[pypy-svn] r59610 - pypy/build/benchmem
xoraxax at codespeak.net
xoraxax at codespeak.net
Fri Oct 31 21:35:12 CET 2008
Author: xoraxax
Date: Fri Oct 31 21:35:10 2008
New Revision: 59610
Modified:
pypy/build/benchmem/report.py
pypy/build/benchmem/report_graphic.py
Log:
Show heap private memory for approfiles, this excludes dirty static data, though.
Modified: pypy/build/benchmem/report.py
==============================================================================
--- pypy/build/benchmem/report.py (original)
+++ pypy/build/benchmem/report.py Fri Oct 31 21:35:10 2008
@@ -224,7 +224,8 @@
inv=True).
filter(group=self.HEAP, inv=True).private for result in
results])
- return plotter.plot_baseint_sizes(heap_private, ip_code, ip_data, rest, results)
+ plotter.plot_baseint_sizes(heap_private, ip_code, ip_data, rest, [r.executable for r in results])
+ return dict([(r.executable, r.snapshot.heap_private()) for r in results])
class BaseTimeOfInterpreters:
Modified: pypy/build/benchmem/report_graphic.py
==============================================================================
--- pypy/build/benchmem/report_graphic.py (original)
+++ pypy/build/benchmem/report_graphic.py Fri Oct 31 21:35:10 2008
@@ -17,7 +17,7 @@
self.basepath = basepath
self.show = show
- def plot_baseint_sizes(self, heap_private, ip_code, ip_data, rest, results):
+ def plot_baseint_sizes(self, heap_private, ip_code, ip_data, rest, executables):
# XXX add axes scaling
heap_private = numpy.array(heap_private)
ip_code = numpy.array(ip_code)
@@ -32,7 +32,7 @@
p2 = pylab.bar(ind, ip_data, WIDTH, color='w', bottom=heap_private+ip_code)
p3 = pylab.bar(ind, rest, WIDTH, color='black',
bottom=heap_private+ip_code+ip_data)
- pylab.xticks(ind + WIDTH/2, [result.executable for result in results])
+ pylab.xticks(ind + WIDTH/2, executables)
pylab.legend([p0[0], p1[0], p2[0], p3[0]],
['heap private', 'ip code', 'ip data', 'rest'])
pylab.ylabel('memory consumption (kB)')
@@ -40,10 +40,6 @@
pylab.savefig(self.basepath + "base_size.ps")
if self.show:
pylab.show()
- res = {}
- for i, value in enumerate(ip_code + ip_data + heap_private + rest):
- res[results[i].executable] = value
- return res
def plot_objsizes(self, benchresults, names, executables, split=SPLIT):
# XXX implement saner colorization
@@ -80,7 +76,7 @@
if self.show:
pylab.show()
- def plot_appprofiles(self, name2results, totals):
+ def plot_appprofiles(self, name2results, base_snapshots):
""" This function plots incremental memory consumption of app benchmarks
(without interpreter size if possible) versus time
"""
@@ -97,13 +93,12 @@
x = [val - min_ts for val in timestamps]
else:
x = [(val - min_ts)/d_ts*100 for val in timestamps]
- if totals:
- basesize = totals[result.executable]
+ if base_snapshots:
+ basesize = base_snapshots[result.executable].heap_private()
else:
basesize = 0
- # XXX measures also the used code pages, this is bad because we do not want to
- # mix effects because of code generation and GC behaviour
- y = [snapshot.private - basesize
+ y = [snapshot.heap_private() - basesize
+ # we do not measure the dirty static data here which is probably sane
for snapshot in result.snapshots]
pylab.title(name)
plots.append(pylab.plot(x, y))
@@ -111,9 +106,10 @@
pylab.legend(plots, [result.executable for result in results])
xlabel = ["wall clock time (%)", "wall clock time (s)"][SHOW_TS]
pylab.xlabel(xlabel)
- ylabel = ["", "incremental "][bool(basesize)] + "private memory consumption (kB)"
+ ylabel = ["", "incremental "][bool(basesize)] + "heap memory consumption (kB)"
pylab.ylabel(ylabel)
if self.basepath is not None:
pylab.savefig(self.basepath + 'appprofiles_%s.ps' % name)
if self.show:
pylab.show()
+
More information about the Pypy-commit
mailing list