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

Side by Side Diff: tools/gc-nvp-to-csv.py

Issue 1175113008: [tools] Add gc-nvp-to-csv.py script. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix nit Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/gc-nvp-trace-processor.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2015 the V8 project authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 #
8 # This is an utility for generating csv files based on GC traces produced by
9 # V8 when run with flags --trace-gc --trace-gc-nvp.
10 #
11 # Usage: gc-nvp-to-csv.py <GC-trace-filename>
12 #
13
14 import sys
15 import gc_nvp_common
16
17 def process_trace(filename):
18 trace = gc_nvp_common.parse_gc_trace(filename)
19 if len(trace):
20 keys = trace[0].keys()
21 print ', '.join(keys)
22 for entry in trace:
23 print ', '.join(map(lambda key: str(entry[key]), keys))
24
25
26 if len(sys.argv) != 2:
27 print "Usage: %s <GC-trace-filename>" % sys.argv[0]
28 sys.exit(1)
29
30 process_trace(sys.argv[1])
OLDNEW
« no previous file with comments | « no previous file | tools/gc-nvp-trace-processor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698