Proper Reland "[wasm] Track meta data size with code size" This is a proper reland of commit c44de52316bae332be3e7b18d7f8a67931a08a7a The reland https://crrev.com/c/5668528 somehow didn't contain the original changes, just the fix for the lock inversion. The issue with the original change: There was a lock-order inversion between the WasmEngine::mutex_ and the WasmImportWrapperCache::mutex_. The different orders: 1. create ModificationScope (cache mutex) and then call PublishCode() -> LogCode() (engine mutex); 2. GC callback (engine mutex) which calls SampleCodeSize() (cache mutex). (The callback is created in AddIsolate()). Solution: We don't have to lock on the cache mutex while calling PublishCode(). Original change's description: > [wasm] Track meta data size with code size > > This CL adds two histograms to track the meta data size with code size > for: > - code flushing (WasmFlushedLiftoffCodeSizeAndMetadataBytes) > - NativeModule::SampleCodeSize (WasmModuleCodeAndMetadataSizeKiB) > > Bug: 349610478 > Change-Id: If948f65c336cf4cdfcbfc5c50e88799f4993eedd > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5660561 > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Eva Herencsárová <evih@chromium.org> > Cr-Commit-Position: refs/heads/main@{#94736} Bug: 349610478 Change-Id: I3ea7113668b2b826c5efddc24928fd5fc693014b Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_dbg,v8_linux64_tsan_isolates_rel,v8_linux64_tsan_no_cm_rel,v8_linux64_tsan_rel,v8_numfuzz_tsan_rel Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5671345 Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Eva Herencsárová <evih@chromium.org> Cr-Commit-Position: refs/heads/main@{#94781}
V8 is Google's open source JavaScript engine.
V8 implements ECMAScript as specified in ECMA-262.
V8 is written in C++ and is used in Google Chrome, the open source browser from Google.
V8 can run standalone, or can be embedded into any C++ application.
V8 Project page: https://v8.dev/docs
Checkout depot tools, and run
fetch v8
This will checkout V8 into the directory v8 and fetch all of its dependencies. To stay up to date, run
git pull origin
gclient sync
For fetching all branches, add the following into your remote configuration in .git/config:
fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
fetch = +refs/tags/*:refs/tags/*
Please follow the instructions mentioned at v8.dev/docs/contribute.