|
From: <sv...@va...> - 2006-04-18 22:34:52
|
Author: njn
Date: 2006-04-18 23:34:48 +0100 (Tue, 18 Apr 2006)
New Revision: 5857
Log:
- Fix indentation in one section of Cachegrind
- In the same section, use VG_(percentify) to avoid overflow when computi=
ng
information for -v printing.
Modified:
trunk/cachegrind/cg_main.c
Modified: trunk/cachegrind/cg_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/cg_main.c 2006-04-18 02:04:52 UTC (rev 5856)
+++ trunk/cachegrind/cg_main.c 2006-04-18 22:34:48 UTC (rev 5857)
@@ -1105,7 +1105,7 @@
=20
static void cg_fini(Int exitcode)
{
- static Char buf1[128], buf2[128], buf3[128], fmt [128];
+ static Char buf1[128], buf2[128], buf3[128], buf4[123], fmt[128];
=20
CC D_total;
ULong L2_total_m, L2_total_mr, L2_total_mw,
@@ -1195,29 +1195,35 @@
=20
// Various stats
if (VG_(clo_verbosity) > 1) {
- Int debug_lookups =3D full_debugs + fn_debugs +
- file_line_debugs + no_debugs;
+ Int debug_lookups =3D full_debugs + fn_debugs +
+ file_line_debugs + no_debugs;
=20
- VG_(message)(Vg_DebugMsg, "");
- VG_(message)(Vg_DebugMsg, "cachegrind: distinct files: %d", disti=
nct_files);
- VG_(message)(Vg_DebugMsg, "cachegrind: distinct fns: %d", disti=
nct_fns);
- VG_(message)(Vg_DebugMsg, "cachegrind: distinct lines: %d", disti=
nct_lines);
- VG_(message)(Vg_DebugMsg, "cachegrind: distinct instrs:%d", disti=
nct_instrs);
- VG_(message)(Vg_DebugMsg, "cachegrind: debug lookups : %d", =
debug_lookups);
- VG_(message)(Vg_DebugMsg, "cachegrind: with full info:%3d%% =
(%d)",=20
- full_debugs * 100 / debug_lookups, full_debugs);
- VG_(message)(Vg_DebugMsg, "cachegrind: with file/line info:%3d%% =
(%d)",=20
- file_line_debugs * 100 / debug_lookups, file_line_de=
bugs);
- VG_(message)(Vg_DebugMsg, "cachegrind: with fn name info:%3d%% =
(%d)",=20
- fn_debugs * 100 / debug_lookups, fn_debugs);
- VG_(message)(Vg_DebugMsg, "cachegrind: with zero info:%3d%% =
(%d)",=20
- no_debugs * 100 / debug_lookups, no_debugs);
- VG_(message)(Vg_DebugMsg, "cachegrind: string table size: %u",
- VG_(OSet_Size)(stringTable));
- VG_(message)(Vg_DebugMsg, "cachegrind: CC table size: %u",
- VG_(OSet_Size)(CC_table));
- VG_(message)(Vg_DebugMsg, "cachegrind: InstrInfo table size: %u",
- VG_(OSet_Size)(instrInfoTable));
+ VG_(message)(Vg_DebugMsg, "");
+ VG_(message)(Vg_DebugMsg, "cachegrind: distinct files: %d", distin=
ct_files);
+ VG_(message)(Vg_DebugMsg, "cachegrind: distinct fns: %d", distin=
ct_fns);
+ VG_(message)(Vg_DebugMsg, "cachegrind: distinct lines: %d", distin=
ct_lines);
+ VG_(message)(Vg_DebugMsg, "cachegrind: distinct instrs:%d", distin=
ct_instrs);
+ VG_(message)(Vg_DebugMsg, "cachegrind: debug lookups : %d", d=
ebug_lookups);
+ =20
+ VG_(percentify)(full_debugs, debug_lookups, 1, 6, buf1);
+ VG_(percentify)(file_line_debugs, debug_lookups, 1, 6, buf2);
+ VG_(percentify)(fn_debugs, debug_lookups, 1, 6, buf3);
+ VG_(percentify)(no_debugs, debug_lookups, 1, 6, buf4);
+ VG_(message)(Vg_DebugMsg, "cachegrind: with full info:%s (%d)=
",=20
+ buf1, full_debugs);
+ VG_(message)(Vg_DebugMsg, "cachegrind: with file/line info:%s (%d)=
",=20
+ buf2, file_line_debugs);
+ VG_(message)(Vg_DebugMsg, "cachegrind: with fn name info:%s (%d)=
",=20
+ buf3, fn_debugs);
+ VG_(message)(Vg_DebugMsg, "cachegrind: with zero info:%s (%d)=
",=20
+ buf4, no_debugs);
+
+ VG_(message)(Vg_DebugMsg, "cachegrind: string table size: %u",
+ VG_(OSet_Size)(stringTable));
+ VG_(message)(Vg_DebugMsg, "cachegrind: CC table size: %u",
+ VG_(OSet_Size)(CC_table));
+ VG_(message)(Vg_DebugMsg, "cachegrind: InstrInfo table size: %u",
+ VG_(OSet_Size)(instrInfoTable));
}
}
=20
|