[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/+/2151346 Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#67166}
This commit is contained in:
parent
5ad6adc3ad
commit
0b392da22d
@ -161,9 +161,6 @@ class WeakScriptHandle {
|
|||||||
std::shared_ptr<NativeModule> NativeModuleCache::MaybeGetNativeModule(
|
std::shared_ptr<NativeModule> NativeModuleCache::MaybeGetNativeModule(
|
||||||
ModuleOrigin origin, Vector<const uint8_t> wire_bytes) {
|
ModuleOrigin origin, Vector<const uint8_t> wire_bytes) {
|
||||||
if (origin != kWasmOrigin) return nullptr;
|
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_);
|
base::MutexGuard lock(&mutex_);
|
||||||
size_t prefix_hash = PrefixHash(wire_bytes);
|
size_t prefix_hash = PrefixHash(wire_bytes);
|
||||||
NativeModuleCache::Key key{prefix_hash, 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) {
|
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_);
|
base::MutexGuard lock(&mutex_);
|
||||||
auto it = map_.lower_bound(Key{prefix_hash, {}});
|
auto it = map_.lower_bound(Key{prefix_hash, {}});
|
||||||
if (it != map_.end() && it->first.prefix_hash == 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) {
|
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_);
|
base::MutexGuard lock(&mutex_);
|
||||||
Key key{prefix_hash, {}};
|
Key key{prefix_hash, {}};
|
||||||
DCHECK_EQ(1, map_.count(key));
|
DCHECK_EQ(1, map_.count(key));
|
||||||
@ -226,9 +217,6 @@ std::shared_ptr<NativeModule> NativeModuleCache::Update(
|
|||||||
std::shared_ptr<NativeModule> native_module, bool error) {
|
std::shared_ptr<NativeModule> native_module, bool error) {
|
||||||
DCHECK_NOT_NULL(native_module);
|
DCHECK_NOT_NULL(native_module);
|
||||||
if (native_module->module()->origin != kWasmOrigin) return 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();
|
Vector<const uint8_t> wire_bytes = native_module->wire_bytes();
|
||||||
DCHECK(!wire_bytes.empty());
|
DCHECK(!wire_bytes.empty());
|
||||||
size_t prefix_hash = PrefixHash(native_module->wire_bytes());
|
size_t prefix_hash = PrefixHash(native_module->wire_bytes());
|
||||||
|
@ -618,11 +618,4 @@
|
|||||||
'test-cpu-profiler/DeoptUntrackedFunction': [SKIP],
|
'test-cpu-profiler/DeoptUntrackedFunction': [SKIP],
|
||||||
}], # variant == turboprop
|
}], # 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],
|
'debugger/wasm-*': [SKIP],
|
||||||
}], # 'arch == s390 or arch == s390x'
|
}], # '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
|
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user