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

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

Issue 3135026: Merge flush code phase into marking phase. (Closed)
Patch Set: returned checked casts Created 10 years, 4 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 | « test/cctest/test-heap.cc ('k') | 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 f1f9dc01c7782e380dfda235330d7225ffa1b37f..285689d8f24f08ea11448156da2984baa99ee059 100755
--- a/tools/gc-nvp-trace-processor.py
+++ b/tools/gc-nvp-trace-processor.py
@@ -288,7 +288,10 @@ def process_trace(filename):
n = len(trace)
total = calc_total(trace, field)
max = calc_max(trace, field)
- avg = total / n
+ if n > 0:
+ avg = total / n
+ else:
+ avg = 0
if n > 1:
dev = math.sqrt(freduce(lambda t,r: (r - avg) ** 2, field, trace, 0) /
(n - 1))
« no previous file with comments | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698