Commit 97c2bc36 authored by mattloring's avatar mattloring Committed by Commit bot

Revert of Include file names in trace_turbo output (patchset #3 id:40001 of...

Revert of Include file names in trace_turbo output (patchset #3 id:40001 of https://codereview.chromium.org/2083863004/ )

Reason for revert:
Many build bots are failing with a message of the form:

Missing or invalid v8 JSON file: /tmp/tmp2qcEUy_swarming/0/output.json

Can be relanded once we understand why these failures are occuring.

Original issue's description:
> Include file names in trace_turbo output
>
> The trace turbo output will overwrite itself when functions in different
> files share the same name. Output files now have the form
> `turbo-<function_name>:<opt_file_name>-<opt_phase>.suffix`.
>
> R=ofrobots@google.com
> BUG=
>
> Committed: https://crrev.com/a53b9bf02f31e5647c37e0392afa19f74df1a3ba
> Cr-Commit-Position: refs/heads/master@{#37199}

TBR=ofrobots@google.com,bmeurer@chromium.org,danno@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2083153004
Cr-Commit-Position: refs/heads/master@{#37204}
parent 0b98dbcc
......@@ -36,32 +36,15 @@ base::SmartArrayPointer<const char> GetVisualizerLogFileName(
} else {
SNPrintF(filename, "turbo-none-%s", phase);
}
char* source_file = nullptr;
if (FLAG_trace_file_names && info->parse_info()) {
Object* source_name = info->script()->name();
if (source_name->IsString()) {
String* str = String::cast(source_name);
if (str->length() > 0) {
source_file = str->ToCString().get();
}
}
}
std::replace(filename.start(), filename.start() + filename.length(), ' ',
'_');
EmbeddedVector<char, 256> full_filename;
if (phase == nullptr && source_file == nullptr) {
if (phase == nullptr) {
SNPrintF(full_filename, "%s.%s", filename.start(), suffix);
} else if (phase != nullptr && source_file == nullptr) {
SNPrintF(full_filename, "%s-%s.%s", filename.start(), phase, suffix);
} else if (phase == nullptr && source_file != nullptr) {
SNPrintF(full_filename, "%s_%s.%s", filename.start(), source_file, suffix);
} else {
SNPrintF(full_filename, "%s_%s-%s.%s", filename.start(), source_file, phase,
suffix);
SNPrintF(full_filename, "%s-%s.%s", filename.start(), phase, suffix);
}
std::replace(full_filename.start(),
full_filename.start() + full_filename.length(), '/', '_');
char* buffer = new char[full_filename.length() + 1];
memcpy(buffer, full_filename.start(), full_filename.length());
......
......@@ -603,7 +603,8 @@ DEFINE_BOOL(mask_constants_with_cookie, true,
DEFINE_BOOL(lazy, true, "use lazy compilation")
DEFINE_BOOL(trace_opt, false, "trace lazy optimization")
DEFINE_BOOL(trace_opt_stats, false, "trace lazy optimization statistics")
DEFINE_BOOL(trace_file_names, false, "include file names in trace output")
DEFINE_BOOL(trace_file_names, false,
"include file names in trace-opt/trace-deopt output")
DEFINE_BOOL(opt, true, "use adaptive optimizations")
DEFINE_BOOL(always_opt, false, "always try to optimize functions")
DEFINE_BOOL(always_osr, false, "always try to OSR functions")
......
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