Commit 0b392da2 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Re-enable native module cache

This reverts commit https://crrev.com/c/2144966, which was merged to
v8.1 in https://crrev.com/c/2151345.

R=thibaudm@chromium.org

Bug: chromium:1070199
Change-Id: Idb25cfaa52f7f7aa07353cf0372e6758adb58d78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151346Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67166}
parent 5ad6adc3
......@@ -161,9 +161,6 @@ class WeakScriptHandle {
std::shared_ptr<NativeModule> NativeModuleCache::MaybeGetNativeModule(
ModuleOrigin origin, Vector<const uint8_t> wire_bytes) {
if (origin != kWasmOrigin) return nullptr;
// Temporarily disabled to fix stability issue on M-81
// (https://crbug.com/1070199).
if (!FLAG_future) return nullptr;
base::MutexGuard lock(&mutex_);
size_t prefix_hash = PrefixHash(wire_bytes);
NativeModuleCache::Key key{prefix_hash, wire_bytes};
......@@ -195,9 +192,6 @@ std::shared_ptr<NativeModule> NativeModuleCache::MaybeGetNativeModule(
}
bool NativeModuleCache::GetStreamingCompilationOwnership(size_t prefix_hash) {
// Temporarily disabled to fix stability issue on M-81
// (https://crbug.com/1070199).
if (!FLAG_future) return true;
base::MutexGuard lock(&mutex_);
auto it = map_.lower_bound(Key{prefix_hash, {}});
if (it != map_.end() && it->first.prefix_hash == prefix_hash) {
......@@ -212,9 +206,6 @@ bool NativeModuleCache::GetStreamingCompilationOwnership(size_t prefix_hash) {
}
void NativeModuleCache::StreamingCompilationFailed(size_t prefix_hash) {
// Temporarily disabled to fix stability issue on M-81
// (https://crbug.com/1070199).
if (!FLAG_future) return;
base::MutexGuard lock(&mutex_);
Key key{prefix_hash, {}};
DCHECK_EQ(1, map_.count(key));
......@@ -226,9 +217,6 @@ std::shared_ptr<NativeModule> NativeModuleCache::Update(
std::shared_ptr<NativeModule> native_module, bool error) {
DCHECK_NOT_NULL(native_module);
if (native_module->module()->origin != kWasmOrigin) return native_module;
// Temporarily disabled to fix stability issue on M-81
// (https://crbug.com/1070199).
if (!FLAG_future) return native_module;
Vector<const uint8_t> wire_bytes = native_module->wire_bytes();
DCHECK(!wire_bytes.empty());
size_t prefix_hash = PrefixHash(native_module->wire_bytes());
......
......@@ -618,11 +618,4 @@
'test-cpu-profiler/DeoptUntrackedFunction': [SKIP],
}], # variant == turboprop
##############################################################################
['variant != future', {
# Wasm native module cache is temporarily disabled in non-future variant
# (https://crbug.com/1070199)
'test-compilation-cache/*': [SKIP]
}], # variant != future
]
......@@ -86,12 +86,4 @@
'debugger/wasm-*': [SKIP],
}], # 'arch == s390 or arch == s390x'
##############################################################################
['variant != future', {
# Wasm native module cache is temporarily disabled in non-future variant
# (https://crbug.com/1070199)
'debugger/wasm-scripts': [SKIP],
}], # variant != future
]
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