Commit Graph

74977 Commits

Author SHA1 Message Date
Michael Lippautz
bd9ed6ce24 Reland "[heap] Refactor atomic marking phase"
This is a reland of commit 25e3225286

Original change's description:
> Reland "[heap] Refactor atomic marking phase"
>
> This is a reland of commit a3f66927f9
>
> The reland addresses a few CHECKs that were too agressive and also
> properly adjusts Oilpan's marking configurations depending on V8's
> flags.
>
> Original change's description:
> > [heap] Refactor atomic marking phase
> >
> > The atomic marking phase was organized in many distinct smaller
> > phases. In particular, before http://crrev.com/c/3584115 the marking
> > phase split into two large separate phases.
> >
> > This CL reorganizes marking into two phases that perform regular V8
> > heap marking, Oilpan, and ephemerons:
> > - A parallel phase that likely drains all marking worklists;
> > - A single-threaded final phase to catch any left overs;
> >
> > This avoids artificial splitting in phases and also avoids repeated
> > starting and joining of jobs.
> >
> > Change-Id: I5cccfc5777837d9ece10d8f4925781bf2d07d9da
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602507
> > Reviewed-by: Omer Katz <omerkatz@chromium.org>
> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#80265}
>
> Change-Id: I26648da361b92d787c173aa9d390100ce8958728
> Bug: chromium:1320896
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616519
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80301}

Bug: chromium:1320896
Change-Id: I7ebb3bde9f0d3497f46c728bfbc380c1bd4bc021
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641167
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80485}
2022-05-12 10:44:21 +00:00
Igor Sheludko
8437ed16e3 [runtime] Add interceptors side effects detector
This CL introduces SideEffectDetectorScope which requires explicit
allowlisting of cases when side effects are allowed after calling
interceptor callbacks.
Side effects are not allowed when the callback does not intercept
the request.
The side effects detector is not enabled yet, it will be enabled in
a follow-up CL.

Bug: chromium:1310062
Change-Id: I805764920ed016cb37390aef7bb02cbdf5f72846
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641172
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80484}
2022-05-12 10:33:10 +00:00
Liu Yu
ef77fe0f4e [loong64][mips][wasm-simd] Prototype Relaxed Rounding Q-format Multiplication
Port commit fe443a4e1f

Bug: v8:12284
Change-Id: I242c4161ecff09fd7bcfeda27560a6c881c87d09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641034
Auto-Submit: Yu Liu <liuyu@loongson.cn>
Commit-Queue: Yu Liu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80483}
2022-05-12 09:16:01 +00:00
Omer Katz
b415cd7c05 [heap] Extend and rename NewSpace base class
NewSpace is renamed to SemiSpaceNewSpace and NewSpaceBase is renamed to
NewSpace (the new PagedSpace new space implementation will be named
PagedNewSpace).

Most usecases are updated to use the base class rather than the concrete
semi space based implementation. To that end, the base class is extended
with additional virtual methods (for delegating to the concrete class).

This CL follows these guidelines:
(*) If at a method callsite we should know the exact new space
implementation we use, we cast to the concrete class. This is the case
for example for callsites in scavenger.*.
(*) If a method is called from outside the heap implementation or should
be present regardless of the concrete implementation, that method is
made virtual.
(*) Other cases are usually methods that are specific to a concrete
implementation but the concrete implementation is not known at the
callsite and there's no clear way to nicely abstract the method. In such
cases we cast to the concrete SemiSpaceNewSpace implementation for now
and we will revisit these cases once PagedNewSpace exists.

Bug: v8:12612
Change-Id: I7b85626774ce0d785b0257bf8d32b9f50eeaf292
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3625975
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80482}
2022-05-12 07:17:23 +00:00
v8-ci-autoroll-builder
a680570338 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: bc4639c..aecbdbf

fix some typos (#1393) (cui fliter)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/aecbdbf

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

Change-Id: Ib44a175614b0e3f2394c901b96e8d0b7fbaaa33c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641659
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@{#80481}
2022-05-12 06:02:30 +00:00
Deepti Gandluri
b49919516d Cleanup some leftover macros
Change-Id: I0efdbb9cdfef6c206201adf4d75a0c542979d2f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640267
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80480}
2022-05-11 22:46:10 +00:00
Milad Fa
f4674fbba3 PPC/s390: [wasm-simd] Prototype Relaxed Rounding Q-format Multiplication
Port fe443a4e1f

Original Commit Message:

    Prototype the instruction on the interpreter, and Arm64. Details of
    instruction lowerings on all relevant architectures can be found at:
    https://github.com/WebAssembly/relaxed-simd/issues/40

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

Change-Id: I5da65cb5f59db811d9d796918b8f5c8892e053fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642299
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80479}
2022-05-11 18:17:32 +00:00
Rob Paveza
081f7281e4 Add Bazel to SHA-256 hash feature
Bug: chromium:1322555
Change-Id: I2416150c19cd1b9dc062edd42806c1b10eead969
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3625836
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80478}
2022-05-11 17:55:12 +00:00
Clemens Backes
f215452211 [cleanup] Remove two unused TRACE_BS macros
BS for "backing store", obviously.

R=ahaas@chromium.org

Bug: v8:12425
Change-Id: I310ba8e34e8ca2c7b7bdeec5f1bc184330fbaf28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641175
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80477}
2022-05-11 17:03:23 +00:00
Marja Hölttä
0cdea40a1c [objects printing] Fix SFI printing
Change-Id: Iafca9e5ddf85bc528d4043863ec71ae1ce7020d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641168
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80476}
2022-05-11 16:12:42 +00:00
Deepti Gandluri
fe443a4e1f [wasm-simd] Prototype Relaxed Rounding Q-format Multiplication
Prototype the instruction on the interpreter, and Arm64. Details of
instruction lowerings on all relevant architectures can be found at:
https://github.com/WebAssembly/relaxed-simd/issues/40

Bug: v8:12284
Change-Id: Id4cb3889d94cf0bb7169ea068efe5ca68cfcbad9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3636365
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80475}
2022-05-11 16:10:32 +00:00
Marja Hölttä
94b4391dab [web snap] Support inheriting from builtins
Side product: enable null as __proto__.

Bug: v8:11525,v8:12820
Change-Id: I2b9508d0f3563d9000ddede24e7684aab18c2b5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637791
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80474}
2022-05-11 14:54:43 +00:00
Camillo Bruni
6b4a541cfd [tools][system-analyzer] Fix timeline scaling
- Make sure the viewport size of the svg is adjusted properly when
  scaling
- Fix an off-by-one when calculating Chunk groups

Bug: v8:10644
Change-Id: I56e857a8aa1a67e408bcfb08ed126e6bfdb0ce1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641177
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80473}
2022-05-11 14:40:42 +00:00
Seth Brenith
2507217839 Improve Script reuse in isolate compilation cache, part 1
Once the root SharedFunctionInfo for any Script gets its bytecode
flushed, the Isolate's compilation cache currently evicts that entry, to
reduce memory usage. However, the associated Script is likely still
alive, since scripts often declare functions which outlive the initial
evaluation of the script. If an identical script is loaded later, a
duplicate Script is created for it, which can waste memory.

In this change, I propose that the compilation cache keys can refer
weakly to the Script. When the root SharedFunctionInfo gets old, instead
of deleting the cache entry entirely, we can just drop the strong
reference to the SharedFunctionInfo. A subsequent lookup in the cache
will retrieve the Script instead of the root SharedFunctionInfo,
indicating an opportunity to save some memory by reusing the existing
Script.

Eventually, all callers to CompilationCache::LookupScript should reuse
the Script if possible. This change implements only the easy case of
reusing the Script for synchronous parsing. Follow-up changes will be
required for the TODO comments left by this change.

Bug: v8:12808
Change-Id: Ia8b0389441a682de9a43e73329049fd2e7835d3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3597106
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80472}
2022-05-11 14:27:43 +00:00
Jakob Kummerow
8fbefa4797 [wasm-gc] Experiment: ref.cast_nop_static
This adds a non-standard, unsafe instruction for performance
experiments: ref.cast_nop_static behaves like ref.cast_static
as far as static types are concerned, but emits no code.

Bug: v8:7748
Change-Id: Ic5797a941146a06d7c6ff249d8e29919145d8ea1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3639206
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80471}
2022-05-11 13:19:12 +00:00
Igor Sheludko
a62c040451 [rwx][mac] Fix component build
The issue is that a thread_local variable used in RwxMemoryWriteScope
can't be directly accessed from another component, so the workaround is
to avoid inlining accesses the variable into other components.

Bug: v8:12797, chromium:1324333
Change-Id: I0f83358ac0c663c92ef7b3dff54a068472d61aed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641169
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80470}
2022-05-11 12:33:52 +00:00
Pierre Langlois
e3addb6eaa [buildtools] Use arch-specific GN on linux.
CIPD provides both amd64 and arm64 binaries for GN, download the correct
one. This way we get the correct GN when checking out V8 on an AArch64
linux host.

Change-Id: I39c2d7a0062eb330bccac9bc71068bc02bf6958b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637798
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80469}
2022-05-11 12:24:52 +00:00
Michael Achenbach
40d2fab61c [foozzie] Disallow flags with too many known failures
This filters the flags --maglev and --no-use-map-space when passed to
foozzie. Most open bugs are known or spurious, but all take up the
limited hashes for correctness bugs, which prevents finding other
bugs. Filtering on the source-side will make those reports appear
as fixed.

Bug: chromium:1324097, chromium:1317880
Change-Id: Ibf1b04bdfdd2395c3bda5787b4843c6bb5ca8f8e
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641171
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80468}
2022-05-11 12:22:22 +00:00
Camillo Bruni
28b2ecfc42 [runtime][api] Be stricter about microtasks and termination exceptions
Bug: chromium:1319267
Change-Id: I7956b804246ee2c1fa170bf2eb8f3588b7488b42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3620285
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80467}
2022-05-11 09:24:52 +00:00
Nico Hartmann
2437a61bae [turbofan] Print graph after SimplifiedLowering retyping
Bug: v8:12619
Change-Id: Idcad21d03081e6f012656d36d99ce465158f84eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634958
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80466}
2022-05-11 09:04:32 +00:00
Patrick Thier
fe1361f392 Revert "[csa] Load hash in TryToName with Acquire semantics"
This reverts commit b086aa700c.

Reason for revert: Significant negative performance impact on Android.

Original change's description:
> [csa] Load hash in TryToName with Acquire semantics
>
> Add support to atomically load (untagged) values from objects to CSA.
>
> Bug: v8:12007
> Change-Id: If0c4f20f20e021ace3b1e3a874c0405574d313e1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627513
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80444}

Bug: v8:12007
Change-Id: Iee97d83725beb0671fd585a2955cf208975315e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641164
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80465}
2022-05-11 08:53:52 +00:00
Marja Hölttä
924a299e1a [maps] Add check for is_prototype_map being set correctly
Bug: v8:11525
Change-Id: I59fdb446d2b704ef386a8695ee3ddd1b1cdd1dac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635724
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80464}
2022-05-11 07:16:03 +00:00
Samuel Groß
70b83edfb6 [sandbox] Temporarily disable sandboxed pointers on ChromeOS
They are causing failures in the Linux ChromiumOS MSan bot.

Bug: chromium:1324301
Change-Id: I7a7bcd111a9f0e0e652d38e107027c51e51bd4bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3639205
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80463}
2022-05-11 07:03:36 +00:00
Simon Zünd
a5ab3507d6 [deoptimizer] Support 'restart frame' in the deoptimizer
Doc: https://bit.ly/revive-restart-frame

This CL implements support for the Debugger's "restart frame"
functionality in the deoptimizer. When the debugger wants to restart
a frame, we throw a termination exception.

If the restarted frame is an optimized frame or was inlined into
an optimized frame, the deoptimizer has to materialize all the
frames up to (and including) the frame we want to restart. This
is similar to materializing all the frames up until the frame
with a catch handler.

The main difference is that we do not jump into the middle of the
top-most materialized frame, but instead use the
RestartFrameTrampolone to immediatly exit, and then re-invoke the
top-most materialized frame.

R=jarin@chromium.org, tebbi@chromium.org

Bug: chromium:1303521
Change-Id: I74ee412bc67f027be81fe56e529b5e5161e97153
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616504
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80462}
2022-05-11 06:38:02 +00:00
v8-ci-autoroll-builder
cbc0e0a1d4 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 8d86026..bc4639c

Add installation and build instructions for Python bindings (#1392) (Nicholas Junge)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/bc4639c

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

Change-Id: I1ab826ee75b642f04c753dd43e5fe01e9821cc2d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640524
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@{#80461}
2022-05-11 06:04:22 +00:00
v8-ci-autoroll-builder
890e920576 Update V8 DEPS.
Rolling v8/build: 256e629..1c34f36

Rolling v8/buildtools/third_party/libc++abi/trunk: ac1834f..ecff200

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/406c287..d1ddc12

Rolling v8/third_party/depot_tools: 1bc3cd2..31bfd51

Rolling v8/third_party/fuchsia-sdk/sdk: version:8.20220509.2.1..version:8.20220510.2.1

Rolling v8/tools/clang: cd2b9e3..9da9510

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

Change-Id: Ide529df4fdc042606e784122148ad1593893b8f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640523
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@{#80460}
2022-05-11 03:55:14 +00:00
Michael Lippautz
cd04f804ae [handles] Fix benign data race
Upon destroying a v8::TracedReference while concurrent marking is
running, we merely reset the object pointer but do not get rid of the
global handle.

We were also restting the parameter which would read the internal
state for a DCHECK. Remove this clearing as the parameter field is not
used for v8::TracedReference.

Bug: chromium:1324074
Change-Id: Ic21bad78deba0925e12c3fc1215b087d0ef5dd7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637796
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80459}
2022-05-10 19:02:25 +00:00
Peter Kasting
02261c4b77 Types on both sides of comparison operators should be the same.
This prevents "ambiguous call" warnings when compiling in C++20 mode.

Bug: chromium:1284275
Change-Id: I52f782aaddfad1920e4b2df5e916b2c292cc7cff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630346
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80458}
2022-05-10 18:48:22 +00:00
Tobias Tebbi
8656d93718 [compiler] remove UnsafePointerAdd operator
UnsafePointerAdd is unnecessary as long as a proper bitcast is used
before the addition. The bitcast is already in the effect chain and
prevents the addition from floating before a GC operation.

Change-Id: Ieadb8a51d2d24eaa1132a62c77c674954f7e2644
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616727
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80457}
2022-05-10 18:14:35 +00:00
Michael Lippautz
09f39ae00d Inspector protocol: Add optional parameter to expose internals
Deprecate the existing parameter to treat global objects as roots as
this is implied by exposing internals.

Bug: chromium:1321620
Change-Id: I73a8124d63f87599dee7080980844c418eb3b5e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637797
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80456}
2022-05-10 16:43:25 +00:00
Shu-yu Guo
fa86b6d36e [private brand checks] Remove --harmony-private-brand-checks
Private brand checks have shipped since M91.

Bug: v8:11374
Change-Id: Ifd2f8e9904cdb25b45b2e4019da13b3cfc9efdc5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3622266
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80455}
2022-05-10 16:28:55 +00:00
Peter Kasting
34499e98fd Fix atomic initialization to work with C++20.
Bug: chromium:1284275
Change-Id: I727950c0bed499050ff550e90b9da07404057abe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630348
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80454}
2022-05-10 15:43:25 +00:00
Clemens Backes
e57f4bb3fc [API] Deprecate OOMErrorCallback
Deprecate the OOMErrorCallback such that we can add a new parameter for
OOM details.

R=mlippautz@chromium.org

Bug: chromium:1323177
Change-Id: I72c931ad0d1b75cda46e8815387098acbe091c68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3632106
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80453}
2022-05-10 15:36:15 +00:00
Nico Hartmann
338c12b3af [turbofan] Fix length accessor for RAB/GSAB in compiled code
Bug: v8:11111, chromium:1307340
Change-Id: I7c68d4985c080bf5c595a4ae3360fc924b1bdefb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627595
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80452}
2022-05-10 15:34:25 +00:00
Camillo Bruni
d3ccf6bc89 [tools] Use python3 by default for gm.py
Change-Id: I16a090fc9af5447c5d36e7bbd4bece1537724678
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637792
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80451}
2022-05-10 13:32:25 +00:00
Igor Sheludko
411a015758 Reland "[rwx][mac] Enable fast W^X on Apple Silicon (M1)"
This is a reland of commit e8cac3776e
Broken jitless mode is fixed in a separate CL.

Original change's description:
> [rwx][mac] Enable fast W^X on Apple Silicon (M1)
>
> Bug: v8:12797
> Change-Id: I53bb803dd77db5bdd42b1a1b4b568e63857adf31
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3598861
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80396}

Bug: v8:12797
Change-Id: I5436ceced5d4673f3b80d9cacdb3d6e84012c6e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635720
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80450}
2022-05-10 12:53:25 +00:00
jameslahm
abe1b97dd2 [web snapshot] Add support for sparse array
This CL adds the array type flag to distinguish between
sparse array and dense array and adds serialization
and deserialization for sparse array.

Bug: v8:11525
Change-Id: Ia302af017d6f52924256a2b3fa9e3d2b34caa442
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629739
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80449}
2022-05-10 12:40:58 +00:00
Igor Sheludko
1c94e7a94c [rwx][mac] Add missing CodePageHeaderModificationScopes
Bug: v8:12797
Change-Id: I93c786ac4b4a9b44d17f20e8d79544c4718d8fe6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637790
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80448}
2022-05-10 11:57:55 +00:00
Dominik Inführ
d5245542c9 [heap] Remove unused sweeping for iterability mechanism
Since we now promote all young objects into old space on full GCs, we
don't need to sweep pages for iterability anymore in new space.

Minor MC doesn't need to make a page iterable when promoting the full
page into the new space. This is because maps are not reclaimed during
a minor GC.

Bug: v8:12760
Change-Id: I16d666e417d00ebf450453864cbd87afd6606afc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635723
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80447}
2022-05-10 11:45:16 +00:00
Camillo Bruni
7e233997b0 [serializer] Disable gc-stats during deserialisation
Objects might be in a partially initialized state during deserialization
which makes collecting gc-stats tricky.

Bug: v8:12678
Change-Id: I154328adda432bf8e3588c96455c1bd8d527ef43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635722
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80446}
2022-05-10 11:37:45 +00:00
Marja Hölttä
395350c064 [web snap] Fix: allow empty objects to have non-trivial prototypes
Bug: v8:11525
Change-Id: I226ba870cee7df20a7960defb0c03607d64e27b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634962
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80445}
2022-05-10 10:29:16 +00:00
Patrick Thier
b086aa700c [csa] Load hash in TryToName with Acquire semantics
Add support to atomically load (untagged) values from objects to CSA.

Bug: v8:12007
Change-Id: If0c4f20f20e021ace3b1e3a874c0405574d313e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627513
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80444}
2022-05-10 10:08:25 +00:00
Simon Zünd
30a8616ab9 [unwinder] Support 'restart frame' in the unwinder
Doc: https://bit.ly/revive-restart-frame

This CL implements support for the Debugger's "restart frame"
functionality in the unwinder. When the debugger wants to restart
a frame, we throw a termination exception. The unwinder checks if we
are currently in "restart frame mode", and if so, drops execution
into a special builtin instead of trying to find a catch handler.

Optimized frames are handled similarly, but the deoptimizer has to
materialize the frames first before also dropping into the
special builtin.

Drive-by: Rename `ShouldRestartFrame` to `IsRestartFrameScheduled`, so
we can reuse the name `ShouldRestartFrame` as a query method to check
if a specific frame is the frame we want to restart.

R=jarin@chromium.org, tebbi@chromium.org

Bug: chromium:1303521
Change-Id: Iff4f5761f970b65e22485f78ee0fd85da620ce66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3613397
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80443}
2022-05-10 09:40:05 +00:00
Igor Sheludko
7beb93cdff [rwx][mac] Fix jitless mode
In some cases we were still trying to change permissions of RWX pages
which is not allowed.

Bug: v8:12797
Change-Id: I9f4ca319d842c524fc6f60bfd3bb3726f8d3029d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635719
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80442}
2022-05-10 09:00:23 +00:00
Samuel Groß
9a6a76bf13 Reland "Reland "[sandbox] Enable sandboxed pointers on Desktop""
This is a reland of commit 31d7838094

Issues related to GWP-ASan were fixed in https://crrev.com/c/3632490

Original change's description:
> Reland "[sandbox] Enable sandboxed pointers on Desktop"
>
> This is a reland of commit 48481a671a
>
> Original change's description:
> > [sandbox] Enable sandboxed pointers on Desktop
> >
> > Bug: chromium:1218005
> > Change-Id: I3df750ee9101779952d8b1ae630c4d3b7563084b
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3578645
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Samuel Groß <saelo@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#80376}
>
> Bug: chromium:1218005
> Change-Id: Iaf7bc81393da5c1381a361a9de129affaa019670
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629348
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Samuel Groß <saelo@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80394}

Bug: chromium:1218005
Change-Id: I98422c2577539e7025f3d6047855a63452ce3786
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3632306
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80441}
2022-05-10 08:18:26 +00:00
Michael Achenbach
7e9715d8a9 Revert "[maglev] Turn on fuzzing for --maglev"
This reverts commit b8b7a3a2f9.

Reason for revert:
https://crbug.com/1324097
https://crbug.com/v8/12859

Let's maybe only reland the clusterfuzz_trials part until the rest
is sorted out.

Original change's description:
> [maglev] Turn on fuzzing for --maglev
>
> Turn on fuzzing for Maglev to get additional test coverage.
>
> Bug: v8:7700
> Change-Id: I5b72d851639e31dff1bd91361cd81ad448c2d69e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629334
> Auto-Submit: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80416}

Bug: v8:7700, chromium:1324097, v8:12859
Change-Id: I926319988c3b9a2bc6dd083c69691a6536838782
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634963
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80440}
2022-05-10 08:01:14 +00:00
Camillo Bruni
57e0fa2efb [log] Increase CodeEventListener::NameBuffer size
URLs can be fairly long and the original 512 char limit is not enough
for many google pages.

Change-Id: Id4f81214e3fedebc80f26c49034c0997397e10fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634779
Reviewed-by: Marja Hölttä <marja@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80439}
2022-05-10 07:41:45 +00:00
Dominik Inführ
234c904d97 [heap] Do not zap freed memory in NotifyObjectSizeChange
Avoid zapping freed memory in NotifyObjectSizeChange. This fixes the
linked performance regression introduced with
https://crrrev.com/c/3607992. Beginning with that CL we would always
zap freed memory on the main thread, while previously we only did this
in CreateFillerForArray when the FixedArray could actually contain
references.

While we could restore the previous behaviour as well, we simply stop
zapping freed memory in NotifyObjectSizeChange altogether for better
throughput. The reason for zapping was to reduce floating garbage.
However this is only relevant for incremental marking which is only
enabled for about <1% of the overall runtime.

Bug: v8:12578, chromium:1322882
Change-Id: I004ee712b924c53edac87810504d04aa7f4a50d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634960
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80438}
2022-05-10 07:32:10 +00:00
Manos Koukoutos
eac584cda3 [wasm][refactor] Move WasmGraphAssembler to separate file
This way we can use it later in the pipeline for optimizations.

Change-Id: I0e97d061fd3d474ca7033ed2b68f43b52617d3e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634961
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80437}
2022-05-10 07:22:25 +00:00
v8-ci-autoroll-builder
253d03dcb3 Update ICU
Rolling v8/third_party/icu: 85814e1..585942f

Cherry-pick PR2084 fix C++20 enum issues (Frank Tang)
https://chromium.googlesource.com/chromium/deps/icu/+/585942f

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

Change-Id: I390adb38bca23243559916323c966b90b1995b29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634549
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@{#80436}
2022-05-10 05:56:25 +00:00