| 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)
|
|
|