[pypy-svn] r59933 - pypy/build/benchmem

xoraxax at codespeak.net xoraxax at codespeak.net
Sat Nov 15 22:45:37 CET 2008


Author: xoraxax
Date: Sat Nov 15 22:45:36 2008
New Revision: 59933

Modified:
   pypy/build/benchmem/report_graphic.py
Log:
Use max() in the appprofiles graph generation when subtracting the baseline

Modified: pypy/build/benchmem/report_graphic.py
==============================================================================
--- pypy/build/benchmem/report_graphic.py	(original)
+++ pypy/build/benchmem/report_graphic.py	Sat Nov 15 22:45:36 2008
@@ -100,9 +100,10 @@
                     basesize = base_snapshots[result.executable].heap_and_data(result)
                 else:
                     basesize = 0
-                # XXX we also measure the working set of the data segment or
-                # third party libraries here
-                y = [snapshot.heap_and_data(result) - basesize
+                # we need a max(\cdot, 0) here because
+                # e.g. the generational GC will likely trigger a nursery
+                # collect that reduces the memory usage compared to the baseline
+                y = [max(snapshot.heap_and_data(result) - basesize, 0)
                      for snapshot in result.snapshots]
                 plots.append(pylab.plot(x, y))
             pylab.title(name)



More information about the Pypy-commit mailing list