Roll V8 back to 3.6
Roll back to V8 3.6 to fix x86 build, we don't have ucontext.h.
This reverts commits:
5d4cdbf7a67d3662fa0bee4efdb7edd8daec9b0b
c7cc028aaeedbbfa11c11d0b7b243b3d9e837ed9
592a9fc1d8ea420377a2e7efd0600e20b058be2b
Bug: 5688872
Change-Id: Ic961bb5e65b778e98bbfb71cce71d99fa949e995
diff --git a/tools/gc-nvp-trace-processor.py b/tools/gc-nvp-trace-processor.py
index fe5a7f3..511ab2b 100755
--- a/tools/gc-nvp-trace-processor.py
+++ b/tools/gc-nvp-trace-processor.py
@@ -219,17 +219,13 @@
if r['gc'] == 's':
# there is no 'other' scope for scavenging collections.
return 0
- return r['pause'] - r['mark'] - r['sweep'] - r['external']
+ 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
-
-def real_mutator(r):
- return r['mutator'] - r['stepstook']
-
plots = [
[
Set('style fill solid 0.5 noborder'),
@@ -238,24 +234,9 @@
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'),
- Item('IGC Steps', 'stepstook', lc = '#FF6347'))
- ],
- [
- Set('style fill solid 0.5 noborder'),
- Set('style histogram rowstacked'),
- Set('style data histograms'),
- Plot(Item('Scavenge', scavenge_scope, lc = 'green'),
- Item('Marking', 'mark', lc = 'purple'),
- Item('Sweep', 'sweep', lc = 'blue'),
- Item('External', 'external', lc = '#489D43'),
- Item('Other', other_scope, lc = '#ADD8E6'),
- Item('External', 'external', lc = '#D3D3D3'))
- ],
-
- [
- Plot(Item('Mutator', real_mutator, lc = 'black', style = 'lines'))
+ Item('Other', other_scope, lc = 'grey'))
],
[
Set('style histogram rowstacked'),
@@ -294,7 +275,7 @@
return reduce(lambda t,r: f(t, r[field]), trace, init)
def calc_total(trace, field):
- return freduce(lambda t,v: t + long(v), field, trace, long(0))
+ return freduce(lambda t,v: t + v, field, trace, 0)
def calc_max(trace, field):
return freduce(lambda t,r: max(t, r), field, trace, 0)
@@ -307,9 +288,8 @@
trace = parse_gc_trace(filename)
marksweeps = filter(lambda r: r['gc'] == 'ms', trace)
+ markcompacts = filter(lambda r: r['gc'] == 'mc', trace)
scavenges = filter(lambda r: r['gc'] == 's', trace)
- globalgcs = filter(lambda r: r['gc'] != 's', trace)
-
charts = plot_all(plots, trace, filename)
@@ -322,7 +302,7 @@
else:
avg = 0
if n > 1:
- dev = math.sqrt(freduce(lambda t,r: t + (r - avg) ** 2, field, trace, 0) /
+ dev = math.sqrt(freduce(lambda t,r: (r - avg) ** 2, field, trace, 0) /
(n - 1))
else:
dev = 0
@@ -331,31 +311,6 @@
'<td>%d</td><td>%d [dev %f]</td></tr>' %
(prefix, n, total, max, avg, dev))
- def HumanReadable(size):
- suffixes = ['bytes', 'kB', 'MB', 'GB']
- power = 1
- for i in range(len(suffixes)):
- if size < power*1024:
- return "%.1f" % (float(size) / power) + " " + suffixes[i]
- power *= 1024
-
- def throughput(name, trace):
- total_live_after = calc_total(trace, 'total_size_after')
- total_live_before = calc_total(trace, 'total_size_before')
- total_gc = calc_total(trace, 'pause')
- if total_gc == 0:
- return
- out.write('GC %s Throughput (after): %s / %s ms = %s/ms<br/>' %
- (name,
- HumanReadable(total_live_after),
- total_gc,
- HumanReadable(total_live_after / total_gc)))
- out.write('GC %s Throughput (before): %s / %s ms = %s/ms<br/>' %
- (name,
- HumanReadable(total_live_before),
- total_gc,
- HumanReadable(total_live_before / total_gc)))
-
with open(filename + '.html', 'w') as out:
out.write('<html><body>')
@@ -365,17 +320,15 @@
stats(out, 'Total in GC', trace, 'pause')
stats(out, 'Scavenge', scavenges, 'pause')
stats(out, 'MarkSweep', marksweeps, 'pause')
+ stats(out, 'MarkCompact', markcompacts, 'pause')
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>')
- throughput('TOTAL', trace)
- throughput('MS', marksweeps)
- throughput('OLDSPACE', globalgcs)
- out.write('<br/>')
for chart in charts:
out.write('<img src="%s">' % chart)
out.write('</body></html>')