|
From: <sv...@va...> - 2007-09-22 07:15:26
|
Author: njn
Date: 2007-09-22 08:15:28 +0100 (Sat, 22 Sep 2007)
New Revision: 6900
Log:
Improve stats gathering slightly.
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/tests/culling1.stderr.exp
branches/MASSIF2/massif/tests/culling2.stderr.exp
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-09-22 06:23:07 UTC (rev 6899)
+++ branches/MASSIF2/massif/ms_main.c 2007-09-22 07:15:28 UTC (rev 6900)
@@ -233,17 +233,18 @@
// - 15,000 XPts 800,000 XPts
// - 1,800 top-XPts
-static UInt n_xpts = 0;
-static UInt n_dupd_xpts = 0;
-static UInt n_dupd_xpts_freed = 0;
-static UInt n_allocs = 0;
-static UInt n_zero_allocs = 0;
-static UInt n_frees = 0;
-static UInt n_xpt_expansions = 0;
-static UInt n_getXCon_redo = 0;
-static UInt n_cullings = 0;
-static UInt n_real_snapshots = 0;
-static UInt n_skipped_snapshots = 0;
+static UInt n_xpts = 0;
+static UInt n_dupd_xpts = 0;
+static UInt n_dupd_xpts_freed = 0;
+static UInt n_allocs = 0;
+static UInt n_zero_allocs = 0;
+static UInt n_frees = 0;
+static UInt n_xpt_init_expansions = 0;
+static UInt n_xpt_later_expansions = 0;
+static UInt n_getXCon_redo = 0;
+static UInt n_cullings = 0;
+static UInt n_real_snapshots = 0;
+static UInt n_skipped_snapshots = 0;
//------------------------------------------------------------//
@@ -516,12 +517,13 @@
if (parent->max_children == 0) {
parent->max_children = 4;
parent->children = VG_(malloc)( parent->max_children * sizeof(XPt*) );
+ n_xpt_init_expansions++;
} else {
parent->max_children *= 2; // Double size
parent->children = VG_(realloc)( parent->children,
parent->max_children * sizeof(XPt*) );
+ n_xpt_later_expansions++;
}
- n_xpt_expansions++;
}
// Insert new child XPt in parent's children list.
@@ -1662,22 +1664,23 @@
// Stats
if (VG_(clo_verbosity) > 1) {
tl_assert(n_xpts > 0); // always have alloc_xpt
- VERB("allocs: %u", n_allocs);
- VERB("zeroallocs: %u (%d%%)",
+ VERB("allocs: %u", n_allocs);
+ VERB("zeroallocs: %u (%d%%)",
n_zero_allocs,
( n_allocs ? n_zero_allocs * 100 / n_allocs : 0 ));
- VERB("frees: %u", n_frees);
- VERB("XPts: %u", n_xpts);
- VERB("top-XPts: %u (%d%%)",
+ VERB("frees: %u", n_frees);
+ VERB("XPts: %u", n_xpts);
+ VERB("top-XPts: %u (%d%%)",
alloc_xpt->n_children,
( n_xpts ? alloc_xpt->n_children * 100 / n_xpts : 0));
- VERB("dup'd XPts: %u", n_dupd_xpts);
- VERB("dup'd/freed XPts: %u", n_dupd_xpts_freed);
- VERB("XPt-expansions: %u", n_xpt_expansions);
- VERB("skipped snapshots: %u", n_skipped_snapshots);
- VERB("real snapshots: %u", n_real_snapshots);
- VERB("cullings: %u", n_cullings);
- VERB("XCon_redos: %u", n_getXCon_redo);
+ VERB("dup'd XPts: %u", n_dupd_xpts);
+ VERB("dup'd/freed XPts: %u", n_dupd_xpts_freed);
+ VERB("XPt-init-expansions: %u", n_xpt_init_expansions);
+ VERB("XPt-later-expansions: %u", n_xpt_later_expansions);
+ VERB("skipped snapshots: %u", n_skipped_snapshots);
+ VERB("real snapshots: %u", n_real_snapshots);
+ VERB("cullings: %u", n_cullings);
+ VERB("XCon_redos: %u", n_getXCon_redo);
}
}
Modified: branches/MASSIF2/massif/tests/culling1.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/culling1.stderr.exp 2007-09-22 06:23:07 UTC (rev 6899)
+++ branches/MASSIF2/massif/tests/culling1.stderr.exp 2007-09-22 07:15:28 UTC (rev 6900)
@@ -361,15 +361,16 @@
Massif: post-cull snapshot 48 (t = 1950 B)
Massif: post-cull snapshot 49 (t = 1990 B) (detailed)
Massif: New time interval = 40 (between snapshots 0 and 1)
-Massif: allocs: 200
-Massif: zeroallocs: 0 (0%)
-Massif: frees: 0
-Massif: XPts: 2
-Massif: top-XPts: 1 (50%)
-Massif: dup'd XPts: 30
-Massif: dup'd/freed XPts: 18
-Massif: XPt-expansions: 1
-Massif: skipped snapshots: 51
-Massif: real snapshots: 150
-Massif: cullings: 2
-Massif: XCon_redos: 0
+Massif: allocs: 200
+Massif: zeroallocs: 0 (0%)
+Massif: frees: 0
+Massif: XPts: 2
+Massif: top-XPts: 1 (50%)
+Massif: dup'd XPts: 30
+Massif: dup'd/freed XPts: 18
+Massif: XPt-init-expansions: 1
+Massif: XPt-later-expansions: 0
+Massif: skipped snapshots: 51
+Massif: real snapshots: 150
+Massif: cullings: 2
+Massif: XCon_redos: 0
Modified: branches/MASSIF2/massif/tests/culling2.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/culling2.stderr.exp 2007-09-22 06:23:07 UTC (rev 6899)
+++ branches/MASSIF2/massif/tests/culling2.stderr.exp 2007-09-22 07:15:28 UTC (rev 6900)
@@ -514,15 +514,16 @@
Massif: post-cull snapshot 48 (t = 19110 B)
Massif: post-cull snapshot 49 (t = 19701 B) (detailed)
Massif: New time interval = 284 (between snapshots 1 and 2)
-Massif: allocs: 200
-Massif: zeroallocs: 1 (0%)
-Massif: frees: 0
-Massif: XPts: 2
-Massif: top-XPts: 1 (50%)
-Massif: dup'd XPts: 40
-Massif: dup'd/freed XPts: 38
-Massif: XPt-expansions: 1
-Massif: skipped snapshots: 1
-Massif: real snapshots: 200
-Massif: cullings: 3
-Massif: XCon_redos: 0
+Massif: allocs: 200
+Massif: zeroallocs: 1 (0%)
+Massif: frees: 0
+Massif: XPts: 2
+Massif: top-XPts: 1 (50%)
+Massif: dup'd XPts: 40
+Massif: dup'd/freed XPts: 38
+Massif: XPt-init-expansions: 1
+Massif: XPt-later-expansions: 0
+Massif: skipped snapshots: 1
+Massif: real snapshots: 200
+Massif: cullings: 3
+Massif: XCon_redos: 0
|