| 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':
|
|
|