|
From: <sv...@va...> - 2007-09-27 00:01:28
|
Author: njn
Date: 2007-09-27 01:01:21 +0100 (Thu, 27 Sep 2007)
New Revision: 6920
Log:
Show skipped counts with -v.
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/tests/culling1.stderr.exp
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-09-26 23:28:15 UTC (rev 6919)
+++ branches/MASSIF2/massif/ms_main.c 2007-09-27 00:01:21 UTC (rev 6920)
@@ -31,8 +31,6 @@
// XXX:
//---------------------------------------------------------------------------
// Todo:
-// - -v: give more detail on each snapshot -- sizes, etc
-// - -v: print number of skipped snapshots after each one is taken
// - make --time-unit=B include heap-admin bytes
// - Add ability to draw multiple graphs, eg. heap-only, stack-only, total.
// Give each graph a title.
@@ -259,6 +257,7 @@
static UInt n_cullings = 0;
static UInt n_real_snapshots = 0;
static UInt n_skipped_snapshots = 0;
+static UInt n_skipped_snapshots_since_last_snapshot = 0;
//------------------------------------------------------------//
@@ -1128,8 +1127,6 @@
snapshot->time = time;
snapshot->total_szB =
snapshot->heap_szB + snapshot->heap_admin_szB + snapshot->stacks_szB;
-
- // Sanity-check it.
sanity_check_snapshot(snapshot);
// Update peak data -------------------------------------------------
@@ -1139,9 +1136,16 @@
peak_snapshot_total_szB = snapshot->total_szB;
}
+ // Finish up verbosity and stats stuff.
if (VG_(clo_verbosity) > 1) {
+ if (n_skipped_snapshots_since_last_snapshot > 0) {
+ VERB(" (skipped %d snapshot%s)",
+ n_skipped_snapshots_since_last_snapshot,
+ ( n_skipped_snapshots_since_last_snapshot == 1 ? "" : "s") );
+ }
VERB_snapshot(kind, snapshot_i);
}
+ n_skipped_snapshots_since_last_snapshot = 0;
}
@@ -1166,6 +1170,7 @@
time_since_prev = time - time_of_prev_snapshot;
if (time < earliest_possible_time_of_next_snapshot) {
n_skipped_snapshots++;
+ n_skipped_snapshots_since_last_snapshot++;
return;
}
Modified: branches/MASSIF2/massif/tests/culling1.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/culling1.stderr.exp 2007-09-26 23:28:15 UTC (rev 6919)
+++ branches/MASSIF2/massif/tests/culling1.stderr.exp 2007-09-27 00:01:21 UTC (rev 6920)
@@ -208,55 +208,105 @@
Massif: post-cull S. 48 (t:960, hp:960, ad:768, st:0)
Massif: post-cull Sd 49 (t:990, hp:990, ad:792, st:0)
Massif: New time interval = 20 (between snapshots 0 and 1)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 50 (t:1010, hp:1010, ad:808, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 51 (t:1030, hp:1030, ad:824, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 52 (t:1050, hp:1050, ad:840, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 53 (t:1070, hp:1070, ad:856, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 54 (t:1090, hp:1090, ad:872, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 55 (t:1110, hp:1110, ad:888, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 56 (t:1130, hp:1130, ad:904, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 57 (t:1150, hp:1150, ad:920, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 58 (t:1170, hp:1170, ad:936, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc Sd 59 (t:1190, hp:1190, ad:952, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 60 (t:1210, hp:1210, ad:968, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 61 (t:1230, hp:1230, ad:984, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 62 (t:1250, hp:1250, ad:1000, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 63 (t:1270, hp:1270, ad:1016, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 64 (t:1290, hp:1290, ad:1032, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 65 (t:1310, hp:1310, ad:1048, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 66 (t:1330, hp:1330, ad:1064, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 67 (t:1350, hp:1350, ad:1080, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 68 (t:1370, hp:1370, ad:1096, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc Sd 69 (t:1390, hp:1390, ad:1112, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 70 (t:1410, hp:1410, ad:1128, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 71 (t:1430, hp:1430, ad:1144, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 72 (t:1450, hp:1450, ad:1160, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 73 (t:1470, hp:1470, ad:1176, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 74 (t:1490, hp:1490, ad:1192, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 75 (t:1510, hp:1510, ad:1208, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 76 (t:1530, hp:1530, ad:1224, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 77 (t:1550, hp:1550, ad:1240, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 78 (t:1570, hp:1570, ad:1256, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc Sd 79 (t:1590, hp:1590, ad:1272, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 80 (t:1610, hp:1610, ad:1288, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 81 (t:1630, hp:1630, ad:1304, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 82 (t:1650, hp:1650, ad:1320, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 83 (t:1670, hp:1670, ad:1336, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 84 (t:1690, hp:1690, ad:1352, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 85 (t:1710, hp:1710, ad:1368, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 86 (t:1730, hp:1730, ad:1384, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 87 (t:1750, hp:1750, ad:1400, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 88 (t:1770, hp:1770, ad:1416, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc Sd 89 (t:1790, hp:1790, ad:1432, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 90 (t:1810, hp:1810, ad:1448, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 91 (t:1830, hp:1830, ad:1464, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 92 (t:1850, hp:1850, ad:1480, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 93 (t:1870, hp:1870, ad:1496, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 94 (t:1890, hp:1890, ad:1512, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 95 (t:1910, hp:1910, ad:1528, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 96 (t:1930, hp:1930, ad:1544, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 97 (t:1950, hp:1950, ad:1560, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc S. 98 (t:1970, hp:1970, ad:1576, st:0)
+Massif: (skipped 1 snapshot)
Massif: alloc Sd 99 (t:1990, hp:1990, ad:1592, st:0)
Massif: Culling...
Massif: 0 (t-span = 40) S. 1 (t:20, hp:20, ad:16, st:0)
|