Commit 56baf567 authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cpu-profiler] Add flag to always generate accurate line info.

For optimized code there are two modes. This is controlled by
NeedsSourcePositionsForProfiling(). The problem we currently have is
that this mode must be enabled before the code is optimized, otherwise
the source position information will be low quality, even once the CPU
profiler is turned on.

Also add an implication from --future to this new flag, to gather
perf & memory data from the bots.

Bug: v8:7983
Change-Id: I993fc03df83028529eea365b6d336d9f4c0dcd2b
Reviewed-on: https://chromium-review.googlesource.com/1156309Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54809}
parent 8b450f59
......@@ -1251,6 +1251,10 @@ DEFINE_BOOL(log_function_events, false,
DEFINE_BOOL(prof, false,
"Log statistical profiling information (implies --log-code).")
DEFINE_BOOL(detailed_line_info, false,
"Always generate detailed line information for CPU profiling.")
DEFINE_IMPLICATION(future, detailed_line_info)
#if defined(ANDROID)
// Phones and tablets have processors that are much slower than desktop
// and laptop computers for which current heuristics are tuned.
......
......@@ -3242,7 +3242,8 @@ bool Isolate::use_optimizer() {
bool Isolate::NeedsSourcePositionsForProfiling() const {
return FLAG_trace_deopt || FLAG_trace_turbo || FLAG_trace_turbo_graph ||
FLAG_turbo_profiling || FLAG_perf_prof || is_profiling() ||
debug_->is_active() || logger_->is_logging() || FLAG_trace_maps;
debug_->is_active() || logger_->is_logging() || FLAG_trace_maps ||
FLAG_detailed_line_info;
}
void Isolate::SetFeedbackVectorsForProfilingTools(Object* value) {
......
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