Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Unified Diff: tools/gc-nvp-trace-processor.py

Issue 7067022: Enhance gc-nvp-trace-processor.py: (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gc-nvp-trace-processor.py
diff --git a/tools/gc-nvp-trace-processor.py b/tools/gc-nvp-trace-processor.py
index 2c173ab56ee456d4f27cd08bf7810eeef4501468..511ab2bcdf8b2d0586e4ff64adf56b396b0ea79b 100755
--- a/tools/gc-nvp-trace-processor.py
+++ b/tools/gc-nvp-trace-processor.py
@@ -216,16 +216,26 @@ def reclaimed_bytes(row):
return row['total_size_before'] - row['total_size_after']
def other_scope(r):
- return r['pause'] - r['mark'] - r['sweep'] - r['compact']
+ if r['gc'] == 's':
+ # there is no 'other' scope for scavenging collections.
+ return 0
+ return r['pause'] - r['mark'] - r['sweep'] - r['compact'] - r['external']
+
+def scavenge_scope(r):
+ if r['gc'] == 's':
+ return r['pause'] - r['external']
+ return 0
plots = [
[
Set('style fill solid 0.5 noborder'),
Set('style histogram rowstacked'),
Set('style data histograms'),
- Plot(Item('Marking', 'mark', lc = 'purple'),
+ Plot(Item('Scavenge', scavenge_scope, lc = 'green'),
+ Item('Marking', 'mark', lc = 'purple'),
Item('Sweep', 'sweep', lc = 'blue'),
Item('Compaction', 'compact', lc = 'red'),
+ Item('External', 'external', lc = '#489D43'),
Item('Other', other_scope, lc = 'grey'))
],
[
@@ -314,6 +324,10 @@ def process_trace(filename):
stats(out, 'Mark', filter(lambda r: r['mark'] != 0, trace), 'mark')
stats(out, 'Sweep', filter(lambda r: r['sweep'] != 0, trace), 'sweep')
stats(out, 'Compact', filter(lambda r: r['compact'] != 0, trace), 'compact')
+ stats(out,
+ 'External',
+ filter(lambda r: r['external'] != 0, trace),
+ 'external')
out.write('</table>')
for chart in charts:
out.write('<img src="%s">' % chart)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698