- 19 May, 2022 1 commit
-
-
Clemens Backes authored
Triggering tier-up can happen very often, so the runtime function should be as slim as possible. This CL adds two DisallowGarbageCollection scopes and removes a HandleScope which was unnecessarily created. R=jkummerow@chromium.org Bug: v8:12281 Change-Id: I43e7f2b449630856ac8dfb36d294fbd29191d0eb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652300 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#80644}
-
- 26 Apr, 2022 1 commit
-
-
Andreas Haas authored
For lazy compilation there is one generic lazy compilation builtin that spills all registers on the stack and then triggers the compilation of the called function. Some of these registers may contain references. If a GC was triggered during lazy compilation, the GC would have to know which spill slots on the stack contain references. This CL adds a check to guarantee that no GC can be triggered during lazy compilation. Thereby it is not necessary for the GC to know which spill slots contain references. If successful, lazy compilation indeed does not allocate on the heap and therefore cannot trigger a GC. However, when compilation fails, an error objects needs to be allocated and thrown. This allocation may trigger a GC, but that's not a problem, because the reference parameters which may get corrupted by the GC will not be used anyways, because the called function will never get executed after the failed compilation. R=clemensb@chromium.org Fixes: v8:11366 Change-Id: Ic526d169d4e80ba83f517970ff234e669f854331 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599474Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#80187}
-
- 27 Jan, 2022 1 commit
-
-
Andreas Haas authored
With dynamic tiering, the total amount of code generated for a WebAssembly module decreases significantly. However, the amount of code space we reserved for generated code has not been adjusted yet. This CL adds a parameter for dynamic tiering to EstimateNativeModuleCodeSize. If dynamic tiering is used, then the code space reserved for TurboFan gets reduced to a quarter of the code space without dynamic tiering. Reserving a quarter of the space seems to be still quite generous. Even Google Earth, seems to use a lot of its code, only needs less than 20%. R=clemensb@chromium.org Bug: chromium:1285334 Change-Id: I7dce0821b5e46d7240dfb1523031de84b1fe1348 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3420307Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#78826}
-
- 14 Jan, 2022 1 commit
-
-
Thibaud Michaud authored
- Add suspend asm builtin stub, and call it from the suspending wasm-to-js wrapper - Rename frame type to match both builtins (prompt and suspend) - Add suspend bool to the import cache key R=ahaas@chromium.org CC=fgm@chromium.org Bug: v8:12191 Change-Id: Ie5a8ca7cbe4bcb91697e05b6470e3d632d608993 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3345004Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/main@{#78628}
-
- 01 Dec, 2021 1 commit
-
-
Leszek Swirski authored
Add suppose for compiling non-eager, non-top-level inner functions in parallel, using the compiler dispatcher. This behaviour can be enabled with --parallel-compile-tasks-for-lazy. There are a couple of consequences: * To support this we need support for off-thread ScopeInfo deserialization, so this adds that too. * The previous --parallel-compile-tasks flag is renamed to the more descriptive --parallel-compile-tasks-for-eager-toplevel. * Both parallel-compile-tasks flags are moved onto UnoptimizedCompileFlags so that they can be enabled/disabled on a per-compile basis (e.g. enabled for streaming, disabled for re-parsing). * asm.js compilations can now happen without an active Context (in the compiler dispatcher's idle finalization) so we can't get a ContextId for metric reporting; we'd need to somehow fix this if we wanted asm.js UKM but for now it's probably fine. * Took the opportunity to clean up some of the "can preparse" logic in the parser. Change-Id: I20b1ec6a6bacfe268808edc8d812b92370c5840d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3281924 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org> Cr-Commit-Position: refs/heads/main@{#78183}
-
- 12 Nov, 2021 1 commit
-
-
Jakob Kummerow authored
FLAG_wasm_dynamic_tiering is still off by default. When enabled, it now uses the technique previously behind --new-wasm-dynamic-tiering. Bug: v8:12281 Change-Id: I365c2c066e62418cd6abc7830f95d1fe0f950e33 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275570 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#77883}
-
- 07 Oct, 2021 1 commit
-
-
Jakob Kummerow authored
This patch adds infrastructure for collecting feedback about call_ref call targets in Liftoff code, and using that feedback for turning such calls into inlineable direct calls when building Turbofan graphs. The feature is considered experimental quality and hence off by default, --wasm-speculative-inlining turns it on. Bug: v8:7748 Change-Id: I0d0d776f8a71c3dd2c9124d3731f3cb06d4f5821 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3205902 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/main@{#77287}
-
- 08 Sep, 2021 1 commit
-
-
Clemens Backes authored
This adds some basic tests for WebAssembly code protection, in four different configurations: - no protection - mprotect-based protection - PKU-based protection - PKU with fallback to mprotect If PKU is not supported by the OS or hardware, then PKU is identical to no protection, and PKU with fallback is identical to mprotect. We always execute all four configurations anyway. If protection is effective, we expect code to be writable within a {CodeSpaceWriteScope}, and not writable otherwise. When trying to write to non-writable code, we expect a crash of the process (checked via {ASSERT_DEATH_IF_SUPPORTED}). R=jkummerow@chromium.org CC=mpdenton@chromium.org Bug: v8:11974 Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_dbg_ng Change-Id: I4ec0ce9426f70ff41a292b9ea25be1e8956a670e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3138210 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#76726}
-
- 24 Aug, 2021 1 commit
-
-
Dan Elphick authored
This is a reland of d1b27019 Fixes include: Adding missing file to bazel build Forward-declaring classing before friend-classing them to fix win/gcc Add missing v8-isolate.h include for vtune builds Original change's description: > [include] Split out v8.h > > This moves every single class/function out of include/v8.h into a > separate header in include/, which v8.h then includes so that > externally nothing appears to have changed. > > Every include of v8.h from inside v8 has been changed to a more > fine-grained include. > > Previously inline functions defined at the bottom of v8.h would call > private non-inline functions in the V8 class. Since that class is now > in v8-initialization.h and is rarely included (as that would create > dependency cycles), this is not possible and so those methods have been > moved out of the V8 class into the namespace v8::api_internal. > > None of the previous files in include/ now #include v8.h, which means > if embedders were relying on this transitive dependency then it will > give compile failures. > > v8-inspector.h does depend on v8-scripts.h for the time being to ensure > that Chrome continue to compile but that change will be reverted once > those transitive #includes in chrome are changed to include it directly. > > Full design: > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing > > Bug: v8:11965 > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448 > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Dan Elphick <delphick@chromium.org> > Cr-Commit-Position: refs/heads/main@{#76424} Cq-Include-Trybots: luci.v8.try:v8_linux_vtunejit Bug: v8:11965 Change-Id: I99f5d3a73bf8fe25b650adfaf9567dc4e44a09e6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113629Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/main@{#76460}
-
- 23 Aug, 2021 2 commits
-
-
Dan Elphick authored
This reverts commit d1b27019. Reason for revert: Broke vtune build, tsan build and possibly others Original change's description: > [include] Split out v8.h > > This moves every single class/function out of include/v8.h into a > separate header in include/, which v8.h then includes so that > externally nothing appears to have changed. > > Every include of v8.h from inside v8 has been changed to a more > fine-grained include. > > Previously inline functions defined at the bottom of v8.h would call > private non-inline functions in the V8 class. Since that class is now > in v8-initialization.h and is rarely included (as that would create > dependency cycles), this is not possible and so those methods have been > moved out of the V8 class into the namespace v8::api_internal. > > None of the previous files in include/ now #include v8.h, which means > if embedders were relying on this transitive dependency then it will > give compile failures. > > v8-inspector.h does depend on v8-scripts.h for the time being to ensure > that Chrome continue to compile but that change will be reverted once > those transitive #includes in chrome are changed to include it directly. > > Full design: > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing > > Bug: v8:11965 > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448 > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Dan Elphick <delphick@chromium.org> > Cr-Commit-Position: refs/heads/main@{#76424} Bug: v8:11965 Change-Id: Id57313ae992e720c8b19abc975cd69729e1344aa No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113627 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Owners-Override: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#76428}
-
Dan Elphick authored
This moves every single class/function out of include/v8.h into a separate header in include/, which v8.h then includes so that externally nothing appears to have changed. Every include of v8.h from inside v8 has been changed to a more fine-grained include. Previously inline functions defined at the bottom of v8.h would call private non-inline functions in the V8 class. Since that class is now in v8-initialization.h and is rarely included (as that would create dependency cycles), this is not possible and so those methods have been moved out of the V8 class into the namespace v8::api_internal. None of the previous files in include/ now #include v8.h, which means if embedders were relying on this transitive dependency then it will give compile failures. v8-inspector.h does depend on v8-scripts.h for the time being to ensure that Chrome continue to compile but that change will be reverted once those transitive #includes in chrome are changed to include it directly. Full design: https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing Bug: v8:11965 Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/main@{#76424}
-
- 21 Jun, 2021 1 commit
-
-
Clemens Backes authored
There is exactly one WasmEngine per process, hence we do not need to store or pass a pointer to it. We just use {GetWasmEngine} (which just reads a global variable) whenever we need it. R=jkummerow@chromium.org Bug: v8:11879 Change-Id: I7e0e86e326f4cafe5a894af0ff6d35803c0340a9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972725 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75266}
-
- 18 Jun, 2021 1 commit
-
-
Dan Elphick authored
The adding of base:: was mostly prepared using git grep and sed: git grep -l <pattern> | grep -v base/vector.h | \ xargs sed -i 's/\b<pattern>\b/base::<pattern>/ with lots of manual clean-ups due to the resulting v8::internal::base::Vectors. #includes were fixed using: git grep -l "src/utils/vector.h" | \ axargs sed -i 's!src/utils/vector.h!src/base/vector.h!' Bug: v8:11879 Change-Id: I3e6d622987fee4478089c40539724c19735bd625 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968412Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75243}
-
- 16 Mar, 2021 1 commit
-
-
Clemens Backes authored
This will make accidental includes much easier to see and fix. Without this, you might get compiler or linker errors instead. R=jkummerow@chromium.org Bug: v8:11238 Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel Change-Id: I235d779f9c1ed3af5d736f1554ded427935ddc9b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756531 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#73422}
-
- 19 Jan, 2021 1 commit
-
-
Andreas Haas authored
For asynchronous compilation, the beginning and end of compilation are marked with different trace events. To allow to connect these events, a compilation id is added to the start and end events. Note that the compilation id is not added to all trace events to avoid bloating traces. Ids may be added later to these events if necessary. R=clemensb@chromium.org Bug: chromium:1084929 Change-Id: I36ad598d27dea355fcca8992534c91e5a880fdaa Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629274 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#72144}
-
- 08 Dec, 2020 3 commits
-
-
Clemens Backes authored
This is a reland of ab4d9717. The original CL did a std::move before the final use of the NativeModule. PS2 removes that. TBR=petermarshall@chromium.org, thibaudm@chromium.org Original change's description: > [wasm] Pass the script ID to code logging > > We didn't pass a script ID with the code creation events for profiling. > This made DevTools lose the connection to the wasm script, hence > jumping from the profiler entry to the source did not work. > > This CL changes the timing of code logging a bit such that the script is > always allocated before logging. In the queue of code to be logged we > then also store the script ID, and finally set it on the {CodeEntry} > object. > > R=thibaudm@chromium.org > > Bug: chromium:1125986 > Change-Id: I2248c1d520bc819436bbe732373f7a3446b64f48 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575057 > Commit-Queue: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Peter Marshall <petermarshall@chromium.org> > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> > Cr-Commit-Position: refs/heads/master@{#71654} Bug: chromium:1125986 Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng Change-Id: I2a7c5fe04fff726836b1279e3d05b1702a4efb76 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2578980Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#71663}
-
Clemens Backes authored
This reverts commit ab4d9717. Reason for revert: UBSan issues: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/14184/overview Original change's description: > [wasm] Pass the script ID to code logging > > We didn't pass a script ID with the code creation events for profiling. > This made DevTools lose the connection to the wasm script, hence > jumping from the profiler entry to the source did not work. > > This CL changes the timing of code logging a bit such that the script is > always allocated before logging. In the queue of code to be logged we > then also store the script ID, and finally set it on the {CodeEntry} > object. > > R=thibaudm@chromium.org > > Bug: chromium:1125986 > Change-Id: I2248c1d520bc819436bbe732373f7a3446b64f48 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575057 > Commit-Queue: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Peter Marshall <petermarshall@chromium.org> > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> > Cr-Commit-Position: refs/heads/master@{#71654} TBR=petermarshall@chromium.org,clemensb@chromium.org,thibaudm@chromium.org Change-Id: I03c90c77b55e770797a6d66b1d778992a047e07a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:1125986 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575070Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#71660}
-
Clemens Backes authored
We didn't pass a script ID with the code creation events for profiling. This made DevTools lose the connection to the wasm script, hence jumping from the profiler entry to the source did not work. This CL changes the timing of code logging a bit such that the script is always allocated before logging. In the queue of code to be logged we then also store the script ID, and finally set it on the {CodeEntry} object. R=thibaudm@chromium.org Bug: chromium:1125986 Change-Id: I2248c1d520bc819436bbe732373f7a3446b64f48 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575057 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#71654}
-
- 19 Oct, 2020 1 commit
-
-
Clemens Backes authored
Migrate wrapper compilation from the tasks API to the job API. This avoids querying the platform for the number of available threads, and makes the code much more idiomatic. R=thibaudm@chromium.org CC=etiennep@chromium.org Bug: chromium:1101340 Change-Id: I2d84176fe729c065348fd479fe8fd1a0d2f19a50 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2471379 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#70620}
-
- 28 Sep, 2020 1 commit
-
-
Jakob Kummerow authored
A Wasm module's start function might be imported from JavaScript, and as such might contain calls to Blink. For such a case, we must make sure that an "incumbent context" is available. Usually, having any JavaScript function on the stack is enough to ensure that; but in the special case of async compilation, the "success" task is executed directly from the event loop, so we have to manually enter a context. Additionally, we need to ensure that such a start function's own context is properly entered: in addition to setting it as the current context on the isolate (as the function call sequence is doing), we have to register it in the list of entered contexts, as if v8::Context::Enter had been used. Bug: chromium:1096558 Change-Id: I12679ab49ee764572e3742da24889dcd55c29160 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2292248Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#70175}
-
- 24 Sep, 2020 1 commit
-
-
Emanuel Ziegler authored
Ensure that events are triggered when a module is decoded, compiled, instantiated and tiered-up. This is a reland of Ib5883a338c3756c6f3488fbdd7b6861ecc2ba218. R=clemensb@chromium.org TBR=adamk@chromium.org Bug: chromium:1092417 Change-Id: I803ae3db23a5f71f26e8ec118251eccdfc551353 Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2425056 Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#70113}
-
- 22 Sep, 2020 2 commits
-
-
Francis McCabe authored
This reverts commit 54b141ef. Reason for revert: closed tree due to: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20noi18n%20-%20debug/33838? Original change's description: > [wasm][ukm] Add tests for Wasm events (reland) > > Ensure that events are triggered when a module is decoded, compiled, > instantiated and tiered-up. > > This is a reland of I9dc87957fc03023c5ab1c4f49e865957c8324e1a. > > R=clemensb@chromium.org > > Bug: chromium:1092417 > Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng > Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng > Change-Id: Ib5883a338c3756c6f3488fbdd7b6861ecc2ba218 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2367866 > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org> > Cr-Commit-Position: refs/heads/master@{#70074} TBR=adamk@chromium.org,clemensb@chromium.org,ecmziegler@chromium.org Change-Id: I859c69bacfca9c790ed274140bb9e8d23de26729 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:1092417 Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2425104Reviewed-by: Francis McCabe <fgm@chromium.org> Commit-Queue: Francis McCabe <fgm@chromium.org> Cr-Commit-Position: refs/heads/master@{#70075}
-
Emanuel Ziegler authored
Ensure that events are triggered when a module is decoded, compiled, instantiated and tiered-up. This is a reland of I9dc87957fc03023c5ab1c4f49e865957c8324e1a. R=clemensb@chromium.org Bug: chromium:1092417 Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng Change-Id: Ib5883a338c3756c6f3488fbdd7b6861ecc2ba218 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2367866Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org> Cr-Commit-Position: refs/heads/master@{#70074}
-
- 17 Aug, 2020 1 commit
-
-
Emanuel Ziegler authored
Add an event for recording metrics related to decoding Wasm modules. R=clemensb@chromium.org Bug: chromium:1092417 Change-Id: Id60560d8eb8c14edb5b863857b18c1c82f48e7e7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351672 Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#69425}
-
- 05 Aug, 2020 1 commit
-
-
Clemens Backes authored
Use the new jobs API for WebAssembly compilation. This avoids having to schedule as many background tasks as there are worker threads. Instead the one job specifies the maximum concurrency, which changes dynamically as new compile jobs become available. This also avoids the artificial deadline we used to ensure that other tasks get some share of the CPU resources if needed. Even though this CL moves actual wasm function completely over to the Jobs API, other similar tasks (like wrapper compilation) are still using the Task API and need to be ported in a follow-up CL. Also, we are still using the same priority for baseline compilation and tier up. We should split this in a follow-up CL to have two jobs with different priorities. This will also allow us to only block on baseline compilation where we currently block on both. R=ahaas@chromium.org CC=gab@chromium.org Bug: chromium:1101340 Change-Id: I5656697753346e5fdb15d578425cdb949ac6e364 Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng Cq-Include-Trybots: luci.chromium.try:linux-rel Cq-Include-Trybots: luci.v8.try:v8_linux_blink_rel Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280100 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#69239}
-
- 28 Jul, 2020 1 commit
-
-
Paolo Severini authored
Currently WebAssembly always goes through the ArgumentsAdaptorTrampoline builtin for wasm-to-js calls as soon as there's a mismatch between the actual number of arguments and the expected number of arguments. This can be made faster in cases where: 1. the callee has "don't adapt arguments" set, which is often the case for builtins, or 2. the callee has "skip adapt arguments" set, which is often the case for strict mode functions. TurboFan already supports this for JS calls: https://chromium-review.googlesource.com/c/1482735; explainer document: http://bit.ly/v8-faster-calls-with-arguments-mismatch. Even though it is probably not as common to have arity mismatches in Wasm->JS calls as it is in JS->JS calls, this still seems a worthwhile optimization to do. This CL ports the TurboFan fix to WebAssembly. In particular, the CL introduces a new WasmImportCallKind (kJSFunctionArityMismatchSkipAdaptor) for the case where the call to Builtins_ArgumentsAdaptorTrampoline can be skipped, and modifies WasmImportWrapperCache::CacheKey to also consider the arity of the imported JS function. A micro-benchmark for this change can be found here: - https://gist.github.com/paolosevMSFT/72c67591170d6163f67c9b03a7e12525#file-adapter-cc - https://gist.github.com/paolosevMSFT/72c67591170d6163f67c9b03a7e12525#file-adapter_test-js With this benchmark, we can save a 40% overhead of Builtins_ArgumentsAdaptorTrampoline for calls that pass too many arguments, while the savings for calls that pass too few arguments are less impressive: Before After callProperApplication: 563 ms 566 ms callOverApplication1: 972 ms 562 ms callOverApplication2: 962 ms 562 ms callUnderApplication: 949 ms 890 ms Bug: v8:8909 Change-Id: Id51764e7c422d00ecc4a48704323e11bdca9377f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2317061 Commit-Queue: Paolo Severini <paolosev@microsoft.com> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#69110}
-
- 21 Jul, 2020 2 commits
-
-
Arnaud Robin authored
On desktop systems, we use a very basic tiering strategy: Everything is initially compiled with Liftoff, and once that is done, the module can start being used. Concurrently to the execution, we re-compile all code with TurboFan, and hot-swap each function once TurboFan finishes. We should start using a more dynamic strategy where each function is tiered-up when judged necessary. This change will then tier-up each liftoff function once it has been called 5 times. I then added a counter in the native module, that is updated directly from Liftoff code, and a runtime call is then made when the counter reaches the goal. R=clemensb@chromium.org CC=thibaudm@chromium.org Bug: v8:10728 Change-Id: I8dc2b02fdff8d97781bb1cf496886594b3d7f644 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306803 Commit-Queue: Arnaud Robin <arobin@google.com> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68971}
-
Clemens Backes authored
Move wrapper compilation to the jobs API. Moving function compilation is much more complex and will be done in a follow-up CL. R=ahaas@chromium.org CC=krivoy@chromium.org Bug: chromium:1101340 Change-Id: I0749e52a88264b725bba28252a6c76ae3338bb0e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2301933Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68965}
-
- 24 Jun, 2020 1 commit
-
-
Clemens Backes authored
Since the interpreter is not used in production any more, it does not need to support lazy compilation. Since the code is still (accidentally) triggered by indirect calls, we need to refactor that code. It only allows calls within the same instance anyway. R=ahaas@chromium.org Bug: v8:10389 Change-Id: Ied1c8effd4c9fbb857a068db587de3463867ac80 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259942Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68512}
-
- 23 Jun, 2020 1 commit
-
-
Clemens Backes authored
The interpreter is not used in production code any more, hence move it from src/wasm to test/common/wasm. It's still used in unit tests, cctests, and in fuzzers. Because of this move, a few more methods had to be exported via V8_EXPORT_PRIVATE. R=ahaas@chromium.org, yangguo@chromium.org Bug: v8:10389 Change-Id: If626b940a721146c596fd7df4faaea633e710272 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257226 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#68480}
-
- 11 May, 2020 1 commit
-
-
Clemens Backes authored
Passing an isolate to {RecompileNativeModule} feels wrong, since compilation and the generated code are totally isolate-independent. In fact, the isolate is only used for updating counters. Instead of passing the counters instead, this CL just refactors the code to support a nullptr for the counters everywhere (some code paths already supported that). The few recompilation would not make a significant difference in the histograms anyway, and even have the risk of skewing the data. Drive-by 1: Rename {TierUp} to {StartTierUp} and update comments. Drive-by 2: Remove non-actionable TODO. R=thibaudm@chromium.org Bug: v8:10359 Change-Id: Ic027f939bbc55398b90784922130fe1fe5573b0c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2187638Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#67708}
-
- 16 Apr, 2020 1 commit
-
-
Clemens Backes authored
This cleans up several parts of the tiering logic. 1) Instead of using the {ExecutionTier} to specify whether we do tier up or down, we introduce a new {TieringState} enum and use that consistently (also where a {bool} was used before). 2) When tiering up or tiering down, always recompile all functions. It's very unlikely that we can reuse previous code anyway (tiering down is cheap enough to just always do it, and when tiering up we need to recompile everything anyway). 3) Remove the {WasmEngine::RecompileAllFunctions} method and inline the implementation into callers. 4) Drive-by: Remove some obsolete comments and fix or extend others. R=thibaudm@chromium.org Bug: v8:10410 Change-Id: Ic765c6760dd97473ccfd469f22a2514695075587 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151355Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#67175}
-
- 09 Apr, 2020 3 commits
-
-
Thibaud Michaud authored
This is a reland of f902ef32 Original change's description: > [wasm] Cleanup wasm script creation > > - Do not expose CreateWasmScript since we should now use > WasmEngine:GetOrCreateScript instead, > - Initialize all Script fields in CreateWasmScript, not in > WasmModuleObject::New, > - Do not pass code size estimate argument, since we can always use the > actual native module's committed code space. > > R=clemensb@chromium.org > > Bug: v8:10349 > Change-Id: If9250d62ffc271ab6efc3b9c45958a305c9d1827 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2135633 > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> > Cr-Commit-Position: refs/heads/master@{#67083} Bug: v8:10349 Change-Id: I38c8b6beb07a1e5d565c6a5fd749daea147817bb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144064Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#67087}
-
Clemens Backes authored
This reverts commit f902ef32. Reason for revert: Makes gc-stress unhappy: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/27404 Original change's description: > [wasm] Cleanup wasm script creation > > - Do not expose CreateWasmScript since we should now use > WasmEngine:GetOrCreateScript instead, > - Initialize all Script fields in CreateWasmScript, not in > WasmModuleObject::New, > - Do not pass code size estimate argument, since we can always use the > actual native module's committed code space. > > R=clemensb@chromium.org > > Bug: v8:10349 > Change-Id: If9250d62ffc271ab6efc3b9c45958a305c9d1827 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2135633 > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> > Cr-Commit-Position: refs/heads/master@{#67083} TBR=clemensb@chromium.org,thibaudm@chromium.org Change-Id: Iac2978af1a300ec079baebab0feb8c9598711738 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:10349 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144058Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#67085}
-
Thibaud Michaud authored
- Do not expose CreateWasmScript since we should now use WasmEngine:GetOrCreateScript instead, - Initialize all Script fields in CreateWasmScript, not in WasmModuleObject::New, - Do not pass code size estimate argument, since we can always use the actual native module's committed code space. R=clemensb@chromium.org Bug: v8:10349 Change-Id: If9250d62ffc271ab6efc3b9c45958a305c9d1827 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2135633Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#67083}
-
- 27 Feb, 2020 1 commit
-
-
Clemens Backes authored
Most function signatures are created once and never changed. Hence pass them as const pointer. This makes it clear in function signatures that these parameters will not be modified. This also avoids a few ugly const_casts where we were passing pointers to constexpr FunctionSigs via non-const pointers. R=jkummerow@chromium.org Bug: v8:10155 Change-Id: Ieb658ab5582bff276f76babdaf7ddb8f72bd4790 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072739Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66478}
-
- 03 Feb, 2020 1 commit
-
-
Thibaud Michaud authored
This is a reland of 9781aa07 Original change's description: > Reland "[wasm] Cache streaming compilation result" > > This is a reland of 015f379a > > Original change's description: > > [wasm] Cache streaming compilation result > > > > Before compiling the code section, check whether the > > bytes received so far match a cached module. If they do, delay > > compilation until we receive the full bytes, since we are likely to find > > a cache entry for them. > > > > R=clemensb@chromium.org > > > > Bug: v8:6847 > > Change-Id: Ie5170d1274da3da6d52ff1b408abc7cb441bbe3c > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002823 > > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> > > Reviewed-by: Clemens Backes <clemensb@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#66000} > > Bug: v8:6847 > Change-Id: I0b5acffa01aeb7dade3dc966392814383d900015 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2022951 > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Cr-Commit-Position: refs/heads/master@{#66047} Bug: v8:6847 Change-Id: I272f56eee28010f34cc99df475164581c8b63036 Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel Cq-Include-Trybots: luci.v8.try:v8_linux64_msan_rel Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030741 Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66081}
-
- 30 Jan, 2020 2 commits
-
-
Thibaud Michaud authored
This reverts commit 9781aa07. Reason for revert: tsan bot failure: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/30110 Original change's description: > Reland "[wasm] Cache streaming compilation result" > > This is a reland of 015f379a > > Original change's description: > > [wasm] Cache streaming compilation result > > > > Before compiling the code section, check whether the > > bytes received so far match a cached module. If they do, delay > > compilation until we receive the full bytes, since we are likely to find > > a cache entry for them. > > > > R=clemensb@chromium.org > > > > Bug: v8:6847 > > Change-Id: Ie5170d1274da3da6d52ff1b408abc7cb441bbe3c > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002823 > > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> > > Reviewed-by: Clemens Backes <clemensb@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#66000} > > Bug: v8:6847 > Change-Id: I0b5acffa01aeb7dade3dc966392814383d900015 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2022951 > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Cr-Commit-Position: refs/heads/master@{#66047} TBR=clemensb@chromium.org,thibaudm@chromium.org Change-Id: I76e3561835815ac3d5bca74e76079e82f9f3d581 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:6847 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030727Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#66050}
-
Thibaud Michaud authored
This is a reland of 015f379a Original change's description: > [wasm] Cache streaming compilation result > > Before compiling the code section, check whether the > bytes received so far match a cached module. If they do, delay > compilation until we receive the full bytes, since we are likely to find > a cache entry for them. > > R=clemensb@chromium.org > > Bug: v8:6847 > Change-Id: Ie5170d1274da3da6d52ff1b408abc7cb441bbe3c > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002823 > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Cr-Commit-Position: refs/heads/master@{#66000} Bug: v8:6847 Change-Id: I0b5acffa01aeb7dade3dc966392814383d900015 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2022951 Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66047}
-
- 27 Jan, 2020 1 commit
-
-
Clemens Backes authored
This reverts commit 015f379a. Reason for revert: Msan is unhappy: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/30702 Original change's description: > [wasm] Cache streaming compilation result > > Before compiling the code section, check whether the > bytes received so far match a cached module. If they do, delay > compilation until we receive the full bytes, since we are likely to find > a cache entry for them. > > R=clemensb@chromium.org > > Bug: v8:6847 > Change-Id: Ie5170d1274da3da6d52ff1b408abc7cb441bbe3c > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002823 > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Cr-Commit-Position: refs/heads/master@{#66000} TBR=clemensb@chromium.org,thibaudm@chromium.org Change-Id: Idfa5b3f354816eb600ae7aab7857063d5d0d27ca No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:6847 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2022949Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66001}
-