Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deps/v8/src/flag-definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,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.")
Expand Down
6 changes: 6 additions & 0 deletions deps/v8/src/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,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);
Expand Down