Home | History | Annotate | Download | only in callgrind

Lines Matching refs:CLG_

48 FullCost CLG_(total_cost) = 0;
51 EventMapping* CLG_(dumpmap) = 0;
53 Int CLG_(get_dump_counter)(void)
84 dump_array_size = CLG_(stat).distinct_objs +
85 CLG_(stat).distinct_files +
86 CLG_(stat).distinct_fns +
87 CLG_(stat).context_counter;
92 file_dumped = obj_dumped + CLG_(stat).distinct_objs;
93 fn_dumped = file_dumped + CLG_(stat).distinct_files;
94 cxt_dumped = fn_dumped + CLG_(stat).distinct_fns;
129 if (CLG_(clo).compress_strings) {
155 if (CLG_(clo).compress_strings) {
174 if (CLG_(clo).compress_strings) {
192 if (CLG_(clo).compress_strings && CLG_(clo).compress_mangled) {
235 if (CLG_(clo).compress_strings) {
271 CLG_(print_cxt)(16, bbcc->cxt, bbcc->rec_index);
274 if (!CLG_(clo).mangle_names) {
314 if (!CLG_(clo).mangle_names) {
384 p->file = CLG_(get_file_node)(bbcc->bb->obj, dir, file);
426 c->cost = CLG_(get_eventset_cost)( CLG_(sets).full );
427 CLG_(init_cost)( CLG_(sets).full, c->cost );
452 if (CLG_(clo).dump_bbs) {
470 if (0) //CLG_(clo).dump_bbs)
473 if (CLG_(clo).dump_instr) {
475 if ( CLG_(clo).compress_pos && (last->addr >0) &&
488 if (CLG_(clo).dump_bb) {
490 if ( CLG_(clo).compress_pos && (last->bb_addr >0) &&
503 if (CLG_(clo).dump_line) {
505 if ( CLG_(clo).compress_pos && (last->line >0) &&
529 HChar *mcost = CLG_(mappingcost_as_string)(es, cost);
546 CLG_(print_cost)(-5, CLG_(sets).full, c->cost);
552 fprint_cost(fp, CLG_(dumpmap), c->cost);
555 CLG_(add_and_zero_cost)( CLG_(sets).full, dump_total_cost, c->cost );
570 CLG_(print_jcc)(-10, jcc);
584 CLG_ASSERT(CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost));
593 if (!CLG_(clo).dump_instr && !CLG_(clo).dump_bb && target.line==0) {
606 if (CLG_(clo).mangle_names)
646 if (CLG_(clo).mangle_names)
651 if (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost)) {
658 fprint_cost(fp, CLG_(dumpmap), jcc->cost);
660 CLG_(init_cost)( CLG_(sets).full, jcc->cost );
693 CLG_(print_bbcc)(15, bbcc);
706 * if CLG_(clo).dump_bbs or file/line has changed
714 if (CLG_(clo).dump_bbs || CLG_(clo).dump_instr ||
718 if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) {
732 (*CLG_(cachesim).add_icost)(currCost->cost, bbcc, instr_info, ecounter);
739 (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
743 if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) {
753 (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
772 (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
777 !CLG_(is_zero_cost)(CLG_(sets).full, bbcc->skipped)) ||
780 if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) {
791 if (bbcc->skipped && !CLG_(is_zero_cost)( CLG_(sets).full,
793 CLG_(add_and_zero_cost)( CLG_(sets).full,
805 (!CLG_(is_zero_cost)( CLG_(sets).full, jcc->cost )))
811 if (CLG_(clo).dump_bbs || CLG_(clo).dump_bb) {
812 if (!CLG_(is_zero_cost)( CLG_(sets).full, currCost->cost )) {
818 if (CLG_(clo).dump_bbs) VG_(fprintf)(fp, "\n");
910 static void CLG_(qsort)(BBCC **a, int n, int (*cmp)(BBCC**,BBCC**))
928 CLG_(print_cxt)(9, (*pm)->cxt, (*pm)->rec_index);
981 CLG_(print_cxt)(9, (*pv)->cxt, (*pv)->rec_index);
992 CLG_(print_cxt)(9, (*pm)->cxt, (*pm)->rec_index);
1004 CLG_(print_cxt)(9, (*pm)->cxt, (*pm)->rec_index);
1008 if ((s = pb+1-pa) > 1) CLG_(qsort)(a, s, cmp);
1009 if ((s = pd+1-pc) > 1) CLG_(qsort)(a+n-s, s, cmp);
1044 for(i = 0; i < CLG_(current_call_stack).sp; i++) {
1045 call_entry* e = &(CLG_(current_call_stack).entry[i]);
1048 CLG_(add_diff_cost_lz)( CLG_(sets).full, &(e->jcc->cost),
1049 e->enter_cost, CLG_(current_state).cost);
1053 i,CLG_(current_tid),bbcc->cxt->fn[0]->name);
1072 for(i = 0; i < CLG_(current_call_stack).sp; i++) {
1073 call_entry* e = &(CLG_(current_call_stack).entry[i]);
1103 CLG_(forall_bbccs)(hash_addCount);
1107 if (CLG_(clo).separate_threads)
1110 CLG_(forall_threads)(cs_addCount);
1119 CLG_(forall_bbccs)(hash_addPtr);
1121 if (CLG_(clo).separate_threads)
1124 CLG_(forall_threads)(cs_addPtr);
1134 CLG_(qsort)(array, prepare_count, my_cmp);
1147 HChar *mcost = CLG_(mappingcost_as_string)(em, cost);
1167 * Naming: <CLG_(clo).filename_base>.<pid>[.<part>][-<tid>]
1169 * <tid> is skipped for thread 1 with CLG_(clo).separate_threads=no
1183 if (!CLG_(clo).combine_dumps) {
1189 if (CLG_(clo).separate_threads)
1232 if (CLG_(clo).separate_threads) {
1243 CLG_(clo).skip_plt ? "yes" : "no");
1245 CLG_(clo).collect_jumps ? "yes" : "no");
1247 CLG_(clo).separate_recursions);
1249 CLG_(clo).separate_callers);
1252 CLG_(clo).dump_bbs ? "yes" : "no");
1254 CLG_(clo).separate_threads ? "yes" : "no");
1257 (*CLG_(cachesim).dump_desc)(fp);
1261 bbs_done, CLG_(stat).bb_executions);
1283 if (fnc->separate_callers != CLG_(clo).separate_callers) {
1287 if (fnc->separate_recursions != CLG_(clo).separate_recursions) {
1298 CLG_(clo).dump_instr ? " instr" : "",
1299 CLG_(clo).dump_bb ? " bb" : "",
1300 CLG_(clo).dump_line ? " line" : "");
1303 HChar *evmap = CLG_(eventmapping_as_string)(CLG_(dumpmap));
1308 sum = CLG_(get_eventset_cost)( CLG_(sets).full );
1309 CLG_(zero_cost)(CLG_(sets).full, sum);
1310 if (CLG_(clo).separate_threads) {
1311 thread_info* ti = CLG_(get_current_thread)();
1312 CLG_(add_diff_cost)(CLG_(sets).full, sum, ti->lastdump_cost,
1321 thread_info** thr = CLG_(get_threads)();
1324 CLG_(add_diff_cost)(CLG_(sets).full, sum,
1329 fprint_cost_ln(fp, "summary: ", CLG_(dumpmap), sum);
1332 CLG_(init_cost_lz)( CLG_(sets).full, &dump_total_cost );
1347 fprint_cost_ln(fp, "totals: ", CLG_(dumpmap),
1350 CLG_(add_cost_lz)(CLG_(sets).full,
1351 &CLG_(total_cost), dump_total_cost);
1375 CLG_DEBUG(1, "+ print_bbccs(tid %u)\n", CLG_(current_tid));
1377 VgFile *print_fp = new_dumpfile(CLG_(current_tid), print_trigger);
1379 CLG_DEBUG(1, "- print_bbccs(tid %u): No output...\n", CLG_(current_tid));
1393 if (!CLG_(is_zero_cost)( CLG_(sets).full, ccSum[currSum].cost )) {
1418 if (CLG_(clo).dump_bbs) {
1443 CLG_(copy_cost)( CLG_(sets).full, ti->lastdump_cost,
1444 CLG_(current_state).cost );
1446 CLG_DEBUG(1, "- print_bbccs(tid %u)\n", CLG_(current_tid));
1457 if (!CLG_(clo).separate_threads) {
1459 Int orig_tid = CLG_(current_tid);
1461 CLG_(switch_thread)(1);
1462 print_bbccs_of_thread( CLG_(get_current_thread)() );
1463 CLG_(switch_thread)(orig_tid);
1466 print_bbccs_of_thread( CLG_(get_current_thread)() );
1468 CLG_(forall_threads)(print_bbccs_of_thread);
1474 void CLG_(dump_profile)(const HChar* trigger, Bool only_current_thread)
1479 CLG_(init_dumps)();
1483 CLG_(stat).bb_executions,
1490 bbs_done = CLG_(stat).bb_executions++;
1562 void CLG_(init_dumps)()
1575 if (!CLG_(clo).out_format)
1576 CLG_(clo).out_format = DEFAULT_OUTFORMAT;
1587 VG_(expand_file_name)("--callgrind-out-file", CLG_(clo).out_format);