Home | History | Annotate | Download | only in callgrind

Lines Matching refs:fn

140 static UWord cxt_hash_val(fn_node** fn, UInt size)
144 while(*fn != 0) {
145 hash = (hash<<7) + (hash>>25) + (UWord)(*fn);
146 fn--;
154 static Bool is_cxt(UWord hash, fn_node** fn, Context* cxt)
162 cxt_fn = &(cxt->fn[0]);
163 while((*fn != 0) && (count>0)) {
164 if (*cxt_fn != *fn) return False;
165 fn--;
175 static Context* new_cxt(fn_node** fn)
183 CLG_ASSERT(fn);
184 top_fn = *fn;
203 while(*fn != 0) {
204 hash = (hash<<7) + (hash>>25) + (UWord)(*fn);
205 cxt->fn[offset] = *fn;
207 fn--;
235 Context* CLG_(get_cxt)(fn_node** fn)
241 CLG_ASSERT(fn != 0);
242 if (*fn == 0) return 0;
243 size = (*fn)->separate_callers+1;
246 CLG_DEBUG(5, "+ get_cxt(fn '%s'): size %d\n",
247 (*fn)->name, size);
249 hash = cxt_hash_val(fn, size);
251 if ( ((cxt = (*fn)->last_cxt) != 0) && is_cxt(hash, fn, cxt)) {
262 if (is_cxt(hash,fn,cxt)) break;
267 cxt = new_cxt(fn);
269 (*fn)->last_cxt = cxt;
281 void CLG_(push_cxt)(fn_node* fn)
286 CLG_DEBUG(5, "+ push_cxt(fn '%s'): old ctx %d\n",
287 fn ? fn->name : (Char*)"0x0",
297 if (fn && (*(CLG_(current_fn_stack).top) == fn)) return;
298 if (fn && (fn->group>0) &&
299 ((*(CLG_(current_fn_stack).top))->group == fn->group)) return;
316 fn ? fn->name : (Char*)"0x0");
321 if (fn && (*(CLG_(current_fn_stack).top) == 0)) {
325 pactive = CLG_(get_fn_entry)(fn->number);
330 *(CLG_(current_fn_stack).top) = fn;
333 CLG_DEBUG(5, "- push_cxt(fn '%s'): new cxt %d, fn_sp %ld\n",
334 fn ? fn->name : (Char*)"0x0",