Commit Graph

79150 Commits

Author SHA1 Message Date
Milad Fa
587690c32b PPC[liftoff]: Implement simd s128 const
Change-Id: I7e8efb713a4a2febb5b4800ac91b0c0067dd3582
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075050
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84658}
2022-12-05 15:37:13 +00:00
Milad Fa
fbdf503591 PPC/S390: refactor behaviour of SetPendingMove
This CL applies the following changes:
- a number of redundant DCHECKs have been removed.
- MoveToTempLocation on PPC specifically checks for Simd128
  usage even though Simd and Double scratch register numbers are the
  same at the moment.
- kScratchReg usage is removed from under AssembleMove in PPC.
- SetPendingMove covers F32/F64 and Simd126 stack and scratch register
  usage by AssembleMove using `IsFPStackSlot` and `IsFPRegister`.

Change-Id: I7e4257bb8cc1e66d59cdabe93c113b724cf91c52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4072585
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84657}
2022-12-05 15:36:05 +00:00
Jakob Kummerow
7545b49288 [tools] Fix update-vscode.sh again
It looks like the server-provided information changed back to what
it was before crrev.com/c/4023861, but rather than just revert that,
this patch makes the logic in our script even more robust.

No-Try: true
Change-Id: I9d60b1c61f85d9bde1275695dbd18c62fa4569bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4080387
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84656}
2022-12-05 15:22:42 +00:00
Michael Achenbach
7136ea89d2 [gcmole] Fix and simplify test-run mode
The test-run mode was broken after output improvements and the
introduction of pathlib.

This fixes the string concatenation with paths and updates the test
output to match the status quo. This also changes the test-run mode
to run exclusively when the --test-run option is passed. Now it's
either a test run or a normal run. Like that we can add the test run
as a separate test step on a bot. If both are needed in sequence
for something, gcmole could be called twice.

Bug: v8:12660
Change-Id: I58179d50950fa76d8f66b974325a8fed84dc91b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075727
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84655}
2022-12-05 15:21:19 +00:00
Jakob Kummerow
377888f565 [wasm-gc] Allow Promise.resolve(wasm_obj) when debugger is open
By applying the same special-case that the Torque builtin already has
to the runtime function.
This is a quick fix pending discussion what the right long-term solution
should be.

Bug: v8:13523
Change-Id: I5303d5ac598d00189f7eb2d9d78b81ad11b919b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075527
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84654}
2022-12-05 15:14:02 +00:00
pthier
eeed2ebadb [heap] Invoke GC callbacks in safepoint for shared GCs
After a shared GC, trigger all registered callbacks while the global
safepoint is active.

Bug: chromium:1395117
Change-Id: I16c61533d44fbeddda18414d2256203848420a99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079624
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84653}
2022-12-05 15:13:00 +00:00
pthier
8c84ac3339 Reland "[strings] Don't try to record/update invalidated slots in shared space"
This is a reland of commit bb288ea342

Changes since revert:
- Skip added test in single generation builds (shared heap is not supported in single generation).
- Use Isolate::Current() instead of GetIsolateFromWritableObject() for  strings that reside in shared space (not only if the string is actually shared).

Original change's description:
> [strings] Don't try to record/update invalidated slots in shared space
>
> Strings in shared space are always direct (i.e. they don't contain
> pointers) and therefore cannot have any recorded slots.
>
> Drive-by: DCHECK no slots are recorded in shared space.
>
> Bug: chromium:1394741
> Change-Id: If1ef04d2fadcc14f552f69e99dc109d883e975c9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075908
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84630}

Bug: chromium:1394741
Change-Id: I6889b565f8a247ae1fe553158e29984e7c05563a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079224
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84652}
2022-12-05 15:11:56 +00:00
Darius M
5010e3d86a [maglev][arm64] Implement Int32 bitwise operations
This isn't enough to run proper mjsunit tests, but it's enough to
compile a simple function like:

    function foo(x, y) {
        return (~x | y & x ^ y) >> 1 << 1;
    }

Bug: v8:7700
Change-Id: Ied109e3e1d841156c964999d6d961644c943bc8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4080226
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84651}
2022-12-05 15:01:56 +00:00
Leszek Swirski
9db020e758 [maglev] Record the maximum call args
To handle stack overflow correctly, we need to check for stack overflow
during calls in the caller, before pushing too many arguments onto the
stack.

Handle this in Maglev same as in TurboFan and Sparkplug -- calculate the
maximum size of calls, and use this in the function entry stack check,
rather than checking on each call.

Bug: v8:7700
Change-Id: I521bee3f5386d5100f94142a5054eb9a1434284a
Fixed: chromium:1384403
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079009
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84650}
2022-12-05 14:53:34 +00:00
Darius M
51a6cd2326 [codegen][arm64] Add comments for Condition codes
Change-Id: Ib63a39f40a95d1bd05eb39f5a321f5f93c631792
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4080227
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84649}
2022-12-05 14:40:27 +00:00
Michael Achenbach
bc15e20a03 [gcmole] Optimize data dependencies
This (micro)optimizes data dependencies of gcmole in two ways:

1. Only bundle icu folders 'common' and 'i18n', omitting particularly
icu's data and test folder, which aren't needed for running gcmole.
This reduces gcmole bundle size from 377MB to 239MB, reducing upload
and download times by a few seconds on g1 bots.

2. Process gcmole data dependencies during GN time only when gcmole
is configured via gn flag. Currently, the dependency files are also
processed on all other bots that aren't running gcmole.

Bug: v8:12660
Change-Id: Ib708fa2957e6e33698e51b2aee45929f4d467935
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4076331
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84648}
2022-12-05 14:03:39 +00:00
Dominik Inführ
3fa264f1b9 [heap] Use thread-local RNGs in EvacuateVisitorBase
The evacuation threads can't use isolate()->fuzzer_rng() directly
since this class isn't thread-safe. This CL uses this RNG to create
thread-local RNGs for each evacuation thread.

Bug: v8:13549
Change-Id: I3a71617e494ae63fcebc2bab2ee2d7a7714de7bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4078965
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84647}
2022-12-05 13:55:26 +00:00
Andreas Haas
60d9dd3563 [d8] Make the profileEnd callback isolate-specific
The OnProfileEndListener callback has to be reset before the isolate
dies to avoid a use-after-free when the Global which holds the callback
gets released.

Drive-by change: make the OnProfileEndListener callback
isolate-specific. At the moment a `profileEnd` call in IsolateA could
trigger the OnProfileEndListener callback of IsolateB, which could
cause all kinds of data races (the callback would access the isolate,
but the isolate is not supposed to get accessed by multiple threads
concurrently. With this CL there is one callback per isolate.

R=clemensb@chromium.org

Bug: chromium:1395237
Change-Id: Ifaa5b883a231f5519a3bfeb6187fb7d8faa02b02
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4076465
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84646}
2022-12-05 13:54:22 +00:00
wenqin.yang
3b4b217af2 Reland "[turbolizer] Show basic block id in schedule phase"
This is a reland of commit 347142f647

This CL fix a bug for bolck onclick event, and improve compatibility
for old turbo-x.json files.

Original change's description:
> [turbolizer] Show basic block id in schedule phase
>
> In the schedule phase of turbolizer, there is only RPO number was
> shown, when we want to debug Builtin PGO or other modules, we
> would like to see the block id instead of RPO number.
>
> this CL add the support for displaying basic block id for schedule
> phase in turbolizer.
>
> Change-Id: I7a71f259230564400b683d598f68b6d064f1eb4d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4068103
> Commit-Queue: Wenqin Yang <wenqin.yang@intel.com>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84625}

Change-Id: Ibaee4826678169d65e809bcad1e29587e480663f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4073861
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Wenqin Yang <wenqin.yang@intel.com>
Cr-Commit-Position: refs/heads/main@{#84645}
2022-12-05 13:39:11 +00:00
Clemens Backes
5a50750651 [wasm] Switch wasm-async fuzzer to Liftoff for reference
The fuzzers based on {WasmExecutionFuzzer} (wasm-code, wasm-compile)
were already switched over in https://crrev.com/c/4042288.
The wasm-async and wasm fuzzers were still testing against the
interpreter, even though WasmGC opcodes are enabled, which leads to
crashes due to incomplete interpreter support.

This CL now switches those remaining fuzzers to "liftoff as reference"
mode, and removes support for testing against the interpreter.

As Liftoff code runs a lot faster than the interpreter, we bump the
limit for the number of executed instructions from 16k to 1M.

R=jkummerow@chromium.org

Bug: chromium:1387316, chromium:1393379, v8:13496
Change-Id: Id3e6177cc89b49e69d03515f10eedaf0872bde82
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4078983
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84644}
2022-12-05 12:53:03 +00:00
Clemens Backes
cd1a29a5d0 [base] Remove OwnedVector::start
For some reason, {OwnedVector} defines both a {start()} and a {begin()}
accessor which return the same value. As {begin()} is the name that the
standard library uses, this CL removes {start()} and switches all uses
to {begin()}.

R=mslekova@chromium.org

Change-Id: Ib505fe146db396f7589404c5a630e19248624729
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075865
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84643}
2022-12-05 12:37:02 +00:00
Clemens Backes
608c5d5ef3 [wasm] Check that streaming decoding finds all errors
We already check that if streaming decoding fails, then also synchronous
decoding finds an error. This adds a DCHECK for the other direction: If
streaming decoding succeeds, then also synchronous decoding must
succeed.

R=ahaas@chromium.org

Bug: v8:13447
Change-Id: Iade188ee81b6d3df964f35777d1d3a71350a6811
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4071924
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84642}
2022-12-05 12:18:58 +00:00
Manos Koukoutos
ea695079e5 [wasm-gc] Canonicalize type passed through export wrapper
The wasm export wrapper passes the expected type as a Smi parameter to
the {WasmJSToWasmObject} runtime function. However, since this wrapper
might be compiled by a different module that is currently running it,
it is not enough to pass the module-specific type index and the module
to reconstruct the type. Rather, we must pass the canonical type
index.

Bug: v8:7748
Change-Id: I84e34e855898477a135f213f07bca10e95ecf49a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4068123
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84641}
2022-12-05 11:53:28 +00:00
Hannes Payer
646f63e54d [heap] Increase timer resolution for --trace-gc pause time.
Change-Id: Ie6e74c7e9812ead0901aff89b9d84b7e387fe5aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079006
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84640}
2022-12-05 11:08:03 +00:00
Victor Gomes
310856a6e6 [maglev][arm64] Int32Add + Deopting fixes
- Fixes PushAll/PopAll to respect alignment
- Adds eager/lazy deopt entry call optimization for arm64
- Share SmiUntag nodes
- Add Int32Add + CheckedSmiTagInt32 for arm64

Bug: v8:7700
Change-Id: I0140acc5b84d02331749fcdc0682b3c1889f3a55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4076168
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84639}
2022-12-05 10:58:51 +00:00
Darius M
e033e1bedd [turboshaft] fix wrong output_reps for Comparison and Equal
The `rep` field of ComparisonOp and EqualOp should be used to know
what is the representation of the things that are being compared,
rather than the output representation: the latter should always be
Word32.

Fixed: chromium:1395737
Bug: v8:12783
Change-Id: I01d29dd598da57bab3410f4b59e407e89871f207
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079223
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84638}
2022-12-05 10:57:39 +00:00
Dominik Inführ
0bd3033a54 [heap][wasm] Update flag used in liftoff write barrier
Update write barrier emitted in Liftoff to also handle pointers into
the shared heap correctly.

Bug: v8:13267, chromium:1395520
Change-Id: I4a356f3cc215cbe993e29819026dc2168bf336ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4078303
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84637}
2022-12-05 10:47:35 +00:00
Clemens Backes
2ceed1a59e [wasm] Revalidate module after streaming error
This refactors how we generate any decoding errors during streaming
compilation: Instead of generating an error message, we only remember
that decoding failed. After all bytes have been received, we then
synchronously re-validate the bytes. This ensures consistent error
messages between all decoding and compilation pipelines.

In order to achieve this, we now unconditionally store the full wire
bytes in the {StreamingDecoder}. This partially overlaps with the
section buffers that we already store, but we cannot continue filling
section buffers after a decoder error. This will be cleaned up in a
follow-up CL.

We can also remove most of the buffer-offset tracking, which will also
be done in a follow-up.

R=ahaas@chromium.org

Bug: v8:13447
Change-Id: I1d506356de6a0070c3bf2b26470dbf781f4f62e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4066922
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84636}
2022-12-05 10:46:31 +00:00
Clemens Backes
a2a907244a [wasm] Remove V8.WasmModuleCodeSizeBaselineMiB counter
The chromium-side histogram is being deprecated in
https://crrev.com/c/4076250.
This CL removes the v8-side counter together with the `kAfterBaseline`
sampling mode.

R=ahaas@chromium.org

Bug: v8:12852
Change-Id: If7960824264dfc7e99e0c5c436de1dca90fbce4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4076167
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84635}
2022-12-05 10:45:29 +00:00
Dominik Inführ
ce68a4a644 [heap] Keep is_marking_flag_ enabled when shared marking is running
When stopping incremental marking in IncrementalMarking::Stop we can't
blindly reset is_marking_flag_ for worker isolates as incremental
marking in the shared heap might be running at that point.

Since we are already here add a isolate() accessor to
IncrementalMarking.

Bug: v8:13267
Change-Id: Icb63306eef820577d59c6ca833429c1be00d294c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061322
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84634}
2022-12-05 10:44:27 +00:00
Igor Sheludko
b296ab30f7 [ptr-compr] Mark base() as V8_CONST
... which is an alias for __attribute__((const)) when it's available.

Bug: v8:7703
Change-Id: Ic585f48bc764ccf0c920ff82ba788cf1e88e0cdd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4076525
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84633}
2022-12-05 10:43:25 +00:00
Matthias Liedtke
e2f9a59c04 Revert "[strings] Don't try to record/update invalidated slots in shared space"
This reverts commit bb288ea342.

Reason for revert: Failing on linux debug and TSAN run
- https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20debug%20-%20single%20generation/7820/overview
- https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20isolates/22912/overview

Original change's description:
> [strings] Don't try to record/update invalidated slots in shared space
>
> Strings in shared space are always direct (i.e. they don't contain
> pointers) and therefore cannot have any recorded slots.
>
> Drive-by: DCHECK no slots are recorded in shared space.
>
> Bug: chromium:1394741
> Change-Id: If1ef04d2fadcc14f552f69e99dc109d883e975c9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075908
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84630}

Bug: chromium:1394741
Change-Id: I938dcac9cb5c9154ec9a3c5504b29f3208e3e369
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079145
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84632}
2022-12-05 10:42:22 +00:00
Dominik Inführ
c62d8261dc [heap] Remove IsolateSafepointScope in CombinedHeapObjectIterator
The safepoint is already initiated by the HeapObjectIterator. In
addition the CombinedHeapObjectIterator wasn't updated for the shared
heap and always used an IsolateSafepointScope which didn't match the
global safepoint initiated by HeapObjectIterator.
Simplify this by relying on the safepoint scope in HeapObjectIterator.

This CL also moves the verification that all client isolates are
fully deserialized into the GC.

Bug: v8:13267
Change-Id: I59eff66a38fd8ecd8e90f68e6ed5abc5d2d4cec9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4076332
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84631}
2022-12-05 09:39:15 +00:00
pthier
bb288ea342 [strings] Don't try to record/update invalidated slots in shared space
Strings in shared space are always direct (i.e. they don't contain
pointers) and therefore cannot have any recorded slots.

Drive-by: DCHECK no slots are recorded in shared space.

Bug: chromium:1394741
Change-Id: If1ef04d2fadcc14f552f69e99dc109d883e975c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075908
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84630}
2022-12-05 09:18:33 +00:00
Wenqin Yang
ce47dcb177 Revert "[turbolizer] Show basic block id in schedule phase"
This reverts commit 347142f647.

Reason for revert: <There is a bug for onclick event.>

Original change's description:
> [turbolizer] Show basic block id in schedule phase
>
> In the schedule phase of turbolizer, there is only RPO number was
> shown, when we want to debug Builtin PGO or other modules, we
> would like to see the block id instead of RPO number.
>
> this CL add the support for displaying basic block id for schedule
> phase in turbolizer.
>
> Change-Id: I7a71f259230564400b683d598f68b6d064f1eb4d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4068103
> Commit-Queue: Wenqin Yang <wenqin.yang@intel.com>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84625}

Change-Id: If6b3674e7bc333be7d323714e3d2ca5327826892
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4078511
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84629}
2022-12-05 08:57:46 +00:00
Marja Hölttä
45642bf199 [rab/gsab] Enable transferring RAB / GSAB to workers
1) When transferring ArrayBuffers, retain resizability

2) Fix transmitting TypedArray flags; we cannot set the flags after
TypedArray creation, since the map would then be wrong.

Bug: v8:11111
Change-Id: Ic2fa3e6a4db1cb82a3751d2b114353fb477a54c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4064463
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84628}
2022-12-05 08:06:11 +00:00
Lu Yahan
4c773679d4 Reland "[riscv] Add tracepoint instructions to help simulator debug"
This is a reland of commit af3678d122

Original change's description:
> [riscv] Add tracepoint instructions to help simulator debug
>
> Change-Id: I92f2c8600ab6ff2be3c0566f8dd5602cb47252cb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4050059
> Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
> Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
> Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
> Cr-Commit-Position: refs/heads/main@{#84441}

Change-Id: If021236afa7f890123f95716e6ed622617b91b07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4074457
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#84627}
2022-12-05 06:38:49 +00:00
v8-ci-autoroll-builder
b1fc7b40d0 Update V8 DEPS (trusted)
Rolling v8/tools/clang: 65848dc..dabb142

Change-Id: Ic17036008ba791ceb8c647b0390161908705c221
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4077213
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@{#84626}
2022-12-05 03:55:15 +00:00
wenqin.yang
347142f647 [turbolizer] Show basic block id in schedule phase
In the schedule phase of turbolizer, there is only RPO number was
shown, when we want to debug Builtin PGO or other modules, we
would like to see the block id instead of RPO number.

this CL add the support for displaying basic block id for schedule
phase in turbolizer.

Change-Id: I7a71f259230564400b683d598f68b6d064f1eb4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4068103
Commit-Queue: Wenqin Yang <wenqin.yang@intel.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84625}
2022-12-05 03:11:45 +00:00
v8-ci-autoroll-builder
a044d73254 Update V8 DEPS (trusted)
Rolling v8/buildtools: fdc7c13..1547c3f

Rolling v8/buildtools/third_party/libc++/trunk: 2dda3c5..f92e1b7

Change-Id: Ife7be3fe4a2e3b6937c7b2ecf0c54e8654c23bbc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075357
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@{#84624}
2022-12-04 03:49:00 +00:00
Yahan Lu
c8240d12df Revert "[riscv] Add tracepoint instructions to help simulator debug"
This reverts commit af3678d122.

Reason for revert: kDebuggerTracingDirectivesMask is error
                   kDebuggerTracingDirectivesMask should be 0b111 << 3
Original change's description:
> [riscv] Add tracepoint instructions to help simulator debug
>
> Change-Id: I92f2c8600ab6ff2be3c0566f8dd5602cb47252cb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4050059
> Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
> Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
> Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
> Cr-Commit-Position: refs/heads/main@{#84441}

Change-Id: I05d237e5ca1ca001d237b344e5cc4e06a0c133ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075385
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#84623}
2022-12-04 02:13:12 +00:00
Dominik Inführ
8f88696983 [codegen] Emit write barriers for shared object stores
The --shared-space flag introduces incremental marking in the shared
heap, this forces us to also emit write barriers for stores into
shared objects.

Bug: v8:13267
Change-Id: I835c3050381cef84e96384fd69a3a77ee588679f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061356
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84622}
2022-12-03 14:45:06 +00:00
v8-ci-autoroll-builder
82aa7e3317 Update V8 DEPS (trusted)
Rolling v8/build: 961774e..988bc9f

Rolling v8/buildtools: 8d4ff27..fdc7c13

Rolling v8/buildtools/third_party/libc++/trunk: ae1fbc4..2dda3c5

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/550c7af..41eec55

Rolling v8/third_party/depot_tools: c4044d4..ec1882f

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221201.2.1..version:10.20221201.3.1

Rolling v8/third_party/instrumented_libraries: ecd3bd8..3296699

Rolling v8/tools/clang: 83f8830..65848dc

Change-Id: I833a6736cc90785d846b968d63ac4345a901d572
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075352
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@{#84621}
2022-12-03 04:06:37 +00:00
Scott Violet
7519793938 [reland] adds the ability for v8 to use sin/cos from libm
This differs from the patch that landed in so far as the libm target
is only defined if v8_use_libm_trig_functions is defined. Doing this
ensures building the 'all' target only builds libm is appropriate.
You can diff between patchset 1 and 2 to see the change.

This is controlled by a gn arg, which defaults to true for clang
builds. I'm limiting to clang builds as the macros for determining
endian type are currently clang specific. My understanding is that
chrome only uses clang. I can update the endian macros if necessary
for other targets.

Bug=v8:13477

Change-Id: I59cd450facc9fcb8987fe56e8cfc1c13522e1f6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4070924
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Auto-Submit: Scott Violet <sky@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84620}
2022-12-02 21:59:04 +00:00
Darius M
74cc4e7d80 Use stronger AVX2 detection in SIMD IndexOf/Includes
Bug: chromium:1392804
Change-Id: Ifd137a8c9547432a046c5510dcc2460d75807cd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4071745
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84619}
2022-12-02 18:38:06 +00:00
Anton Bikineev
be25ee7397 unified-young-gen: Fix races caused by wrong MarkingState
MinorMC's parallel marker was mistakenly using CppMarkingState for the
mutator thread, which caused tsan reports due to pushing into the same
WorkList::Local.

Bug: v8:13475
Change-Id: I640ee23ff643a40910a73eab986795710cec1393
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4076445
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84618}
2022-12-02 16:51:54 +00:00
Dominik Inführ
a1a2821878 [heap] Fix CHECK in RememberedSet::CheckNoneInRange
When invoking RememberedSet::CheckNoneInRange the end address is
exclusive, which means a slot might be recorded at that this address.

Bug: v8:13267, chromium:1395311
Change-Id: I20c23a69530b2c9b10c6213036145c4dcfb206a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075526
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84617}
2022-12-02 15:50:44 +00:00
Darius M
8b21fabe91 [turboshaft] fix wrong set_deferred in RecreateSchedule
Fixed: chromium:1394769
Bug: v8:12783
Change-Id: I3291672cc90eb0181ba90a052562a923d65be9cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4069867
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84616}
2022-12-02 15:08:22 +00:00
Leszek Swirski
4e5a77d1b2 [maglev] Rename vreg allocation
Rename the vreg allocation to "SetValueLocationConstraints", which is a
more accurate description of what it does. Also, remove the actual vreg
state, since we don't care about unallocated operand vregs (ValueNodes
act as their own vreg).

This allows us to remove a post-processing pass which sets input
constraints for Phi nodes, which previously couldn't do so in the foward
pass due to loop Phis' back-edge inputs not having a vreg yet.

Bug: v8:7700
Change-Id: I24e75f0f600aa5fbd2169a189c0863e4153f3439
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075529
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84615}
2022-12-02 14:57:53 +00:00
Marja Hölttä
6b66329631 [builtins] Remove dead TypedArray related code
Change-Id: I499cb6ced3a2ffb071f80746d4c67bc98a8dff49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075906
Auto-Submit: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84614}
2022-12-02 14:08:34 +00:00
Clemens Backes
35ff32d43e [tools][gdbinit] Increase search depth for V8_Dcheck frame
In a local debugging session, it happened to be be in frame 8, so was
slighly missed. Looking through the first 10 frames instead of 7 should
not hurt anyone but fixes that problem.

My stack trace:
#0 __pthread_kill_implementation
#1 __pthread_kill_internal
#2 __GI___pthread_kill
#3 ??
#4 __GI_abort
#5 v8::base::OS::Abort
#6 V8_Fatal
#7 v8::base::(anonymous namespace)::DefaultDcheckHandler
#8 V8_Dcheck

R=leszeks@chromium.org

No-Try: true
Change-Id: I6d8bfb482fe4c926a8ecfad8757286618a98f2c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061894
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84613}
2022-12-02 12:59:48 +00:00
Clemens Backes
01ec9f47b2 [wasm] Remove dead field from AsyncStreamingProcessor
The {async_counters_} field is not used, so we should remove it.

R=ahaas@chromium.org

Bug: v8:13447
Change-Id: I55c335b65f0ab12f8ccc4969741908cb33e1fa8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4067024
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84612}
2022-12-02 12:42:03 +00:00
Clemens Backes
95cdb3c573 [wasm] Always use the engine allocator for decoded modules
As Wasm module can live longer than the isolate that initially created
them, it generally makes sense to use the WasmEngine's accounting
allocator for the decoded WasmModule.

Instead of passing that allocator through many functions, we can just
get it directly from the one global WasmEngine when we need it.

R=ahaas@chromium.org

Change-Id: I552f8e19072f2305a3186b821c2f5b3969eac83f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4071464
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84611}
2022-12-02 12:22:06 +00:00
Leszek Swirski
e4ed61a96c [maglev] Fix merge tagging
The reasoning around EnsureTagged using known node aspects in merges was
previously broken.  Consider the following case:

  1. We have a Smi-feedback logical right shift.
  2. We emit Int32ShiftRightLogical followed by CheckUint32IsSmi, and we
     now know this is a Smi, so we record it in known_node_aspects.
  3. We EnsureTagged the Int32ShiftRightLogical value in a merge, when
     mergin it with another value.
  4. EnsureTagged inserts UnsafeSmiTag (because the shift is a known
     Smi), but inserts it _between_ the Int32ShiftRightLogical and
     CheckUint32IsSmi.
  5. During execution, we get a non-Smi value out of
     Int32ShiftRightLogical. The "assert in Smi range" check in
     UnsafeSmiTag fails.

In short, this is because we insert the conversion node immediately
after the value node, but th known_node_aspects is, at this point,
reasoning about known aspects later than this.

This patch fixes this by changing the logic around tagging entirely --
instead of EnsureTagged inserting the conversion immediately after the
node, it inserts it at the end of the predecessor requiring the
conversion.

This would mean that the conversion is emitted at the end of _every_
predecessor to the merge; we try to avoid this by additionally storing a
per-predecessor cache of the known_node_aspects at that predecessor's
control node, in particular storing whether there are any existing
tagged alternatives. This cache is checked when creating the Phi,
otherwise we continue using the untagged value. We'll be able to re-use
this cache for non-tagged Phis in the future.

A drive-by is that a bunch of code moves from the
maglev-interpreter-frame-state header to the .cc file -- this is to
avoid cyclical dependencies on between that header and the BasicBlock
one (which we now need for the append of the conversion node).

Bug: v8:7700
Change-Id: Ie441a8c7bd14a14dde8b12f91578f2dc713c4e33
Fixed: chromium:1393232
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055116
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84610}
2022-12-02 11:12:51 +00:00
Victor Gomes
765b3dac71 [maglev][arm64] Share GapMove IR
Drive-by fix: wrong compare order in Return

Bug: v8:7700
Change-Id: Id5c2f70ad75ecbd295144e8bae442360e5b00656
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075726
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84609}
2022-12-02 10:54:33 +00:00