Commit Graph

73763 Commits

Author SHA1 Message Date
Milad Fa
9bfbe79917 S390: Fix floating point offset calculation
During `WasmDebugBreak` we push the full 128-bit vector register
instead of only the 64-bit FP value. As a result offset calculation
must use kSimd128Size instead of kDoubleSize.

Change-Id: Icaa44d9663024b9740acbbf054f6c334ae349cf8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487958
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79271}
2022-02-24 21:53:47 +00:00
Jakob Kummerow
647b41ef9c [wasm-gc] Use correct Context when wrapping objects
For creating and unpacking the wrapper objects we currently use
for WasmGC <-> JavaScript interop, we must read the Context from
the "WasmApiFunctionRef" rather than from the "instance_node_".

As a bonus, this patch also slightly improves generated code
for wasm-to-js wrappers by moving conditionally needed code to
labels (previously it was always executed but the results only
conditionally used).

Fixed: v8:12640
Change-Id: I55485cdb6a402f32ddc42ec6316dcbe23f1fcccb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3489486
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79270}
2022-02-24 20:42:19 +00:00
Junliang Yan
04f6a1aa23 s390x: [baseline] Add baseline test for s390x
Change-Id: Iebe587955aad8445cd22598a3e2930ca9444e792
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484702
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79269}
2022-02-24 19:37:07 +00:00
Toon Verwaest
69a2565bff [maglev] Add an InputsUpdater to update next use and clear dead inputs
- First inputs are walked to update next_use and collect dead inputs
- If any dead values were collected, clear them from the registers
- Finally free the LiveNodeInfo from values_.

Bug: v8:7700
Change-Id: I4ae78820d4405470e73d3ec89948e46442286eeb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487786
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79268}
2022-02-24 17:26:17 +00:00
Dominik Inführ
7768e9347b Reland "[heap] Allow shared references in WeakMap"
This is a reland of a183895687

Now that https://crrev.com/c/3485678 landed and fixed the deadlock
in the linked bug, we can reland this CL without changes.

Original change's description:
> [heap] Allow shared references in WeakMap
>
> Shared references can also be stored in WeakMaps and during marking we
> need to be able to deal with such references. In a client GC shared
> objects are treated as live, so we don't need to update or check mark
> bits for such objects.
>
> Bug: v8:11708
> Change-Id: I0dbf797472c4779f462750dab63cc9b012aad091
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3447365
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79153}

Bug: v8:11708, v8:12642
Change-Id: I5945a16255647c897a1df834267137bf73b6207f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3485679
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@{#79267}
2022-02-24 17:22:38 +00:00
Shu-yu Guo
1bf1aa4c1b Stage Array grouping
Bug: v8:12499
Change-Id: I41961dc689ff634fa141c8b15909ca57bdb401cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3482479
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79266}
2022-02-24 17:18:06 +00:00
Clemens Backes
b5003a3c63 [liftoff][x64] Fix bug in i32.atomic.sub32
{AtomicSub} on x64 first negates the {value} register, then does an
atomic addition. For that reason, {value} should be a unique register.
So far, we only checked that it's not used in the value stack, but we
should also check for overlap with the destination address or the offset
register.

Drive-by: Remove unneeded handling of non-unique register index on arm,
as that cannot happen (LiftoffCompiler ensures that the result register
is unique).

R=thibaudm@chromium.org

Bug: chromium:1296876
Change-Id: Ie6b97eec8e8dea07b0bcc644d261f47467cc5b8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487987
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79265}
2022-02-24 16:57:37 +00:00
Nico Hartmann
502fb22cd4 [turbofan] Verification pass for SimplifiedLowering
This CL introduces an additional verification pass at the end of
SimplifiedLowering. The verification checks consistency of the lowered
graph with respect to node types under the effect of used truncations.
Typing of additional, lower level nodes is required and added in this
CL.

The verification pass can be enabled using --verify-simplified-lowering.

Bug: v8:12619, v8:11682
Change-Id: I21e7ebcf40153e53108ddfad2a871c7cbd61a085
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3452029
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79264}
2022-02-24 16:33:37 +00:00
Tobias Tebbi
0860e24848 Revert "heap: Force incremental marking in C++ only workloads"
This reverts commit 4fde332811.

Reason for revert: causes crashes

Original change's description:
> heap: Force incremental marking in C++ only workloads
>
> ... when above a certain minimum threshold. This is to guard against
> memory running away in scenarios where the JS heap is empty and
> there's only high throughput C++ allocations that don't allow for a
> memory reducer GC to kick in.
>
> This logic should be revisited after Oilpan's young generation
> collector is implemented which may allow switching to a more efficient
> shrinking strategy for initial heap setup.
>
> Bug: chromium:1029379, chromium:1300028, chromium:1300492
> Change-Id: I93924fc2fe77d6226c29358d3afb1cc9d6fbf3b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484319
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79255}

Bug: chromium:1029379, chromium:1300028, chromium:1300492
Change-Id: I15e8d7b37b9f9b6ef4f72968c262a614618f1863
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487970
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@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@{#79263}
2022-02-24 15:51:27 +00:00
Michael Lippautz
755e7521ea test: Fix test to use a proper interval >0
Previously, the interval was max(6, <interval_value>) which was
changed to actually consider the value of the flag.

Change-Id: Iec3cef19b6ec8528f03c36db6239b044ee90cde1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487969
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79262}
2022-02-24 15:44:27 +00:00
Dominik Inführ
17b3a623d7 [d8] Park thread before blocking in semaphore
We need to park the isolate's main thread before blocking in the
semaphore to allow a shared GC to happen in the meantime.

Bug: v8:11708, v8:12647
Change-Id: Ide215d2c811caee84663d8749b7d94a414c44bd8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3485678
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79261}
2022-02-24 15:33:57 +00:00
Michael Lippautz
a1b206dd2b heap: Call AllocateRawWith directly
Avoid going through Heap but rather call it directly on the allocator.

Bug: v8:12615
Change-Id: I395b96d08b685c63c4125245a76c3610acf1643b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3485677
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79260}
2022-02-24 13:27:52 +00:00
Jakob Gruber
266f41aa24 Fix v8_enable_maglev = false compiles
Bug: v8:7700
Change-Id: I38251c42a06af554281879613b6424cf65fbbbd1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487967
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79259}
2022-02-24 13:12:20 +00:00
Clemens Backes
f8379afa88 [base] Fail early in OS::Free and OS::Release
Instead of returning a boolean value, and then failing in the caller via
a CHECK, do fail directly inside OS::Free, OS::Release and similar
functions.

The PageAllocator methods still return a bool (which is always true) to
avoid changing the public API.

R=mlippautz@chromium.org

Bug: v8:12656, chromium:1299735
Cq-Include-Trybots: luci.v8.try:v8_fuchsia_compile_rel
Change-Id: Ide02e7d893e1603326c629797a7defac8bf258ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483671
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79258}
2022-02-24 12:56:34 +00:00
Nikolaos Papaspyrou
227434be22 heap: Refactor GC type timer methods
This CL refactors Heap::GCTypeTimer and Heap::GCTypePriorityTimer
and moves them to a GCTracer::RecordGCPhasesInfo class. This is
a necessary change for deprecating counters that are used for
old style GC metrics, like gc_scavenger. When all such counters
are deprecated, GCTracer::RecordGCPhasesInfo will no longer be
necessary and will be removed.

Bug: chromium:1154636
Change-Id: I04504a0f6c7a0955f4300a1c94c969aaeb23b77f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3486556
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79257}
2022-02-24 12:43:50 +00:00
Michael Lippautz
03e7e3e77a heap: Move headroom for allocation behind --random-gc-interval
Keep --gc-interval precise wrt to the # of allocations needed for a
GC.

Bug: v8:12615
Change-Id: I1ff45ef709013427b5f27643e3a6135dd0f4025d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3485676
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79256}
2022-02-24 12:21:31 +00:00
Michael Lippautz
4fde332811 heap: Force incremental marking in C++ only workloads
... when above a certain minimum threshold. This is to guard against
memory running away in scenarios where the JS heap is empty and
there's only high throughput C++ allocations that don't allow for a
memory reducer GC to kick in.

This logic should be revisited after Oilpan's young generation
collector is implemented which may allow switching to a more efficient
shrinking strategy for initial heap setup.

Bug: chromium:1029379, chromium:1300028, chromium:1300492
Change-Id: I93924fc2fe77d6226c29358d3afb1cc9d6fbf3b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484319
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79255}
2022-02-24 12:17:31 +00:00
Leszek Swirski
7cec18854b [maglev] Fix specializations in non-namespace scope
Bug: v8:7700
Change-Id: I801b482039b6f8ba19332747a8fee0fcdbcb8764
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487553
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79254}
2022-02-24 12:05:31 +00:00
Jakob Gruber
46b7ed4704 Update WATCHLISTS
- Add a maglev watchlist and add jgruber,leszeks,verwaest.
- Remove unused lists csa/interpreter/torque.

Bug: v8:7700
Change-Id: Ib2d361fe0af298a39b2dc1d9bd96ff39e7b7c0fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487552
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79253}
2022-02-24 11:37:36 +00:00
Camillo Bruni
9be698ff39 [web-snapshot] Collect unsupported objects in the externals JSArray
With this change we can easily track and filter unsupported objects
for full-page snapshots.

Bug: v8:11525
Change-Id: Id75b6f4edf68b47d6dfbe79aed2b686aeec61068
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484320
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79252}
2022-02-24 11:20:11 +00:00
Leszek Swirski
88ddce15df [maglev] Fix x64 register includes
Bug: v8:7700
Change-Id: I221d77ddc43b5956e0b873900d1e92ec7c037103
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487550
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79251}
2022-02-24 10:47:41 +00:00
Maya Lekova
61a1d71db5 [turbofan] Remove concurrent_inlining flag
Bug: v8:12142
Change-Id: I700bae611cecb8bc26b476e35a1df407efd30331
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487549
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79250}
2022-02-24 10:46:14 +00:00
v8-ci-autoroll-builder
4d62c005f8 [tools] Update gcmole
R=machenbach@chromium.org

Change-Id: I9866742528d47210d39fcdeda522dcf29bdba38e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3486679
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79249}
2022-02-24 10:30:13 +00:00
Clemens Backes
205fb2958b Fail earlier on FreePages
{FreePages} is never expected to fail, and each caller wraps the call in
a CHECK macro. In order to learn more about failures, this CL moves the
CHECK inside of {::FreePages}, to fail whenever the {PageAllocator}
fails to free pages.

As a next step, I'll audit our {PageAllocator} implementations to ensure
that none of them return {false} for {FreePages}. Note that this is
already the case for the gin platform (chromium).

R=mlippautz@chromium.org

Bug: v8:12656, chromium:1299735
Change-Id: Ib61be6cc8da0110ead2db1ad005728bd061e0243
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484321
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79248}
2022-02-24 10:12:50 +00:00
Leszek Swirski
a5a87e1e87 [maglev] Initial Maglev commit
Maglev is mid-tier optimising compiler designed mainly for compilation
speed that can still generate good code for straightforward JS.

This initial commit is an MVP for Maglev which can compile and run some
very simple code, and sets up a framework that we can build upon.

Design:
https://docs.google.com/document/d/13CwgSL4yawxuYg3iNlM-4ZPCB8RgJya6b8H_E2F-Aek/edit#

Bug: v8:7700
Change-Id: I5ae074ae099126c2c0d50864ac9b3d6fa5c9e85a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483664
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79247}
2022-02-24 09:50:50 +00:00
Tobias Tebbi
4be0a3486c [test] skip mozilla/ecma/Array/15.4.4.5-3 (flaky)
Bug: v8:12655
Change-Id: I1ae4d546b7232fe30f716c5a9913f895637761f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487546
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79246}
2022-02-24 09:23:01 +00:00
Liu Yu
36663a0a53 [loong64][mips64][safepoints] Various refactors
Port commit c7e47c3033

Bug: v8:7700
Change-Id: I59d5e483867118fa8efc50cc52e00bd3321fa01a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487428
Auto-Submit: Yu Liu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#79245}
2022-02-24 07:41:10 +00:00
Anton Bikineev
de436c6945 heap: Fix by-word error in IsOnStack() for unsafe stack
Bug: chromium:1300105
Change-Id: I89d08662a81bec6da7f1565c8fc582edc69781d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3485682
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79244}
2022-02-24 06:22:00 +00:00
v8-ci-autoroll-builder
9fe8a4fdb0 Update ICU
Rolling v8/third_party/icu: b867f20..901474b

Add an option to not add the stubdata.cpp file. (Harry Terkelsen)
https://chromium.googlesource.com/chromium/deps/icu/+/901474b

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com,ftang@chromium.org

Change-Id: I2f3b4c2123e86c42c5f2916101539dcbeb3dda04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3487130
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@{#79243}
2022-02-24 05:56:42 +00:00
v8-ci-autoroll-builder
fcf00c3d19 Update V8 DEPS.
Rolling v8/build: 51ff1c6..9a383ac

Rolling v8/buildtools: 93c1552..893aa03

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/4ac0eac..08a8050

Rolling v8/third_party/depot_tools: 64f5f26..36d41ce

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: Ie040ea1c181ff59228fda9639943958e16404007
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3486677
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@{#79242}
2022-02-24 03:53:10 +00:00
Dominik Inführ
ca6d783e74 [heap] Bailout in top frame visitor for references into client heaps
Unlike regular marking code we can encounter client references in a
shared GC, so we need a bail out here as well.

Bug: v8:11708, v8:12647
Change-Id: Ie5ccb66206a8dca7d7bb08c75c90ce4999ed5a78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483663
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79241}
2022-02-23 21:28:00 +00:00
Shu-yu Guo
d7e6146bc6 [infra] Fork test262-harness
The external project is effectively abandoned. Fork and move it in-tree
for easier maintenance and Python 3 migration.

Bug: chromium:1296209
Change-Id: I4ff97749acb2895bd8433c08b2a4ff109c90cda2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3475086
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79240}
2022-02-23 18:47:35 +00:00
Darius M
3d5d99ffd9 [compiler] let InstructionSelector duplicate branch conditions
Bug: v8:12484
Change-Id: I44c2028efadbd70e7711f01d107995e0462f05d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3477094
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79239}
2022-02-23 17:42:36 +00:00
George Wort
3e2b9a3196 [arm64] Add DCHECK for negative stack pointer offset
Negative offsets from the stack pointer are prohibited by the
simulator so add a check to catch this at compile time.

This DCHECK is currently tripped by the
v8_enable_builtins_profiling and
--turbo_force_mid_tier_regalloc flags
causing the mid-tier register allocator to be used.

Bug: chromium:1299793
Change-Id: I0d11e584178cc08a500e563fa213737a93b10bad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483660
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/main@{#79238}
2022-02-23 17:17:28 +00:00
Milad Fa
bb9004f32f PPC/s390: [safepoints] Various refactors
Port c7e47c3033

Original Commit Message:

    A collection of smallish cleanups and improvements for safepoints.

    Maintainability:
    - The class names were not very clear; move Safepoint inside
      SafepointTableBuilder to clarify that this wrapper class is used
      during codegen.
    - Rename DefinePointerSlot/DefineRegister to
      DefineTaggedStackSlot/DefineTaggedRegister for clarity.
    - Use named constants instead of -1.
    - DefineTaggedRegister has no connection to kNoDeoptIndex, remove
      the DCHECK and comment.
    - Remove the unused kNumSafepointRegisters constant + other dead code.
    - Small clarifications in CommonFrame::IterateCompiledFrame.
    - Rename has_safepoint_info to uses_safepoint_table and refactor s.t.
      `stack_slots` can be used when `uses_safepoint_table == false`. In
      this case it just returns 0.

    Perf:
    - During codegen, represent stack slots as a growable bit vector
      instead of a list of int indices. Extend GrowableBitVector
      functionality to support the above.
    - Track the minimum index instead of iterating all stack slots in
      all safepoints before encoding.

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ifef2d95f1e4a064d85d4ce437b1d12ae9796336f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484701
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79237}
2022-02-23 17:06:16 +00:00
Michael Lippautz
09c001a79a Reland "heap: Factor out raw allocation functions into HeapAllocator"
This is a reland of dec62c2d0f

Revert was not necessary as test was independently flaking.

Original change's description:
> heap: Factor out raw allocation functions into HeapAllocator
>
> This CL is mostly mechanic and provides runtime and static
> dispatch for allocation of objects using HeapAllocator.
>
> Future CLs will remove the Heap bottelenecks.
>
> Bug: v8:12615
> Change-Id: Id2becf7da4bd5273f96abc0e1a4ac6c04bddb1cb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474674
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79229}

Bug: v8:12615
Change-Id: I505ebde7afd2b0d03e11ef4cbcf1d4d09c6826a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484322
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79236}
2022-02-23 16:29:26 +00:00
Jakob Gruber
22d8d3be5a Remove OptimizeFunctionForTopTier
It's no longer needed.

Bug: v8:12552
Change-Id: I3522ab621001ee07ce7037888934279e4050dea9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484318
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79235}
2022-02-23 15:29:36 +00:00
Corentin Pescheloche
b7b79ad835 [profiler] Use FilterContext to filter VMState in Samples
To avoid leaking VMState cross origin leverage existing FilterContext
to filter out VMSTates.
GC State is the exception as it is not coupled to any native context and
is always included.

Bug: chromium:1263871
Change-Id: I5cab8620460f4db24fa183c891cb0c43996e95c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3465735
Auto-Submit: Corentin Pescheloche <cpescheloche@fb.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79234}
2022-02-23 14:47:37 +00:00
Jakob Gruber
c7e47c3033 [safepoints] Various refactors
A collection of smallish cleanups and improvements for safepoints.

Maintainability:
- The class names were not very clear; move Safepoint inside
  SafepointTableBuilder to clarify that this wrapper class is used
  during codegen.
- Rename DefinePointerSlot/DefineRegister to
  DefineTaggedStackSlot/DefineTaggedRegister for clarity.
- Use named constants instead of -1.
- DefineTaggedRegister has no connection to kNoDeoptIndex, remove
  the DCHECK and comment.
- Remove the unused kNumSafepointRegisters constant + other dead code.
- Small clarifications in CommonFrame::IterateCompiledFrame.
- Rename has_safepoint_info to uses_safepoint_table and refactor s.t.
  `stack_slots` can be used when `uses_safepoint_table == false`. In
  this case it just returns 0.

Perf:
- During codegen, represent stack slots as a growable bit vector
  instead of a list of int indices. Extend GrowableBitVector
  functionality to support the above.
- Track the minimum index instead of iterating all stack slots in
  all safepoints before encoding.

Bug: v8:7700
Change-Id: If409bc42c825d47fc0074fce51e3b963fd080806
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483659
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79233}
2022-02-23 14:19:26 +00:00
Igor Sheludko
d8a5bd5694 [runtime] Fix failing map verification on GC stress bot
This is a follow-up fix for
  https://chromium-review.googlesource.com/c/v8/v8/+/3482436
which introduced a new check to Map verification.

Bug: v8:10391
Cq-Include-Trybots: luci.v8.try:v8_linux_gc_stress_dbg_ng
Change-Id: I8c02354bc159259c7157b296939790d0fc2c31c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483662
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79232}
2022-02-23 14:08:27 +00:00
Tobias Tebbi
dd34aa401f Revert "heap: Factor out raw allocation functions into HeapAllocator"
This reverts commit dec62c2d0f.

Reason for revert: bot failures

Original change's description:
> heap: Factor out raw allocation functions into HeapAllocator
>
> This CL is mostly mechanic and provides runtime and static
> dispatch for allocation of objects using HeapAllocator.
>
> Future CLs will remove the Heap bottelenecks.
>
> Bug: v8:12615
> Change-Id: Id2becf7da4bd5273f96abc0e1a4ac6c04bddb1cb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474674
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79229}

Bug: v8:12615
Change-Id: I55bf6c6a857d853462b11251e767c44fc6fa2edd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483665
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@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@{#79231}
2022-02-23 13:48:29 +00:00
Benjamin Kramer
692d4b4b30 Fix C++20 incompatiblities
- std::memory_order is no longer an enum, remove the double
  qualification. P0439R0.
- `icu::StringPiece(nullptr, 0)` is now ambiguous due to char8_t no
  longer being equal to char. Use the default constructor. P0482R6.
- WasmGlobal is aggregate initialized, remove the default ctor. It's
  move-only anyways because some of its members are. P1008R1.
- Remove stray `inline` keyword Clang warns about.

Change-Id: I63dca25350a4e560779dc637c3bf637a385dd0c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3472497
Auto-Submit: Benjamin Kramer <kramerb@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79230}
2022-02-23 13:23:16 +00:00
Michael Lippautz
dec62c2d0f heap: Factor out raw allocation functions into HeapAllocator
This CL is mostly mechanic and provides runtime and static
dispatch for allocation of objects using HeapAllocator.

Future CLs will remove the Heap bottelenecks.

Bug: v8:12615
Change-Id: Id2becf7da4bd5273f96abc0e1a4ac6c04bddb1cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474674
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79229}
2022-02-23 12:46:46 +00:00
Anton Bikineev
2049390441 cppgc: young-gen: Fix gcc and Bazel builds
Use class instead of lambda for static constexpr comparator (looks like
a bug in gcc).

Bug: chromium:1029379
Change-Id: I5caebacba2550bb206514f6e989d44361995f368
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484315
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79228}
2022-02-23 11:22:56 +00:00
Igor Sheludko
c4712e8f7e [runtime] Fix embedder fields offset calculations
Embedder fields are located between JSObject header and inobject fields
and there must be no gaps.
This CL adds respective check to Map verification and fixes existing
issues.

Bug: v8:10391
Change-Id: If55652095588f8704c9a375fb86be1599816aa86
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3482436
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79227}
2022-02-23 11:19:46 +00:00
Kim-Anh Tran
5145860836 [debugger] Fix step out when instrumentation breaks are turned on
When triggering a step out action, we check whether we already
are at a return or suspend location. If not, we first flood all
return positions with breakpoints, set the fast_forward_to_return_
flag and continue.

With the new way of reporting instrumentation breakpoints, we now
may get into the situation where we stopped on an instrumentation,
but may still need to continue until we reach the return point for
the step out. This CL fixes a bug in which we ran into a DCHECK
that expected us to stop on a return location (since
fast_forward_to_return_ is set to true), but we didn't.

Drive-by: adapt other stepping tests to properly wait for all pauses

Bug: chromium:1229541
Change-Id: Ie5fd358922f4cdaf1f8584bb0b35e87b0e221fb8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3480094
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79226}
2022-02-23 11:16:36 +00:00
Samuel Groß
a0ad27195f [sandbox] Fix verify_csa mode when the sandbox is enabled
For the purpose of graph verification, a SandboxedPointer is equivalent
to a Word64. The SandboxedPointer representation only affects lowering,
which needs to perform encoding/decoding of the pointer when
storing/loading it to/from the heap. As such, this CL promotes
kSandboxedPointer to kWord64 representation for graph verification.

Bug: v8:10391
Change-Id: I466f03dc7bbe9ed8f7b4f431aee5b14bd6db3d31
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483658
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79225}
2022-02-23 10:58:56 +00:00
Marja Hölttä
55f6e945b8 [web snapshot] Serialize leaf objects first
This generates snapshots which are quicker to deserialize since
there are less forward references (item referring to another item with
a greater ID).

Bug: v8:11525
Change-Id: Ib5dce296fca57dae4c0d9bc98f97fe8440c9be8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483657
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79224}
2022-02-23 10:38:31 +00:00
Liu Yu
c2374f9026 [loong64][mips] Only save clobbered registers when calling RecordWrite
Port commit b8b32f6b48

Change-Id: I5592b4027715d5d3544435718c9e1161cf69f3e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3482480
Auto-Submit: Yu Liu <liuyu@loongson.cn>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79223}
2022-02-23 10:29:05 +00:00
Camillo Bruni
30756f21b4 [tools] Improve list_deprecated.py
- List the current v8 version
- Minor code cleanup

Change-Id: Ic7a89e42d27465cc5df8e2249eaeacf8ca1eb6a7
No-Try: true
No-Presubmit: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3477034
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79222}
2022-02-23 10:22:16 +00:00