Commit Graph

79001 Commits

Author SHA1 Message Date
Andreas Haas
6160fe9f40 [wasm][debug] Do lazy compilation after leaving debugging
Currently V8 recompiles all functions of a WebAssembly module with
TurboFan when a debugging session ends. This is outdated behavior and
causes OOMs for developers. With this CL all debugging code gets removed
when a debugging session ends, and functions get re-compiled lazily.

This behavior may lead to slightly worse performance for some time after
debugging finishes, but it avoids OOMs, and developers are used to
debugging code being not as performant as production code.

R=clemensb@chromium.org

Bug: chromium:1372621, v8:13224
Change-Id: I9fc97408ef92ad5564f2a9743213762226c2b25e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055923
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84509}
2022-11-28 13:46:09 +00:00
Samuel Groß
852aa1865f [sandbox] Do not trigger GC during EPT entry allocation
This simplifies some call sites as they do not need to worry about
stores to external pointer fields (especially lazily initialized ones)
triggering GCs. This also keeps the sandbox and non-sandbox mode more
consistent, as these stores will never trigger GC in non-sandbox builds.
Since there must be millions of objects that own the external pointer
table entries, the chances are quite high that GCs will anyway be
scheduled. If not, we should instead see if we can introduce an API
to only schedule incremental marking but not perform GC finalization.

Bug: v8:13535
Change-Id: Ie3c82b51194746107d4b0ed61d47abf87d28ba63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061688
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84508}
2022-11-28 13:38:49 +00:00
Dominik Inführ
6669b5aea4 [objects] Pass isolate to SeqString::Truncate
With shared strings we can't get the isolate/heap from the heap object
itself, so we need to pass this as additional argument instead.
Luckily enough all callers already know the current isolate.

Bug: v8:13267, chromium:1392755
Change-Id: I7c40f7a38da8ad57fcdaa575451b8f5ac2272b1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4059026
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84507}
2022-11-28 13:20:49 +00:00
Samuel Groß
9c61d04fa3 Remove incorrect DCHECKs in VirtualMemory functions
Performing actions such as changing page permissions can fail under
memory pressure, as such, these DCHECKs can sometimes trigger and should
be removed. Instead, this CL adds V8_WARN_UNUSED_RESULT to these APIs to
ensure that callers check the return value.

Bug: chromium:1382075
Change-Id: I678d3fb41ee465feda7d677678d3462dbc4c5940
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4031633
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84506}
2022-11-28 12:14:28 +00:00
Liu Yu
d8e2a28509 [mips64] Fix a typo
One of the kMips64MulOvf should be kMips64DMulOvf.

Change-Id: Ie333da46b443513c58d78bc092a3245ce612efbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061106
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#84505}
2022-11-28 07:51:58 +00:00
v8-ci-autoroll-builder
852ae98a1b Update V8 DEPS (trusted)
Rolling v8/build: 3542a5d..cd59f8e

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221126.2.1..version:10.20221127.3.1

Change-Id: Icfb8739468d50f7e2487b66ecae16b25e7a13cc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4060048
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84504}
2022-11-28 04:06:18 +00:00
v8-ci-autoroll-builder
59187809cb Update V8 DEPS (trusted)
Rolling v8/build: abd061c..3542a5d

Rolling v8/buildtools: 8641823..4a1666e

Rolling v8/buildtools/third_party/libc++/trunk: 8a91ae4..0488dfb

Rolling v8/buildtools/third_party/libc++abi/trunk: 83cce21..7362046

Rolling v8/third_party/depot_tools: 73a2624..0115386

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221123.1.1..version:10.20221126.2.1

Change-Id: Ib645e3757a280b9ffbd542b428560f7734a05520
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4058468
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84503}
2022-11-27 04:20:57 +00:00
Milad Fa
515e863e4f Check for INT64_MIN / -1 under SignedMulOverflow64
Bug: chromium:1392928, v8:9407
Change-Id: I0cf75d27a8e2db74f735c32461c02dbab098590d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4058066
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84502}
2022-11-26 17:13:27 +00:00
v8-ci-autoroll-builder
7d61e9aaa5 Update V8 DEPS (trusted)
Rolling v8/build: f57e5d4..abd061c

Rolling v8/buildtools: 9ca2fd2..8641823

Rolling v8/buildtools/reclient: re_client_version:0.86.0.25feac0-gomaip..re_client_version:0.87.0.b6908b3-gomaip

Rolling v8/buildtools/third_party/libc++/trunk: cd0a050..8a91ae4

Change-Id: I8054b163726a119cbaaa0472b1d2374649daa68b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4057830
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84501}
2022-11-26 04:19:47 +00:00
pthier
eaf033132a [heap] Enable string shortcutting with stack per default
Disabling string shortcutting during GCs with stack caused regressions
(mainly on RegExp and typescript benchmarks).
Enable shortcutting per default (again).

Bug: chromium:1393572
Change-Id: Idcf7f3f6e74263a94d9303c93b66c7ed4e20a9cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055272
Auto-Submit: Patrick Thier <pthier@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84500}
2022-11-25 21:07:08 +00:00
Omer Katz
b1f450a1a6 [heap] Run unittests for MinorMC variant
Bug: v8:12612
Change-Id: I02bf23916e1fb7ae07197310158ae3777b84f20f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4056257
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84499}
2022-11-25 19:47:56 +00:00
Victor Gomes
3a13bc5596 [maglev] Arm64 boilerplate
The absolute minimum to compile arm64 with v8_enable_maglev.

Bug: v8:7700
Change-Id: I7e1a0e31397f1677977c416d0ecc68fd6ee35b12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055115
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84498}
2022-11-25 16:13:36 +00:00
Igor Sheludko
7216ab0c08 [csa][builtins-pgo] Make builtins architecture-independent, pt. 1
This CL moves the architecture-dependent Word32ShiftIsSafe() check
from C++ code to CSA graph in order to ensure that the builtins control
flow structure is architecture-independent.

Since the constant value is known at compile-time TurboFan will remove
the check and delete the dead code so in the end the generated code
will be the same and when the check was on C++ side.

However, having these checks in the CSA graph keeps the initial state
of graph structure the same for all architectures of the same bitness.
This allows reusing the x64/x86 builtins PGO profiles on arm64/arm
builds respectively.

Bug: v8:10470
Change-Id: I5a7a10dfbf905e542d14f05193ff3b3990288b87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055606
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84497}
2022-11-25 16:12:33 +00:00
Darius M
db437000b1 [turboshaft] re-enable BranchElimination
Now that 1618cb9f99
has landed, BranchElimination should work again.

Bug: v8:12783
Change-Id: I6c1f148d1ce97a45107bfed2da41b387ad9bf1ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055113
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84496}
2022-11-25 16:01:20 +00:00
Qifan Pan
2301870e75 [turboshaft] Implement SignedMulOverflow64
This CL implements SignedMulOverflow64 to enable constant folding
of 64-bit SignedMul in machine optimization reducer.

Bug: chromium:1392928, v8:9407
Change-Id: I3a46198b2e2a0b59ca33f5a333fb8ea3d8f89340
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055684
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84495}
2022-11-25 15:44:06 +00:00
Samuel Groß
eacdc876e9 [sandbox] Remove v8_enable_sandbox_future
As this is by now equivalent to v8_enable_sandbox.

Bug: v8:10391
Change-Id: I1eef40a86b984a1867de3513a108ece0d43ec394
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055273
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84494}
2022-11-25 15:12:23 +00:00
Milad Fa
9ec8dd6b8b PPC[liftoff]: Implement simd FP<->Int conversions
Change-Id: Iefcadb2ee186d5bf2aca6c5e05adcedcacd74e2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4053378
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84493}
2022-11-25 14:39:05 +00:00
Victor Gomes
05b46168fa [maglev] Add Float64Modulus
Bug: v8:7700
Change-Id: I2b33732872152d9ba913ba7a9ed9f7f20ef17e66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055464
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84492}
2022-11-25 14:32:55 +00:00
Milad Fa
9231d9eebb PPC[was]: skip max-wasm-functions.js
PPC has a smaller wasm code space compared to other platforms and
as a result can't execute modules with large number of functions.

More details are available under the comment section of
crrev.com/c/4027963

Change-Id: I0531ec855ee9ffa5542bf0527287a3e49e1cdb0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4053377
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84491}
2022-11-25 13:41:18 +00:00
Victor Gomes
7b33cc5d80 [maglev] Move x64 specific code
Bug: v8:7700
Change-Id: Ifed534a2fa5cd53955aa9bf126d31c79d4d6b9da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055110
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84490}
2022-11-25 13:21:25 +00:00
Marja Hölttä
9010d09a05 [rab/gsab] Fix TA.p.lastIndexOf + evil resize to 0
Evil resizes were tested. Evil resizes to 0 were not.

Bug: v8:11111,chromium:1393375
Change-Id: Ie7318ae300d9779664d97e61214fed61f061f36d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4053554
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84489}
2022-11-25 13:04:15 +00:00
Dominik Inführ
2507b38af2 [heap] Update SharedStringInClientGlobalHandle test for --shared-space
This test had to be updated for --shared-space because the main isolate
is always parked when the client isolate requests a GC. In such cases
the GC isn't performed and therefore the weak handle not reset.

The CL moves the client isolate into a proper thread which allows the
main isolate to remain in the running state.

In addition this CL adds the BasicMemoryChunk::ComputeMarkBit
methods. These methods make it easy during debugging to compute
the MarkBit (cell + mask) for an object.

Bug: v8:13267
Change-Id: I6680d8d1d8b36d86b22c43399abbd4325f64ccb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4054622
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84488}
2022-11-25 12:41:35 +00:00
Victor Gomes
c970d03449 [maglev] Add unary IEEE Math builtin functions
Bug: v8:7700
Change-Id: I7225f252ae753d7f51a8b4a33f01819dad15cdba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4056875
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84487}
2022-11-25 12:35:15 +00:00
Darius M
1618cb9f99 [turboshaft] Refactor Call and multi-output handling in GraphBuilder
Bug: v8:12783
Change-Id: I0f7896259f0c1344b0a1d9583093de7bec930a77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4044221
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84486}
2022-11-25 12:14:25 +00:00
Matthias Liedtke
d2305bebcd [wami] Print '<bot>' for invalid negative heap types
This is consistent with the bottom value type.

Bug: v8:13525
Change-Id: Ib413c67a3b79b27280e2ea6b8ba3d48d3786cdf8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4053553
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84485}
2022-11-25 12:08:35 +00:00
Michael Lippautz
a39f9f6d28 [handles] Fix diagnosing CHECK
Bug: chromium:1380114, v8:13372
Change-Id: I9fb91ac175b6985efb47da11c8f03f4eb6bacb0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4053552
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84484}
2022-11-25 12:01:05 +00:00
Toon Verwaest
46d2105337 [maglev] Spill values across throw->catch
If a value is used after a try-block finishes, we need to make sure that
the catch-block can restore its value. Otherwise we'd accidentally drop
the value on register merge thinking we're in a liveness hole on the
merge after the catch (since the catch cleared all the registers). This
then breaks JumpLoops that need to restore the value in a specific
register.

Bug: v8:7700, chromium:1392061
Change-Id: I7255ccf9b36bf36583ad612882137b251c48caed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055111
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84483}
2022-11-25 11:56:05 +00:00
Victor Gomes
029e8a2f19 [maglev] Add Float64Exp + inline Math.pow
Bug: v8:7700
Change-Id: I681503d062e88609131979a6eea0fdee08b93ef1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055941
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84482}
2022-11-25 11:53:45 +00:00
pthier
0fec70aeb1 [regexp] Support properties of strings in unicode sets mode
Add support for properties of strings in unicode sets mode (/v).

Bug: v8:11935
Change-Id: Iae2f0182b1c42bb900c524ca406784b7b1b52842
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4051247
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84481}
2022-11-25 10:29:16 +00:00
pthier
5d7782f694 [regexp] Support string disjunctions in unicode set mode
Add support for string disjunctions within regular expression character
classes in unicode sets mode (/v).

Bug: v8:11935
Change-Id: Ida607123ced11c4dc3dfc687996f6abffeb6eeff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4051243
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84480}
2022-11-25 09:56:29 +00:00
Michael Achenbach
1211605a39 [build] Remove dead ENABLE_DEBUGGER_SUPPORT define
Bug: v8:9287
Change-Id: Ia031aa653b78bae1817e05c75ea508a7e2df8a83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055628
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84479}
2022-11-25 09:54:03 +00:00
Michael Achenbach
becc278d14 [foozzie] Ignore --harmony-struct until it's suitable for differential fuzzing
The flag --harmony-struct changes the global object which is
observable when doing differential fuzzing. The flag will now be
ignored to close ongoing false positives. It could be enabled in
the future if the global object stays equal in all compared
configurations, which could be faked behind the flag:
--correctness-fuzzer-suppressions.

No-Try: true
Bug: chromium:1393020
Change-Id: Ib5f3325a742dd32cac34febca58bf99e0184ac97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055627
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84478}
2022-11-25 09:18:23 +00:00
Michael Achenbach
96959b9ae9 [gcmole] Introduce gcmole arch-variants in configs
This uses arch-specific config keys for gcmole prepared by:
https://crrev.com/c/4055685

In a follow up, we can move the runs to bots with the respective
architecture.

Bug: v8:9287
Change-Id: Iedbb44490195b49d560658451263a1abdc2d3258
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055320
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84477}
2022-11-25 09:17:21 +00:00
Marja Hölttä
9bd85f5fb3 [rab/gsab] Put AB.p.transfer behind a separate flag
This enables launching RAB / GSAB and transfer separately.

See: https://github.com/tc39/proposal-resizablearraybuffer/issues/113

Bug: v8:11111
Change-Id: Id167adfbdcc2e92caf254b3b9b58a7336763ca4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055322
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84476}
2022-11-25 09:10:29 +00:00
Omer Katz
e96a2a174e [heap] Fix unittest for shrinking new space
HeapTest.GrowAndShrinkNewSpace emulates a GC cycle for shrinking new
space. Starting a new MinorMC cycle should first finalize sweeping from
the previous GC cycle.

Bug: v8:12612
Change-Id: Iea35b54ba0f7be3b7870c557c92042a8d9896045
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055625
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84475}
2022-11-25 08:53:09 +00:00
v8-ci-autoroll-builder
dc684ca778 Update V8 DEPS (trusted)
Rolling v8/build: 9c7229e..f57e5d4

Rolling v8/buildtools/third_party/libc++abi/trunk: 1a32724..83cce21

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/9da1075..0748984

Change-Id: I06d40961839d3f754f0a9f09f7f6c405f03dac10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4056417
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84474}
2022-11-25 03:42:14 +00:00
Anton Bikineev
f613df8b07 unified-young-gen: Soft bail out from wrapper tracing
There are still tests that use EmbedderHeapTracer, which would crash
with --minor-gc enabled. Bail out from PerformWrapperTracing() if
there is no cpp marking worklist to MarkingWorklists (i.e. Publish()
returns false).

Bug: v8:13475
Change-Id: I04708ffe8ebaf18f94f1a3fc60d9f6afeef13e03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055505
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84473}
2022-11-24 21:55:00 +00:00
Dominik Inführ
27dd6db546 [heap] Remove broken DCHECK in CheckOldToNewSlotForSharedTyped
This DCHECK doesn't hold anymore since we are comparing the old
and the new target objects.

Bug: v8:13267
Change-Id: I7fe1ec58f165555eab003bf021b856a5095e8daf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4056256
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84472}
2022-11-24 21:23:20 +00:00
Darius M
af6f1c4736 [turboshaft] Fix wrong reconstruction of FrameStates
Fixed: v8:13520
Bug: v8:12783
Change-Id: Ifea57ac5fda9a20be1fe6aa4c8e05ff13bfe9f5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4051206
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84471}
2022-11-24 19:49:10 +00:00
Dominik Inführ
be40ab1b6a [heap] Improve verification of outgoing pointers in shared space
Objects in shared space cannot have pointers to objects outside
the shared heap (apart from read only space). Improve heap
verification to also handle this invariant.

Bug: v8:13267
Change-Id: I28c5987bd6f74658eb75329be7c2d011f9569913
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055683
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84470}
2022-11-24 17:25:20 +00:00
Vasili Skurydzin
0b6fca7364 Aix: Skip processor.mjs test for component build
Bug: v8:13440
Change-Id: I5bc18a7c9d3bed75ef84d61e0f6100f5c9e6424d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4048420
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/main@{#84469}
2022-11-24 17:20:01 +00:00
Tobias Tebbi
747896380a [torque] align unreachable error message with C++
Bug: chromium:1384477
Change-Id: I39d22fc1e1472675c2dfbe9e22d8ef88551056a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4046222
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84468}
2022-11-24 16:23:00 +00:00
Tobias Tebbi
0d04ebd575 [turboshaft] fix signed div with power of 2
Bug: chromium:1392953
Change-Id: I392d5e0b12d840e08cd4f97b092a74208b30ac9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055862
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84467}
2022-11-24 16:18:14 +00:00
Nikolaos Papaspyrou
9acc6f96d8 [heap] Remove excessive heap verification for shared GC
During a shared garbage collection, the heap was verified both in
Heap::PerformGarbageCollection and Heap::PerformSharedGarbageCollection
and concurrent marking was paused/resumed twice. This CL removes what
is not necessary and fixes the order: pause, verify, GC, verify, resume.

Change-Id: I0f687a37785cbb99691fc83c0c80c8ca4a30bb71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042242
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84466}
2022-11-24 15:41:10 +00:00
Clemens Backes
7798a1f6f3 [wasm] Speed up the JS WasmModuleBuilder
The WasmModuleBuilder is used in tests for creating Wasm modules. It can
be pretty slow for huge modules, in particular in simulator builds or in
slow variants like gc-stress.

This CL adds a fast path to the code section creation, for functions
without locals. This makes the wasm-max-functions test 1.45x faster in
the arm64 simulator (generation of the code section alone gets 2.2x
faster).

R=ahaas@chromium.org

Change-Id: I993542448fb4f0b5fdadca13c59691d86844e2a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4051606
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84465}
2022-11-24 15:17:50 +00:00
Dominik Inführ
68b5b766a4 [heap] Allow maps in shared space during verification
Maps might be allocated in the shared space as well when using
--shared-space.

Bug: v8:13267
Change-Id: I8e5e0742d0dc519d676d1adb3f2fffc8a17ca3c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055503
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84464}
2022-11-24 14:57:17 +00:00
Leszek Swirski
b7508114c0 [maglev] Avoid allocation for BuildCheckMaps
Pass the map list into BuildCheckMaps as a base::Vector (a non-owning
span type) rather than ZoneVector, so that it can accept either an
existing ZoneVector, or an on-stack array.

Bug: v8:7700
Change-Id: Iaef0986433bc7984ee28883c6f1e9fb32f538ecb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4004959
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84463}
2022-11-24 14:55:30 +00:00
Leszek Swirski
26bc8bb401 [ext-code-space] Make process-wide code range leaky
Make the process-wide code range a once-initialised leaky object, rather
than having a global weak_ptr + per-heap shared pointers and allowing it
to be collected when all Isolates die.

These weak pointers add locking overhead when accessing the code range,
which shows up in GC and deoptimization traces when attempting to
calculate Code objects from PCs. The process-wide pointer compression
cage is already leaky, so it makes sense for the code range to be
similar.

Bug: v8:11460

Change-Id: Ibebd468ebad9eafe8aec49f575cdbf604e4b6cc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4051201
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84462}
2022-11-24 14:50:20 +00:00
Dominik Inführ
8aa7720c83 [roots, heap] Move invalid_prototype_validity_cell into RO space
This validity cell is already invalidated from its creation, which
means this object is actually immutable. Move it into RO space to make
use of this property.

There was one store to that object which simply overwrote that
invalid marker with the same value. This CL changes this into a
conditional store.

Bug: v8:13267
Change-Id: I12ab5a41bd9fc0a62523a4ac35607c4b38b2acee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055895
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84461}
2022-11-24 14:38:00 +00:00
Dominik Inführ
32fd715ec3 [heap] Verify no OLD_TO_SHARED slots recorded in shared heap
We do not record OLD_TO_SHARED slots in the shared heap itself. This
invariant can be checked in the heap verifier.

Bug: v8:13267
Change-Id: Ie2f3fb0923c597c962a1139d2986258a65998648
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055663
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84460}
2022-11-24 14:29:01 +00:00