Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6a33399

Browse filesBrowse files
psmarshalltargos
authored andcommitted
deps: backport detailed line info for CPU profiler
[cpu-profiler] Add flag to always generate accurate line info. https://chromium.googlesource.com/v8/v8/+/ 56baf56790de439b3f69e887e94beb3b301ed77c [cpu-profiler] Turn on detailed line info for optimized code https://chromium.googlesource.com/v8/v8/+/ 84894ce6d2af7feb9e1f5574409355120887326c [cpu-profiler] Separate the flags for generating extra line information https://chromium.googlesource.com/v8/v8/+/ 30ff6719db441cc7ef220d449970cc169067e256 PR-URL: #22688 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 688d01c commit 6a33399
Copy full SHA for 6a33399

File tree

Expand file treeCollapse file tree

5 files changed

+11
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+11
-2
lines changed
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# Reset this number to 0 on major V8 upgrades.
3131
# Increment by one for each non-official patch applied to deps/v8.
32-
'v8_embedder_string': '-node.24',
32+
'v8_embedder_string': '-node.25',
3333

3434
# Enable disassembler for `--print-code` v8 options
3535
'v8_enable_disassembler': 1,
Collapse file

‎deps/v8/src/flag-definitions.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/flag-definitions.h
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,9 @@ DEFINE_BOOL(log_function_events, false,
12111211
DEFINE_BOOL(prof, false,
12121212
"Log statistical profiling information (implies --log-code).")
12131213

1214+
DEFINE_BOOL(detailed_line_info, true,
1215+
"Always generate detailed line information for CPU profiling.")
1216+
12141217
#if defined(ANDROID)
12151218
// Phones and tablets have processors that are much slower than desktop
12161219
// and laptop computers for which current heuristics are tuned.
Collapse file

‎deps/v8/src/isolate.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/isolate.cc
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3285,6 +3285,10 @@ bool Isolate::use_optimizer() {
32853285
!is_precise_count_code_coverage() && !is_block_count_code_coverage();
32863286
}
32873287

3288+
bool Isolate::NeedsDetailedOptimizedCodeLineInfo() const {
3289+
return NeedsSourcePositionsForProfiling() || FLAG_detailed_line_info;
3290+
}
3291+
32883292
bool Isolate::NeedsSourcePositionsForProfiling() const {
32893293
return FLAG_trace_deopt || FLAG_trace_turbo || FLAG_trace_turbo_graph ||
32903294
FLAG_turbo_profiling || FLAG_perf_prof || is_profiling() ||
Collapse file

‎deps/v8/src/isolate.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/isolate.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,8 @@ class Isolate : private HiddenFactory {
10221022

10231023
bool NeedsSourcePositionsForProfiling() const;
10241024

1025+
bool NeedsDetailedOptimizedCodeLineInfo() const;
1026+
10251027
bool is_best_effort_code_coverage() const {
10261028
return code_coverage_mode() == debug::Coverage::kBestEffort;
10271029
}
Collapse file

‎deps/v8/src/optimized-compilation-info.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/optimized-compilation-info.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ OptimizedCompilationInfo::OptimizedCompilationInfo(
3939
// Collect source positions for optimized code when profiling or if debugger
4040
// is active, to be able to get more precise source positions at the price of
4141
// more memory consumption.
42-
if (isolate->NeedsSourcePositionsForProfiling()) {
42+
if (isolate->NeedsDetailedOptimizedCodeLineInfo()) {
4343
MarkAsSourcePositionsEnabled();
4444
}
4545

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.