<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,7 +23,7 @@ They are called like this: most_allocations.sh program and most_allocated.sh pro
 --------------------------------------
 memview.py
 
-This tool generated images based on free_size's output.
+This tool generates images based on free_size's output.
 It is called without any arguments, but in the current folder there must be a file called trace-out.txt, which is the input file.
 
 --------------------------------------</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 
 echo -e &quot;Valgrind is running ...\n&quot;
 
-G_SLICE=always-malloc valgrind --tool=massif --massif-out-file=/dev/null --alloc-fn=g_mem_chunk_alloc --alloc-fn=g_malloc --alloc-fn=g_malloc0 --alloc-fn=g_realloc $@ &amp;&gt; temporary_file
+G_SLICE=always-malloc valgrind --tool=massif --alloc-fn=g_mem_chunk_alloc --alloc-fn=g_malloc --alloc-fn=g_malloc0 --alloc-fn=g_realloc $@ &amp;&gt; temporary_file
 
 echo -e &quot;Processing data ...\n&quot;
 grep -e '^m\ ' -e '^f\ ' -e '^[1-9]' temporary_file &gt; temporary_file2</diff>
      <filename>alloc_lifespan.sh</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 
 from PIL import Image
 
-IMAGE_BASE_WIDTH = 175
+IMAGE_BASE_WIDTH = 75
 SCALE_IMAGE_BY = 6
 
 PAGE_SIZE = 4096
@@ -82,36 +82,6 @@ class AllocationVisualizer:
         keys = self.map.keys()
         keys.sort()
 
-        height = (len(keys) / imSide) + 1
-        im = Image.new(&quot;RGBA&quot;, (imSide, height), (0,0,0,0))
-        pix = im.load()
-        print imSide, height
-        c = 0
-        for k in keys:
-            val = self.map[k]
-
-            x = c % imSide
-            y = c / imSide
-            if val == 1.0:
-                colour = (0, 0, 0, 255)
-            elif val == -1.0:
-                colour = (119, 255, 187, 255)
-            else:
-                val += 1
-                val /= 2
-                z = int(255 - (255 * val))
-                colour = (z, z, z, 255)
-
-            pix[x, y] = colour
-
-            c += 1
-
-        return im
-
-    def makeImage2(self, imSide = 256):
-        keys = self.map.keys()
-        keys.sort()
-
         height = (((self.highaddr - self.lowaddr) / PAGE_SIZE) / imSide) + 1
         im = Image.new(&quot;RGBA&quot;, (imSide, height), (0,255,255,255))
         pix = im.load()
@@ -159,16 +129,7 @@ def main():
 
     f.close()
 
-    im = map.makeImage(75)
-    newsize = im.size
-    w = newsize[0] * SCALE_IMAGE_BY
-    h = newsize[1] * SCALE_IMAGE_BY
-    im = im.resize((w, h), Image.NEAREST)
-    im.save(&quot;mem%03d.png&quot; % (imageIndex,), &quot;PNG&quot;)
-
-    imageIndex += 1
-
-    im = map.makeImage2(IMAGE_BASE_WIDTH)
+    im = map.makeImage(IMAGE_BASE_WIDTH)
     newsize = im.size
     w = newsize[0] * SCALE_IMAGE_BY
     h = newsize[1] * SCALE_IMAGE_BY</diff>
      <filename>memview.py</filename>
    </modified>
    <modified>
      <diff>@@ -2039,7 +2039,7 @@ static void pp_snapshot_SXPt(Int fd, SXPt* sxpt, Int depth, Char* depth_str,
       Char* s = ( sxpt-&gt;Insig.n_xpts == 1 ? &quot;,&quot; : &quot;s, all&quot; );
       perc = make_perc(sxpt-&gt;szB, snapshot_total_szB);
       FP(&quot;%sn0: %lu in %d place%s below massif's threshold (%s)\n&quot;,
-         depth_str, sxpt-&gt;nr, sxpt-&gt;Insig.n_xpts, s,
+         depth_str, sxpt-&gt;szB, sxpt-&gt;Insig.n_xpts, s,
          make_perc((ULong)clo_threshold, 100));
       break;
     }</diff>
      <filename>ms_main.c</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,7 @@ ensure_log_file (void)
   if (log_file)
     return;
 
-  snprintf (filename, sizeof (filename), &quot;/tmp/mp-%d.log&quot;, getpid ());
+  snprintf (filename, sizeof (filename), &quot;gmh-%d.log&quot;, getpid ());
 
   log_file = fopen (filename, &quot;w&quot;);
   if (!log_file)
@@ -128,6 +128,5 @@ mp_init (void)
   };
 
   g_mem_set_vtable (&amp;mp_mem_table);
-
 }
 </diff>
      <filename>my_gmalloc_hook.c</filename>
    </modified>
    <modified>
      <diff>@@ -36,7 +36,7 @@ ensure_log_file (void)
 	if (log_file)
 		return;
 
-	snprintf (filename, sizeof (filename), &quot;/tmp/my_malloc_hook-%d.log&quot;, getpid ());
+	snprintf (filename, sizeof (filename), &quot;mh-%d.log&quot;, getpid());
 
 	log_file = fopen (filename, &quot;w&quot;);
 }
@@ -178,5 +178,5 @@ my_free_hook (void *ptr, const void *caller)
 	__realloc_hook= my_realloc_hook; 
 
 	pthread_mutex_unlock (&amp;mutex);
-
 }
+</diff>
      <filename>my_malloc_hook.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c108e41f33f011c9e9e711c84773c48d1e947712</id>
    </parent>
  </parents>
  <author>
    <name>Andrei Soare</name>
    <email>andrei@andrei-laptop.(none)</email>
  </author>
  <url>http://github.com/asoare/bprof/commit/c07753b1a1cf6459944582c8ec55ee1542d201a8</url>
  <id>c07753b1a1cf6459944582c8ec55ee1542d201a8</id>
  <committed-date>2008-08-14T05:17:54-07:00</committed-date>
  <authored-date>2008-08-14T05:17:54-07:00</authored-date>
  <message>*improved memview.py, and minor modifications to the hooks</message>
  <tree>e6a4e359a73d8ed2cfa317157101d21678192d09</tree>
  <committer>
    <name>Andrei Soare</name>
    <email>andrei@andrei-laptop.(none)</email>
  </committer>
</commit>
