• Home
  • Raw
  • Download

Lines Matching refs:CLG_

48 FullCost CLG_(total_cost) = 0;
51 EventMapping* CLG_(dumpmap) = 0;
53 Int CLG_(get_dump_counter)(void) in CLG_() function
84 dump_array_size = CLG_(stat).distinct_objs + in init_dump_array()
85 CLG_(stat).distinct_files + in init_dump_array()
86 CLG_(stat).distinct_fns + in init_dump_array()
87 CLG_(stat).context_counter; in init_dump_array()
92 file_dumped = obj_dumped + CLG_(stat).distinct_objs; in init_dump_array()
93 fn_dumped = file_dumped + CLG_(stat).distinct_files; in init_dump_array()
94 cxt_dumped = fn_dumped + CLG_(stat).distinct_fns; in init_dump_array()
129 if (CLG_(clo).compress_strings) { in print_obj()
155 if (CLG_(clo).compress_strings) { in print_file()
174 if (CLG_(clo).compress_strings) { in print_fn()
192 if (CLG_(clo).compress_strings && CLG_(clo).compress_mangled) { in print_mangled_fn()
235 if (CLG_(clo).compress_strings) { in print_mangled_fn()
271 CLG_(print_cxt)(16, bbcc->cxt, bbcc->rec_index); in print_fn_pos()
274 if (!CLG_(clo).mangle_names) { in print_fn_pos()
314 if (!CLG_(clo).mangle_names) { in print_fn_pos()
384 p->file = CLG_(get_file_node)(bbcc->bb->obj, dir, file); in get_debug_pos()
426 c->cost = CLG_(get_eventset_cost)( CLG_(sets).full ); in init_fcost()
427 CLG_(init_cost)( CLG_(sets).full, c->cost ); in init_fcost()
452 if (CLG_(clo).dump_bbs) { in fprint_apos()
473 if (CLG_(clo).dump_instr) { in fprint_pos()
475 if ( CLG_(clo).compress_pos && (last->addr >0) && in fprint_pos()
488 if (CLG_(clo).dump_bb) { in fprint_pos()
490 if ( CLG_(clo).compress_pos && (last->bb_addr >0) && in fprint_pos()
503 if (CLG_(clo).dump_line) { in fprint_pos()
505 if ( CLG_(clo).compress_pos && (last->line >0) && in fprint_pos()
529 HChar *mcost = CLG_(mappingcost_as_string)(es, cost); in fprint_cost()
546 CLG_(print_cost)(-5, CLG_(sets).full, c->cost); in fprint_fcost()
552 fprint_cost(fp, CLG_(dumpmap), c->cost); in fprint_fcost()
555 CLG_(add_and_zero_cost)( CLG_(sets).full, dump_total_cost, c->cost ); in fprint_fcost()
570 CLG_(print_jcc)(-10, jcc); in fprint_jcc()
584 CLG_ASSERT(CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost)); in fprint_jcc()
593 if (!CLG_(clo).dump_instr && !CLG_(clo).dump_bb && target.line==0) { in fprint_jcc()
606 if (CLG_(clo).mangle_names) in fprint_jcc()
646 if (CLG_(clo).mangle_names) in fprint_jcc()
651 if (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost)) { in fprint_jcc()
658 fprint_cost(fp, CLG_(dumpmap), jcc->cost); in fprint_jcc()
660 CLG_(init_cost)( CLG_(sets).full, jcc->cost ); in fprint_jcc()
693 CLG_(print_bbcc)(15, bbcc); in fprint_bbcc()
714 if (CLG_(clo).dump_bbs || CLG_(clo).dump_instr || in fprint_bbcc()
718 if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) { in fprint_bbcc()
732 (*CLG_(cachesim).add_icost)(currCost->cost, bbcc, instr_info, ecounter); in fprint_bbcc()
739 (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost ))) in fprint_bbcc()
743 if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) { in fprint_bbcc()
753 (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost ))) in fprint_bbcc()
772 (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost ))) in fprint_bbcc()
777 !CLG_(is_zero_cost)(CLG_(sets).full, bbcc->skipped)) || in fprint_bbcc()
780 if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) { in fprint_bbcc()
791 if (bbcc->skipped && !CLG_(is_zero_cost)( CLG_(sets).full, in fprint_bbcc()
793 CLG_(add_and_zero_cost)( CLG_(sets).full, in fprint_bbcc()
805 (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost ))) in fprint_bbcc()
811 if (CLG_(clo).dump_bbs || CLG_(clo).dump_bb) { in fprint_bbcc()
812 if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) { in fprint_bbcc()
818 if (CLG_(clo).dump_bbs) VG_(fprintf)(fp, "\n"); in fprint_bbcc()
910 static void CLG_(qsort)(BBCC **a, int n, int (*cmp)(BBCC**,BBCC**)) in CLG_() function
928 CLG_(print_cxt)(9, (*pm)->cxt, (*pm)->rec_index); in CLG_()
981 CLG_(print_cxt)(9, (*pv)->cxt, (*pv)->rec_index); in CLG_()
992 CLG_(print_cxt)(9, (*pm)->cxt, (*pm)->rec_index); in CLG_()
1004 CLG_(print_cxt)(9, (*pm)->cxt, (*pm)->rec_index); in CLG_()
1008 if ((s = pb+1-pa) > 1) CLG_(qsort)(a, s, cmp); in CLG_()
1009 if ((s = pd+1-pc) > 1) CLG_(qsort)(a+n-s, s, cmp); in CLG_()
1044 for(i = 0; i < CLG_(current_call_stack).sp; i++) { in cs_addCount()
1045 call_entry* e = &(CLG_(current_call_stack).entry[i]); in cs_addCount()
1048 CLG_(add_diff_cost_lz)( CLG_(sets).full, &(e->jcc->cost), in cs_addCount()
1049 e->enter_cost, CLG_(current_state).cost); in cs_addCount()
1053 i,CLG_(current_tid),bbcc->cxt->fn[0]->name); in cs_addCount()
1072 for(i = 0; i < CLG_(current_call_stack).sp; i++) { in cs_addPtr()
1073 call_entry* e = &(CLG_(current_call_stack).entry[i]); in cs_addPtr()
1103 CLG_(forall_bbccs)(hash_addCount); in prepare_dump()
1107 if (CLG_(clo).separate_threads) in prepare_dump()
1110 CLG_(forall_threads)(cs_addCount); in prepare_dump()
1119 CLG_(forall_bbccs)(hash_addPtr); in prepare_dump()
1121 if (CLG_(clo).separate_threads) in prepare_dump()
1124 CLG_(forall_threads)(cs_addPtr); in prepare_dump()
1134 CLG_(qsort)(array, prepare_count, my_cmp); in prepare_dump()
1147 HChar *mcost = CLG_(mappingcost_as_string)(em, cost); in fprint_cost_ln()
1183 if (!CLG_(clo).combine_dumps) { in new_dumpfile()
1189 if (CLG_(clo).separate_threads) in new_dumpfile()
1235 if (CLG_(clo).separate_threads) { in new_dumpfile()
1246 CLG_(clo).skip_plt ? "yes" : "no"); in new_dumpfile()
1248 CLG_(clo).collect_jumps ? "yes" : "no"); in new_dumpfile()
1250 CLG_(clo).separate_recursions); in new_dumpfile()
1252 CLG_(clo).separate_callers); in new_dumpfile()
1255 CLG_(clo).dump_bbs ? "yes" : "no"); in new_dumpfile()
1257 CLG_(clo).separate_threads ? "yes" : "no"); in new_dumpfile()
1260 (*CLG_(cachesim).dump_desc)(fp); in new_dumpfile()
1264 bbs_done, CLG_(stat).bb_executions); in new_dumpfile()
1286 if (fnc->separate_callers != CLG_(clo).separate_callers) { in new_dumpfile()
1290 if (fnc->separate_recursions != CLG_(clo).separate_recursions) { in new_dumpfile()
1301 CLG_(clo).dump_instr ? " instr" : "", in new_dumpfile()
1302 CLG_(clo).dump_bb ? " bb" : "", in new_dumpfile()
1303 CLG_(clo).dump_line ? " line" : ""); in new_dumpfile()
1306 HChar *evmap = CLG_(eventmapping_as_string)(CLG_(dumpmap)); in new_dumpfile()
1311 sum = CLG_(get_eventset_cost)( CLG_(sets).full ); in new_dumpfile()
1312 CLG_(zero_cost)(CLG_(sets).full, sum); in new_dumpfile()
1313 if (CLG_(clo).separate_threads) { in new_dumpfile()
1314 thread_info* ti = CLG_(get_current_thread)(); in new_dumpfile()
1315 CLG_(add_diff_cost)(CLG_(sets).full, sum, ti->lastdump_cost, in new_dumpfile()
1324 thread_info** thr = CLG_(get_threads)(); in new_dumpfile()
1327 CLG_(add_diff_cost)(CLG_(sets).full, sum, in new_dumpfile()
1332 fprint_cost_ln(fp, "summary: ", CLG_(dumpmap), sum); in new_dumpfile()
1335 CLG_(init_cost_lz)( CLG_(sets).full, &dump_total_cost ); in new_dumpfile()
1350 fprint_cost_ln(fp, "totals: ", CLG_(dumpmap), in close_dumpfile()
1353 CLG_(add_cost_lz)(CLG_(sets).full, in close_dumpfile()
1354 &CLG_(total_cost), dump_total_cost); in close_dumpfile()
1378 CLG_DEBUG(1, "+ print_bbccs(tid %u)\n", CLG_(current_tid)); in print_bbccs_of_thread()
1380 VgFile *print_fp = new_dumpfile(CLG_(current_tid), print_trigger); in print_bbccs_of_thread()
1382 CLG_DEBUG(1, "- print_bbccs(tid %u): No output...\n", CLG_(current_tid)); in print_bbccs_of_thread()
1396 if (!CLG_(is_zero_cost)( CLG_(sets).full, ccSum[currSum].cost )) { in print_bbccs_of_thread()
1421 if (CLG_(clo).dump_bbs) { in print_bbccs_of_thread()
1446 CLG_(copy_cost)( CLG_(sets).full, ti->lastdump_cost, in print_bbccs_of_thread()
1447 CLG_(current_state).cost ); in print_bbccs_of_thread()
1449 CLG_DEBUG(1, "- print_bbccs(tid %u)\n", CLG_(current_tid)); in print_bbccs_of_thread()
1460 if (!CLG_(clo).separate_threads) { in print_bbccs()
1462 Int orig_tid = CLG_(current_tid); in print_bbccs()
1464 CLG_(switch_thread)(1); in print_bbccs()
1465 print_bbccs_of_thread( CLG_(get_current_thread)() ); in print_bbccs()
1466 CLG_(switch_thread)(orig_tid); in print_bbccs()
1469 print_bbccs_of_thread( CLG_(get_current_thread)() ); in print_bbccs()
1471 CLG_(forall_threads)(print_bbccs_of_thread); in print_bbccs()
1477 void CLG_(dump_profile)(const HChar* trigger, Bool only_current_thread) in CLG_() function
1482 CLG_(init_dumps)(); in CLG_()
1486 CLG_(stat).bb_executions, in CLG_()
1493 bbs_done = CLG_(stat).bb_executions++; in CLG_()
1565 void CLG_(init_dumps)() in CLG_() function
1578 if (!CLG_(clo).out_format) in CLG_()
1579 CLG_(clo).out_format = DEFAULT_OUTFORMAT; in CLG_()
1590 VG_(expand_file_name)("--callgrind-out-file", CLG_(clo).out_format); in CLG_()