Home | History | Annotate | Download | only in callgrind

Lines Matching refs:fn

133 static UWord cxt_hash_val(fn_node** fn, UInt size)
137 while(*fn != 0) {
138 hash = (hash<<7) + (hash>>25) + (UWord)(*fn);
139 fn--;
147 static Bool is_cxt(UWord hash, fn_node** fn, Context* cxt)
155 cxt_fn = &(cxt->fn[0]);
156 while((*fn != 0) && (count>0)) {
157 if (*cxt_fn != *fn) return False;
158 fn--;
168 static Context* new_cxt(fn_node** fn)
176 CLG_ASSERT(fn);
177 top_fn = *fn;
196 while(*fn != 0) {
197 hash = (hash<<7) + (hash>>25) + (UWord)(*fn);
198 cxt->fn[offset] = *fn;
200 fn--;
228 Context* CLG_(get_cxt)(fn_node** fn)
234 CLG_ASSERT(fn != 0);
235 if (*fn == 0) return 0;
236 size = (*fn)->separate_callers+1;
239 CLG_DEBUG(5, "+ get_cxt(fn '%s'): size %u\n",
240 (*fn)->name, size);
242 hash = cxt_hash_val(fn, size);
244 if ( ((cxt = (*fn)->last_cxt) != 0) && is_cxt(hash, fn, cxt)) {
255 if (is_cxt(hash,fn,cxt)) break;
260 cxt = new_cxt(fn);
262 (*fn)->last_cxt = cxt;
274 void CLG_(push_cxt)(fn_node* fn)
279 CLG_DEBUG(5, "+ push_cxt(fn '%s'): old ctx %d\n",
280 fn ? fn->name : "0x0",
290 if (fn && (*(CLG_(current_fn_stack).top) == fn)) return;
291 if (fn && (fn->group>0) &&
292 ((*(CLG_(current_fn_stack).top))->group == fn->group)) return;
309 fn ? fn->name : "0x0");
314 if (fn && (*(CLG_(current_fn_stack).top) == 0)) {
318 pactive = CLG_(get_fn_entry)(fn->number);
323 *(CLG_(current_fn_stack).top) = fn;
326 CLG_DEBUG(5, "- push_cxt(fn '%s'): new cxt %d, fn_sp %ld\n",
327 fn ? fn->name : "0x0",