Commit df38420f authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[compiler] Make --code-comments include inlining info on main thread.

In my previous CL, I completely disabled the processing of inlining stacks
when generating code comments. This CL restores the feature at least for
runs without concurrent recompilation.

In other words, if you use --code-comments and want to see nice source positions,
you must also use --no-concurrent-recompilation.

Bug: v8:6048
Change-Id: Ief7e52a4046cb74e02b1783dbace19534093c588
Reviewed-on: https://chromium-review.googlesource.com/570021
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46643}
parent 33ad9568
......@@ -506,12 +506,14 @@ void CodeGenerator::AssembleSourcePosition(SourcePosition source_position) {
if (!info->parse_info()) return;
std::ostringstream buffer;
buffer << "-- ";
if (FLAG_trace_turbo) {
if (FLAG_trace_turbo ||
tasm()->isolate()->concurrent_recompilation_enabled()) {
buffer << source_position;
} else {
buffer << source_position;
// TODO(neis): Figure out if/how to print InliningStack(info) from a
// background thread.
AllowHeapAllocation allocation;
AllowHandleAllocation handles;
AllowHandleDereference deref;
buffer << source_position.InliningStack(info);
}
buffer << " --";
tasm()->RecordComment(StrDup(buffer.str().c_str()));
......
......@@ -699,7 +699,9 @@ DEFINE_BOOL(fast_promotion_new_space, false,
// assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc
DEFINE_BOOL(debug_code, DEBUG_BOOL,
"generate extra code (assertions) for debugging")
DEFINE_BOOL(code_comments, false, "emit comments in code disassembly")
DEFINE_BOOL(code_comments, false,
"emit comments in code disassembly; for more readable source "
"positions you should add --no-concurrent_recompilation")
DEFINE_BOOL(enable_sse3, true, "enable use of SSE3 instructions if available")
DEFINE_BOOL(enable_ssse3, true, "enable use of SSSE3 instructions if available")
DEFINE_BOOL(enable_sse4_1, true,
......
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