]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Minor tweak to drawing of peak and detailed snapshot bars on the graph.
authorNicholas Nethercote <njn@valgrind.org>
Mon, 26 Nov 2007 22:27:02 +0000 (22:27 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Mon, 26 Nov 2007 22:27:02 +0000 (22:27 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7231

massif/docs/ms-manual.xml
massif/ms_main.c
massif/ms_print.in

index c9eec4d3f303027d3b975e8456ca0f7a3433fcfd..8cd7bd729884d415c29d3043e649bbb07a478041 100644 (file)
@@ -212,7 +212,7 @@ re-run ms_print, we get this more useful graph:</para>
      |                                      :        #  : :  : : :  : .       
      |                            :         :        #  : :  : : :  : :  .    
      |                            :         :        #  : :  : : :  : :  : .  
-     |                        :   :         :        #  : :  : : :  : :  : : .
+     |                        :   :         :        #  : :  : : :  : :  : : ,
      |                     @  :   :         :        #  : :  : : :  : :  : : @
      |                   : @  :   :         :        #  : :  : : :  : :  : : @
      |                :  : @  :   :         :        #  : :  : : :  : :  : : @
@@ -248,7 +248,7 @@ graph by bars consisting of ':' and '.' characters.</para>
 <para>Some snapshots are <emphasis>detailed</emphasis>.  Information about
 where allocations happened are recorded for these snapshots, as we will see
 shortly.  Detailed snapshots are represented in the graph by bars consisting
-of '@' and '.' characters.  The text at the bottom show that 3 detailed
+of '@' and ',' characters.  The text at the bottom show that 3 detailed
 snapshots were taken for this program (snapshots 9, 14 and 24).  By default,
 every 10th snapshot is detailed, although this can be changed via the
 <computeroutput>--detailed-freq</computeroutput>option.</para>
@@ -260,7 +260,7 @@ default Massif records a peak whose size is within 1% of the size of the
 true peak.  See the description of the
 <computeroutput>--peak-inaccuracy</computeroutput> option below for more
 details.) The peak snapshot is represented in the graph by a bar consisting
-of '#' and '.' characters.  The text at the bottom show that snapshot 14 was
+of '#' and ',' characters.  The text at the bottom show that snapshot 14 was
 the peak.  Note that for tiny programs that never deallocate heap memory,
 Massif will record a peak snapshot.</para>
 
@@ -269,24 +269,24 @@ browser.  It shows what graphs for larger programs look like.</para>
 <screen><![CDATA[
     MB
 3.952^                                                                    #.
-     |                                                                  .@#:
-     |                                                            . .. :@@#:
+     |                                                                  ,@#:
+     |                                                            , .. :@@#:
      |                                                            @ :: :@@#:.
-     |                                                           .@ :: :@@#::
-     |                                                       . .@@@ :: :@@#:.
+     |                                                           ,@ :: :@@#::
+     |                                                       , .@@@ :: :@@#:.
      |                                                      .@ :@@@ :: :@@#::
      |                                                    : :@ :@@@ :: :@@#::
-     |                                                   .: :@ :@@@ :: :@@#::
-     |                                                 .:@: :@ :@@@ :: :@@#::.
+     |                                                   ,: :@ :@@@ :: :@@#::
+     |                                                 ,:@: :@ :@@@ :: :@@#::.
      |                                                @@:@: :@ :@@@ :: :@@#:::
-     |                         ..:      .::   . .  .::@@:@: :@ :@@@ :: :@@#:::
+     |                         ,,:      .::   . ,  .::@@:@: :@ :@@@ :: :@@#:::
      |                       .:@@:   .: ::: ::: @  :::@@:@: :@ :@@@ :: :@@#:::
-     |                    .: ::@@:  ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
+     |                    ,: ::@@:  ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
      |                    @: ::@@:  ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#::.
      |                    @: ::@@:  ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
-     |                  . @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
+     |                  , @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
      |                ::@ @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
-     |           . :::::@ @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
+     |           , :::::@ @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
      |         ..@ :::::@ @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
    0 +----------------------------------------------------------------------->Mi
      0                                                                   626.4
index b6997b9899a5c8e85ec0e05b223caad4bb0d5469..caf7ae3700208c1d3ffaa21a2fe8fa7a9d7b6e3e 100644 (file)
@@ -34,7 +34,6 @@
 // - address/close all the bug reports below (after writing docs)
 // - do a graph-drawing test
 // - Get Josef to update the Callgrind --callgrind-out-file option.
-// - Use '_' instead of '.' for detailed/peak bars?
 //
 // Todo -- nice, but less critical:
 // - make file format more generic.  Obstacles:
index 1b225342337539b927a405876e1d112473c2f35f..6cc3faa30b94c81b9dfb50d928e1cdfaaef2fcbe 100755 (executable)
@@ -523,7 +523,9 @@ sub read_input_file()
     my $peak_full_char     = '#';                            
     my $detailed_full_char = '@';
     my $normal_full_char   = ':';
-    my $half_char          = '.';
+    my $peak_half_char     = ',';                            
+    my $detailed_half_char = ',';
+    my $normal_half_char   = '.';
 
     # 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.
@@ -559,13 +561,16 @@ sub read_input_file()
         if ($should_draw_column) {
             # If it's detailed, mark the X-axis.  Also choose the full-slot
             # char.
-            my $full_char;
+            my ($full_char, $half_char);
             if ($i == $peak_num)  {                          
                 $full_char = $peak_full_char;                
+                $half_char = $peak_half_char;
             } elsif ($is_detaileds[$i])  {    
                 $full_char = $detailed_full_char;
+                $half_char = $detailed_half_char;
             } else {
                 $full_char = $normal_full_char;
+                $half_char = $normal_half_char;
             }
             # Grow this snapshot bar from bottom to top.
             for ($y = 1; $y <= $graph_y; $y++) {