Commit dad52013 authored by Andreas Haas's avatar Andreas Haas Committed by V8 LUCI CQ

[wasm] Disable dynamic tiering for the c-api

With dynamic tiering, the "serialize" function provided by the c-api
does not work anymore, and it is unclear how it should work.

R=jkummerow@chromium.org

Bug: v8:12281
Change-Id: Ib70bf118ba42b0752eb5dab5f43893da0404931e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338657Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78369}
parent 8c0b9b3b
......@@ -391,7 +391,6 @@ Engine::~Engine() { impl(this)->~EngineImpl(); }
void Engine::operator delete(void* p) { ::operator delete(p); }
auto Engine::make(own<Config>&& config) -> own<Engine> {
i::FLAG_expose_gc = true;
auto engine = new (std::nothrow) EngineImpl;
if (!engine) return own<Engine>();
engine->platform = v8::platform::NewDefaultPlatform();
......@@ -402,6 +401,16 @@ auto Engine::make(own<Config>&& config) -> own<Engine> {
}
#endif
v8::V8::Initialize();
// The commandline flags get loaded in V8::Initialize(), so we can override
// the flag values only afterwards.
i::FLAG_expose_gc = true;
// We disable dynamic tiering because it interferes with serialization. We
// only serialize optimized code, but with dynamic tiering not all code gets
// optimized. It is then unclear what we should serialize in the first place.
i::FLAG_wasm_dynamic_tiering = false;
// We disable speculative inlining, because speculative inlining depends on
// dynamic tiering.
i::FLAG_wasm_speculative_inlining = false;
return make_own(seal<Engine>(engine));
}
......
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