[wasm] Temporarily disable native module cache

v8.1 has a stability issue where we free code too early. Thus disable
for now, such that we can merge this back to v8.1.
v8.2 does not have this problem, since https://crrev.com/c/2078583 fixed
it. This CL is not easily backmergable though.

R=tebbi@chromium.org

Bug: chromium:1070199, chromium:1070182
Change-Id: I4bf468b3e7b5b1e66b314907f844d4195b3ff029
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144966
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67103}
This commit is contained in:
Clemens Backes 2020-04-13 15:47:56 +02:00 committed by Commit Bot
parent 0d011fb21f
commit 335c9941a9
3 changed files with 25 additions and 0 deletions

View File

@ -161,6 +161,9 @@ 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};
@ -192,6 +195,9 @@ 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) {
@ -206,6 +212,9 @@ 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));
@ -217,6 +226,9 @@ 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());

View File

@ -618,4 +618,11 @@
'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
]

View File

@ -87,5 +87,11 @@
}], # '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
]