|
From: <sv...@va...> - 2007-09-19 08:11:51
|
Author: njn
Date: 2007-09-19 09:11:49 +0100 (Wed, 19 Sep 2007)
New Revision: 6867
Log:
- Remove "other" from sub-threshold lines, it didn't add anything.
- Make ms_print sub-threshold lines accurate by changing them to "in N+
places", (ie. N or more).
- Added two extra threshold tests.
Added:
branches/MASSIF2/massif/tests/thresholds_5_0.post.exp
branches/MASSIF2/massif/tests/thresholds_5_0.stderr.exp
branches/MASSIF2/massif/tests/thresholds_5_0.vgtest
branches/MASSIF2/massif/tests/thresholds_5_10.post.exp
branches/MASSIF2/massif/tests/thresholds_5_10.stderr.exp
branches/MASSIF2/massif/tests/thresholds_5_10.vgtest
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/ms_print
branches/MASSIF2/massif/tests/Makefile.am
branches/MASSIF2/massif/tests/thresholds_0_10.post.exp
branches/MASSIF2/massif/tests/thresholds_10_0.post.exp
branches/MASSIF2/massif/tests/thresholds_10_10.post.exp
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-09-19 06:23:14 UTC (rev 6866)
+++ branches/MASSIF2/massif/ms_main.c 2007-09-19 08:11:49 UTC (rev 6867)
@@ -570,7 +570,7 @@
// XXX: taking a full snapshot... could/should just snapshot the significant
// parts. Nb: then the amounts wouldn't add up, unless I represented the
-// "other insignificant places" in XPts. Might be worthwhile -- there can
+// "insignificant places" in XPts. Might be worthwhile -- there can
// be a lot of zero nodes in the XTree...
static XPt* dup_XTree(XPt* xpt, XPt* parent)
{
@@ -1425,7 +1425,7 @@
XPt_revcmp_curr_szB);
// How many children are significant? Also calculate the number of child
- // entries to print -- there may be a need for an "N [other] places" line.
+ // entries to print -- there may be a need for an "in N places" line.
n_sig_children = 0;
while (n_sig_children < xpt->n_children &&
is_significant_XPt(xpt->children[n_sig_children], curr_total_szB)) {
@@ -1457,16 +1457,13 @@
printed_children_szB += child->curr_szB;
}
- // Print the extra "N [other] places" line, if any children were
- // insignificant. If all children were insignificant, we omit the
- // "other".
+ // Print the extra "in N places" line, if any children were insignificant.
if (n_insig_children > 0) {
Char* s = ( n_insig_children == 1 ? "," : "s, all" );
- Char* other = ( n_insig_children == xpt->n_children ? "" : " other" );
SizeT total_insig_children_szB = xpt->curr_szB - printed_children_szB;
perc = make_perc(total_insig_children_szB, curr_total_szB);
- FP("%sn0: %ld in %d%s place%s below massif's threshold (%s)\n",
- depth_str, total_insig_children_szB, n_insig_children, other, s,
+ FP("%sn0: %ld in %d place%s below massif's threshold (%s)\n",
+ depth_str, total_insig_children_szB, n_insig_children, s,
make_perc(clo_threshold, 10000));
}
Modified: branches/MASSIF2/massif/ms_print
===================================================================
--- branches/MASSIF2/massif/ms_print 2007-09-19 06:23:14 UTC (rev 6866)
+++ branches/MASSIF2/massif/ms_print 2007-09-19 08:11:49 UTC (rev 6867)
@@ -265,15 +265,13 @@
if ($is_significant) {
# If this was significant but any children were insignificant, print
- # the "N [other] places" line for them. If all children were
- # insignificant, we omit the "other".
+ # the "in N places" line for them.
if ($print && $n_insig_children > 0) {
$perc = 100 * $total_insig_children_szB / $mem_total_B;
- my $s = ( $n_insig_children == 1 ? "," : "s, all" );
- my $other = ( $n_insig_children == $n_children ? "" : " other" );
- printf("%s->%05.2f%% (%dB) in %d%s place%s below ms_print's threshold (%05.2f%%)\n",
+ printf("%s->%05.2f%% (%dB) in %d+ places, all below "
+ . "ms_print's threshold (%05.2f%%)\n",
$this_prefix2, $perc, $total_insig_children_szB,
- $n_insig_children, $other, $s, $threshold);
+ $n_insig_children, $threshold);
print("$this_prefix2\n");
}
Modified: branches/MASSIF2/massif/tests/Makefile.am
===================================================================
--- branches/MASSIF2/massif/tests/Makefile.am 2007-09-19 06:23:14 UTC (rev 6866)
+++ branches/MASSIF2/massif/tests/Makefile.am 2007-09-19 08:11:49 UTC (rev 6867)
@@ -10,6 +10,8 @@
thresholds_0_0.post.exp thresholds_0_0.stderr.exp thresholds_0_0.vgtest \
thresholds_0_10.post.exp thresholds_0_10.stderr.exp thresholds_0_10.vgtest \
thresholds_10_0.post.exp thresholds_10_0.stderr.exp thresholds_10_0.vgtest \
+ thresholds_5_0.post.exp thresholds_5_0.stderr.exp thresholds_5_0.vgtest \
+ thresholds_5_10.post.exp thresholds_5_10.stderr.exp thresholds_5_10.vgtest \
thresholds_10_10.post.exp thresholds_10_10.stderr.exp thresholds_10_10.vgtest \
toobig-allocs.stderr.exp toobig-allocs.vgtest
Modified: branches/MASSIF2/massif/tests/thresholds_0_10.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_0_10.post.exp 2007-09-19 06:23:14 UTC (rev 6866)
+++ branches/MASSIF2/massif/tests/thresholds_0_10.post.exp 2007-09-19 08:11:49 UTC (rev 6867)
@@ -48,14 +48,14 @@
| ->60.00% (6000B) 0x80483D3: a7550 (thresholds.c:38)
| | ->60.00% (6000B) 0x8048448: main (thresholds.c:52)
| |
-| ->06.50% (650B) in 3 other places, all below ms_print's threshold (10.00%)
+| ->06.50% (650B) in 3+ places, all below ms_print's threshold (10.00%)
|
->20.00% (2000B) 0x804846A: main (thresholds.c:55)
|
->13.00% (1300B) 0x80483A4: my_malloc2 (thresholds.c:28)
-| ->13.00% (1300B) in 3 places, all below ms_print's threshold (10.00%)
+| ->13.00% (1300B) in 3+ places, all below ms_print's threshold (10.00%)
|
-->00.50% (50B) in 1 other place, below ms_print's threshold (10.00%)
+->00.50% (50B) in 1+ places, all below ms_print's threshold (10.00%)
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
Modified: branches/MASSIF2/massif/tests/thresholds_10_0.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_0.post.exp 2007-09-19 06:23:14 UTC (rev 6866)
+++ branches/MASSIF2/massif/tests/thresholds_10_0.post.exp 2007-09-19 08:11:49 UTC (rev 6867)
@@ -48,14 +48,14 @@
| ->60.00% (6000B) 0x80483D3: a7550 (thresholds.c:38)
| | ->60.00% (6000B) 0x8048448: main (thresholds.c:52)
| |
-| ->06.50% (650B) in 3 other places, all below massif's threshold (10.00%)
+| ->06.50% (650B) in 3 places, all below massif's threshold (10.00%)
|
->20.00% (2000B) 0x804846A: main (thresholds.c:55)
|
->13.00% (1300B) 0x80483A4: my_malloc2 (thresholds.c:28)
| ->13.00% (1300B) in 3 places, all below massif's threshold (10.00%)
|
-->00.50% (50B) in 1 other place, below massif's threshold (10.00%)
+->00.50% (50B) in 1 place, below massif's threshold (10.00%)
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
Modified: branches/MASSIF2/massif/tests/thresholds_10_10.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_10.post.exp 2007-09-19 06:23:14 UTC (rev 6866)
+++ branches/MASSIF2/massif/tests/thresholds_10_10.post.exp 2007-09-19 08:11:49 UTC (rev 6867)
@@ -48,14 +48,14 @@
| ->60.00% (6000B) 0x80483D3: a7550 (thresholds.c:38)
| | ->60.00% (6000B) 0x8048448: main (thresholds.c:52)
| |
-| ->06.50% (650B) in 3 other places, all below massif's threshold (10.00%)
+| ->06.50% (650B) in 1+ places, all below ms_print's threshold (10.00%)
|
->20.00% (2000B) 0x804846A: main (thresholds.c:55)
|
->13.00% (1300B) 0x80483A4: my_malloc2 (thresholds.c:28)
| ->13.00% (1300B) in 3 places, all below massif's threshold (10.00%)
|
-->00.50% (50B) in 1 other place, below massif's threshold (10.00%)
+->00.50% (50B) in 1+ places, all below ms_print's threshold (10.00%)
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
Added: branches/MASSIF2/massif/tests/thresholds_5_0.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_5_0.post.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_5_0.post.exp 2007-09-19 08:11:49 UTC (rev 6867)
@@ -0,0 +1,67 @@
+--------------------------------------------------------------------------------
+Command: ./thresholds
+Data file: massif.out
+Options: XXX
+--------------------------------------------------------------------------------
+
+
+ 10k| @
+ | @
+ | @
+ | @
+ | . @
+ | .. : @
+ | . ::: : @
+ | : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ 0 +-----------------------------------------------------------------------@
+
+
+Number of snapshots: 10
+ Detailed snapshots: [9]
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
+ 0 0 0 0 0 0
+ 1 6,000 6,000 6,000 0 0
+ 2 6,900 6,900 6,900 0 0
+ 3 7,200 7,200 7,200 0 0
+ 4 7,300 7,300 7,300 0 0
+ 5 7,400 7,400 7,400 0 0
+ 6 7,450 7,450 7,450 0 0
+ 7 7,950 7,950 7,950 0 0
+ 8 9,950 9,950 9,950 0 0
+ 9 10,000 10,000 10,000 0 0
+100.00% (10000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
+->66.50% (6650B) 0x804838D: my_malloc1 (thresholds.c:23)
+| ->60.00% (6000B) 0x80483D3: a7550 (thresholds.c:38)
+| | ->60.00% (6000B) 0x8048448: main (thresholds.c:52)
+| |
+| ->05.00% (500B) 0x804845A: main (thresholds.c:54)
+| |
+| ->01.50% (150B) in 2 places, all below massif's threshold (05.00%)
+|
+->20.00% (2000B) 0x804846A: main (thresholds.c:55)
+|
+->13.00% (1300B) 0x80483A4: my_malloc2 (thresholds.c:28)
+| ->09.00% (900B) 0x80483E3: a7550 (thresholds.c:39)
+| | ->09.00% (900B) 0x8048448: main (thresholds.c:52)
+| |
+| ->04.00% (400B) in 2 places, all below massif's threshold (05.00%)
+|
+->00.50% (50B) in 1 place, below massif's threshold (05.00%)
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
Added: branches/MASSIF2/massif/tests/thresholds_5_0.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_5_0.stderr.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_5_0.stderr.exp 2007-09-19 08:11:49 UTC (rev 6867)
@@ -0,0 +1,2 @@
+
+
Added: branches/MASSIF2/massif/tests/thresholds_5_0.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_5_0.vgtest (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_5_0.vgtest 2007-09-19 08:11:49 UTC (rev 6867)
@@ -0,0 +1,4 @@
+prog: thresholds
+vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=500
+post: perl ../../massif/ms_print massif.out --threshold=0
+cleanup: rm massif.out
Added: branches/MASSIF2/massif/tests/thresholds_5_10.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_5_10.post.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_5_10.post.exp 2007-09-19 08:11:49 UTC (rev 6867)
@@ -0,0 +1,62 @@
+--------------------------------------------------------------------------------
+Command: ./thresholds
+Data file: massif.out
+Options: XXX
+--------------------------------------------------------------------------------
+
+
+ 10k| @
+ | @
+ | @
+ | @
+ | . @
+ | .. : @
+ | . ::: : @
+ | : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ 0 +-----------------------------------------------------------------------@
+
+
+Number of snapshots: 10
+ Detailed snapshots: [9]
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
+ 0 0 0 0 0 0
+ 1 6,000 6,000 6,000 0 0
+ 2 6,900 6,900 6,900 0 0
+ 3 7,200 7,200 7,200 0 0
+ 4 7,300 7,300 7,300 0 0
+ 5 7,400 7,400 7,400 0 0
+ 6 7,450 7,450 7,450 0 0
+ 7 7,950 7,950 7,950 0 0
+ 8 9,950 9,950 9,950 0 0
+ 9 10,000 10,000 10,000 0 0
+100.00% (10000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
+->66.50% (6650B) 0x804838D: my_malloc1 (thresholds.c:23)
+| ->60.00% (6000B) 0x80483D3: a7550 (thresholds.c:38)
+| | ->60.00% (6000B) 0x8048448: main (thresholds.c:52)
+| |
+| ->06.50% (650B) in 2+ places, all below ms_print's threshold (10.00%)
+|
+->20.00% (2000B) 0x804846A: main (thresholds.c:55)
+|
+->13.00% (1300B) 0x80483A4: my_malloc2 (thresholds.c:28)
+| ->13.00% (1300B) in 2+ places, all below ms_print's threshold (10.00%)
+|
+->00.50% (50B) in 1+ places, all below ms_print's threshold (10.00%)
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
Added: branches/MASSIF2/massif/tests/thresholds_5_10.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_5_10.stderr.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_5_10.stderr.exp 2007-09-19 08:11:49 UTC (rev 6867)
@@ -0,0 +1,2 @@
+
+
Added: branches/MASSIF2/massif/tests/thresholds_5_10.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_5_10.vgtest (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_5_10.vgtest 2007-09-19 08:11:49 UTC (rev 6867)
@@ -0,0 +1,4 @@
+prog: thresholds
+vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=500
+post: perl ../../massif/ms_print massif.out --threshold=10
+cleanup: rm massif.out
|