Commit Graph

77510 Commits

Author SHA1 Message Date
Tobias Tebbi
ae32940798 [compiler] fix typing of [[DateValue]]
Bug: chromium:1356308
Change-Id: I00be3495031b203b71cf924745dd2bad878ab3c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868955
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82918}
2022-09-01 14:49:41 +00:00
Clemens Backes
c4959e25b7 Revert "Port Generic JS-Wasm Wrapper for arm64"
This reverts commit 5a318a2313.

Reason for revert: Fails on Mac arm64: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug/8211/overview

Original change's description:
> Port Generic JS-Wasm Wrapper for arm64
>
> Bug: v8:10701
> Change-Id: I2014f8994c74379663998e2560d1d51b98a4a9a6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811834
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82915}

Bug: v8:10701
Change-Id: I9d5f19fedb82e2be64bd313f8cf5821fb0d8c795
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3869145
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82917}
2022-09-01 14:23:12 +00:00
Clemens Backes
f2faee8519 [wasm] Use std::shared_mutex instead of base::SharedMutex
base::SharedMutex was implemented as an exclusive lock on Mac, because
of an OS issue on Mac (see https://crbug.com/v8/12037).
https://crrev.com/c/3855361 then introduced a custom implementation on
Mac, which caused performance regressions (see
https://crbug.com/1358856).

Since we rely on C++17 now, we can instead just use {std::shared_mutex},
which does not seem to have the deadlock issue of {pthread_rwlock_t}.
As a smoke test (and to check whether this actually fixes the
performance regressions), only switch one mutex in Wasm compilation to
std::shared_mutex. If this CL looks good, then other places can be
switched over as well.

R=ishell@chromium.org

Bug: chromium:1358856, v8:13256
Change-Id: Ia56efcb7747f191cc3ed7a381096c8f57142aff8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868954
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82916}
2022-09-01 13:49:52 +00:00
Ilya Rezvov
5a318a2313 Port Generic JS-Wasm Wrapper for arm64
Bug: v8:10701
Change-Id: I2014f8994c74379663998e2560d1d51b98a4a9a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811834
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82915}
2022-09-01 13:35:02 +00:00
Jakob Linke
a3f4caa0b4 [maglev] Temporarily disable ShiftRightLogical fast path
.. just until I can implement the fix.

Bug: v8:7700,v8:13251
Change-Id: I8ccbe8b08351472a1144db46fd8d9bcbd4188633
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865919
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82914}
2022-09-01 13:02:15 +00:00
Leon Bettscheider
44e2357efe [heap] Make ScheduleJob branch to JobTaskMinor and JobTaskMajor
This CL renames ConcurrentMarking::JobTask to JobTaskMajor, adds
JobTaskMinor, and makes ScheduleJob branch to schedule the respective
JobTask depending on its GarbageCollector parameter.

Bug: v8:13012
Change-Id: Ic7ab15ba70f7d4e86c94a6824623c258aa8b739c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3850482
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82913}
2022-09-01 12:35:12 +00:00
Leszek Swirski
ada791dc6c [maglev] Optionally do HeapObject check in other checks
Fold the CheckHeapObject check into the other checks (CheckMaps,
CheckString, etc), to avoid emitting a separate IR node with separate
deopt info and a separate actual deopt point.

Allow this check to be elided when we already know the node is a heap
object.

Bug: v8:7700
Change-Id: I981860a6522c082d86abc856cfe1b3ff5658ac59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867733
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82912}
2022-09-01 12:22:42 +00:00
Leszek Swirski
5f3cc6354b [maglev] Rudimentary check elimination
Add a simple forward check elimination based on a side hashmap of "known
node aspects", namely the node type and node map (if any). This set of
aspects is cloned when merge states are created, and destructively
merged when merged into existing merge states -- destructive cloning
here means removing any mismatching information. This allows information
in dominators to be preserved.

Maps are kept separate from node types because we want to distinguish
between stable and unstable maps, where the former need a dependency and
the latter must be flushed across side-effecting calls.

The representation of this known information is currently very
inefficient, and won't win us any compilation speed prizes -- just
ZoneMaps keyed on ValueNode*. We should optimize this to take into
account some sort of liveness information, and clear out nodes that
aren't reachable anymore. There is also a lot more information we could
store per Node, e.g. known loaded fields or alternative representations;
depending on what we want to store and how that has to be invalidated,
we likely might need an alternative way of representing it. This
implementation is good enough for now though, for measuring the impact
of check elimination.

Bug: v8:7700
Change-Id: I2f001dedf8ab5d86f8acaa22416617bd80701982
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865160
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82911}
2022-09-01 12:08:28 +00:00
Leon Bettscheider
fef977e74f [heap] Pass GarbageCollector to ScheduleJob
This CL removes the marking_worklists parameter from the
ConcurrentMarking constructor, and instead sets marking_worklists_
in ScheduleJob based on the new GarbageCollector parameter.

We will use the ConcurrentMarking class for both major and minor
marking later, and this CL does preparatory work for that by allowing
to change the mode of operation (minor/major) through ScheduleJob.

Bug: v8:13012
Change-Id: I44a35155cf19e1df139a6a4e5bc5cbedbc3e00aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3850289
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82910}
2022-09-01 11:51:51 +00:00
George Wort
0d591e919d Reland "[turbofan][arm64] Emit Lsl for Int32MulWithOverflow when possible"
This is a reland of commit aa541f1c9c

Original change's description:
> [turbofan][arm64] Emit Lsl for Int32MulWithOverflow when possible
>
> Int32MulWithOverflow on arm64 uses a cmp to set flags rather than
> the multiply instruction itself, thus we can use a left shift when
> the multiplication is by a power of two.
>
> This provides 0.15% for Speedometer2 on a Neoverse-N1 machine,
> with React being improved by 0.45%.
>
> Change-Id: Ic8db42ecc7cb14cf1ac7bbbeab0e9d8359104351
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829472
> Commit-Queue: George Wort <george.wort@arm.com>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82499}

Change-Id: Ib8f387bd41d283df551299f7ee98e72d39e2a3bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865484
Commit-Queue: George Wort <george.wort@arm.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82909}
2022-09-01 11:40:02 +00:00
George Wort
1c84fedbf5 [turbofan] Set turbo_rewrite_far_jumps default to false on platforms that don't use it
Remove jump optimization for platforms such as arm64 that
do not support it, and thus unblock alignment in builtins.

This provides a 0.3% improvement in Speedometer2
on a Cortex-A55 machine when PGO is applied.

This patch increases arm64's embedded code size by 0.3%.

Change-Id: Ice09c39f5f3fc954e114b9ee30630c0d9528107c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3863281
Commit-Queue: George Wort <george.wort@arm.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82908}
2022-09-01 11:35:32 +00:00
Nico Hartmann
1e017c1499 [base] Add some utilities for working with containers
This CL adds src/base/container-utils.h wich contains a few utilities
to make working with containers easier by providing a few additional
functions (e.g. contains, all_equal, ...) that are not (yet) shipped
with C++ standard containers.

Change-Id: I365b88c4286bf58bcac32c7bb89a5b0a98fc3509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865966
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82907}
2022-09-01 11:28:41 +00:00
Omer Katz
7590b1cd2b [heap] Fix OLD_TO_SHARED remembered set and tests
Sufficiently full pages in new space are promoted as is to old space. If
a string is allocated on such a page, it won't be promoted to the shared
heap. The string can later be promoted by the next full GC, but then it
is promoted from old space, not new space, which was not supported.

Bug: v8:12612
Change-Id: I6133e13bec9ba3110b2b9dbfb4dcef47bde25e90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865162
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82906}
2022-09-01 11:24:22 +00:00
Simon Zünd
960bac8d5e Reland "[debug] CHECK that a function's context is always available"
This is a reland of commit 911c7170dc

Re-landed as https://crrev.com/c/3867727 has also been re-landed.

Original change's description:
> [debug] CHECK that a function's context is always available
>
> After https://crrev.com/c/3854501 has landed, we no longer have to
> handle the case that we do not find a function's context in the
> scope iterator even though the function requires one.
>
> This CL renames `NeedsAndHasContext` to `NeedsContext` since we
> always find a scope's context now. Additionally we turn this
> assumption into a dedicated check.
>
> R=bmeurer@chromium.org
>
> Bug: chromium:1246907
> Change-Id: I6458df76689c0bfa6d6b2f8c421f9ce481855547
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865153
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82848}

Bug: chromium:1246907
Change-Id: I5ce4fe458e4614f4d6ee419483c5a9071dc91bbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865555
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82905}
2022-09-01 11:19:55 +00:00
Victor Gomes
94af29ef27 [maglev] Use liveness to filter unused register in GeneratorStore
Otherwise we could point to a potentially dead (not allocable)
input to GeneratorStore.

Bug: v8:7700
Change-Id: I113a02e0c1a3eb1b817dc4eb8f538cf40a1d0d3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867729
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82904}
2022-09-01 11:18:52 +00:00
Leon Bettscheider
58912650da [heap] IncrementalMarkingJob bailout for MinorMC
It is possible for IncrementalMarkingJob to be scheduled while MajorMC
is running, but it only gets to run after MajorMC finished.

If concurrent MinorMC is run in the meantime, RunInternal should not
invoke Step, which is currently only supported for MajorMC. This CL adds
a bailout for this case.

Bug: v8:13012
Change-Id: I3012cac3de5195a9f1b85f1ac18b02cef67b004b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867516
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82903}
2022-09-01 10:54:22 +00:00
Tobias Tebbi
eed7eaff06 [compiler] eliminate quadratic behavior of store-store elimination in straight-line code
Bug: v8:13247
Change-Id: Ia1e82ef106914481e20076ac1ada9ba79e23c5a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865547
Reviewed-by: Patrick Thier <pthier@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82902}
2022-09-01 10:50:52 +00:00
Simon Zünd
a55ecfaf7f Reland "[debug] Immediately step-in for 'stack check triggered' debug breaks"
This is a reland of commit 3297ccca23

This is a straight-up reland of the original CL. The failing test
was flaky and removed with https://crrev.com/c/3868727. We replaced
the test with a proper DevTools e2e test: https://crrev.com/c/3867522

Original change's description:
> [debug] Immediately step-in for 'stack check triggered' debug breaks
>
> This CL changes debug breaks that are triggered via interrupts (i.e.
> via stack check). One client of this behavior is the `Debugger.pause`
> CDP method.
>
> The problem is that when we pause so early, the JSFunction didn't have
> time yet to create and push it's context. This requires special
> handling in the ScopeIterator and makes an upcoming change unnecessary
> complex.
>
> Another (minor) problem is that local debug-evaluate can't change
> context-allocated local variables (see changed regression bug). Since
> the context is not yet created and pushed, variables are written to
> the DebugEvaluateContext that goes away after the evaluation.
>
> The solution is to mirror what `BreakOnNextFunction` does. Instead
> of staying paused in the middle of the function entry, we trigger
> a "step in" and pause at the first valid breakable position instead.
> This ensures that the function context is already created and pushed.
>
> Note that we do this only in case for JSFunctions. In all other cases
> we keep the existing behavior and stay paused in the entry.
>
> R=jgruber@chromium.org
>
> Fixed: chromium:1246907
> Change-Id: I0cd8ae6e049a3b55bdd44858e769682a1ca47064
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3854501
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82817}

Change-Id: I1938ccb5979fd80dff530b2ffe3f18714b7eff3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867727
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82901}
2022-09-01 10:33:03 +00:00
Marja Hölttä
557eb10ec3 [test] Disable TF for the "omit default ctors" test
Bug: v8:13091,v8:13253
Change-Id: I9a40a937e2774a62e607d792256fdd34e8a634f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867735
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82900}
2022-09-01 10:25:45 +00:00
Leszek Swirski
762d6ea802 [maglev] Allow waiting for compile jobs to finish
Add a mechanism similar to the optimizing compile dispatcher, for tests
to be able to wait for Maglev compilation to finish, and to force
finalization.

Bug: v8:7700
Change-Id: I0ef542001fe9f6622b1231eb9406130ad81c8f6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865551
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82899}
2022-09-01 10:24:41 +00:00
Tobias Tebbi
29cf41780a [compiler] limit load elimination to avoid quadratic complexity
Bug: v8:13247
Change-Id: I8fd1fe179accc0ca37d32b737a5cfac2a736e1a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865553
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82898}
2022-09-01 10:03:31 +00:00
Camillo
71f67d271a [log] Add more fine-grained logging flags
New Flags added:
--log-source-code
--log-source-position
--log-feedback-vector

With the above flags we can choose between detailed or lightweight
logging.

Drive-by-fix:
- Use std::isprint
- Add AppendRawString to avoid vprintf formatting for raw strings


Change-Id: I3e9eda8473153de9620d24617c5a5e12e2e3bd56
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3863469
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82897}
2022-09-01 09:52:45 +00:00
Igor Sheludko
dd6233abae [ext-code-space] Use Object::SafeEquals() in DescriptorLookupCache
... which works for stale pointers. The default == operator contains
a DCHECK guarding against Code vs. non-Code object comparisons and
thus it can't be used for stale pointer.

Bug: v8:13252, v8:11880
Change-Id: Iaf80d7d1039515fee0d4d294f1fc4c6689cd8d5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867734
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82896}
2022-09-01 09:51:42 +00:00
Leon Bettscheider
a7a0c7b581 [heap] MarkingFromInternalFields write barrier bailout for MinorMC
This CL skips the MarkingFromInternalFields write barrier when
MinorMC concurrent marking is active, because we do not run Oilpan
young GCs yet.

Bug: v8:13012
Change-Id: Ib73dea8357be6d135290009258b5d172477a633b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865464
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82895}
2022-09-01 09:28:33 +00:00
Jakob Linke
25506204b8 [maglev] Don't deopt-for-osr when Turbofan is disabled
Bug: v8:7700
Change-Id: I784d28b8ee043a4fa2478dbaaf7412a0708b811c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867732
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82894}
2022-09-01 09:26:13 +00:00
Dominik Inführ
7e4293a1fe Reland "[heap] Verify client heaps during shared GC"
This is a reland of commit ddafb7a30e

CL is relanded without changes. https://crrev.com/c/3865965 and
https://crrev.com/c/3865967 fixed the failing DCHECKs that caused
this CL to be reverted.

Original change's description:
> [heap] Verify client heaps during shared GC
>
> With --verify-heap verify all client heaps before and after a shared
> GC. This ensures that the OLD_TO_SHARED remembered set is properly
> filled for each client isolate.
>
> Bug: v8:11708
> Change-Id: I1506a419c7a91c5baa87ce251da9861d8ad9e066
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3857559
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82829}

Bug: v8:11708
Change-Id: I38bd6724807fee36bc47d70b0d83156b81a2b4fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865968
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82893}
2022-09-01 09:02:02 +00:00
Jakob Linke
8775410530 [maglev] Fix int overflow in SmallEnoughForOSR
Bug: v8:7700
Change-Id: Id417c068ea6df04c43823f32b60531d7588dcd1f
Fixed: chromium:1358655
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865552
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82892}
2022-09-01 08:56:31 +00:00
Leon Bettscheider
8441f26cf4 [heap] Bailout in IncrementalMarkingJob::ScheduleTask
Currently MinorMC does not suport incremental marking but uses the
IncrementalMarking class to bootstrap concurrent marking.

IncrementalMarkingJob::ScheduleTask is called from multiple call
sites which assume major incremental marking. This CL adds a bailout
to ScheduleTask on IsMajorMarking()==false to avoid erreoneously
doing incremental steps while in MinorMC mode.

Bug: v8:13012
Change-Id: I57803a8f258697478a9696716063c8c2cae1ae30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865147
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82891}
2022-09-01 08:55:11 +00:00
Leon Bettscheider
d1e696d035 [heap] Remove two DCHECKs for minor concurrent marking
This CL removes two DCHECKs which no longer hold with minor
concurrent marking.

Bug: v8:13012
Change-Id: I6f24284f0955c57deeb2fa2c300623d9aedfdd3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865463
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82890}
2022-09-01 08:51:02 +00:00
Ting Chou
dad963c84f [riscv] Separate single and double precision zero to different registers to avoid misuse.
R=yahan@iscas.ac.cn

Bug: v8:13191
Change-Id: I8c7ccb90c4e8a5b8ca5d88fc11c99fbe876621bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3831142
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82889}
2022-09-01 08:49:52 +00:00
Camillo
9526c2936d Dehandlify more code
Bug: v8:11263
Change-Id: Ia53518d52f906c96afafc084af99679bd64b46fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866177
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82888}
2022-09-01 08:40:12 +00:00
jiepan
b7c71a6d1b [no-wasm] Fix compilation of some wasm simd test
Some wasm simd unit tests are not guarded by V8_ENABLE_WEBASSEMBLY,
it will cause test failure on no-wasm build.

Change-Id: Ib08e133f979e492ca620191d799f641bdb0f60bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866706
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#82887}
2022-09-01 08:26:52 +00:00
Jakob Linke
7086e988e7 [maglev] Fix osr-from-ml-to-tf flake again
We've previously reset profiler ticks on ML finalization to avoid
unexpected early tierups to TF. This CL additionally avoid early TF
tierup through the `small function` reason by disabling small-function
optimization.

Bug: v8:7700
Change-Id: I57ba294af0d1d189f76c2cb1ffc31af0837b1e42
Fixed: v8:13242
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865550
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82886}
2022-09-01 08:03:22 +00:00
Leszek Swirski
3fcf167ae1 [maglev] Deopt on binops/cmpops with no feedback
Emit an unconditional deopt if a BinOp/CompareOp has insufficient
feedback, rather than emitting a generic op.

Bug: v8:7700
Change-Id: I3e47d82716a8fe7832cc179e949d689b9aef14e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867731
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82885}
2022-09-01 08:01:22 +00:00
Igor Sheludko
447feef80e [assembler] Introduce RelocInfo::NEAR_BUILTIN_ENTRY
... for PC-relative builtin calls/jumps and explicitly use near_call /
near_jump instructions.

This is a step towards
1) removing the RelocInfo::RUNTIME_ENTRY which was temporarily used
   for this purpose,
2) being able to remap embedded builtins into the code range multiple
   times.

Bug: v8:11527
Change-Id: Ife26c8bbc524be0b07f333776716f22bd4bd36aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866190
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82884}
2022-09-01 07:55:51 +00:00
Liu Yu
85f8b8bf9d [loong64][mips64][maglev] Implement Maglev-to-Turbofan OSR
Port commit ed90ea5cf7

Bug: v8:7700
Change-Id: I8cec07b2fe971287895c89b91436d0f1223cf89a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868527
Auto-Submit: Liu Yu <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@{#82883}
2022-09-01 06:47:36 +00:00
Jakob Linke
5b7a5f4d11 [maglev] Add a --maglev clusterfuzz trial
.. and update old entries:

- Remove --no-untrusted-code-mitigations (flag no longer exists)
- Make --stress-concurrent-inlining-attach-code less likely since it
  mostly overlaps with --stress-concurrent-inlining and there haven't
  been many reports in this are lately.

Bug: v8:7700
Change-Id: Ic88ea74ca88a7c14edfc39bc0a55b846bb01e465
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867506
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82882}
2022-09-01 05:31:37 +00:00
Jaroslav Sevcik
ba14e4d062 [inspector] Introduce instrumentation pause distinction
Introduce an inspector client interface method for running an
"instrumentation pause" (when an instrumentation breakpoint is hit).
This allows the client to run a more restrictive version of message
pumping on instrumentation breakpoint hits.

If not overriden, the instrumentation pause message loop handler will
run the normal message loop. Such an implementation preserves the
behavior for existing clients.

Bug: chromium:1354043
Change-Id: Id33bb10503d73b59b24e63fd9d24631611f68dee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3863256
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@{#82881}
2022-09-01 05:22:16 +00:00
Manos Koukoutos
886cd431c7 [wasm] Inlining improvements
Changes:
- Limit how often a function can be inlined, mostly to constrain
  recursive-function inlining.
- Move call count limiting earlier (to WasmInliner::ReduceCall), and
  guard it behind the flags that are required to generate call counts.

Bug: v8:12166
Change-Id: Ie3c140daff110e08fe7103ee79393ea27ae49bb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865918
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82880}
2022-09-01 04:29:46 +00:00
v8-ci-autoroll-builder
761be17cf7 Update V8 DEPS (trusted)
Rolling v8/build: d74c524..252971c

Rolling v8/buildtools: 69f262d..c24a0d5

Rolling v8/buildtools/linux64: git_revision:5705e56a0e5856621415cfdf444432554e72c9c9..git_revision:00b741b1568d56cf4e117dcb9f70cd42653b4c78

Rolling v8/buildtools/third_party/libc++/trunk: e5670a0..42e738f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6552f9b..638d30e

Rolling v8/third_party/depot_tools: b0fb8d5..5084800

Rolling v8/third_party/fuchsia-sdk/sdk: version:9.20220830.2.1..version:9.20220831.2.1

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

Change-Id: Ic2b31700344a5e433521362408949fa382ae0d2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865743
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@{#82879}
2022-09-01 04:22:16 +00:00
Lu Yahan
7370cb9775 [riscv]Port [wasm] Keep call_indirect index on the stack
Port commit ed90ea5cf7
Port commit ed90ea5cf7
Port commit ab5db111d0329cb0954c110a8cc67b9793b2bb8f

Change-Id: I7981793d7f38d3769a1c9fdca23b7607d7772089
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867138
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82878}
2022-09-01 01:51:45 +00:00
Liu Yu
295911112b [loong64][mips64][sparkplug] Allow sparkplug->ignition deopt in func entry
Port commit af62c4f0e5

Bug: chromium:1246907, chromium:1357554
Change-Id: Ia54fd08719827a2d58ff81ef7e243a3a365ffb55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867135
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Liu Yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#82877}
2022-09-01 01:41:16 +00:00
Shu-yu Guo
57b777ff92 [heap] Don't get the ForegroundTaskRunner in shared isolate
This CL removes dependence on the ForegroundTaskRunner in the shared
isolate because the shared isolate doesn't have one associated with it.

There are 3 places:

1. The memory reducer is no longer allocated on the shared isolate.

2. The WasmEngine is no longer initialized for the shared isolate, which
   never executes user code.

3. Ability to post non-nestable tasks is no longer required on the
   shared isolate. This is required for FinalizationRegistry, and
   the shared isolate never executes user code.

Bug: v8:11708
Change-Id: I4b0cf2c8dc8686ccc7b7d24e6c9e12eb4b9d03d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3864275
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82876}
2022-08-31 23:37:35 +00:00
Deepti Gandluri
247b33e921 Cleanup some macros
Change-Id: Ife29e300d51058a19e4b568cb8d335f26a7556e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3863806
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82875}
2022-08-31 19:31:55 +00:00
Frank Tang
d42f2801db [Temporal] Unskip fixed tests.
We fixed the test earlier but forgot to remove the SKIP.

Bug: v8:11544
Change-Id: I6594dc2ad07fe88fdc2ed9bfaa0f0715bc14930b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867132
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82874}
2022-08-31 17:05:10 +00:00
Dominik Inführ
5c84002aa2 [heap] Add test for old-to-shared slot recording for page promotion
Add test for ensuring that page promotion records old-to-shared slots
during a full GC.

Bug: v8:11708
Change-Id: Id2eb77a623c84586cad61d72bb80479ef69e3b29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866176
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82873}
2022-08-31 16:02:55 +00:00
Marja Hölttä
b1553b9188 [interpreter] Omit calling default ctors
If we see a default ctor, walk up the constructors until we find a non-
default one.

Default ctors can only be skipped if there are no class fields / private
brands.

This CL implements the Ignition parts; Sparkplug, Maglev and TF will
be implemented as follow ups. (This is fine, since this feature is
behind a flag.)

Bug: v8:13091
Change-Id: Ie8ca8aedb01bd4b13adf1063332a5cdf41ab358a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804601
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82872}
2022-08-31 15:45:26 +00:00
Matthias Liedtke
168fcef9b0 [wasm-gc] Support Table<struct|array index>
Bug: v8:7748
Change-Id: I4057a9288fe3d2dc0df308ce51be92e417572bd1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865483
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82871}
2022-08-31 15:35:35 +00:00
Shu-yu Guo
d855d7f7b1 [shared-struct] Rework ValueSerializer::Delegate::SupportsSharedValues
This CL has two changes:

1. Remove ValueDeserializer::Delegate::SupportsSharedValues. Only
   ValueSerializer::Delegate needs to report whether it supports
   serializing shared values. The ValueDeserializer::Delegate should
   DCHECK if it gets a shared object tag but it doesn't support it.
   This better mirrors what happens with SharedArrayBuffer transfers
   currently.

2. When attempting to serialize a shared object (shared struct, shared
   array, Atomics.Mutex, or Atomics.Condition) when
   !SupportsSharedValues(), throw instead of assert. This is for better
   ergonomics.

Bug: v8:12547
Change-Id: I2bb66830393526578016813c4e3488859dd07073
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866302
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82870}
2022-08-31 15:27:55 +00:00
Patrick Thier
f03dd79562 [interpreter] Rename bytecode operand flag accessors in assembler
Rename BytecodeOperandFlag to BytecodeOperandFlag8. The methods in
interpreter-assembler were missed in https://crrev.com/c/3857561.

Change-Id: I09383531e4d16e6e428a56feb76192156211dc81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867515
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82869}
2022-08-31 14:36:17 +00:00