Commit Graph

4702 Commits

Author SHA1 Message Date
Darius M
9a5776c0be [base] Implement shared mutex for Mac OS X
Bug: chromium:1355917, v8:12037
Change-Id: I5a0a19fd1abb06920f851ef04f5313e9d37dadc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3855361
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82826}
2022-08-30 14:26:18 +00:00
Jakob Kummerow
8e069d6294 [wasm][simd] Fix SpillAdjacentFpRegisters...
...to honor the {pinned} list under all circumstances.

Drive-by: DEBUG-mode helpers to print FunctionSig and LiftoffRegList
objects to stdout.

Fixed: chromium:1356718
Change-Id: I487db12294f687790cec1d658d7a7d754f3c2f99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3859752
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82815}
2022-08-30 11:24:28 +00:00
Feng Yu
ccb86fc503 [test] Migrate rest cctest/compiler/test-run-js* to unittests/
Bug: v8:12781
Change-Id: I19de9ab655e3e4b7ad45cde7f9bc659741d856a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3858928
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Feng Yu <f3n67u@gmail.com>
Cr-Commit-Position: refs/heads/main@{#82786}
2022-08-29 15:00:45 +00:00
Clemens Backes
c497701814 [wasm] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=jkummerow@chromium.org

Bug: v8:12887
Change-Id: Ieccf35730f69bcefa3740227f15e05686080d122
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3843517
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82774}
2022-08-29 12:43:46 +00:00
Shu-yu Guo
31e17fe62d [shared-struct, api] Support shared isolates in API
Currently the ability to create shared isolates is partially exposed to
API. Instead of fully exposing it, this CL makes shared isolate and
shared heap handling transparent to the embedder.

If a flag that requires the shared heap is true (currently
--shared-string-table and --harmony-struct), the first isolate created
in the process will create and attach to a process-wide shared isolate.
Subsequent isolates will attach to that shared isolate. When that first isolate is deleted, the shared isolate is also deleted.

Bug: v8:12547
Change-Id: Idaf2947bc354066c44f2d10243e10162b1b7e4d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3848825
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82756}
2022-08-26 23:41:57 +00:00
Matthias Liedtke
8600d58092 [wasm-gc] Rename array.new_fixed_static -> array.new_fixed
This is a left-over of the removal of the dynamic (rtt-based)
variants.

Bug: v8:7748
Change-Id: I93bb74a72543a5697f1102d283c7d65c6be99466
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3856577
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82746}
2022-08-26 13:11:38 +00:00
Feng Yu
1bd68aa9e1 [test] Migrate cctest/compiler/test-run-jsops to unittests/
Bug: v8:12781
Change-Id: I0c1234c5a649f3533eebbab89f7fe16140327d59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3858927
Commit-Queue: Feng Yu <f3n67u@gmail.com>
Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82743}
2022-08-26 11:07:32 +00:00
Qifan Pan
6fb86b9788 [turbofan] Support BigIntDivide
Bug: v8:9407
Change-Id: I29f8f5ec68f09e8631b59d3a6a2926bab3b3bcd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3845638
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82741}
2022-08-26 08:51:36 +00:00
Feng Yu
64ca6cc4f0 [test] Migrate cctest/test-temporal-parser to unittests/
Bug: v8:12781
Change-Id: I281047a0606b8f709a930998ef7e7a53f780f59d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3840146
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Feng Yu <f3n67u@gmail.com>
Cr-Commit-Position: refs/heads/main@{#82725}
2022-08-25 13:01:48 +00:00
Feng Yu
c6a94381a9 Reland "[test] Migrate cctest/test-inspector to unittests/"
This is a reland of commit 437b311a18

Original change's description:
> [test] Migrate cctest/test-inspector to unittests/
>
> test-inspector.cc -> inspector-unittest.cc
>
> Bug: v8:12781
> Change-Id: I37d2bc2d023ffd91b94d5a09cdbfe4a6e22fecf1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813062
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82512}

Bug: v8:12781
Change-Id: Iece26e724f21d459dd1e96423d3aa72f15c5424e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3837705
Commit-Queue: Feng Yu <f3n67u@gmail.com>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82724}
2022-08-25 12:49:54 +00:00
Feng Yu
c48e39153a Reland "[test] Migrate cctest/test-global-handles to unittests/"
This is a reland of commit 3615ae691d.

Original change's description:
> [test] Migrate cctest/test-global-handles to unittests/
>
> Bug: v8:12781
> Change-Id: If7681564f3e0c087e3347557a3f9169625b51607
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3817621
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82633}

Bug: v8:12781
Change-Id: I776ab176733722fd8853deaabec93e0d44274d9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3855979
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82719}
2022-08-25 10:22:02 +00:00
Feng Yu
ae9d62ea88 Reland "[test] Migrate cctest/test-weakmaps to unittests/"
This is a reland of commit d83346befb

Original change's description:
> [test] Migrate cctest/test-weakmaps to unittests/
>
> Bug: v8:12781
> Change-Id: Ief6bd7ee0ff2876e19970b2fb6af4f3208ec7f4e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815486
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82699}

Bug: v8:12781
Change-Id: I9f74c32b924433dea67f62e26a336ef7263282e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3856096
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82717}
2022-08-25 09:36:11 +00:00
Leszek Swirski
d9e0603c27 Revert "[test] Migrate cctest/test-weakmaps to unittests/"
This reverts commit d83346befb.

Reason for revert: Seems to be breaking TSAN bot (https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20stress-incremental-marking/8867/overview)

Original change's description:
> [test] Migrate cctest/test-weakmaps to unittests/
>
> Bug: v8:12781
> Change-Id: Ief6bd7ee0ff2876e19970b2fb6af4f3208ec7f4e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815486
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82699}

Bug: v8:12781
Change-Id: Ia20078e9f40d0e2257cf0b953ddd2e72594c4085
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3855938
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>
Cr-Commit-Position: refs/heads/main@{#82713}
2022-08-25 07:03:08 +00:00
Feng Yu
d83346befb [test] Migrate cctest/test-weakmaps to unittests/
Bug: v8:12781
Change-Id: Ief6bd7ee0ff2876e19970b2fb6af4f3208ec7f4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815486
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82699}
2022-08-24 15:54:00 +00:00
George Wort
f066452821 Revert "[turbofan][arm64] Emit Lsl for Int32MulWithOverflow when possible"
This reverts commit aa541f1c9c.

Reason for revert: Reverting due to large regressions for motionmark on M1.

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: I896530a53fbdf6d397922124abddda4140144448
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3854222
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: George Wort <george.wort@arm.com>
Cr-Commit-Position: refs/heads/main@{#82696}
2022-08-24 14:01:40 +00:00
Leon Bettscheider
4085827c6c [heap] Enable MinorMC incremental marking on soft limit
This CL adds a soft limit (via AllocationObserver) to run
incremental marking for MinorMC.

Once the soft limit is triggered, roots are marked.
This a stepping stone for concurrent marking
(YoungGenerationConcurrentMarkingVisitor, go/YGCMV) integration.

Bug: v8:13012
Change-Id: I5bc9aeb80511159561845deb494023ade3fb7365
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824339
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82695}
2022-08-24 13:58:21 +00:00
Derek Gonyeo
8c8f65984a [fuchsia][v8_unittests] migrate v8_unittests.cmx to .cml
Replace `v8_unittests.cmx` with `v8_unittests.cml`, thus migrating the
tests to CFv2.

Bug: chromium:1256503
Change-Id: Iab90b406973585a513bce5a1a0884860c7c88e90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3826050
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Derek Gonyeo <dgonyeo@google.com>
Cr-Commit-Position: refs/heads/main@{#82692}
2022-08-24 13:36:40 +00:00
Dominik Inführ
c08f7bf491 [heap] Remove CHECK in SimulateIncrementalMarking after loop
Concurrent markers could add work into the worklist before the CHECK.

Bug: v8:12775, v8:13223
Change-Id: I8ac252b0fec8e5acbcfec56dad04830e596c709d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3854496
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82690}
2022-08-24 12:54:30 +00:00
George Wort
32d23e7b26 Reland "[compiler] Make ReduceWord32EqualForConstantRhs work for Word64Equal"
This is a reland of commit abd0adf106

Original change's description:
> [compiler] Make ReduceWord32EqualForConstantRhs work for Word64Equal
>
> Adds reduction case in MachineOperatorReducer for when the left-hand side of a
> Word64Equals is based on a 64-bit shift-and-mask operation, as is the case
> when Torque accesses 64-bit bitfields.
>
> This improves Speedometer2 by 0.15% on a Neoverse-N1 machine, with
> React-Redux being improved by 0.4%.
>
> Change-Id: Icd0451c00c1b25f7d370e81bddcfd668a5b2523c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3834027
> Commit-Queue: George Wort <george.wort@arm.com>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82593}

Change-Id: I62393c062b2c785a5dfa3500b80fe44ec08f6f21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3841569
Commit-Queue: George Wort <george.wort@arm.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82684}
2022-08-24 09:50:09 +00:00
Michael Lippautz
bf5e3a8a0e [api, heap] Deprecate v8::EmbedderHeapTracer
Users should rely on CppHeap which is the only supported way of using
v8::TracedReference in going forward.

Bug: v8:13207
Change-Id: Idd03f458167c74b06f285bb568e5c77ad46003fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3849037
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82681}
2022-08-24 09:03:00 +00:00
Feng Yu
0cbfcede6d [test] Migrate cctest/test-sloppy-equality to unittests/
Bug: v8:12781
Change-Id: I1b0be6803d6a9f4ab7071bc3ae5abeb8f29ce9c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829753
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82680}
2022-08-24 08:46:10 +00:00
Feng Yu
75beca729e [test] Migrate cctest/parsing/test-preparser to unittests/
Bug: v8:12781
Change-Id: I5b605db296c2a2813a44f05c74500cc1a0049f57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3832175
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82668}
2022-08-23 15:54:39 +00:00
ishell@chromium.org
4be9de90ac [api] Add v8::CrashKeyId::kCodeRangeBaseAddress
... when the code range is created. This key should be more helpful
than the existing kCodeSpaceFirstPageAddress crash key, especially
for the cases when snapshot does not contain Code objects and thus
the code space is not created during Isolate initialization.

The mid-term plan is to remove the latter in favour of the former
since the default configuration does not imply creation of the code
space.

Bug: v8:11880
Change-Id: Icdea38723c7ed73605c2df6589ec01193571d55c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3849038
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82667}
2022-08-23 15:26:09 +00:00
Dominik Inführ
655866de45 [heap] Replace IncrementalMarking::IsRunning() with IsMarking()
IsRunning() and IsMarking() are now equivalent. So IsRunning() can be
removed in favor of IsMarking().

IsComplete() is also renamed to IsMarkingComplete().

Bug: v8:12775
Change-Id: Ife88be4d674af055590ba5178ec1e410f8fa89d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3849833
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82665}
2022-08-23 14:51:29 +00:00
Ryan Everett
d4e202468d [baseline][arm64] Improve code generation for conditional branches
Generate Tbz/Tbnz instead of (tst;bcc),
and Cbz/Cbnz instead of (cmp;bcc), where possible.

This improves Speedometer2 by 0.22% on a Neoverse-N1 machine.

Change-Id: Ie86bae7189a7a4bd4975f946e7413225c9023316
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3833816
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82657}
2022-08-23 11:10:29 +00:00
Derek Gonyeo
086f0be523 [fuchsia][v8_unittests] move to Fuchsia SDK package templates
Use the `fuchsia_component` and `fuchsia_package` GN templates from the
Fuchsia SDK to package the `v8_unittests` test for Fuchsia. Give the
`v8_unittests` their own dedicated `.cmx` file, instead of depending on
`v8.cmx`.

Bug: chromium:1256503
Change-Id: I22788359bed18eb643e288ee1a0c92c24c0dc3e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3819644
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Derek Gonyeo <dgonyeo@google.com>
Cr-Commit-Position: refs/heads/main@{#82656}
2022-08-23 11:06:19 +00:00
Michael Lippautz
889e6bb61d [heap] Another round of Worklist simplifications
- Swap() was not necessary as all uses merely required Merge()
- Remove unused empty Local ctor
- Use refrence for backref as it's always supposed to be non-null

Bug: v8:13193
Change-Id: Ide0a0de15185a67d028890371ae30528fd55a058
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3846863
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82648}
2022-08-23 09:26:15 +00:00
Feng Yu
1617f24279 [test] Migrate cctest/test-run-deopt to unittests/
Bug: v8:12781
Change-Id: I649318b653d62ba484d6b2d96ee66e8fb30ad6b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829324
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82645}
2022-08-23 08:25:50 +00:00
Matthias Liedtke
3cc931543f [wasm-gc] Add Table<any|eq|data|array>
This change adds support for new table element types besides the
existing support for func and extern.
The newly supported types are the generic types of the 'any' subtype
hierarchy: any, eq, data and array.
All these table types are also usable and accessible via JavaScript,
causing implicit internalization and externalization of the elements
on Table::get() and Table::set().

Bug: v8:7748
Change-Id: Ie85d8f5e1d70471360dd2fb8a39cd38efaac2c22
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3838729
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82643}
2022-08-23 07:38:49 +00:00
wenqin.yang
c4a0e4a10f [Interpreter]Elide redundant load context bytecode
We found there are redundant load context operations in
some bytecode array.

like this:
LdaImmutableCurrentContextSlot [1]
Star0
......   (don’t edit accumulator)
LdaImmutableCurrentContextSlot [1]
Star1
Add r1

In that case, we could modify this bytecode array as:
LdaImmutableCurrentContextSlot [1]
Star0
......   (don’t edit accumulator)
Add r0

This CL will elide these redundant bytecodes
(LdaImmutableCurrentContextSlot and Star1), because there is no
side effect for loading context, and this context slot is immutable.

Change-Id: Ia26f4b934d3bd1d48c50c0c4699ba7942939991c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3816221
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82641}
2022-08-23 07:20:36 +00:00
Nico Hartmann
a3e6259309 Revert "[test] Migrate cctest/test-global-handles to unittests/"
This reverts commit 3615ae691d.

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

Original change's description:
> [test] Migrate cctest/test-global-handles to unittests/
>
> Bug: v8:12781
> Change-Id: If7681564f3e0c087e3347557a3f9169625b51607
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3817621
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82633}

Bug: v8:12781
Change-Id: Ia0e714028e1554b46421d455d86759b61883fd8f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3845712
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: 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@{#82638}
2022-08-23 07:17:28 +00:00
Michael Lippautz
41738ca95e [heap] Fix marking in per-context mode
Per-context mode marking segregates worklists per context. Upon doing
so, Worklist::Local's move ctor was invoked which cleared the back
pointer to worklist. This break switching to that context which
happens in rare secnarios.

Rework Local marking worklists avoiding the move ctor which is also
removed.

Bug: chromium:1355545
Change-Id: If0e8c7f08df564b2a1e27e4a3fc5a6a40e46ee46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3845630
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82636}
2022-08-22 19:18:38 +00:00
Feng Yu
3615ae691d [test] Migrate cctest/test-global-handles to unittests/
Bug: v8:12781
Change-Id: If7681564f3e0c087e3347557a3f9169625b51607
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3817621
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82633}
2022-08-22 18:45:58 +00:00
Feng Yu
4392e0a4ad [test] Migrate cctest/compiler/test-codegen to unittests/
This changeset include:
1. [prepare for migrate] move `cctest/compiler/value-helper.h`,
`cctest/compiler/c-signature.h`, and `cctest/compiler/call-tester.h` to
`test/common` directory because both `test-codegen` and a lot of cctest file
include it.
2. [prepare for migrate] separate the tester helper part of `test-codegen`
into a new `codegen-tester` file.
3. finally, migrate test-codegen.cc to `codegen-unittest.cc`

Bug: v8:12781
Change-Id: Ia2f52c1d3b6b62501066dc1c4308a2c09d699e92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3831146
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82630}
2022-08-22 17:28:27 +00:00
Feng Yu
b09b5f7867 [test] Migrate cctest/test-feedback-vector to unittests/
Bug: v8:12781
Change-Id: I3dfbc03dd2dd4ac32d16cf153146979a0b4bcf50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829504
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82628}
2022-08-22 16:36:28 +00:00
Omer Katz
2dee759ca1 Revert "Skip HeapTest.GrowAndShrinkNewSpace under tsan"
This reverts commit 9799768159.

Reason for revert: Races fixed. Skipping no longer needed.

Original change's description:
> Skip HeapTest.GrowAndShrinkNewSpace under tsan
>
> Bug: v8:13185
> Change-Id: I0c6e4ba8b325c3ac70dbceb927e2a8b1f9d68a16
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3830286
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Adam Klein <adamk@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#82449}

Bug: v8:13185
Change-Id: I4e1c117250932358dbd8d09ebe2cc2d331e7236f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3844530
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82618}
2022-08-22 10:48:34 +00:00
Omer Katz
ddfc587402 [heap] Use ManualGCScope in HeapTest.GrowAndShrinkNewSpace
Bug: v8:13185
Change-Id: Id145e76ad52469d9aa8a12c9172851b086421afd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3840217
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82608}
2022-08-22 08:03:27 +00:00
Feng Yu
698c7643a0 [test] Migrate cctest/test-macro-assembler-arm64 to unittests/
Bug: v8:12781
Change-Id: I0271c632a057ed457af5af59cb918d86472563d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3827131
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82606}
2022-08-21 15:07:24 +00:00
Shu-yu Guo
d4a8f1a478 Revert "[compiler] Make ReduceWord32EqualForConstantRhs work for Word64Equal"
This reverts commit abd0adf106.

Reason for revert: Test times out on Win64
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20msvc/23024/overview

Original change's description:
> [compiler] Make ReduceWord32EqualForConstantRhs work for Word64Equal
>
> Adds reduction case in MachineOperatorReducer for when the left-hand side of a
> Word64Equals is based on a 64-bit shift-and-mask operation, as is the case
> when Torque accesses 64-bit bitfields.
>
> This improves Speedometer2 by 0.15% on a Neoverse-N1 machine, with
> React-Redux being improved by 0.4%.
>
> Change-Id: Icd0451c00c1b25f7d370e81bddcfd668a5b2523c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3834027
> Commit-Queue: George Wort <george.wort@arm.com>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82593}

Change-Id: I26515348a3d8de58445ecddc0486d9fcc2711cec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3839048
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82603}
2022-08-19 19:44:13 +00:00
Shu-yu Guo
4266684c99 [shared-struct] Make publishing of shared objects safe
Currently there is nothing ensuring the internal VM state of shared
objects are in a coherent state and visible to other threads when the
shared object is published.

This CL adds a store-store memory barrier when returning from Factory methods that allocate shared JSObjects that are exposed to user JS code. For primitives, there is an additional store-store memory barrier in the shared value barrier.

Bug: v8:12547
Change-Id: I4833c7ebf02cc352da9b006d2732669d6d043172
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng,v8_linux64_tsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3819041
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82596}
2022-08-19 15:14:32 +00:00
George Wort
abd0adf106 [compiler] Make ReduceWord32EqualForConstantRhs work for Word64Equal
Adds reduction case in MachineOperatorReducer for when the left-hand side of a
Word64Equals is based on a 64-bit shift-and-mask operation, as is the case
when Torque accesses 64-bit bitfields.

This improves Speedometer2 by 0.15% on a Neoverse-N1 machine, with
React-Redux being improved by 0.4%.

Change-Id: Icd0451c00c1b25f7d370e81bddcfd668a5b2523c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3834027
Commit-Queue: George Wort <george.wort@arm.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82593}
2022-08-19 13:02:39 +00:00
Anton Bikineev
1d3a1c6f66 cppgc: Avoid fragmentation in NormalPageMemoryRegion
NormalPageMemoryRegion is a span of 10 pages, all of which must belong
to the same space. This requirement imposes a fragmentation issue for virtual space, which is not ideal for the current 2GB cage
configuration.

The CL fixes this by mixing pages of different spaces inside the same
NormalPageMemoryRegion. With cage it's actually not necessary anymore
to have NormalPageMemoryRegion, but we keep it to allow the code to be
uniform for cage/non-cage configurations.

There is no type confusion across spaces, since pages (even empty) are
never shared between spaces. In addition, the shared cage puts an
additional memory constraint on the GC. So, there is no security benefit
in having NormalPageMemoryRegion assigned to a single space.

Savings in reserved address space:
cnn:2021: 14%
facebook_infinite_scroll:2018: 23%

Bug: chromium:1325007, chromium:1352649
Change-Id: I7b49032d581dd56feb8633734a1f37803e9526c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3840749
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82584}
2022-08-19 09:13:27 +00:00
Michael Lippautz
0145c20325 [heap] Fix test that requires manual GC scheduling
Bug: v8:13141
Change-Id: I05e905a40a572c7f85f60629b2303cd73ae06a70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3838731
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82564}
2022-08-18 14:39:58 +00:00
Feng Yu
97669ca6a1 [test] Migrate cctest/test-assembler-x64 to unittests/
Bug: v8:12781
Change-Id: I1bf06cd74b82e98f44e00f8d6e9049d1b92c86cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3827121
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82563}
2022-08-18 12:41:11 +00:00
Michael Lippautz
3e825c77f9 [handles] Remove black allocation of traced nodes
Traced nodes were allocated black, even outside of GCs. Nodes would
always survive one GC, while the objects pointed to could die.

This CL removes black allocation and relies on proper write barriers
(that are anyways in place) to mark the nodes and their objects. This
also means that marked nodes should always point to live objects which
is now verified in the atomic pause.

Bug: v8:13141
Change-Id: Ie5cdc92d8fe5f57865d02b71d3fae9425ae532fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820070
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82559}
2022-08-18 11:43:06 +00:00
Dominik Inführ
dc5c3ee5dd [heap] Add IncrementalMarking::AdvanceForTesting bottleneck
Introducing IncrementalMarking::AdvanceForTesting as last bottleneck
for driving incremental marking in addition to AdvanceFromTask
and AdvanceOnAllocation.

Now that we have those 3 bottlenecks, Step() and AdvanceWithDeadline()
can become private methods in IncrementalMarking. We also don't need
the StepResult return value in Step() anymore, which allows us to
remove CombineStepResult.

Bug: v8:12775
Change-Id: I702714439ef7ea4b9abf2156387503d4d00a7a48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3823131
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82552}
2022-08-18 07:50:29 +00:00
Matthias Liedtke
772f6c8bcd Reland "[wasm-gc] Add extern.externalize"
This is a reland of commit ee89a26977

Original change's description:
> [wasm-gc] Add extern.externalize
>
> This adds `extern.externalize(ref null any): ref null extern` to wasm
> which packs wasm objects into JS objects if the js-interop flag is not set.
> This is the counterpart to extern.internalize introduced in
> 50ec8a11f2.
>
> Bug: v8:7748
> Change-Id: I67b8fe6d70b9f526ff6c43b0a4d7861c7ff5dad0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825879
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82492}

Bug: v8:7748
Change-Id: Ie13cfd6464006dcadc2a53f2dbf77f76ab185504
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829940
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82551}
2022-08-18 07:41:29 +00:00
Jakob Linke
07b0574a39 Revert "[test] Migrate cctest/test-inspector to unittests/"
This reverts commit 437b311a18.

Reason for revert: Causes issues for other CLs: https://ci.chromium.org/ui/p/v8/builders/try/v8_linux_chromium_gn_rel/76508/overview

Original change's description:
> [test] Migrate cctest/test-inspector to unittests/
>
> test-inspector.cc -> inspector-unittest.cc
>
> Bug: v8:12781
> Change-Id: I37d2bc2d023ffd91b94d5a09cdbfe4a6e22fecf1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813062
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82512}

Bug: v8:12781
Change-Id: I3355e5828814fdd489f7d31ecb694419b95f9c5b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829939
Reviewed-by: Liviu Rau <liviurau@google.com>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82516}
2022-08-17 09:15:38 +00:00
Michael Lippautz
a4840410e5 [heap] Invoke internal GC callbacks before Heap verification
- Move InnerPointerToCodeCache to using internal callbacks.
- Refactor internal and external callbacks to use a unified interface.

Bug: v8:13184
Change-Id: If0006d324b0433f5d6bbf00b6d0fc1a2589227bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3834583
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82515}
2022-08-17 09:00:28 +00:00
Feng Yu
437b311a18 [test] Migrate cctest/test-inspector to unittests/
test-inspector.cc -> inspector-unittest.cc

Bug: v8:12781
Change-Id: I37d2bc2d023ffd91b94d5a09cdbfe4a6e22fecf1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813062
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82512}
2022-08-17 05:52:18 +00:00