Commit Graph

79565 Commits

Author SHA1 Message Date
Michael Lippautz
dd68531420 [heap] Moving scheduling GCs from LocalEmbedderHeapTracer to CppHeap
Bug: v8:13207
Change-Id: Id595a34677cc58319043c0e784beb5eed9be7411
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128506
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85073}
2023-01-03 13:05:54 +00:00
Victor Gomes
1fe5f0f8e1 [maglev][arm64] Add SetPending IR
... and add exception handlers trampolines as a jump target for CFI.

Bug: v8:7700
Change-Id: Ie0ef6617ae5a42965862e5f3cf0d7a50158267bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128528
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85072}
2023-01-03 12:59:00 +00:00
Darius M
5694514c5c [maglev][arm64] Implement DataView IRs
Bug: v8:7700
Change-Id: I90a837981d56f3bb26814e243b8e8fe2c324a3ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128526
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85071}
2023-01-03 12:46:39 +00:00
pthier
45277889e8 [maglev][arm64] Make CheckUint32IsSmi arch agnostic and port AssertInt32
Bug: v8:7700
Change-Id: I9710adb42b56c7df18bcb0570dc7693558f655dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128507
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85070}
2023-01-03 11:45:06 +00:00
Victor Gomes
6f29973f20 [maglev][arm64] Share [Holey]Float64Box
... and CheckJSArrayBounds.
Also remove unused CmpObjectType in macro assembler.

Bug: v8:7700
Change-Id: I44297fd01146d68643222ad270391c597d0cbe66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128093
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85069}
2023-01-03 10:37:58 +00:00
Michael Achenbach
e3828ab088 Revert "[foozzie] Temporarily lower the amount of --future tests"
This reverts commit 6b2c271cfb.

Reason for revert: All open bugs were fixed.

Original change's description:
> [foozzie] Temporarily lower the amount of --future tests
>
> Drop --future from 25% to 5% for a few days until all currently open
> correctness cases associated with --future are fixed.
>
> No-Try: true
> Bug: v8:7700
> Change-Id: I161a0adbc767c5cec46409443fe58c634531487c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4114292
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85010}

Change-Id: I804a4c33922595e380bdd11150ff826d6669d846
No-Try: true
Bug: v8:7700
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128527
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85068}
2023-01-03 10:07:30 +00:00
v8-ci-autoroll-builder
a5acddef26 Update V8 DEPS (trusted)
Rolling v8/build: 7ba88a0..5129278

Rolling v8/third_party/depot_tools: 03af44a..5b0c934

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230101.3.1..version:11.20230102.2.1

Change-Id: I4e5f8192c181d81ab7f241583e87fdfff2ca5d92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4131422
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@{#85067}
2023-01-03 03:46:42 +00:00
Nikolaos Papaspyrou
15c726bd63 [heap] Merge mechanisms for disabling CSS
EmbedderStackStateScope is used to disable conservative stack scanning
for cppgc when the stack is known to not contain heap pointers. Also,
DisableConservativeStackScanningScopeForTesting is used to disable CSS
for the V8 heap in tests that assume a precise GC. Until now, these two
have used two different mechanisms for disabling CSS. This CL merges
the two mechanisms and implements the latter scope via the former.

This is a reland of commit f51e0bb1db
reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/4111954

Bug: v8:13257
Change-Id: Ia124a4201686e0ea79f9cd07bc3888b9781cafa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128141
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85066}
2023-01-02 16:51:48 +00:00
Clemens Backes
ba8eec7da0 [wasm] Report decommit failure as OOM
If we are near OOM, the {DecommitPages} call can actually fail. Call
{FatalProcessOutOfMemory} in that case to get a proper OOM crash
signature.

To protect against bugs in the implementation, we add a check that
decommitting only fails with the ENOMEM error.

R=mlippautz@chromium.org

Bug: chromium:1403519
Change-Id: I54fabd1efa566cc1c474974577ec16f75cd3d726
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118548
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85065}
2023-01-02 16:09:29 +00:00
Clemens Backes
03ad044ce5 [fuzzer][liftoff] Account for locals in max_steps
The fuzzer limits the number of "steps" that should be executed in
Liftoff. A "step" typically means one Wasm instruction. The cost of
function calls is linear in the number of parameters and locals though,
so that should be accounted for.

In the linked issue (timeout), we were repeatedly calling a function
with a big number of reference locals, which all need to be initialized
to the null value.

R=thibaudm@chromium.org

Bug: chromium:1399868
Change-Id: Id071aeee6a0b2670b926880744ea82cc37881876
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118547
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85064}
2023-01-02 15:53:46 +00:00
pthier
9b9063dd22 [maglev][arm64] Port ToObject, ToString and ConvertReceiver
Bug: v8:7700
Change-Id: I74465260ee7a1af69bdf17c5d02d897a30c7866a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4129531
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85063}
2023-01-02 15:45:03 +00:00
Clemens Backes
f941f98d4e [liftoff] Compute instance register more directly
Just take the first GP parameter register; this is more efficient than
going through the call descriptor.

R=ahaas@chromium.org

Bug: v8:13565
Change-Id: If0c6988c359511c07c5f41b7fa79e3e55d3d81c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111934
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85062}
2023-01-02 15:39:48 +00:00
Michael Lippautz
a8a1805e12 [api, heap, handles] Remove deprecated EmbedderHeapTracer
This removes EmbedderHeapTracer from V8's API. Going forward
v8::TracedReference is only supported with using CppHeap (Oilpan).

Bug: v8:13207
Change-Id: I4e0efa94890ed147293b5df69fd7e0edad45abb5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111546
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85061}
2023-01-02 15:17:40 +00:00
Leszek Swirski
d43b93a7ac [maglev] Use NaN for StoreDataView with no args.
StoreDataView with no args should store NaN, not zero.

Bug: v8:7700
Change-Id: I9688465fea2ac1a88f0bff2a7b7d1c419dc7e43e
Fixed: chromium:1403743
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4127165
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85060}
2023-01-02 15:03:55 +00:00
Darius M
3d921a0afb [maglev][arm64] Implement StoreMap/StoreDoubleField IRs
Bug: v8:7700
Change-Id: Ic2bb43b4fb34aa6221bf04d90517ecc3a3482b8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128523
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85059}
2023-01-02 15:02:53 +00:00
Leszek Swirski
06e469190c [maglev] Fix RootConstant::ToBoolean for root heap nums
ToBoolean was wrong for a couple of root heap numbers (namely, NaN,
holey NaN, and minus zero.

Fix this, and add an exhaustive test of root constant ToBoolean values.

Bug: v8:7700
Change-Id: I6939c6eb5130cb8a3a4f7007b1a0a1dcc415e8b2
Fixed: chromium:1403740
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128524
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85058}
2023-01-02 15:01:50 +00:00
pthier
cabbc128e4 [string] Don't overwrite original string in InternalizedStringKey
When internalizing external strings, a new internalized external string object is allocated if the string is not in-place internalizable. This newly allocated strings external resource is set to null (the actual resource will be transferred by MakeThin to ensure unique ownership of the resource).

We need to preserve the original string in the InternalizedStringKey for
the second lookup (inside the critical section), as we need to access
the external resource in case of hash collisions to check for equality.

Bug: chromium:1402187
Change-Id: I62b637859b06f05d1b34cb26495f08ec44d2f2db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128089
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85057}
2023-01-02 14:27:51 +00:00
Andreas Haas
e6d1bea299 [wasm] Add histogram for WebAssembly compilation methods
This histogram should give us information on which compilation methods
get used in the wild.

R=clemensb@chromium.org, mlippautz@chromium.org

Change-Id: I6906580c1b8df7a1dff9ce6c169c6861936857d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128555
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85056}
2023-01-02 14:26:13 +00:00
Leszek Swirski
0621eaff2c Revert "Reland "Reland "[static-roots] Enable static roots on supported configurations"""
This reverts commit 4bbbb521f4.

Reason for revert: Speculative revert for broken roll.

Original change's description:
> Reland "Reland "[static-roots] Enable static roots on supported configurations""
>
> This is a reland of commit b247270178
>
> But with static roots disabled on non-external code space builds.
>
>
> Original change's description:
> > Reland "[static-roots] Enable static roots on supported configurations"
> >
> > This is a reland of commit c04ca9cc63
> >
> > 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: Id65bb5b19df999dfe930a78993e4bf3343d9f996
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111641
> > Auto-Submit: Olivier Flückiger <olivf@chromium.org>
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84991}
>
> Bug: v8:13466
> Change-Id: Id1f55c1cf8d349338fd49f6cb0ed7dc2e1054a72
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4123534
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85037}

Bug: v8:13466
Change-Id: I54a9d68871e0ce2c0faeb49fd9947921073a6873
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128090
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85055}
2023-01-02 14:20:19 +00:00
Clemens Backes
6ace5cfb51 [platform] Check for failure of DiscardSystemPages
The {madvise} call should typically not fail.
There are only two errors specified (EINVAL and ENOMEM), both of which
would only happen for invalid parameters.

Thus add a CHECK that the {madvise} call does not fail.

R=mlippautz@chromium.org

Bug: chromium:1403519
Change-Id: Ib8c7ca9bbcab921b89305f1614319ecaddd79812
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4124534
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85054}
2023-01-02 14:14:45 +00:00
Leszek Swirski
f23a3ecccf Revert "[wasm][capi] Optimize all functions before serialization"
This reverts commit 84e470845a.

Reason for revert: Breaks TSAN stress-incremental-marking: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20stress-incremental-marking/10433/overview

Original change's description:
> [wasm][capi] Optimize all functions before serialization
>
> The existing implementation of `serialize` in the C-API is to produce
> a snapshot of the current state of the `NativeModule`. However, so far
> all users of `serialize` did not care about the runtime of `serialize`,
> but cared about `deserialize` starting up fast.
>
> With this CL all functions of a module get tiered up to TurboFan before
> serializing the module.
>
> R=​clemensb@chromium.org
>
> Change-Id: Icaef846e33509d90b38559c0b689f798d35a98db
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4129495
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85052}

Change-Id: Ie0758b32ef3469fe75d3a45bc3e6950b3b192edb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4131634
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85053}
2023-01-02 13:59:06 +00:00
Andreas Haas
84e470845a [wasm][capi] Optimize all functions before serialization
The existing implementation of `serialize` in the C-API is to produce
a snapshot of the current state of the `NativeModule`. However, so far
all users of `serialize` did not care about the runtime of `serialize`,
but cared about `deserialize` starting up fast.

With this CL all functions of a module get tiered up to TurboFan before
serializing the module.

R=clemensb@chromium.org

Change-Id: Icaef846e33509d90b38559c0b689f798d35a98db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4129495
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85052}
2023-01-02 12:46:25 +00:00
pthier
58ae6e4a81 [regexp] Explicitly include ICUs utf16.h
... required for U16_NEXT in builds with ICU.

Change-Id: I2ccda0c3fa7fd0139745e6233c6ab4a5dec46b50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128520
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85051}
2023-01-02 12:38:02 +00:00
Victor Gomes
a2633fe4c1 [bazel] Add v8_disable_write_barriers to build config
Which is needed to filter tests in the testrunner.

Change-Id: I6ef24ac3e7a716329acb3e860872d5c83f7d84d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128521
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85050}
2023-01-02 12:06:51 +00:00
Darius M
848bd2eb50 [maglev] Fix missing sign-extension in Switch
TurboAssembler::Switch considers its "condition" input is 64-bit.
However, Maglev's inner integers are rather Smis/32-bit integers.
Because we didn't not sign-extend the condition before calling
TurboAssembler::Switch, negative values were treated as positive
rather than negative.

Fixed: chromium:1403749
Bug: v8:7700
Change-Id: I78e934045330012186dc83dea0dc620ec977380a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128080
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85049}
2023-01-02 11:24:04 +00:00
Clemens Backes
bfa76578c8 [wasm] Simplify {RemoveCompiledCode}
Inline {GetCodeLocked} and {ResetCodeLocked} to make the code simpler
and more efficient.

Drive-by: Make {FindJumpTablesForRegionLocked} private.

R=ahaas@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel
Change-Id: Id0649924440737f3a04dbb536bd2141732f4f3bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4123535
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85048}
2023-01-02 11:16:29 +00:00
Andreas Haas
cc6fd8c8c0 [d8] Check profile for nullptr before serializing it
`CpuProfiler::StopProfiling()` return `nullptr` if no profiling is
active. Thus a `nullptr` check is needed before serializing the profile
returned by `CpuProfiler::StopProfiling()`.

R=clemensb@chromium.org

Bug: chromium:1394663
Change-Id: I364eeb1d9bd670de5179e242c4462f0fbfc9c607
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4126234
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85047}
2023-01-02 10:33:50 +00:00
Darius M
fede2e9dcb [maglev][arm64] Add StoreTaggedFieldWithWriteBarrier IR
Bug: v8:7700
Change-Id: I64801703a23ea4c2485aacb6ae907259fff73990
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128519
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85046}
2023-01-02 10:30:24 +00:00
Darius M
d019c8367e [maglev][arm64] Implement Float64Ieee754Unary node
Bug: v8:7700
Change-Id: I509e4cbd55a60dc0bbd809e35e563dde92278714
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128097
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85045}
2023-01-02 10:25:23 +00:00
Darius M
e490cf4a72 [arm64] Make CheckPageFlag behave as on x64/ia32/arm
The condition to pass to CheckPageFlag was inverted on arm64 compared
to x64/ia32/arm. This caused a bug in Maglev (fixed in
https://crrev.com/c/4128556), and seems like it could easily cause
other bugs in the future.
With this CL, CheckPageFlag now behaves similarly on arm64 and
x64/ia32/arm.

Change-Id: Ib6b7f157db08d2e771ceb450ab16344c3578c546
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128518
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85044}
2023-01-02 09:16:22 +00:00
v8-ci-autoroll-builder
1f9ff9cef4 Update V8 DEPS (trusted)
Rolling v8/build: e8a1124..7ba88a0

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221231.3.1..version:11.20230101.3.1

Change-Id: Ie9d8ce221aee75e6d578dacaa6fbbecb63e26286
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4127151
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@{#85043}
2023-01-02 03:47:54 +00:00
v8-ci-autoroll-builder
bd708c27bb Update V8 DEPS (trusted)
Rolling v8/build: d60073f..e8a1124

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221230.3.1..version:11.20221231.3.1

Change-Id: I4c7a1d8fd5420cad3b704364aae703a1b105e889
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4127145
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@{#85042}
2023-01-01 04:02:26 +00:00
v8-ci-autoroll-builder
4f7a03ca5b Update V8 DEPS (trusted)
Rolling v8/build: 83df13d..d60073f

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221229.3.1..version:11.20221230.3.1

Change-Id: If6dca69c7f4f975d512a8b4253861b7808db5945
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4129170
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@{#85041}
2022-12-31 03:47:34 +00:00
v8-ci-autoroll-builder
d8aeae69df Update V8 DEPS (trusted)
Rolling v8/build: d9fb377..83df13d

Rolling v8/buildtools: 134af4c..cf8d11e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/fa82fd2..a404e6d

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221228.1.1..version:11.20221229.3.1

Change-Id: I15521073cf263003381aed151b4e48a77e7dc86e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4129163
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@{#85040}
2022-12-30 03:43:40 +00:00
Jakob Linke
ba1fed5ccb [maglev] Fix several bugs in codegen for x % x
.. which should result in 0 if x is non-negative, and -0.0 otherwise.

- Fix two invalid modulus-related folds.
- Handle aliased inputs in Int32ModulusWithOverflow.
- Drive-by: rename left/right to lhs/rhs to match the algorithm
  description.

Note there is no deopt loop here since a result of -0.0 will update
feedback to kSignedSmallInputs.

Bug: v8:7700
Change-Id: I84fca0e43ded152d3520cbe73cc43299ff1c4230
Fixed: chromium:1403575
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128081
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85039}
2022-12-29 14:26:17 +00:00
Michael Achenbach
0aa0b44a40 Whitespace to test bots
Change-Id: Ia9152f8821baf8f2ebeaf71125f05100cacf898d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4129496
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85038}
2022-12-29 13:50:18 +00:00
Olivier Flückiger
4bbbb521f4 Reland "Reland "[static-roots] Enable static roots on supported configurations""
This is a reland of commit b247270178

But with static roots disabled on non-external code space builds.


Original change's description:
> Reland "[static-roots] Enable static roots on supported configurations"
>
> This is a reland of commit c04ca9cc63
>
> 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: Id65bb5b19df999dfe930a78993e4bf3343d9f996
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111641
> Auto-Submit: Olivier Flückiger <olivf@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84991}

Bug: v8:13466
Change-Id: Id1f55c1cf8d349338fd49f6cb0ed7dc2e1054a72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4123534
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85037}
2022-12-29 09:19:11 +00:00
Jakob Linke
b2ab857f39 Properly print minus zero (-0.0) heap numbers
.. print them as '-0.0' instead of '0.0'.

Change-Id: I425d78e245868e7ff878c07282a0f9d8ca67a8d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128558
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85036}
2022-12-29 09:18:07 +00:00
Darius M
f23bf2752d [maglev][arm64] Fix wrong write barrier usage
The arm64 version of GeneratorStore was using the write barrier
incorrectly, triggering it when it shouldn't be triggered (and
vise-versa), and a "PointersFromHere" was mistakenly used instead of a
"PointersToHere".

The reason for the incorrect ne/eq used in CheckFlags is that this
function works a bit differently on x64 and arm64, cf their
implementations:

  - x64: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/x64/macro-assembler-x64.cc;l=3425;drc=605e46479aca3449a6ba1350a1de7927c76b86ad

  - arm64: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/arm64/macro-assembler-arm64.cc;l=3248;drc=dc950c32bd5262d66d845d2bfeb1ff4a17a857bc

For an example of both of those functions used for similar purposes,
see `MacroAssembler::RecordWrite` in macro-assembler-x64.h and
macro-assembler-arm64.h: the former uses `zero` in `CheckFlags`, while
the latter uses `ne`.

When --stress-maglev and --verify-heap were enabled, this mistake was
causing a crash in the heap verifier in the
`mjsunit/es6/typedarray-from.js` and `mjsunit/wasm/gc-js-interop.js`
benchmarks. I was able to reproduce those crashes on x64 by replacing
the "not_equal" in CheckFlags by "equal".


Bug: v8:7700
Change-Id: I42316931fba858433317238fc42f7c33985f46ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128556
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85035}
2022-12-29 07:30:21 +00:00
QiuJi
cfec73d847 [riscv][regalloc] Port the rest part of "Resolve tail-call gap moves"
Port commit 2f4397d652

Bug: chromium:1269989
Change-Id: I5929a605300b9c127e61710585314c3fc50a1aff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128600
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#85034}
2022-12-29 05:41:55 +00:00
v8-ci-autoroll-builder
4a719abf8e Update V8 DEPS (trusted)
Rolling v8/build: c171e77..d9fb377

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/816a551..fa82fd2

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221227.3.1..version:11.20221228.1.1

Rolling v8/third_party/jinja2: 4633bf4..264c07d

Change-Id: I76e336b991407015c2789fdcdb6e27c96733c1e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4126919
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@{#85033}
2022-12-29 03:46:39 +00:00
Olivier Flückiger
d65596fc36 [static-roots] Fix performance regression from 4116776
Addresses two potential performance regressions introduced in
https://crrev.com/c/4116776. First, the left-over CHECK is changed to a
DCHECK. Second, calling `EarlyGetReadOnlyRoots` should at least be as
efficient as `GetReadOnlyRoots` before the earlier change.

Bug: v8:13466
Change-Id: I93e9c06ce651cae90e9c969e54ec73e4eab80fd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4127159
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85032}
2022-12-28 14:59:35 +00:00
Michael Achenbach
48495722ce [js-fuzzer] Add optimization template for Maglev
This makes js-fuzzer use %OptimizeMaglevOnNextCall in 30% of the
times when optimization patterns are chosen. Other probabilities
of the function-call mutator are tuned a bit to keep using
%OptimizeFunctionOnNextCall proportionally similarly to before.

(~ some round number preferences... exact choices might not matter
much, since the original probability choices are rater arbitrary
anyways)

Bug: v8:7700
Change-Id: I7727ea27fd956efab6fbee2b4a090213d1d7ff05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4124118
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85031}
2022-12-28 14:50:03 +00:00
Olivier Flückiger
be9c39d3d9 [static-roots] Rename --static-roots to --generate-static-roots
Rename the flag in order to avoid confusion with `V8_STATIC_ROOTS_BOOL`.
The flag is used by `./mksnapshot` to generate a new static-roots.h
file.

Bug: v8:13466
Change-Id: Ieb5af89b9839673fd2b8aeef197c104aa3c580aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111933
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85030}
2022-12-28 14:46:41 +00:00
Darius M
0f3036ce09 [maglev][arm64] Fix scratch register shortage on funs with many args
The Sub macro sometimes needs a scratch register when the 2nd operand
is too large to be encoded in the instruction. The prologue was
already reserving 2 scratch registers, which made Sub crash on a
DCHECK when trying to reserve one more scratch register.

Bug: v8:7700
Change-Id: I995689b8b16e3ef216641f0b6cadbf58f7f3740b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128554
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85029}
2022-12-28 14:02:51 +00:00
Jakob Linke
b8b136cb36 [maglev] Skip the TieringManager on TieringState::kInProgress
When the interrupt_budget is exhausted, Maglev code calls into runtime
for tiering logic in TieringManager. As always, the runtime call
itself has a certain (noticeable) overhead.

This CL is an optimization based on the observation that the
TieringManager only performs simple bookkeeping if the
tiering_state (or osr_tiering_state) is kInProgress. We can avoid
the runtime call overhead in this case. Changes are:

1. Extract the interrupt check (= stack check) into generated code s.t.
   it's separate from tiering logic. Note, combining the interrupt
   check and tiering logic was a previous optimization to reduce
   generated code size, introduced in crrev.com/c/3049076.
2. Skip the runtime call to Runtime::kBytecodeBudgetInterrupt if
   `tiering_state == kInProgress || osr_tiering_state == kInProgress`.

Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel
Bug: v8:7700
Change-Id: Ibcd416aaea7abdd087741551fa213fa033fe12e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4127157
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85028}
2022-12-28 13:49:33 +00:00
Vladimir Nechaev
28cb67cdec Runtime.callFunctionOn supports uniqueContextId
Bug: v8:13620
Change-Id: I802deb3325a5c8ac9e7e378d60be591af66e6fee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4126215
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Vladimir Nechaev <nechaev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85027}
2022-12-28 10:45:28 +00:00
Darius M
dff5fc1b23 [maglev] Fix wrong EmitDeoptIf instead of EmitEagerDeoptIf
A recent CL refactored some Deopts
(https://chromium-review.googlesource.com/c/v8/v8/+/4120575), and
mistakenly wrote EmitDeoptIf (which isn't an existing function)
instead of EmitEagerDeoptIf, which broke the Arm64 build (which
isn't covered by the bots yet).

Bug: v8:7700
Change-Id: I1301a26584bd76d1a2608c37c07c58fe990446d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128095
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85026}
2022-12-28 09:48:27 +00:00
Jakob Linke
4914da9d01 Update comments and names related to stack checks
.. and several other minor changes (branch hints, moving code around
for better grouping, const).

Bug: v8:7700
Change-Id: Ia07aa478a5ae5d1852e4ad2dce39f42743376e65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128096
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85025}
2022-12-28 09:46:40 +00:00
v8-ci-autoroll-builder
eb008c433e Update ICU (trusted)
Rolling v8/third_party/icu: 1b7d391..2c51e5c

Update TZ to 2022g (Frank Tang)
https://chromium.googlesource.com/chromium/deps/icu/+/2c51e5c

[fuchsia] Limit the visibility of ICU targets (Filip Filmar)
https://chromium.googlesource.com/chromium/deps/icu/+/9a2f72a

[config] Declare the args conditionally (Filip Filmar)
https://chromium.googlesource.com/chromium/deps/icu/+/b6d6790

Change-Id: Iea9aa1ada43e2a457a8950e533fc1d1c460e1003
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4126757
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@{#85024}
2022-12-28 04:21:27 +00:00