Commit 9da3ab66 authored by ofrobots's avatar ofrobots Committed by Commit bot

New flag --perf_basic_prof_only_functions

Restricts linux perf-event code range reporting to functions only (i.e. on
stubs.) While this makes the gathered ticks less accurate, it reduces the
growth of the /tmp/perf-${pid}.map file.

BUG=v8:3453
R=hablich@chromium.org,danno@chromium.org
LOG=N

Review URL: https://codereview.chromium.org/1292743002

Cr-Commit-Position: refs/heads/master@{#30179}
parent 0c5fbd39
......@@ -943,6 +943,9 @@ DEFINE_BOOL(ll_prof, false, "Enable low-level linux profiler.")
DEFINE_BOOL(perf_basic_prof, false,
"Enable perf linux profiler (basic support).")
DEFINE_NEG_IMPLICATION(perf_basic_prof, compact_code_space)
DEFINE_BOOL(perf_basic_prof_only_functions, false,
"Only report function code ranges to perf (i.e. no stubs).")
DEFINE_IMPLICATION(perf_basic_prof_only_functions, perf_basic_prof)
DEFINE_STRING(gc_fake_mmap, "/tmp/__v8_gc__",
"Specify the name of the file for fake gc mmap used in ll_prof")
DEFINE_BOOL(log_internal_timer_events, false, "Time internal events.")
......
......@@ -288,6 +288,12 @@ void PerfBasicLogger::LogRecordedBuffer(Code* code,
int length) {
DCHECK(code->instruction_start() == code->address() + Code::kHeaderSize);
if (FLAG_perf_basic_prof_only_functions &&
(code->kind() != Code::FUNCTION &&
code->kind() != Code::OPTIMIZED_FUNCTION)) {
return;
}
base::OS::FPrint(perf_output_handle_, "%llx %x %.*s\n",
reinterpret_cast<uint64_t>(code->instruction_start()),
code->instruction_size(), length, name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment