Home | History | Annotate | Download | only in callgrind

Lines Matching refs:CLG_

46 call_stack CLG_(current_call_stack);
48 void CLG_(init_call_stack)(call_stack* s)
63 call_entry* CLG_(get_call_entry)(Int sp)
65 CLG_ASSERT(sp <= CLG_(current_call_stack).sp);
66 return &(CLG_(current_call_stack).entry[sp]);
69 void CLG_(copy_current_call_stack)(call_stack* dst)
73 dst->size = CLG_(current_call_stack).size;
74 dst->entry = CLG_(current_call_stack).entry;
75 dst->sp = CLG_(current_call_stack).sp;
78 void CLG_(set_current_call_stack)(call_stack* s)
82 CLG_(current_call_stack).size = s->size;
83 CLG_(current_call_stack).entry = s->entry;
84 CLG_(current_call_stack).sp = s->sp;
92 call_stack *cs = &CLG_(current_call_stack);
107 CLG_(stat).call_stack_resizes++;
111 CLG_(current_call_stack).size);
123 Int old = CLG_(clo).verbose;
124 CLG_(clo).verbose = fn->verbosity;
128 fn->name, CLG_(clo).verbose);
135 CLG_(dump_profile)(trigger, True);
138 CLG_(zero_all_cost)(True);
142 CLG_(current_state).collect = !CLG_(current_state).collect;
145 CLG_(current_state).collect ? "ON" : "OFF");
157 CLG_(dump_profile)(trigger, True);
160 CLG_(current_state).collect = !CLG_(current_state).collect;
163 CLG_(current_state).collect ? "ON" : "OFF");
168 Int old = CLG_(clo).verbose;
169 CLG_(clo).verbose = fn->verbosity;
173 fn->name, CLG_(clo).verbose);
186 void CLG_(push_call_stack)(BBCC* from, UInt jmp, BBCC* to, Addr sp, Bool skip)
197 ensure_stack_size(CLG_(current_call_stack).sp +1);
198 current_entry = &(CLG_(current_call_stack).entry[CLG_(current_call_stack).sp]);
206 if (CLG_(current_state).nonskipped) {
208 CLG_ASSERT(CLG_(current_state).nonskipped == from);
214 CLG_(copy_cost_lz)( CLG_(sets).full, &(current_entry->enter_cost),
215 CLG_(current_state).cost );
217 jcc = CLG_(get_jcc)(from, jmp, to);
220 pdepth = CLG_(get_fn_entry)(to_fn->number);
221 if (CLG_(clo).skip_direct_recursion) {
228 CLG_(stat).rec_call_counter++;
231 CLG_(stat).call_counter++;
251 current_entry->nonskipped = CLG_(current_state).nonskipped;
253 CLG_(current_call_stack).sp++;
256 CLG_ASSERT(CLG_(current_call_stack).sp < CLG_(current_call_stack).size);
261 CLG_(current_state).nonskipped = 0;
262 else if (!CLG_(current_state).nonskipped) {
264 CLG_(current_state).nonskipped = from;
265 if (!CLG_(current_state).nonskipped->skipped) {
266 CLG_(init_cost_lz)( CLG_(sets).full,
267 &CLG_(current_state).nonskipped->skipped);
268 CLG_(stat).distinct_skips++;
274 if (CLG_(clo).verbose<2) {
282 int s = CLG_(current_call_stack).sp;
294 else if (CLG_(clo).verbose<4) {
295 VG_(printf)("+ %2d ", CLG_(current_call_stack).sp);
296 CLG_(print_short_jcc)(jcc);
301 CLG_(print_stackentry)(3, CLG_(current_call_stack).sp-1);
314 void CLG_(pop_call_stack)()
320 if (CLG_(current_state).sig >0) {
323 CLG_(run_post_signal_on_call_stack_bottom)();
327 &(CLG_(current_call_stack).entry[CLG_(current_call_stack).sp-1]);
330 CLG_(current_call_stack).sp, lower_entry->jcc);
334 CLG_(current_state).nonskipped = lower_entry->nonskipped;
338 UInt* pdepth = CLG_(get_fn_entry)(to_fn->number);
339 if (CLG_(clo).skip_direct_recursion) {
347 if ( CLG_(add_diff_cost_lz)( CLG_(sets).full, &(jcc->cost),
349 CLG_(current_state).cost) ) {
356 CLG_(stat).ret_counter++;
359 CLG_(current_state).cxt = lower_entry->cxt;
360 CLG_(current_fn_stack).top =
361 CLG_(current_fn_stack).bottom + lower_entry->fn_sp;
362 CLG_ASSERT(CLG_(current_state).cxt != 0);
370 CLG_(current_call_stack).sp--;
374 if (CLG_(clo).verbose<4) {
378 CLG_(current_call_stack).sp,
380 CLG_(print_addr)(bb_jmpaddr(jcc->from->bb));
382 CLG_(current_call_stack).entry[CLG_(current_call_stack).sp].sp);
383 CLG_(print_cost)(10, CLG_(sets).full, jcc->cost);
387 CLG_(current_call_stack).sp,
388 CLG_(current_call_stack).entry[CLG_(current_call_stack).sp].sp);
392 CLG_(print_stackentry)(7, CLG_(current_call_stack).sp);
395 CLG_(print_addr_ln)(bb_jmpaddr(jcc->from->bb));
407 Int CLG_(unwind_call_stack)(Addr sp, Int minpops)
412 sp, minpops, CLG_(current_call_stack).sp);
420 while( (csp=CLG_(current_call_stack).sp) >0) {
421 call_entry* top_ce = &(CLG_(current_call_stack).entry[csp-1]);
428 CLG_(pop_call_stack)();
429 csp=CLG_(current_call_stack).sp;