|
From: <sv...@va...> - 2007-09-19 06:23:14
|
Author: njn
Date: 2007-09-19 07:23:14 +0100 (Wed, 19 Sep 2007)
New Revision: 6866
Log:
- Added four threshold tests. One of them doesn't work yet.
- Improved printing of the detailed snapshots list.
- Added some comments.
- Improved printing of "insignificant" lines in both ms_main.c and ms_print.
Added:
branches/MASSIF2/massif/tests/thresholds.c
branches/MASSIF2/massif/tests/thresholds_0_0.post.exp
branches/MASSIF2/massif/tests/thresholds_0_0.stderr.exp
branches/MASSIF2/massif/tests/thresholds_0_0.vgtest
branches/MASSIF2/massif/tests/thresholds_0_10.post.exp
branches/MASSIF2/massif/tests/thresholds_0_10.stderr.exp
branches/MASSIF2/massif/tests/thresholds_0_10.vgtest
branches/MASSIF2/massif/tests/thresholds_10_0.post.exp
branches/MASSIF2/massif/tests/thresholds_10_0.stderr.exp
branches/MASSIF2/massif/tests/thresholds_10_0.vgtest
branches/MASSIF2/massif/tests/thresholds_10_10.post.exp
branches/MASSIF2/massif/tests/thresholds_10_10.stderr.exp
branches/MASSIF2/massif/tests/thresholds_10_10.vgtest
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/ms_print
branches/MASSIF2/massif/tests/Makefile.am
branches/MASSIF2/massif/tests/basic.post.exp
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-09-19 02:00:13 UTC (rev 6865)
+++ branches/MASSIF2/massif/ms_main.c 2007-09-19 06:23:14 UTC (rev 6866)
@@ -30,9 +30,15 @@
//---------------------------------------------------------------------------
// XXX:
//---------------------------------------------------------------------------
-// Next:
+// Todo:
+// - write a good basic test that shows how the tool works, suitable for
+// documentation
+// - get snapshot frequency right after some have been discarded
// - Check MALLOCLIKE_BLOCK works, write regtest
+// - clean up structure of ms_print
+// - work out peak-taking
//
+// Misc:
// - with --heap=no, --heap-admin still counts. should it?
//
// Work out how to take the peak.
@@ -564,7 +570,8 @@
// 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.
+// "other 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)
{
Int i;
@@ -1418,8 +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 insignificant
- // places" line.
+ // entries to print -- there may be a need for an "N [other] places" line.
n_sig_children = 0;
while (n_sig_children < xpt->n_children &&
is_significant_XPt(xpt->children[n_sig_children], curr_total_szB)) {
@@ -1451,15 +1457,17 @@
printed_children_szB += child->curr_szB;
}
- // Print the extra "N [other] insignificant places" line, if necessary.
- // If there were no significant children, we omit the "other".
+ // Print the extra "N [other] places" line, if any children were
+ // insignificant. If all children were insignificant, we omit the
+ // "other".
if (n_insig_children > 0) {
- Char* s = ( n_insig_children == 1 ? "" : "s" );
- Char* other = ( 0 == n_sig_children ? "" : "other " );
- SizeT unprinted_children_szB = xpt->curr_szB - printed_children_szB;
- perc = make_perc(unprinted_children_szB, curr_total_szB);
- FP("%sn0: %ld in %d %sinsignificant place%s\n",
- depth_str, unprinted_children_szB, n_insig_children, other, s);
+ 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,
+ make_perc(clo_threshold, 10000));
}
// Unindent.
Modified: branches/MASSIF2/massif/ms_print
===================================================================
--- branches/MASSIF2/massif/ms_print 2007-09-19 02:00:13 UTC (rev 6865)
+++ branches/MASSIF2/massif/ms_print 2007-09-19 06:23:14 UTC (rev 6866)
@@ -32,7 +32,6 @@
# XXX:
# - move graph printing stuff into a separate subroutine
-# - implement --threshold
# - merge read_input_file[12]
#----------------------------------------------------------------------------
@@ -160,6 +159,7 @@
if ($arg =~ /^-v$|^--version$/) {
die("ms_print-$version\n");
+ # XXX: consider making threshold /100, like massif itself
# --threshold=X (tolerates a trailing '%')
} elsif ($arg =~ /^--threshold=([\d\.]+)%?$/) {
$threshold = $1;
@@ -244,7 +244,9 @@
# We precede this node's line with "$this_prefix.$arrow". We precede
# any children of this node with "$this_prefix$child_midfix$arrow".
if ($print && $is_significant) {
- printf("$this_prefix$arrow%05.2f%% (${bytes}B)$details\n", $perc);
+ # Nb: $details might have '%' in it, so don't embed directly in the
+ # format string.
+ printf("$this_prefix$arrow%05.2f%% (${bytes}B)%s\n", $perc, $details);
}
# Now read all the children.
@@ -263,22 +265,21 @@
if ($is_significant) {
# If this was significant but any children were insignificant, print
- # the "N [other] insignificant places" line for them.
- # If all children were insignificant, we omit the "other".
+ # the "N [other] places" line for them. If all children were
+ # insignificant, we omit the "other".
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" );
- # XXX: Currently printing "... N insig ..." to distinguish
- # significance judgments made here versus those made in Massif2
- # itself.
- printf("$this_prefix2->%05.2f%% (${total_insig_children_szB}B) ... $n_insig_children$other insig...\n",
- $perc);
+ printf("%s->%05.2f%% (%dB) in %d%s place%s below ms_print's threshold (%05.2f%%)\n",
+ $this_prefix2, $perc, $total_insig_children_szB,
+ $n_insig_children, $other, $s, $threshold);
print("$this_prefix2\n");
}
- # If this node has no children, print an extra empty line.
+ # If this node has no children, print an extra (mostly) empty line.
if ($print && 0 == $n_children) {
- print("$this_prefix\n");
+ print("$this_prefix2\n");
}
return (0, 0);
@@ -367,6 +368,7 @@
#-------------------------------------------------------------------------
# Print header
#-------------------------------------------------------------------------
+ # XXX: print the massif invocation and the ms_print invocation
print($fancy_nl);
print("Command: $cmd\n");
print("Data file: $input_file\n");
@@ -488,13 +490,19 @@
#-------------------------------------------------------------------------
print("\n\n");
print("Number of snapshots: $n_snapshots\n");
- print(" Detailed snapshots:");
+ print(" Detailed snapshots: [");
+ my $first_detailed = 1;
for (my $i = 0; $i < $n_snapshots; $i++) {
if ($is_detaileds[$i]) {
- print(" $i");
+ if ($first_detailed) {
+ printf("$i");
+ $first_detailed = 0;
+ } else {
+ printf(", $i");
+ }
}
}
- print("\n");
+ print("]\n");
}
#-----------------------------------------------------------------------------
@@ -575,6 +583,8 @@
# Depth in the heap tree. '1' means the tree should be printed.
# Then reprint the header.
read_heap_tree(1, "", "", "", $mem_total_B);
+ # XXX: don't print the header if there are no more snapshots!
+ # (see tests/thresholds.c for an example)
print($header);
} else {
die("Line $.: expected 'empty' or '...' after 'heap_tree='\n");
Modified: branches/MASSIF2/massif/tests/Makefile.am
===================================================================
--- branches/MASSIF2/massif/tests/Makefile.am 2007-09-19 02:00:13 UTC (rev 6865)
+++ branches/MASSIF2/massif/tests/Makefile.am 2007-09-19 06:23:14 UTC (rev 6866)
@@ -7,11 +7,16 @@
EXTRA_DIST = $(noinst_SCRIPTS) \
basic.post.exp basic.stderr.exp basic.vgtest \
basic_malloc.stderr.exp basic_malloc.vgtest \
+ 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_10_10.post.exp thresholds_10_10.stderr.exp thresholds_10_10.vgtest \
toobig-allocs.stderr.exp toobig-allocs.vgtest
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
check_PROGRAMS = \
basic \
- basic_malloc
+ basic_malloc \
+ thresholds
Modified: branches/MASSIF2/massif/tests/basic.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/basic.post.exp 2007-09-19 02:00:13 UTC (rev 6865)
+++ branches/MASSIF2/massif/tests/basic.post.exp 2007-09-19 06:23:14 UTC (rev 6866)
@@ -29,7 +29,7 @@
Number of snapshots: 73
- Detailed snapshots: 9 19 29 39 49 59 69
+ Detailed snapshots: [9, 19, 29, 39, 49, 59, 69]
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
--------------------------------------------------------------------------------
@@ -45,7 +45,7 @@
9 900 972 900 72 0
92.59% (900B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->92.59% (900B) 0x80483E5: main (basic.c:14)
-
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
--------------------------------------------------------------------------------
@@ -61,7 +61,7 @@
19 1,900 2,052 1,900 152 0
92.59% (1900B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->92.59% (1900B) 0x80483E5: main (basic.c:14)
-
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
--------------------------------------------------------------------------------
@@ -77,7 +77,7 @@
29 2,900 3,132 2,900 232 0
92.59% (2900B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->92.59% (2900B) 0x80483E5: main (basic.c:14)
-
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
--------------------------------------------------------------------------------
@@ -93,7 +93,7 @@
39 3,900 3,564 3,300 264 0
92.59% (3300B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->92.59% (3300B) 0x80483E5: main (basic.c:14)
-
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
--------------------------------------------------------------------------------
@@ -109,7 +109,7 @@
49 4,900 2,484 2,300 184 0
92.59% (2300B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->92.59% (2300B) 0x80483E5: main (basic.c:14)
-
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
--------------------------------------------------------------------------------
@@ -125,7 +125,7 @@
59 5,900 1,404 1,300 104 0
92.59% (1300B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->92.59% (1300B) 0x80483E5: main (basic.c:14)
-
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
--------------------------------------------------------------------------------
@@ -141,7 +141,7 @@
69 6,900 324 300 24 0
92.59% (300B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->92.59% (300B) 0x80483E5: main (basic.c:14)
-
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
--------------------------------------------------------------------------------
Added: branches/MASSIF2/massif/tests/thresholds.c
===================================================================
--- branches/MASSIF2/massif/tests/thresholds.c (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds.c 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,58 @@
+// This test is for testing that the --threshold options in both Massif and
+// ms_print work as they should. A threshold of 10% is a good choice for
+// this file, because in some parts of the tree it renders all children
+// insignificant, and in others parts of the tree it renders only some
+// children insignificant.
+//
+// Also, it's deliberate that the 'malloc(2000)' and 'my_malloc1(500)' calls
+// are in 'main' -- at one point, ms_print was failing to connect some
+// children arrows when a more significant child didn't have any children of
+// its own, eg:
+//
+// |
+// ->20.00% (2000B) 0x804846A: main (thresholds.c:43)
+//
+// ->13.00% (1300B) 0x80483A4: my_malloc2 (thresholds.c:16)
+//
+// (There must be a '|' between the '->'s.)
+
+#include <stdlib.h>
+
+void my_malloc1(int n)
+{
+ malloc(n);
+}
+
+void my_malloc2(int n)
+{
+ malloc(n);
+}
+
+void my_malloc3(int n)
+{
+ malloc(n);
+}
+
+void a7550(void)
+{
+ my_malloc1(6000);
+ my_malloc2( 900);
+}
+
+void a450(void)
+{
+ my_malloc2( 300);
+ my_malloc1( 100);
+ my_malloc2( 100);
+ my_malloc1( 50);
+}
+
+int main(void)
+{
+ a7550();
+ a450();
+ my_malloc1(500);
+ malloc(2000);
+ my_malloc3(50);
+ return 0;
+}
Added: branches/MASSIF2/massif/tests/thresholds_0_0.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_0_0.post.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_0_0.post.exp 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,76 @@
+--------------------------------------------------------------------------------
+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.00% (100B) 0x8048408: a450 (thresholds.c:45)
+| | ->01.00% (100B) 0x804844D: main (thresholds.c:53)
+| |
+| ->00.50% (50B) 0x8048422: a450 (thresholds.c:47)
+| ->00.50% (50B) 0x804844D: main (thresholds.c:53)
+|
+->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)
+| |
+| ->03.00% (300B) 0x80483FB: a450 (thresholds.c:44)
+| | ->03.00% (300B) 0x804844D: main (thresholds.c:53)
+| |
+| ->01.00% (100B) 0x8048415: a450 (thresholds.c:46)
+| ->01.00% (100B) 0x804844D: main (thresholds.c:53)
+|
+->00.50% (50B) 0x80483BB: my_malloc3 (thresholds.c:33)
+ ->00.50% (50B) 0x8048477: main (thresholds.c:56)
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
Added: branches/MASSIF2/massif/tests/thresholds_0_0.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_0_0.stderr.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_0_0.stderr.exp 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,2 @@
+
+
Added: branches/MASSIF2/massif/tests/thresholds_0_0.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_0_0.vgtest (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_0_0.vgtest 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,4 @@
+prog: thresholds
+vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=0
+post: perl ../../massif/ms_print massif.out --threshold=0
+cleanup: rm massif.out
Added: branches/MASSIF2/massif/tests/thresholds_0_10.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_0_10.post.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_0_10.post.exp 2007-09-19 06:23:14 UTC (rev 6866)
@@ -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 3 other 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%)
+|
+->00.50% (50B) in 1 other place, 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_0_10.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_0_10.stderr.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_0_10.stderr.exp 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,2 @@
+
+
Added: branches/MASSIF2/massif/tests/thresholds_0_10.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_0_10.vgtest (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_0_10.vgtest 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,4 @@
+prog: thresholds
+vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=0
+post: perl ../../massif/ms_print massif.out --threshold=10
+cleanup: rm massif.out
Added: branches/MASSIF2/massif/tests/thresholds_10_0.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_0.post.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_10_0.post.exp 2007-09-19 06:23:14 UTC (rev 6866)
@@ -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 3 other 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%)
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
Added: branches/MASSIF2/massif/tests/thresholds_10_0.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_0.stderr.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_10_0.stderr.exp 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,2 @@
+
+
Added: branches/MASSIF2/massif/tests/thresholds_10_0.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_0.vgtest (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_10_0.vgtest 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,4 @@
+prog: thresholds
+vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=1000
+post: perl ../../massif/ms_print massif.out --threshold=0
+cleanup: rm massif.out
Added: branches/MASSIF2/massif/tests/thresholds_10_10.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_10.post.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_10_10.post.exp 2007-09-19 06:23:14 UTC (rev 6866)
@@ -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 3 other 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%)
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
Added: branches/MASSIF2/massif/tests/thresholds_10_10.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_10.stderr.exp (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_10_10.stderr.exp 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,2 @@
+
+
Added: branches/MASSIF2/massif/tests/thresholds_10_10.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_10.vgtest (rev 0)
+++ branches/MASSIF2/massif/tests/thresholds_10_10.vgtest 2007-09-19 06:23:14 UTC (rev 6866)
@@ -0,0 +1,4 @@
+prog: thresholds
+vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=1000
+post: perl ../../massif/ms_print massif.out --threshold=10
+cleanup: rm massif.out
|