Commit 58a13f11 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm] Main thread participates in debugging recompilation

R=clemensb@chromium.org

Bug: v8:11319
Change-Id: If24b1ba929bce2e4268a794930c325aaebcfa556
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637222Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72150}
parent b967c0d1
......@@ -646,6 +646,10 @@ class CompilationStateImpl {
compilation_id_ = compilation_id;
}
std::weak_ptr<NativeModule> const native_module_weak() const {
return native_module_weak_;
}
private:
// Trigger callbacks according to the internal counters below
// (outstanding_...), plus the given events.
......@@ -1713,8 +1717,10 @@ void RecompileNativeModule(NativeModule* native_module,
}
});
// Now wait until all compilation units finished.
// TODO(clemensb): Contribute to compilation while waiting.
constexpr JobDelegate* kNoDelegate = nullptr;
ExecuteCompilationUnits(
compilation_state->native_module_weak(), native_module->engine(),
compilation_state->counters(), kNoDelegate, kBaselineOnly);
recompilation_finished_semaphore->Wait();
DCHECK(!compilation_state->failed());
}
......
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