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

Unified Diff: tools/ignition/linux_perf_report.py

Issue 2511553002: [Tools] Update linux_perf_report to split out GC. (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ignition/linux_perf_report.py
diff --git a/tools/ignition/linux_perf_report.py b/tools/ignition/linux_perf_report.py
index 69db37cbae4b276005a06e510e007378a0a96f8e..4e0b8844eae511abdc508bf0d5112a6885f2339c 100755
--- a/tools/ignition/linux_perf_report.py
+++ b/tools/ignition/linux_perf_report.py
@@ -54,6 +54,8 @@ COMPILER_SYMBOLS_RE = re.compile(
r"v8::internal::(?:\(anonymous namespace\)::)?Compile|v8::internal::Parser")
JIT_CODE_SYMBOLS_RE = re.compile(
r"(LazyCompile|Compile|Eval|Script):(\*|~)")
+GC_SYMBOLS_RE = re.compile(
+ r"v8::internal::Heap::CollectGarbage")
def strip_function_parameters(symbol):
@@ -74,7 +76,7 @@ def strip_function_parameters(symbol):
def collapsed_callchains_generator(perf_stream, hide_other=False,
hide_compiler=False, hide_jit=False,
- show_full_signatures=False):
+ hide_gc=False, show_full_signatures=False):
current_chain = []
skip_until_end_of_chain = False
compiler_symbol_in_chain = False
@@ -122,6 +124,11 @@ def collapsed_callchains_generator(perf_stream, hide_other=False,
current_chain.append("[jit]")
yield current_chain
skip_until_end_of_chain = True
+ elif GC_SYMBOLS_RE.match(symbol):
+ if not hide_gc:
+ current_chain.append("[gc]")
+ yield current_chain
+ skip_until_end_of_chain = True
elif symbol == "Stub:CEntryStub" and compiler_symbol_in_chain:
if not hide_compiler:
current_chain.append("[compiler]")
@@ -212,6 +219,11 @@ def parse_command_line():
action="store_true"
)
command_line_parser.add_argument(
+ "--hide-gc",
+ help="Hide samples from garbage collection",
+ action="store_true"
+ )
+ command_line_parser.add_argument(
"--show-full-signatures", "-s",
help="show full signatures instead of function names",
action="store_true"
@@ -237,7 +249,8 @@ def main():
callchains = collapsed_callchains_generator(
perf.stdout, program_options.hide_other, program_options.hide_compiler,
- program_options.hide_jit, program_options.show_full_signatures)
+ program_options.hide_jit, program_options.hide_gc,
+ program_options.show_full_signatures)
if program_options.output_flamegraph:
write_flamegraph_input_file(program_options.output_stream, callchains)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698