|
From: <sv...@va...> - 2007-09-24 02:15:49
|
Author: njn
Date: 2007-09-24 03:15:42 +0100 (Mon, 24 Sep 2007)
New Revision: 6905
Log:
Improve graph printing -- better labels of axes, and some graph-drawing
tweaks.
Added:
branches/MASSIF2/massif/tests/one.c
branches/MASSIF2/massif/tests/one.post.exp
branches/MASSIF2/massif/tests/one.stderr.exp
branches/MASSIF2/massif/tests/one.vgtest
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/ms_print
branches/MASSIF2/massif/tests/Makefile.am
branches/MASSIF2/massif/tests/alloc-fns-A.post.exp
branches/MASSIF2/massif/tests/alloc-fns-B.post.exp
branches/MASSIF2/massif/tests/basic.c
branches/MASSIF2/massif/tests/basic.post.exp
branches/MASSIF2/massif/tests/long-time.post.exp
branches/MASSIF2/massif/tests/null.post.exp
branches/MASSIF2/massif/tests/realloc.post.exp
branches/MASSIF2/massif/tests/thresholds_0_0.post.exp
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
branches/MASSIF2/massif/tests/thresholds_5_0.post.exp
branches/MASSIF2/massif/tests/thresholds_5_10.post.exp
branches/MASSIF2/massif/tests/zero1.post.exp
branches/MASSIF2/massif/tests/zero2.post.exp
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/ms_main.c 2007-09-24 02:15:42 UTC (rev 6905)
@@ -352,6 +352,7 @@
else VG_NUM_CLO (arg, "--heap-admin", clo_heap_admin)
else VG_BNUM_CLO(arg, "--depth", clo_depth, 1, MAX_DEPTH)
+ // XXX: use a fractional number, so no division by 100
else VG_NUM_CLO(arg, "--threshold", clo_threshold)
else if (VG_CLO_STREQ(arg, "--time-unit=ms")) clo_time_unit = TimeMS;
Modified: branches/MASSIF2/massif/ms_print
===================================================================
--- branches/MASSIF2/massif/ms_print 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/ms_print 2007-09-24 02:15:42 UTC (rev 6905)
@@ -30,8 +30,6 @@
use warnings;
use strict;
-# XXX: need to label axes with the unit
-
#----------------------------------------------------------------------------
# Global variables, main data structures
#----------------------------------------------------------------------------
@@ -112,7 +110,6 @@
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;
@@ -252,9 +249,68 @@
}
#-----------------------------------------------------------------------------
-# Reading the input file
+# Reading the input file: main
#-----------------------------------------------------------------------------
+sub max_label_2($$)
+{
+ my ($szB, $szB_scaled) = @_;
+
+ # For the label, if $szB is 999B or below, we print it as an integer.
+ # Otherwise, we print it as a float with 5 characters (including the '.').
+ # Examples (for bytes):
+ # 1 --> 1 B
+ # 999 --> 999 B
+ # 1000 --> 0.977 KB
+ # 1024 --> 1.000 KB
+ # 10240 --> 10.00 KB
+ # 102400 --> 100.0 KB
+ # 1024000 --> 0.977 MB
+ # 1048576 --> 1.000 MB
+ #
+ if ($szB < 1000) { return sprintf("%5d", $szB); }
+ elsif ($szB_scaled < 10) { return sprintf("%5.3f", $szB_scaled); }
+ elsif ($szB_scaled < 100) { return sprintf("%5.2f", $szB_scaled); }
+ else { return sprintf("%5.1f", $szB_scaled); }
+}
+
+# Work out the units for the max value, measured in bytes.
+sub B_max_label($)
+{
+ my ($szB) = @_;
+
+ # We repeat until the number is less than 1000, but we divide by 1024 on
+ # each scaling.
+ my $szB_scaled = $szB;
+ my $unit = "B";
+ if ($szB_scaled >= 1000) { $unit = "KB"; $szB_scaled /= 1024; }
+ if ($szB_scaled >= 1000) { $unit = "MB"; $szB_scaled /= 1024; }
+ if ($szB_scaled >= 1000) { $unit = "GB"; $szB_scaled /= 1024; }
+ if ($szB_scaled >= 1000) { $unit = "TB"; $szB_scaled /= 1024; }
+ if ($szB_scaled >= 1000) { $unit = "PB"; $szB_scaled /= 1024; }
+ if ($szB_scaled >= 1000) { $unit = "EB"; $szB_scaled /= 1024; }
+ if ($szB_scaled >= 1000) { $unit = "ZB"; $szB_scaled /= 1024; }
+ if ($szB_scaled >= 1000) { $unit = "YB"; $szB_scaled /= 1024; }
+
+ return (max_label_2($szB, $szB_scaled), $unit);
+}
+
+# Work out the units for the max value, measured in ms/s/h.
+sub t_max_label($)
+{
+ my ($szB) = @_;
+
+ # We scale from millisecond to seconds to hours.
+ #
+ # XXX: this allows a number with 6 chars, eg. "3599.0 s"
+ my $szB_scaled = $szB;
+ my $unit = "ms";
+ if ($szB_scaled >= 1000) { $unit = "s"; $szB_scaled /= 1000; }
+ if ($szB_scaled >= 3600) { $unit = "h"; $szB_scaled /= 3600; }
+
+ return (max_label_2($szB, $szB_scaled), $unit);
+}
+
# This prints four things:
# - the output header
# - the graph
@@ -398,17 +454,17 @@
my $x;
my $y;
- # We increment end_ms_time by 1 so that the last snapshot occurs just
- # before it, and doesn't spill over into the final column.
my $n_snapshots = scalar(@snapshot_nums);
($n_snapshots > 0) or die;
- my $end_time = $times[$n_snapshots-1] + 1;
- ($end_time > 0) or die;
+ my $end_time = $times[$n_snapshots-1];
+ ($end_time >= 0) or die;
# Setup graph[][].
$graph[0][0] = '+'; # axes join point
for ($x = 1; $x <= $graph_x; $x++) { $graph[$x][0] = '-'; } # X-axis
for ($y = 1; $y <= $graph_y; $y++) { $graph[0][$y] = '|'; } # Y-axis
+ $graph[$graph_x][0] = '>'; # X-axis arrow
+ $graph[0][$graph_y] = '^'; # Y-axis arrow
for ($x = 1; $x <= $graph_x; $x++) { # usable area
for ($y = 1; $y <= $graph_y; $y++) {
$graph[$x][$y] = ' ';
@@ -440,14 +496,28 @@
# Work out how many bytes each row represents. If the peak size was 0,
# make it 1 so that the Y-axis covers a non-zero range of values.
+ # Likewise for end_time.
if (0 == $peak_mem_total_szB) { $peak_mem_total_szB = 1; }
+ if (0 == $end_time ) { $end_time = 1; }
my $K = $peak_mem_total_szB / $graph_y;
+ # If we leave end_time as is, the final snapshot will spill over past
+ # the last column. So we add a small epsilon to it to prevent this from
+ # happening.
+ $end_time += 0.001;
+
for (my $i = 0; $i < $n_snapshots; $i++) {
- # Work out which column this snapshot belongs to.
- my $x_pos_frac = ($times[$i] / $end_time) * $graph_x;
+ # Work out which column this snapshot belongs to.
+ my $x_pos_frac = ($times[$i] / ($end_time)) * $graph_x;
$x = int($x_pos_frac) + 1; # +1 due to Y-axis
+ # The final snapshot will spill over into the n+1th column, which
+ # doesn't get shown. So we fudge that one and pull it back a
+ # column, as if the end_time was actually end_time+epsilon.
+ if ($times[$i] == $end_time) {
+ ($x == $graph_x+1) or die;
+ $x = $graph_x;
+ }
# Draw the column only if it's a detailed snapshot, or we don't
# already have a detailed snapshot's bar in this column -- we don't
@@ -477,49 +547,40 @@
}
}
- # Work out the units for the Y-axis.
- my $orders_of_magnitude = 0;
- my $unit;
- my $peak_mem_total_szBscaled = $peak_mem_total_szB;
- while ($peak_mem_total_szBscaled > 1000) {
- $orders_of_magnitude++;
- $peak_mem_total_szBscaled /= 1000;
- }
- if (0 == $orders_of_magnitude) { $unit = ' '; }
- elsif (1 == $orders_of_magnitude) { $unit = 'k'; }
- elsif (2 == $orders_of_magnitude) { $unit = 'M'; }
- elsif (3 == $orders_of_magnitude) { $unit = 'G'; }
- elsif (4 == $orders_of_magnitude) { $unit = 'T'; }
- else { die("unknown order of magnitude: $orders_of_magnitude\n"); }
-
#-------------------------------------------------------------------------
# Print graph[][].
#-------------------------------------------------------------------------
+ my ($y_label, $y_unit) = B_max_label($peak_mem_total_szB);
+ my ($x_label, $x_unit) = ( $time_unit eq "ms"
+ ? t_max_label($end_time)
+ : B_max_label($end_time) );
+
+ printf(" %2s\n", $y_unit);
for ($y = $graph_y; $y >= 0; $y--) {
- # Row prefix (ie. X-axis label)
- if ($graph_y == $y) { # top point
- if ($peak_mem_total_szBscaled < 10) {
- printf("%3.1f%s", $peak_mem_total_szBscaled, $unit);
- } else {
- printf("%3d%s", $peak_mem_total_szBscaled, $unit);
- }
- } elsif (0 == $y) { # bottom point
- print(" 0 ");
+ if ($graph_y == $y) { # top row
+ print($y_label);
+ } elsif (0 == $y) { # bottom row
+ print(" 0 ");
} else { # anywhere else
- print(" ");
+ print(" ");
}
# Axis and data for the row.
for ($x = 0; $x <= $graph_x; $x++) {
printf("%s", $graph[$x][$y]);
}
- print("\n");
+ if (0 == $y) {
+ print("$x_unit\n");
+ } else {
+ print("\n");
+ }
}
+ printf(" 0%s%5s\n", ' ' x ($graph_x-5), $x_label);
#-------------------------------------------------------------------------
# Print snapshot numbers.
#-------------------------------------------------------------------------
- print("\n\n");
+ print("\n");
print("Number of snapshots: $n_snapshots\n");
print(" Detailed snapshots: [");
my $first_detailed = 1;
Modified: branches/MASSIF2/massif/tests/Makefile.am
===================================================================
--- branches/MASSIF2/massif/tests/Makefile.am 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/Makefile.am 2007-09-24 02:15:42 UTC (rev 6905)
@@ -13,6 +13,7 @@
culling2.stderr.exp culling2.vgtest \
long-time.post.exp long-time.stderr.exp long-time.vgtest \
null.post.exp null.stderr.exp null.vgtest \
+ one.post.exp one.stderr.exp one.vgtest \
realloc.post.exp realloc.stderr.exp realloc.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 \
@@ -33,6 +34,7 @@
culling1 culling2 \
long-time \
null \
+ one \
realloc \
thresholds \
zero
Modified: branches/MASSIF2/massif/tests/alloc-fns-A.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/alloc-fns-A.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/alloc-fns-A.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
-900 | @
- | @
- | . @
- | : @
- | . : @
- | : : @
- | : : @
- | : : : @
- | : : : @
- | : : : : @
- | : : : : @
- | . : : : : @
- | : : : : : @
- | . : : : : : @
- | : : : : : : @
- | : : : : : : @
- | : : : : : : : @
- | : : : : : : : @
- | : : : : : : : : @
- | : : : : : : : : @
- 0 +-----------------------------------------------------------------------@
+ B
+ 900^ @
+ | @
+ | . @
+ | : @
+ | . : @
+ | : : @
+ | : : @
+ | : : : @
+ | : : : @
+ | : : : : @
+ | : : : : @
+ | . : : : : @
+ | : : : : : @
+ | . : : : : : @
+ | : : : : : : @
+ | : : : : : : @
+ | : : : : : : : @
+ | : : : : : : : @
+ | : : : : : : : : @
+ | : : : : : : : : @
+ 0 +-----------------------------------------------------------------------@B
+ 0 900
-
Number of snapshots: 10
Detailed snapshots: [9]
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/alloc-fns-B.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/alloc-fns-B.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/alloc-fns-B.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
-900 | @
- | @
- | . @
- | : @
- | . : @
- | : : @
- | : : @
- | : : : @
- | : : : @
- | : : : : @
- | : : : : @
- | . : : : : @
- | : : : : : @
- | . : : : : : @
- | : : : : : : @
- | : : : : : : @
- | : : : : : : : @
- | : : : : : : : @
- | : : : : : : : : @
- | : : : : : : : : @
- 0 +-----------------------------------------------------------------------@
+ B
+ 900^ @
+ | @
+ | . @
+ | : @
+ | . : @
+ | : : @
+ | : : @
+ | : : : @
+ | : : : @
+ | : : : : @
+ | : : : : @
+ | . : : : : @
+ | : : : : : @
+ | . : : : : : @
+ | : : : : : : @
+ | : : : : : : @
+ | : : : : : : : @
+ | : : : : : : : @
+ | : : : : : : : : @
+ | : : : : : : : : @
+ 0 +-----------------------------------------------------------------------@B
+ 0 900
-
Number of snapshots: 10
Detailed snapshots: [9]
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/basic.c
===================================================================
--- branches/MASSIF2/massif/tests/basic.c 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/basic.c 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,7 +5,7 @@
int main(void)
{
- // N=36 gives us 72 sample points, which fills the text graph nicely.
+ // N=36 gives us 72 snapshots, which fills the text graph nicely.
#define N 36
int i;
int* a[N];
@@ -13,7 +13,7 @@
for (i = 0; i < N; i++) {
a[i] = malloc(100);
}
- for (i = 0; i < N; i++) {
+ for (i = 0; i < N-1; i++) {
free(a[i]);
}
Modified: branches/MASSIF2/massif/tests/basic.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/basic.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/basic.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,30 +5,31 @@
--------------------------------------------------------------------------------
-3.9k| :
- | .:::.
- | .::::::@.
- | .::::::::@::.
- | .@:::::::::@::::.
- | ::@:::::::::@::::::
- | .:::@:::::::::@:::::::.
- | .:::::@:::::::::@:::::::::.
- | .:::::::@:::::::::@:::::::::@:.
- | .:::::::::@:::::::::@:::::::::@:::.
- | :@:::::::::@:::::::::@:::::::::@:::::
- | .::@:::::::::@:::::::::@:::::::::@::::::.
- | .::::@:::::::::@:::::::::@:::::::::@::::::::.
- | .::::::@:::::::::@:::::::::@:::::::::@:::::::::@.
- | .::::::::@:::::::::@:::::::::@:::::::::@:::::::::@::.
- | @:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@::::
- | .:@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::.
- | .:::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::.
- | .:::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::.
- |.:::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:.
- 0 +--------@---------@---------@---------@---------@---------@---------@---
+ KB
+3.797^ :
+ | .:::.
+ | .::::::@.
+ | .::::::::@::.
+ | .@:::::::::@::::.
+ | ::@:::::::::@::::::
+ | .:::@:::::::::@:::::::.
+ | .:::::@:::::::::@:::::::::.
+ | .:::::::@:::::::::@:::::::::@:.
+ | .:::::::::@:::::::::@:::::::::@:::.
+ | :@:::::::::@:::::::::@:::::::::@:::::
+ | .::@:::::::::@:::::::::@:::::::::@::::::.
+ | .::::@:::::::::@:::::::::@:::::::::@::::::::.
+ | .::::::@:::::::::@:::::::::@:::::::::@:::::::::@.
+ | .::::::::@:::::::::@:::::::::@:::::::::@:::::::::@::.
+ | @:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@::::
+ | .:@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::.
+ | .:::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::.
+ | .:::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::.
+ | .:::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:::::::::@:.
+ 0 +---------@---------@---------@---------@---------@---------@---------@->KB
+ 0 6.934
-
-Number of snapshots: 73
+Number of snapshots: 72
Detailed snapshots: [9, 19, 29, 39, 49, 59, 69]
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
@@ -147,4 +148,3 @@
--------------------------------------------------------------------------------
70 7,000 216 200 16 0
71 7,100 108 100 8 0
- 72 7,200 0 0 0 0
Modified: branches/MASSIF2/massif/tests/long-time.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/long-time.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/long-time.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
-2.3M| : @ : @ : @ : @ : @ :
- | : @ : @ : @ : @ : @ :
- | : @ : @ : @ : @ : @ :
- | ........: . . . . . @. . @ . @ :. @. :. @. :.
- | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
- | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
- | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
- | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
- | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
- | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
- |.. ::::::::.::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- |:: :::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- |::.......:::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
- 0 +--@-----------------------------@------@--@------@-----@-----@-----@----
+ MB
+2.193^ : @ : @ : @ : @ : @ :
+ | : @ : @ : @ : @ : @ :
+ | : @ : @ : @ : @ : @ :
+ | ........: . . . . . @. . @ . @ :. @. :. @. :.
+ | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
+ | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
+ | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
+ | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
+ | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
+ | ::::::::: : @ : : : @: : @ : @ :: @: :: @: ::
+ |.. ::::::::.::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ |:: :::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ |::.......:::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ |::@:::::::::::::::::::::::: : @ : : : @: :: :@ :: :@ ::::@:::: @: ::
+ 0 +--@-----------------------------@------@--@------@-----@-----@-----@--->GB
+ 0 11.10
-
Number of snapshots: 97
Detailed snapshots: [3, 40, 46, 49, 59, 69, 79, 89]
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/null.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/null.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/null.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
-1.0 |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- 0 +------------------------------------------------------------------------
+ B
+ 1^
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ 0 +----------------------------------------------------------------------->B
+ 0 1
-
Number of snapshots: 1
Detailed snapshots: []
--------------------------------------------------------------------------------
Added: branches/MASSIF2/massif/tests/one.c
===================================================================
--- branches/MASSIF2/massif/tests/one.c (rev 0)
+++ branches/MASSIF2/massif/tests/one.c 2007-09-24 02:15:42 UTC (rev 6905)
@@ -0,0 +1,10 @@
+#include <stdlib.h>
+
+// Allocate some memory and then deallocate it, to get a nice up-then-down
+// graph.
+
+int main(void)
+{
+ malloc(1);
+ return 0;
+}
Added: branches/MASSIF2/massif/tests/one.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/one.post.exp (rev 0)
+++ branches/MASSIF2/massif/tests/one.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -0,0 +1,38 @@
+--------------------------------------------------------------------------------
+Command: ./one
+Massif arguments: --stacks=no --time-unit=B --heap-admin=0
+ms_print arguments: massif.out
+--------------------------------------------------------------------------------
+
+
+ B
+ 1^ :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ 0 +----------------------------------------------------------------------->B
+ 0 1
+
+Number of snapshots: 2
+ Detailed snapshots: []
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
+ 0 0 0 0 0 0
+ 1 1 1 1 0 0
Added: branches/MASSIF2/massif/tests/one.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/one.stderr.exp (rev 0)
+++ branches/MASSIF2/massif/tests/one.stderr.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -0,0 +1,2 @@
+
+
Added: branches/MASSIF2/massif/tests/one.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/one.vgtest (rev 0)
+++ branches/MASSIF2/massif/tests/one.vgtest 2007-09-24 02:15:42 UTC (rev 6905)
@@ -0,0 +1,4 @@
+prog: one
+vgopts: --stacks=no --time-unit=B --heap-admin=0
+post: perl ../../massif/ms_print massif.out
+cleanup: rm massif.out
Modified: branches/MASSIF2/massif/tests/realloc.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/realloc.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/realloc.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
-150 | :
- | :
- | :
- | :
- | :
- | :
- | :
- | : :
- | : :
- | : :
- | : :
- | : :
- | : :
- | : . :
- | : : :
- | : : :
- | : : :
- | : : :
- | : : :
- | : : :
- 0 +------------------------------------------------------------------------
+ B
+ 150^ :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | :
+ | : :
+ | : :
+ | : :
+ | : :
+ | : :
+ | : :
+ | : . :
+ | : : :
+ | : : :
+ | : : :
+ | : : :
+ | : : :
+ | : : :
+ 0 +----------------------------------------------------------------------->B
+ 0 400
-
Number of snapshots: 6
Detailed snapshots: []
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/thresholds_0_0.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_0_0.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/thresholds_0_0.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
- 10k| @
- | @
- | @
- | @
- | . @
- | .. : @
- | . ::: : @
- | : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- 0 +-----------------------------------------------------------------------@
+ KB
+9.766^ @
+ | @
+ | @
+ | @
+ | . @
+ | .. : @
+ | . ::: : @
+ | : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ 0 +-----------------------------------------------------------------------@KB
+ 0 9.766
-
Number of snapshots: 10
Detailed snapshots: [9]
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/thresholds_0_10.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_0_10.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/thresholds_0_10.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
- 10k| @
- | @
- | @
- | @
- | . @
- | .. : @
- | . ::: : @
- | : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- 0 +-----------------------------------------------------------------------@
+ KB
+9.766^ @
+ | @
+ | @
+ | @
+ | . @
+ | .. : @
+ | . ::: : @
+ | : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ 0 +-----------------------------------------------------------------------@KB
+ 0 9.766
-
Number of snapshots: 10
Detailed snapshots: [9]
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/thresholds_10_0.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_0.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/thresholds_10_0.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
- 10k| @
- | @
- | @
- | @
- | . @
- | .. : @
- | . ::: : @
- | : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- 0 +-----------------------------------------------------------------------@
+ KB
+9.766^ @
+ | @
+ | @
+ | @
+ | . @
+ | .. : @
+ | . ::: : @
+ | : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ 0 +-----------------------------------------------------------------------@KB
+ 0 9.766
-
Number of snapshots: 10
Detailed snapshots: [9]
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/thresholds_10_10.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_10_10.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/thresholds_10_10.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
- 10k| @
- | @
- | @
- | @
- | . @
- | .. : @
- | . ::: : @
- | : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- 0 +-----------------------------------------------------------------------@
+ KB
+9.766^ @
+ | @
+ | @
+ | @
+ | . @
+ | .. : @
+ | . ::: : @
+ | : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ 0 +-----------------------------------------------------------------------@KB
+ 0 9.766
-
Number of snapshots: 10
Detailed snapshots: [9]
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/thresholds_5_0.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_5_0.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/thresholds_5_0.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
- 10k| @
- | @
- | @
- | @
- | . @
- | .. : @
- | . ::: : @
- | : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- | : : ::: : @
- 0 +-----------------------------------------------------------------------@
+ KB
+9.766^ @
+ | @
+ | @
+ | @
+ | . @
+ | .. : @
+ | . ::: : @
+ | : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ | : : ::: : @
+ 0 +-----------------------------------------------------------------------@KB
+ 0 9.766
-
Number of snapshots: 10
Detailed snapshots: [9]
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/thresholds_5_10.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/thresholds_5_10.post.exp 2007-09-23 01:14:25 UTC (rev 6904)
+++ branches/MASSIF2/massif/tests/thresholds_5_10.post.exp 2007-09-24 02:15:42 UTC (rev 6905)
@@ -5,29 +5,30 @@
--------------------------------------------------------------------------------
- 10k| @
- | @
- | @
- | @
- | . ...
[truncated message content] |