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

Unified Diff: tools/process-heap-prof.py

Issue 155764: Heap profiling: add logging of heap memory stats (capacity, used) under 'log-gc' flag. (Closed)
Patch Set: Created 11 years, 5 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 | « src/log.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/process-heap-prof.py
diff --git a/tools/process-heap-prof.py b/tools/process-heap-prof.py
index 79c49f83d8ca300d2aa3f2f16ac5ff7cc0b05e2b..b8ab2d39863e345d7572f6a6d541a25d32401eb9 100755
--- a/tools/process-heap-prof.py
+++ b/tools/process-heap-prof.py
@@ -39,6 +39,7 @@
import csv, sys, time
def process_logfile(filename):
+ first_call_time = None
sample_time = 0.0
sampling = False
try:
@@ -53,7 +54,10 @@ def process_logfile(filename):
for row in logreader:
if row[0] == 'heap-sample-begin' and row[1] == 'Heap':
- sample_time = float(row[3]) + float(row[4])/1000000.0
+ sample_time = float(row[3])/1000.0
+ if first_call_time == None:
+ first_call_time = sample_time
+ sample_time -= first_call_time
print('BEGIN_SAMPLE %.2f' % sample_time)
sampling = True
elif row[0] == 'heap-sample-end' and row[1] == 'Heap':
« no previous file with comments | « src/log.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698