Author: njn
Date: 2007-11-26 22:27:02 +0000 (Mon, 26 Nov 2007)
New Revision: 7231

Log:
Minor tweak to drawing of peak and detailed snapshot bars on the graph.

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


Modified: trunk/massif/docs/ms-manual.xml
===================================================================
--- trunk/massif/docs/ms-manual.xml     2007-11-26 22:17:19 UTC (rev 7230)
+++ trunk/massif/docs/ms-manual.xml     2007-11-26 22:27:02 UTC (rev 7231)
@@ -212,7 +212,7 @@
      |                                      :        #  : :  : : :  : .       
      |                            :         :        #  : :  : : :  : :  .    
      |                            :         :        #  : :  : : :  : :  : .  
-     |                        :   :         :        #  : :  : : :  : :  : : .
+     |                        :   :         :        #  : :  : : :  : :  : : ,
      |                     @  :   :         :        #  : :  : : :  : :  : : @
      |                   : @  :   :         :        #  : :  : : :  : :  : : @
      |                :  : @  :   :         :        #  : :  : : :  : :  : : @
@@ -248,7 +248,7 @@
 <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 @@
 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 @@
 <screen><![CDATA[
     MB
 3.952^                                                                    #.
-     |                                                                  [EMAIL 
PROTECTED]:
-     |                                                            . .. :@@#:
+     |                                                                  ,@#:
+     |                                                            , .. :@@#:
      |                                                            @ :: :@@#:.
-     |                                                           .@ :: :@@#::
-     |                                                       . .@@@ :: :@@#:.
+     |                                                           ,@ :: :@@#::
+     |                                                       , .@@@ :: :@@#:.
      |                                                      .@ :@@@ :: :@@#::
      |                                                    : :@ :@@@ :: :@@#::
-     |                                                   .: :@ :@@@ :: :@@#::
-     |                                                 .:@: :@ :@@@ :: :@@#::.
+     |                                                   ,: :@ :@@@ :: :@@#::
+     |                                                 ,:@: :@ :@@@ :: :@@#::.
      |                                                @@:@: :@ :@@@ :: :@@#:::
-     |                         ..:      .::   . .  .::@@:@: :@ :@@@ :: :@@#:::
+     |                         ,,:      .::   . ,  .::@@:@: :@ :@@@ :: :@@#:::
      |                       .:@@:   .: ::: ::: @  :::@@:@: :@ :@@@ :: :@@#:::
-     |                    .: ::@@:  ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
+     |                    ,: ::@@:  ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
      |                    @: ::@@:  ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#::.
      |                    @: ::@@:  ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
-     |                  . @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
+     |                  , @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
      |                ::@ @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
-     |           . :::::@ @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
+     |           , :::::@ @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
      |         ..@ :::::@ @: ::@@:: ::: ::::::: @  :::@@:@: :@ :@@@ :: :@@#:::
    0 
+----------------------------------------------------------------------->Mi
      0                                                                   626.4

Modified: trunk/massif/ms_main.c
===================================================================
--- trunk/massif/ms_main.c      2007-11-26 22:17:19 UTC (rev 7230)
+++ trunk/massif/ms_main.c      2007-11-26 22:27:02 UTC (rev 7231)
@@ -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:

Modified: trunk/massif/ms_print.in
===================================================================
--- trunk/massif/ms_print.in    2007-11-26 22:17:19 UTC (rev 7230)
+++ trunk/massif/ms_print.in    2007-11-26 22:27:02 UTC (rev 7231)
@@ -523,7 +523,9 @@
     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 @@
         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++) {


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to