Commit a41f5bee authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[wasm] Only print compiler for proper functions

The new DCHECK fires when the tier was set to {kNone}, which was the
case for wrappers.
Since the compiler is only interesting for proper Wasm functions, we
keep the DCHECK but only print the compiler for code objects that
represent actual Wasm functions.

R=thibaudm@chromium.org

Bug: chromium:1223839
Change-Id: Icc0f13b34b53fee2a8d53857a4769ab4d80ab805
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3003467
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75562}
parent a1116f2d
......@@ -363,11 +363,13 @@ void WasmCode::Disassemble(const char* name, std::ostream& os,
if (name) os << "name: " << name << "\n";
if (!IsAnonymous()) os << "index: " << index() << "\n";
os << "kind: " << GetWasmCodeKindAsString(kind()) << "\n";
DCHECK(is_liftoff() || tier() == ExecutionTier::kTurbofan);
const char* compiler = is_liftoff()
? (for_debugging() ? "Liftoff (debug)" : "Liftoff")
: "TurboFan";
os << "compiler: " << compiler << "\n";
if (kind() == kFunction) {
DCHECK(is_liftoff() || tier() == ExecutionTier::kTurbofan);
const char* compiler =
is_liftoff() ? (for_debugging() ? "Liftoff (debug)" : "Liftoff")
: "TurboFan";
os << "compiler: " << compiler << "\n";
}
size_t padding = instructions().size() - unpadded_binary_size_;
os << "Body (size = " << instructions().size() << " = "
<< unpadded_binary_size_ << " + " << padding << " padding)\n";
......
// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --print-code
function module(global, imports) {
'use asm';
var x = imports.fn;
function f() {}
return f;
}
module(this, {fn: i => i});
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