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

[wasm] Adjust test conditions for lazy compilation

Bug: v8:12852
Change-Id: I4f38a41afe07633060038151acee986f318103b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3795376Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82129}
parent 7252b023
...@@ -1263,16 +1263,17 @@ STREAM_TEST(TestIncrementalCaching) { ...@@ -1263,16 +1263,17 @@ STREAM_TEST(TestIncrementalCaching) {
CHECK(!thrower.error()); CHECK(!thrower.error());
WasmCodeRefScope code_scope; WasmCodeRefScope code_scope;
CHECK(tester.native_module()->GetCode(0)->is_liftoff()); NativeModule* module = tester.native_module();
CHECK(tester.native_module()->GetCode(1)->is_liftoff()); CHECK(module->GetCode(0) == nullptr || module->GetCode(0)->is_liftoff());
CHECK(tester.native_module()->GetCode(2)->is_liftoff()); CHECK(module->GetCode(1) == nullptr || module->GetCode(1)->is_liftoff());
CHECK(module->GetCode(2) == nullptr || module->GetCode(2)->is_liftoff());
// No TurboFan compilation happened yet, and therefore no call to the cache. // No TurboFan compilation happened yet, and therefore no call to the cache.
CHECK_EQ(0, call_cache_counter); CHECK_EQ(0, call_cache_counter);
i::wasm::TriggerTierUp(*instance, 0); i::wasm::TriggerTierUp(*instance, 0);
tester.RunCompilerTasks(); tester.RunCompilerTasks();
CHECK(!tester.native_module()->GetCode(0)->is_liftoff()); CHECK(!module->GetCode(0)->is_liftoff());
CHECK(tester.native_module()->GetCode(1)->is_liftoff()); CHECK(module->GetCode(1) == nullptr || module->GetCode(1)->is_liftoff());
CHECK(tester.native_module()->GetCode(2)->is_liftoff()); CHECK(module->GetCode(2) == nullptr || module->GetCode(2)->is_liftoff());
CHECK_EQ(1, call_cache_counter); CHECK_EQ(1, call_cache_counter);
size_t serialized_size; size_t serialized_size;
{ {
...@@ -1281,9 +1282,9 @@ STREAM_TEST(TestIncrementalCaching) { ...@@ -1281,9 +1282,9 @@ STREAM_TEST(TestIncrementalCaching) {
} }
i::wasm::TriggerTierUp(*instance, 1); i::wasm::TriggerTierUp(*instance, 1);
tester.RunCompilerTasks(); tester.RunCompilerTasks();
CHECK(!tester.native_module()->GetCode(0)->is_liftoff()); CHECK(!module->GetCode(0)->is_liftoff());
CHECK(!tester.native_module()->GetCode(1)->is_liftoff()); CHECK(!module->GetCode(1)->is_liftoff());
CHECK(tester.native_module()->GetCode(2)->is_liftoff()); CHECK(module->GetCode(2) == nullptr || module->GetCode(2)->is_liftoff());
CHECK_EQ(2, call_cache_counter); CHECK_EQ(2, call_cache_counter);
{ {
i::wasm::WasmSerializer serializer(tester.native_module()); i::wasm::WasmSerializer serializer(tester.native_module());
......
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