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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gc-nvp-trace-processor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gc-nvp-to-csv.py
diff --git a/tools/gc-nvp-to-csv.py b/tools/gc-nvp-to-csv.py
new file mode 100755
index 0000000000000000000000000000000000000000..26ed8e1c977b353f435e26ea48443e5aad82340f
--- /dev/null
+++ b/tools/gc-nvp-to-csv.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+#
+# Copyright 2015 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+#
+# This is an utility for generating csv files based on GC traces produced by
+# V8 when run with flags --trace-gc --trace-gc-nvp.
+#
+# Usage: gc-nvp-to-csv.py <GC-trace-filename>
+#
+
+import sys
+import gc_nvp_common
+
+def process_trace(filename):
+ trace = gc_nvp_common.parse_gc_trace(filename)
+ if len(trace):
+ keys = trace[0].keys()
+ print ', '.join(keys)
+ for entry in trace:
+ print ', '.join(map(lambda key: str(entry[key]), keys))
+
+
+if len(sys.argv) != 2:
+ print "Usage: %s <GC-trace-filename>" % sys.argv[0]
+ sys.exit(1)
+
+process_trace(sys.argv[1])
« 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