Commit Graph

79354 Commits

Author SHA1 Message Date
Maya Lekova
3764898a23 [turboshaft] Fix incorrect assumption when inlining a block
The current version of CloneAndInlineBlock assumes that the inlined
block is a direct predecessor of the currently reduced block. With
recent Return reductions implemented in branch elimination that's no
longer the case, as we're looking one edge past the current block.

Bug: chromium:1399626
Change-Id: I2ce23672c0e33b2857a4663d8e7ad5ed1df3c20e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4097125
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84862}
2022-12-15 10:43:46 +00:00
V8 Autoroll
5b84df0b99 Version 11.1.0
Change-Id: I9250e6a62e5606197a3f08d886d1f1c8f28bbe1e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4108798
Commit-Queue: Lutz Vahl <vahl@chromium.org>
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84861}
2022-12-15 10:26:39 +00:00
pthier
40c3175283 [maglev] Store stack slots as signed integer
The stack slot index in maglev is the offset from the frame pointer, so
it is always negative.
Storing it as an unsigned 32-bit integer causes issues when the value is
used as a 64-bit int (preventing sign extension).

Bug: v8:7700
Change-Id: I0c64fc8c96f72507f02b870155f2fe7655485894
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4107388
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84860}
2022-12-15 10:08:37 +00:00
Dominik Inführ
1d8d361976 [heap] Update limits in MemoryAllocator::TakeOverLargePage
When taking over large pages from another heap, allocated limits in
MemoryAllocator need to updated as well.

Bug: v8:13267, chromium:1401077
Change-Id: I2ef349578de34ff697a5fa76da17870fa171df95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4108649
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84859}
2022-12-15 09:49:41 +00:00
Dominik Inführ
70c7eefed0 Revert "[d8] Do not dispose isolate in quit()"
This reverts commit 27c561617f.

Reason for revert: Causes some benchmarks to fail.

Original change's description:
> [d8] Do not dispose isolate in quit()
>
> With --shared-space the main isolate has to be disposed last, so we
> can't really dispose the main isolate while worker isolates are
> still running without violating our invariants.
>
> Solve this by not invoking Isolate::Dispose() for `quit()`.
>
> Bug: v8:13267, chromium:1400810
> Change-Id: Id9d6288c62d9c03d5c2f40c52efd0ac6422ac822
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106751
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84846}

Bug: v8:13267, chromium:1400810
Change-Id: I51559ffdb0bbbd870de3f33f65812cb9056636b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110648
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84858}
2022-12-15 09:36:26 +00:00
Frank Tang
6bf3344f5d [Intl] Impl LocaleInfo PR 63
https://github.com/tc39/proposal-intl-locale-info/pull/63

Sort collation code alphabetically before return.

Bug: v8:13542
Change-Id: I1c7df69af483a96a1fc7625b11c2b850edc59283
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4094503
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84857}
2022-12-15 01:21:58 +00:00
Frank Tang
f0dfa877b2 [test262] Roll test262
ec752ebaab..e6c6460a5b

Bug: v8:7834
Change-Id: I886a7aaba57564076c30493b07d30757cefedbfc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4099704
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84856}
2022-12-15 00:34:07 +00:00
Dominik Inführ
1e47404bb7 [heap] Fix uninitialized field in DescriptorArray write barrier
marking_barrier_type_ wasn't initialized in MarkingBarrier's ctor.
With --shared-space and enabling incremental marking in the shared
heap this could lead to the load of an uninitialized value in
`is_minor` in the DescriptorArray write barrier.

The write barrier was also not using the right value for old_marked
when both minor and shared incremental marking were enabled.

Bug: v8:13267, chromium:1400730
Change-Id: Ibd682b9baba333ce16af028e4f66aefb6c8aaea7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4108028
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84855}
2022-12-14 22:19:32 +00:00
Frank Tang
96bc59aec0 [intl] Sync to durationFormat PR130
https://github.com/tc39/proposal-intl-duration-format/pull/130

Bug: v8:11660
Change-Id: Ib749a5f8264fdef21cb8622df766ebf7710595e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4104320
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84854}
2022-12-14 21:33:36 +00:00
Matthias Liedtke
86d44a8c2b [wasm] Fix wrong comparison in liftoff for callref
The comparison of an external pointer used `kRef` here which is the
ValueKind for Wasm GC references. As those references are only 32 bits
on pointer-compressed builds, a 32-bit-comparison is used.
(This was introduced with change https://crrev.com/c/4016816.)

If the pointer has the 32 least signficant bits zeroed out, it assumes
that the callref target is a WasmJSFunction looking in the code table
for this index for the JS function. As it is a wasm function, it has a
trap handler registered there causing the call to trap instead.

Fix: v8:13534
Change-Id: I35474e1eaeeefff3cbe5bec9c6ede470688a0ce6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106850
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84853}
2022-12-14 19:14:28 +00:00
Adam Klein
89f82e97d5 Revert "[static-roots] Enable static roots on supported configurations"
This reverts commit c04ca9cc63.

Reason for revert: failures on arm64 msan:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/47385/overview

Original change's description:
> [static-roots] Enable static roots on supported configurations
>
> The static root values are not actually used yet.
>
> Bug: v8:13466
> Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84850}

Bug: v8:13466
Change-Id: Iebf3c4eadb874f7ebc4d9382d454e63a63e9d977
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4107729
Auto-Submit: Adam Klein <adamk@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84852}
2022-12-14 17:55:06 +00:00
Choongwoo Han
bda14cb7ed Support precise zone stats for Windows
MSVC does not have cxxabi.h. Also, MSVC does not need demangling in this case.

Bug: v8:10572
Change-Id: I27f2335ba6cb2bb35132bad23ce95b78b66cd3fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4103520
Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84851}
2022-12-14 17:18:58 +00:00
Olivier Flückiger
c04ca9cc63 [static-roots] Enable static roots on supported configurations
The static root values are not actually used yet.

Bug: v8:13466
Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84850}
2022-12-14 17:00:42 +00:00
Leszek Swirski
9cf68fd90b [maglev] Call megamorphic stubs for megamorphic feedback
Add paths to named and keyed loads with empty feedback (distinct from
insufficient feedback), which signals that this is a megamorphic load
(cf. ShouldUseMegamorphicLoadBuiltin in js-generic-lowering.cc).

Bug: v8:7700
Change-Id: Ic32980f9217a7f1a3e44cc40444edf002cf4e6f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106848
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@{#84849}
2022-12-14 16:41:26 +00:00
Nikolaos Papaspyrou
f81430caa9 [heap] Enable conservative stack scanning on tests
Since its introduction (behind a compile-time flag), conservative stack
scanning was disabled by default on tests. This CL inverts this logic,
enabling CSS by default for all tests that do not define an explicit
scope to disable it.

Bug: v8:13257
Change-Id: I5ea4249d02f69b0b1e195415c2562daf5d8c0ea9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100912
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84848}
2022-12-14 16:14:12 +00:00
Victor Gomes
444fefb520 [maglev][arm64] Add BuiltinStringPrototypeCharCodeAt
... and the necessary IR nodes to test a simple
program: `"abc".charCodeAt(1)`

Bug: v8:7700
Change-Id: Ia670d8a44f39f4a0b8312d69d7d3f64cbc2b6831
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106748
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84847}
2022-12-14 15:35:36 +00:00
Dominik Inführ
27c561617f [d8] Do not dispose isolate in quit()
With --shared-space the main isolate has to be disposed last, so we
can't really dispose the main isolate while worker isolates are
still running without violating our invariants.

Solve this by not invoking Isolate::Dispose() for `quit()`.

Bug: v8:13267, chromium:1400810
Change-Id: Id9d6288c62d9c03d5c2f40c52efd0ac6422ac822
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106751
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84846}
2022-12-14 15:31:20 +00:00
Dominik Inführ
54ef53caff [heap] Open right safepoint in heap verifier
Bug: v8:13267, chromium:1400810
Change-Id: I510864344f724511d705842938e9786ae24a0c61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106749
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84845}
2022-12-14 15:29:39 +00:00
Olivier Flückiger
f6eab3830d [static-roots] Build infrastructure for static roots
Add gen-static-roots.py to conveniently re-generate the static roots
table when it needs changing.

Additionally, ensure the first read-only page is allocated as first page
during mksnapshot, to move static roots closer to start.

Bug: v8:13466
Change-Id: Ie72b64d0ad0dd3e5fccd3b41e8ed00a4a55a0033
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096481
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84844}
2022-12-14 15:19:39 +00:00
Dominik Inführ
4677d3ba1b [heap] Make shared heap allocations in GC more robust
Bug: v8:13267, v8:13591
Change-Id: I8797a871479f13d1d45a6c9e7d9063a661a3ff8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106368
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84843}
2022-12-14 15:01:46 +00:00
Dominik Inführ
e7c12c00d8 [heap] Fix old-to-shared typed slot recording
Bug: v8:13267, v8:13592
Change-Id: I9a56586580b3348e57a0713f8ae7b6522a01fee2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106488
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84842}
2022-12-14 14:58:56 +00:00
pthier
39fbe7220d [maglev][arm64] Fix prologue
Modify stack pointer (instead of frame pointer) to reserve space for
untagged stack slots.

Bug: v8:7700
Change-Id: I47aa2b1cb060447e9746fe58ffb4bfa8b44d80dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106181
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84841}
2022-12-14 14:06:09 +00:00
Victor Gomes
955de73ee5 [maglev] Disable %OptimizeOsr for Maglev in concurrent Osr mode
Since it (currently) needs to find the JumpLoop bytecode.
See comment in line 645.

Fixed: chromium:1400549
Bug: v8:7700
Change-Id: If73a9c8d2f5a85cceded34cdf1aa7b5895937990
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4103683
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84840}
2022-12-14 14:05:06 +00:00
Anton Bikineev
f8bd5feb68 unified-young-gen: Fix Oilpan-to-V8 remembered set
The CL applies multiple changes:
1) Reverts back to using std::vector<> for young nodes. Distinguishing
   between young and remembered nodes is still needed to allow fast
   filtering.
2) Adds the has-old-host flag to TracedNode, which is used to remember a
   node.
3) Adds bailouts for old objects into UnifiedHeapMarkinState and
   ConservativeTracedHandlesMarkingVisitor.

Bug: v8:13475
Change-Id: Ib296ece9df6f783bb3d47ffa0794be16e6c1aea8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4080386
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84839}
2022-12-14 14:01:35 +00:00
Victor Gomes
6bcbcfed5c [maglev] Noop when OSR if active tier is already TF
If the current active tier is already Turbofan, then
we just return to JumpLoopPrologue codegen to deopt.

Fixed: v8:13585
Bug: v8:7700
Change-Id: Idf8f4990e8dfea9e9fd6e3378e15110ec09b1896
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4104623
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84838}
2022-12-14 13:11:51 +00:00
Camillo Bruni
bc9c27aa2b [runtime] Reduce ExternalCallbackScope size
- Force using the isolate from VMState
- Mark all fields as const to allow for better code

Change-Id: I5538f615e22569dc365dbb0d1482138311932575
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4098629
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84837}
2022-12-14 13:09:15 +00:00
Leszek Swirski
6a52ff1d84 Revert "Fix a few more places where we don't check for termination"
This reverts commit 8b283d0c7e.

Reason for revert: This test fails in stress mode: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20verify%20csa/31485/overview

Original change's description:
> Fix a few more places where we don't check for termination
>
> Bug: chromium:1376663, chromium:1393272
> Change-Id: Ie6ee25fb87f9959166b1696e36f07218d2959098
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4105981
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84835}

Bug: chromium:1376663, chromium:1393272
Change-Id: Iaa9b1370a9e581dd8cb06b83855acaa9a22652c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106370
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84836}
2022-12-14 13:08:13 +00:00
Camillo Bruni
8b283d0c7e Fix a few more places where we don't check for termination
Bug: chromium:1376663, chromium:1393272
Change-Id: Ie6ee25fb87f9959166b1696e36f07218d2959098
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4105981
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84835}
2022-12-14 12:01:47 +00:00
Camillo Bruni
88b7fdae83 Add termination check in MicrotaskQueue::RunMicrotasks
We should not enter V8 if it's marked for termination.

Bug: chromium:1382710
Change-Id: Ic58f7c7b32614431dce04e2429c60dd79040ec43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030476
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84834}
2022-12-14 12:00:44 +00:00
pthier
6ed0ea7dfb [maglev][arm64] Port Call and CallKnownJSFunction
- Both Call and CallKnownJSFunction are now architecture independent.
- Introduced PushReverse to push arguments.
- Added support for iterators to Push/PushReverse.
- Added RepeatIterator helper to push the same value N times.

Drive-by: Implement load/store from/to stack slot and double registers.

Bug: v8:7700
Change-Id: I4f995ded7e95b79d8c8c3d7b2ffd373f51e631d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4085006
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84833}
2022-12-14 11:59:41 +00:00
Qifan Pan
b152c67e03 [turbofan] Support BigIntEqual
This CL adds support for BigIntEqual in turbofan and collects type
feedback for small BigInt equal and strict equal in ignition.

Bug: v8:9407
Change-Id: I29cbc4d3bdfe9fcde8c1717afe83654a84c25c36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096557
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Cr-Commit-Position: refs/heads/main@{#84832}
2022-12-14 10:37:47 +00:00
Dominik Inführ
72d0205b0e [heap] Add missing write barrier for stores into shared heap
With --shared-space we need the write barrier for incremental
marking.

Bug: v8:13267
Change-Id: I7fb6e6de0f793824f3c27b8ec3c29cba39901188
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4103241
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84831}
2022-12-14 10:07:30 +00:00
Dominik Inführ
3915384f58 Reland "[heap] Also promote strings in large objects into shared heap"
This is a reland of commit 303facf5e1

This CL fixes DCHECK failures by using BasicMemoryChunk in
RecordOldToSharedSlot.

Original change's description:
> [heap] Also promote strings in large objects into shared heap
>
> With --shared-string-table all in-place internalizable strings are
> directly promoted from new space into the shared heap. However, this
> wasn't the case with large objects. This CL fixes this and adds test
> to guide fuzzers.
>
> Bug: v8:13267, chromium:1400048
> Change-Id: I6f850d480956c63bfbe1a7060140df850e284933
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096818
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84805}

Bug: v8:13267, chromium:1400048, v8:13588
Change-Id: I221592ec723d2b5e92094ff2598a99576d72a677
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4098831
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84830}
2022-12-14 10:06:27 +00:00
Leszek Swirski
9bfc84f18f [tools] Use code attribution in timeline view
Reflect the code attribution (in particular, "attribute non-functions to
JS functions") in the timeline view, which visualises the distribution
of each code kind. This allows easier visualisation of which tiers are
active, ignoring stubs that are shared between tiers (like ICs).

Change-Id: I1f2818ffd4e466ce18c01627865186e6a94e2bed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4105021
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84829}
2022-12-14 10:04:50 +00:00
Clemens Backes
9be597d194 [arm] Do not emit the constant pool before a branch
After computing the branch offset but before emitting the actual branch,
we should not emit a constant pool. Otherwise the previously computed
offset would be off.

Instead of handling this indirectly via the Assembler::branch_offset
method, do this directly in the Assembler::b method (and friends), so it
is not missed on other call sites.

R=jkummerow@chromium.org

Bug: chromium:1399424
Change-Id: I0cbb219ced5b671001a296b1cc7c339f395abffe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4102800
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84828}
2022-12-14 06:45:53 +00:00
Jaroslav Sevcik
4c3266841c [inspector] Handle instrumentation break with multiple sessions
Currently, any session can resume instrumentation breaks by sending
Debugger.resume command. That can lead to unreliable breakpoint
placement because sessions can resume too early.

The early resumption can happen in two ways:

- When we have two instrumented sessions, the first one to resume
  can prevent the other one from setting its breakpoints
  before executing the code.

- With one instrumented session and one without instrumentation
  breakpoints, the uninstrumented session's Debugger.resume
  command can resume the instrumentation pause before the
  instrumented session can set its breakpoints.

This patch fixes both of these issues by changing the instrumentation
pause resumption logic to take note of the sessions that were notified
about the instrumentation breakpoints. The debugger will only resume
once all those sessions resume (or disconnect).

Bug: chromium:1354043
Change-Id: I84cf16b57187dbb40645b2f7ec2e08f0078539dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100466
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84827}
2022-12-14 06:01:22 +00:00
Shu-yu Guo
4757205b3c [rab/gsab,api] Add resizable BackingStore creation
This CL adds v8::ArrayBuffer::NewResizableBackingStore.

This API is needed to support Mojo cross-process serialization of
resizable buffers. See https://chromium-review.googlesource.com/c/chromium/src/+/4086949

Bug: chromium:1396361, v8:11111
Change-Id: I1d3ad367f28015184fd80fd2f05a37a3659d3a66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4093555
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84826}
2022-12-14 01:54:00 +00:00
Milad Fa
c3568fdb87 PPC[liftoff]: Implement simd shuffle
Change-Id: Id40e71c5c18b7003452d250f9b545304e880ee8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4102760
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/main@{#84825}
2022-12-13 19:26:42 +00:00
Clemens Backes
770e66c483 [wasm] Do not validate asm.js code
Asm.js code (translated to Wasm) is valid by design, do not try to
validate it.
This is achieved by fully populating the {validated_functions} bitset
for asm.js modules. To make this safe(r) we do not allow to change the
origin or a WasmModule after initialization, which requires some
refactoring mostly in tests.

R=ahaas@chromium.org

Bug: v8:13447, v8:13565
Change-Id: I174c01f13185ff4117b02882b953c6ba29a3644d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100686
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84824}
2022-12-13 17:46:59 +00:00
Darius M
0aaab06ffc [maglev][arm64] Implement xxxWithOverflow nodes
Bug: v8:7700
Change-Id: I1601d4e19d313be4d5e1ca4ca1147834e1d7947a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101124
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84823}
2022-12-13 17:38:07 +00:00
Choongwoo Han
836c13ba6d Fix build errors for precise zone stats
There were compile errors when building v8 with v8_enable_precise_zone_stats = true.

../../src/zone/type-stats.cc:30:24: error: no type named 'Free' in namespace 'v8::base'
    if (buffer_) base::Free(buffer_);

../../src/zone/zone.h:255:3: error: use of undeclared identifier 'stdd'; did you mean 'std'?

  stdd::atomic<size_t> freed_size_for_tracing_ = {0};

Bug: v8:10572
Change-Id: If1035edc99eff05c418e0bc65de8a8729f75e30f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4098379
Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84822}
2022-12-13 17:33:18 +00:00
Dominik Inführ
a14c682f50 [heap] Allow handle derefs in GC safepoint epilogue callbacks
This is necessary to allow running GC epilogue callbacks after a
GC in the safepoint. Handle dereferences are allowed even if that
particular thread is parked. They may generally also happen from a
different thread than expected by DCHECKs in the case shared GCs
combined with multiple main threads.

This CL solves this issue by adding an additional assertion scope
that can temporarily allow such derefs for running the callbacks.

Unlike other assert scopes the new assert scope is disabled by
default.

Bug: v8:13267, chromium:1399379
Change-Id: Ibc741ad6bebb740cf24ae8be116d770f62ae6481
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100826
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84821}
2022-12-13 17:32:15 +00:00
Clemens Backes
0d3d31e42a [wasm][cleanup] Move ModuleDecoderTemplate fields to the end
According to the style guide, field definitions should be the last thing
in the private section.

R=ahaas@chromium.org

Change-Id: I2b0890b7f5f5c8a9a19213a80c400bd9db080a05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4097429
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84820}
2022-12-13 17:31:10 +00:00
Choongwoo Han
fd8a89af75 [presubmit] Handle Windows path for header guard check
AffectedFile.LocalPath returns a path with backward slashes in Windows. Update the presubmit script to handle this case properly.

Bug: v8:13582
Change-Id: Iabc46ded5a8448e5d373679162108f94846c06e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4099007
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#84819}
2022-12-13 17:30:02 +00:00
Adam Klein
a40734b3cc Revert "[maglev] Enable --maglev with --future"
This reverts commit 4cc24b6a1c.

Reason for revert: sqlite-change-heap mjsunit test starts failing:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20no-concurrent-marking/12381/overview

Original change's description:
> [maglev] Enable --maglev with --future
>
> This also removes --nowrite-protect-code-memory from --future.
>
> Bug: v8:7700
> Change-Id: Ibf17f541906d5f586d380b00ce471b5e1f20f7e3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100754
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Auto-Submit: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84817}

Bug: v8:7700
Change-Id: Ia9c4e5515cf24c8b96f7b05dc3c823bdfa285643
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4102360
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84818}
2022-12-13 17:25:07 +00:00
Toon Verwaest
4cc24b6a1c [maglev] Enable --maglev with --future
This also removes --nowrite-protect-code-memory from --future.

Bug: v8:7700
Change-Id: Ibf17f541906d5f586d380b00ce471b5e1f20f7e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100754
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84817}
2022-12-13 16:32:16 +00:00
Victor Gomes
2a887253e1 [maglev] Share Tagged(Not)Equal nodes
Bug: v8:7700
Change-Id: Icee125319136cb3326c02b8f0958777929569bb3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100709
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84816}
2022-12-13 15:28:14 +00:00
Olivier Flückiger
afc49f4725 [static-roots] Support serializing read-only heap as a memory dump
Build mode for serializing the read only heap as a memory dump in the
startup snapshot. This makes compressed pointers of root objects
statically known at mksnapshot time.

This CL also adds a feature to mksnapshot to dump the static addresses
to a C++ header file. This will allow us to use these addresses in the
future.

The mode is disabled for now since we need some build infrastructure
first to conveniently re-generate the table when the layout changes.

Bug: v8:13466
Change-Id: I975b15bd89fedf713fb7d12b4929935ece78139d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4056181
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84815}
2022-12-13 15:21:25 +00:00
Nico Hartmann
2e9b4afa38 [turboshaft] Fix type refinement for unreachable branches
Bug: v8:12783, chromium:1400034
Change-Id: Ifdd105fba500ebc7678ee223947743eb0283f950
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4097428
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84814}
2022-12-13 14:53:18 +00:00
Dominik Inführ
8f911e423e Revert "[heap] Also promote strings in large objects into shared heap"
This reverts commit 303facf5e1.

Reason for revert: Causes failures with fuzzers.

Original change's description:
> [heap] Also promote strings in large objects into shared heap
>
> With --shared-string-table all in-place internalizable strings are
> directly promoted from new space into the shared heap. However, this
> wasn't the case with large objects. This CL fixes this and adds test
> to guide fuzzers.
>
> Bug: v8:13267, chromium:1400048
> Change-Id: I6f850d480956c63bfbe1a7060140df850e284933
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096818
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84805}

Bug: v8:13267, chromium:1400048
Change-Id: If20528bbf804b73ce8ad10f8addc9a1f11b50d96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101261
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84813}
2022-12-13 14:38:39 +00:00