• Home
  • Raw
  • Download

Lines Matching refs:bbcc

335 static Bool print_fn_pos(int fd, FnPos* last, BBCC* bbcc)  in print_fn_pos()  argument
339 CLG_ASSERT(bbcc && bbcc->cxt); in print_fn_pos()
343 CLG_(print_cxt)(16, bbcc->cxt, bbcc->rec_index); in print_fn_pos()
347 if (last->rec_index != bbcc->rec_index) { in print_fn_pos()
348 VG_(sprintf)(outbuf, "rec=%d\n\n", bbcc->rec_index); in print_fn_pos()
350 last->rec_index = bbcc->rec_index; in print_fn_pos()
355 if (last->cxt != bbcc->cxt) { in print_fn_pos()
358 fn_node* curr_from = (bbcc->cxt->size >1) ? in print_fn_pos()
359 bbcc->cxt->fn[1] : 0; in print_fn_pos()
372 last->cxt = bbcc->cxt; in print_fn_pos()
376 if (last->obj != bbcc->cxt->fn[0]->file->obj) { in print_fn_pos()
378 print_obj(outbuf+3, bbcc->cxt->fn[0]->file->obj); in print_fn_pos()
380 last->obj = bbcc->cxt->fn[0]->file->obj; in print_fn_pos()
384 if (last->file != bbcc->cxt->fn[0]->file) { in print_fn_pos()
386 print_file(outbuf+3, bbcc->cxt->fn[0]->file); in print_fn_pos()
388 last->file = bbcc->cxt->fn[0]->file; in print_fn_pos()
393 if (last->fn != bbcc->cxt->fn[0]) { in print_fn_pos()
394 print_fn(fd,outbuf, "fn", bbcc->cxt->fn[0]); in print_fn_pos()
395 last->fn = bbcc->cxt->fn[0]; in print_fn_pos()
401 if ((last->rec_index != bbcc->rec_index) || in print_fn_pos()
402 (last->cxt != bbcc->cxt)) { in print_fn_pos()
404 print_mangled_fn(fd, outbuf, "fn", bbcc->cxt, bbcc->rec_index); in print_fn_pos()
405 last->fn = bbcc->cxt->fn[0]; in print_fn_pos()
406 last->rec_index = bbcc->rec_index; in print_fn_pos()
411 last->cxt = bbcc->cxt; in print_fn_pos()
441 Bool get_debug_pos(BBCC* bbcc, Addr addr, AddrPos* p) in get_debug_pos() argument
471 p->file = CLG_(get_file_node)(bbcc->bb->obj, file); in get_debug_pos()
480 p->addr = addr - bbcc->bb->obj->offset; in get_debug_pos()
481 p->bb_addr = bbcc->bb->offset; in get_debug_pos()
484 addr, bb_addr(bbcc->bb), bbcc->cxt->fn[0]->name, in get_debug_pos()
779 static Bool fprint_bbcc(Int fd, BBCC* bbcc, AddrPos* last) in fprint_bbcc() argument
787 BB* bb = bbcc->bb; in fprint_bbcc()
789 CLG_ASSERT(bbcc->cxt != 0); in fprint_bbcc()
792 CLG_(print_bbcc)(15, bbcc); in fprint_bbcc()
799 ecounter = bbcc->ecounter_sum; in fprint_bbcc()
807 if (!get_debug_pos(bbcc, bb_addr(bb) + instr_info->instr_offset, in fprint_bbcc()
810 newCost->p.file = bbcc->cxt->fn[0]->file; in fprint_bbcc()
820 fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file); in fprint_bbcc()
831 (*CLG_(cachesim).add_icost)(currCost->cost, bbcc, instr_info, ecounter); in fprint_bbcc()
836 for(jcc=bbcc->jmp[jmp].jcc_list; jcc; jcc=jcc->next_from) in fprint_bbcc()
844 fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file); in fprint_bbcc()
847 get_debug_pos(bbcc, bb_addr(bb)+instr_info->instr_offset, &(currCost->p)); in fprint_bbcc()
848 fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file); in fprint_bbcc()
850 for(jcc=bbcc->jmp[jmp].jcc_list; jcc; jcc=jcc->next_from) { in fprint_bbcc()
861 ecounter -= bbcc->jmp[jmp].ecounter; in fprint_bbcc()
868 for(jcc=bbcc->jmp[jmp].jcc_list; jcc; jcc=jcc->next_from) { in fprint_bbcc()
875 if ( (bbcc->skipped && in fprint_bbcc()
876 !CLG_(is_zero_cost)(CLG_(sets).full, bbcc->skipped)) || in fprint_bbcc()
881 fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file); in fprint_bbcc()
885 get_debug_pos(bbcc, bb_jmpaddr(bb), &(currCost->p)); in fprint_bbcc()
886 fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file); in fprint_bbcc()
890 if (bbcc->skipped && !CLG_(is_zero_cost)( CLG_(sets).full, in fprint_bbcc()
891 bbcc->skipped )) { in fprint_bbcc()
893 currCost->cost, bbcc->skipped ); in fprint_bbcc()
902 for(jcc=bbcc->jmp[jmp].jcc_list; jcc; jcc=jcc->next_from) { in fprint_bbcc()
915 fprint_apos(fd, &(currCost->p), last, bbcc->cxt->fn[0]->file); in fprint_bbcc()
926 bbcc->ecounter_sum = 0; in fprint_bbcc()
927 for(i=0; i<=bbcc->bb->cjmp_count; i++) in fprint_bbcc()
928 bbcc->jmp[i].ecounter = 0; in fprint_bbcc()
929 bbcc->ret_counter = 0; in fprint_bbcc()
1129 static void hash_addCount(BBCC* bbcc) in hash_addCount() argument
1131 if ((bbcc->ecounter_sum > 0) || (bbcc->ret_counter>0)) in hash_addCount()
1135 static void hash_addPtr(BBCC* bbcc) in hash_addPtr() argument
1137 if ((bbcc->ecounter_sum == 0) && in hash_addPtr()
1138 (bbcc->ret_counter == 0)) return; in hash_addPtr()
1140 *prepare_ptr = bbcc; in hash_addPtr()
1148 BBCC* bbcc; in cs_addCount() local
1160 bbcc = e->jcc->from; in cs_addCount()
1163 i,CLG_(current_tid),bbcc->cxt->fn[0]->name); in cs_addCount()
1165 if (bbcc->ecounter_sum>0 || bbcc->ret_counter>0) { in cs_addCount()
1176 BBCC* bbcc; in cs_addPtr() local
1186 bbcc = e->jcc->from; in cs_addPtr()
1188 if (bbcc->ecounter_sum>0 || bbcc->ret_counter>0) { in cs_addPtr()
1193 *prepare_ptr = bbcc; in cs_addPtr()