Commit 27ad0c84 authored by Ben L. Titzer's avatar Ben L. Titzer Committed by Commit Bot

[wasm] Do not log imported function code

The wrappers for imports are not accessible through the code() accessor,
so avoid tracing them for now.

BUG=chromium:844745
R=ahaas@chromium.org

Change-Id: I63fe447091ba3c202e3ffcfddfa645049a0b83cf
Reviewed-on: https://chromium-review.googlesource.com/1068739
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53280}
parent 2cd48c74
......@@ -1552,8 +1552,12 @@ void WasmCompiledModule::LogWasmCodes(Isolate* isolate) {
wasm::NativeModule* native_module = GetNativeModule();
if (native_module == nullptr) return;
// TODO(titzer): we skip the logging of the import wrappers
// here, but they should be included somehow.
const uint32_t start =
native_module->shared_module_data()->module()->num_imported_functions;
const uint32_t number_of_codes = native_module->function_count();
for (uint32_t i = 0; i < number_of_codes; i++) {
for (uint32_t i = start; i < number_of_codes; i++) {
wasm::WasmCode* code = native_module->code(i);
if (code == nullptr) continue;
code->LogCode(isolate);
......
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