Commit 5e6d9093 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[turbo] Fix --trace-turbo for wasm graphs

{info->optimization_id()} DCHECKS that {info->IsOptimizing()} is true.
Hence, it fails for graphs generated from wasm code.
The bug was introduced in
https://chromium-review.googlesource.com/c/v8/v8/+/592028.

R=mstarzinger@chromium.org
CC=leszeks@chromium.org

Change-Id: Ic192017fd7801797eb9ec7adc67a4bf94d219a7a
Reviewed-on: https://chromium-review.googlesource.com/640951Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47680}
parent 8a70c239
......@@ -34,7 +34,7 @@ std::unique_ptr<char[]> GetVisualizerLogFileName(CompilationInfo* info,
const char* suffix) {
EmbeddedVector<char, 256> filename(0);
std::unique_ptr<char[]> debug_name = info->GetDebugName();
int optimization_id = info->optimization_id();
int optimization_id = info->IsOptimizing() ? info->optimization_id() : 0;
if (strlen(debug_name.get()) > 0) {
SNPrintF(filename, "turbo-%s-%i", debug_name.get(), optimization_id);
} else if (info->has_shared_info()) {
......
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