Commit Graph

77995 Commits

Author SHA1 Message Date
Samuel Groß
d7fcbba80e [sandbox] Increase ExternalPointerTable maximum capacity to 512MB
Bug: v8:10391
Change-Id: I383e11bdccf6fcaf13f29d25e1404545067d313e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891249
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83203}
2022-09-14 19:35:38 +00:00
Seth Brenith
3d59a3c2c1 Add option to report discarded allocations in sampling heap profiler
A couple of customers have asked about using devtools to get information
about temporary allocations, with the goal of reducing GC time and/or
peak memory usage. Currently, the sampling heap profiler reports only
objects which are still alive at the end of the profiling session. In
this change, I propose adding configuration options when starting the
sampling heap profiler so that it can optionally include information
about objects which were discarded by the GC before the end of the
profiling session. A user could run the sampling heap profiler in
several different modes depending on their goals:

1. To find memory leaks or determine which functions contribute most to
   steady-state memory consumption, the current default mode is best.
2. To find functions which cause large temporary memory spikes or large
   GC pauses, the user can request data about both live objects and
   those collected by major GC.
3. To tune for minimal GC activity in latency-sensitive applications
   like real-time audio processing, the user can request data about
   every allocation, including objects collected by major or minor GC.
4. I'm not sure why anybody would want data about objects collected by
   minor GC and not objects collected by major GC, but it's also a valid
   flags combination.

Change-Id: If55d5965a1de04fed3ae640a02ca369723f64fdf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868522
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#83202}
2022-09-14 17:39:12 +00:00
Samuel Groß
95216968f5 [sandbox] Update test/mkgrokdump/README
When regenerating v8heapconst.py, the v8 sandbox now has to be enabled
explicitly (using the v8_enabe_sandbox=true gn arg) as it is enabled by
default in Chromium builds, but not standalone v8 builds.

Bug: v8:13281
Change-Id: I1a0861b1d63f340465d7433e042b27eace706ca7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3895622
Commit-Queue: Adam Klein <adamk@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83201}
2022-09-14 17:09:49 +00:00
Milad Fa
429f959f3d PPC [liftoff]: Implement simd comparison ops
Change-Id: Id691009bddafdbb5a53c234fe00995b6e0733586
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893417
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83200}
2022-09-14 16:38:17 +00:00
Simon Zünd
35e58232e6 [inspector] Add use counter for async stack tagging API
We count the calls to `createTask` to track adoption.

Chromium CL: https://crrev.com/c/3894138

R=kimanh@chromium.org

Bug: chromium:1334585
Change-Id: I091f738e5b0dfdbb5843cda09eed7d3f906ea681
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892783
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83199}
2022-09-14 16:36:29 +00:00
Junliang Yan
0b455d082e s390x: fix JumpIfTagged on ptr-compr
JumpIfTagged access the stack for 4 byte compressed ptrs
so we need to add stack bias for that for big endian

Change-Id: Ifefa56018cf4ddccb337704775b38937e47ac3ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893419
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83198}
2022-09-14 15:32:20 +00:00
Leszek Swirski
273511200d [maglev] Only assign rax to exception accumulator if not dead
Check whether the exception phi for the accumulator (i.e. the exception
message object) is dead, and don't assign rax to it if yes. Note that
maglev node liveness can differ from bytecode liveness, since the
bytecode accumulator could have been considered "live" just because of a
move to a (dead) register.

Bug: v8:7700
Change-Id: If1384284f6f55a565e2ae94e5e7a32455fdedb93
Fixed: chromium:1359382
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892353
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83197}
2022-09-14 15:18:58 +00:00
Leszek Swirski
4fcd7307a5 [maglev] Fix OOB check for elements
Bug: v8:7700
Change-Id: I0eaf1ffaaa2d759226b675b367a58bc0ea9a5da2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3895813
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83196}
2022-09-14 15:02:48 +00:00
Leszek Swirski
f3a0e8bccf [runtime] Key template object cache on Script
Use Script as the key for the template object cache, instead of the
SharedFunctionInfo. This is because SharedFunctionInfos can be garbage
collected and then later recompiled, which would mean that we break the
spec's expectation that the template object stays constant.

Now the association of cached template object with SharedFunctionInfo is
via the function_literal_id of the SharedFunctionInfo, stored on the
CachedTemplateObject. These are linearly searched, similar to the linear
search over slot ids.

Bug: v8:13190
Change-Id: I3f67811c16ea4cd39c99b2fa034aa7e1f03c171e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892787
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83195}
2022-09-14 14:34:09 +00:00
Michael Achenbach
67cbe057da Revert "[heap] Add shared spaces for --shared-space"
This reverts commit 10756bea83.

Reason for revert: Test failures on GPU and other Chromium bots:
https://ci.chromium.org/ui/p/v8/builders/ci/Linux%20V8%20FYI%20Release%20(NVIDIA)/21271/overview
https://luci-milo.appspot.com/ui/inv/build-8803047917676096065/test-results?q=V8MemoryDumpProviderTest.DumpGlobalHandlesSize

Original change's description:
> [heap] Add shared spaces for --shared-space
>
> This CL adds shared spaces for regular and large objects in the shared
> space isolate. Spaces aren't used for allocation yet.
>
> Bug: v8:13267
> Change-Id: If508144530f4c9a1b3c0567570165955b64cc200
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876824
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83178}

Bug: v8:13267
Change-Id: Iefa01243ae8bebaba5cda8426a5aa0f4fd306bf3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892788
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#83194}
2022-09-14 14:04:58 +00:00
Samuel Groß
7e4ee6862e [sandbox] Introduce ExternalPointerTable::Freelist
This struct represents the freelist of an ExternalPointerTable and
contains both the size and the head of the freelist. It is encoded and
stored as a single Atomic64 field (freelist_) inside the
ExternalPointerTable class. This ensures that the freelist head and size
are always synchronized.

Previously, the freelist size was encoded in freelist entries in the top
bits. This only works as long as the maximum table size is relatively
small however, as it requires both the freelist size and the index of
the next entry on the list to fit into 24 bits. To allow for bigger
maximum table sizes in the future, this CL moves the freelist size
directly into the table as part of the freelist_ field.

Bug: v8:10391
Change-Id: Id09c9b28d09d79b704ac47e6566029cfb209ecd1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891256
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83193}
2022-09-14 13:57:23 +00:00
Michael Achenbach
b4cd59c383 Revert "[heap] Use std::unique_ptr for space_ array"
This reverts commit 6d342fa52c.

Reason for revert: Needed to land:
https://crrev.com/c/3892788

Original change's description:
> [heap] Use std::unique_ptr for space_ array
>
> Document ownership with using std::unique_ptr<Space> for the space_
> array.
>
> Bug: v8:13267
> Change-Id: I12861d97cd52d2a8cf9ceb43a2f90008be87b2a3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890913
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83187}

Bug: v8:13267
Change-Id: Ieeb29454e146ee763130c0031af3f7a48b4eec94
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3895811
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83192}
2022-09-14 13:52:18 +00:00
Omer Katz
7096496aca Revert "[heap] Remove MinorMC variant from bots"
This reverts commit 7c64e5b43b.

Reason for revert: MinorMC passes all CQ bots again (crrev.com/c/3872266)

Original change's description:
> [heap] Remove MinorMC variant from bots
>
> As part of revising MinorMC, it would soon be broken and bots should
> not be red because of it.
>
> Bug: v8:12612
> Change-Id: I0551d0a115ac2f4fa7fc32190458850f80b84cf5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810353
> Commit-Queue: Omer Katz <omerkatz@chromium.org>
> Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82197}

Bug: v8:12612
Change-Id: I4a08f79efc3b5fc133a0a920a11d2af559b5bf4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3885890
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83191}
2022-09-14 13:23:28 +00:00
Omer Katz
416d6308e0 [heap] Turn on fuzzing for MinorMC
Based on bots and local testing, MinorMC has reached a stable state in
terms of correctness.
Enable fuzzing with MinorMC to flush out additional issues.

Bug: v8:12612
Change-Id: I9cf8c5791d7256ff63c777b295863506436ee165
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3872265
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83190}
2022-09-14 13:19:38 +00:00
Jose Dapena Paz
cc37191809 IWYU: missing include for std::unique_lock in wasm module-compiler.cc
Fix build error:
    ../../v8/src/wasm/module-compiler.cc:147:10: error: ‘unique_lock’ is not a member of ‘std’
      147 |     std::unique_lock<std::shared_mutex> queues_guard{queues_mutex_};
          |          ^~~~~~~~~~~

Bug: chromium:957519
Change-Id: I0d14730d5b8dd76820fcc0a47d66ab0bd3e38f24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3880498
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83189}
2022-09-14 13:11:48 +00:00
Michael Achenbach
fa5a13be8e [test] Fix a rare numfuzz hang up
The numfuzz fuzzer.py has a loop to send a new test after receiving
a result. When all test processors go into stopped state, attempts
of sending new tests return False. That case wasn't handled here
and we kept looping forever.

Bug: v8:13113
Change-Id: Ief2686614d9703fb590400ac3e73b6ac9008c8f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891373
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83188}
2022-09-14 12:41:12 +00:00
Dominik Inführ
6d342fa52c [heap] Use std::unique_ptr for space_ array
Document ownership with using std::unique_ptr<Space> for the space_
array.

Bug: v8:13267
Change-Id: I12861d97cd52d2a8cf9ceb43a2f90008be87b2a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890913
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83187}
2022-09-14 12:13:28 +00:00
Omer Katz
8e4e35090b [heap] Fix tests for MinorMC
SimulateFullSpace starts with no LAB, iterates over pages and allocates
all free space on each page. After the first page, the LAB is empty but
is no longer null.

Bug: v8:12612
Change-Id: I2c00b9ba68fdd5f60eda086ea940cb6e211a986e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891294
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83186}
2022-09-14 11:42:38 +00:00
Tobias Tebbi
7fce6dec89 [turboshaft] performance tweak: source positions only if needed
Change-Id: I2a35ae0d07bcd5c570bcaae8ae6ef886a5b5e926
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3852484
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83185}
2022-09-14 11:32:17 +00:00
Thibaud Michaud
6b13d25897 [wasm] Fix inconsistent stack state
During a stack switch, the stack state is temporarily inconsistent when
the old stack is marked as "inactive" and the new stack is not yet
marked as "active".

Ensure that the WasmAllocateSuspender runtime function is not called in
an inconsistent state. It can trigger a GC, and we need a consistent
state to iterate the roots.

Wait until the end of the function to mark the current stack as
"inactive", so that it is still marked as "active" when it is
potentially visited.

R=clemensb@chromium.org

Bug: v8:13272
Change-Id: I65fe76c3d222d9fa47d17b66069443ceabba47ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890919
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83184}
2022-09-14 10:37:32 +00:00
Manos Koukoutos
f2b98fa8bb [wasm] Index wrappers by isorecursive canonical type
Before, import and export wrappers were cached based on their
signature. This change
- makes wrapper canonicalization consistent with that of types and
  call_indirect signatures under --wasm-type-canonicalization,
- removes the last uses of signature maps, which will enable us to
  remove them in a future CL.

Change-Id: I512bc234f0ae10e50bd94237e8e675ca47ed13c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891250
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83183}
2022-09-14 10:14:17 +00:00
Greg Thompson
74c2cec6ca [fuchsia] Include what you use fixes in test/unittests/BUILD.gn
Bug: chromium:1092804
Change-Id: I9f4385d00af464eb2b9251b7c1dcfe0d4b69cdf2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891279
Auto-Submit: Greg Thompson <grt@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83182}
2022-09-14 10:10:08 +00:00
Jakob Linke
33e90400d0 [maglev] Restore the correct context for exception handlers
Ignition remembers the correct context to restore when entering an
exception handler by moving the context to an interpreter register
when entering a try block, and restoring it from there when unwinding
the frame and entering the catch block.

Maglev code has to do the same by taking the context from the
appropriate register for the handler's frame state.

Bug: v8:7700
Change-Id: I294fcccc845c660b2289b6d7b40f49f1aa46283d
Fixed: chromium:1359928
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892352
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83181}
2022-09-14 10:02:58 +00:00
Marja Hölttä
c894fee0c7 [baseline] Use a more obvious error message when the accumulator is clobbered
This error type is very common and deserves its own error message
instead of the generic "Unexpected value" one.

Change-Id: I07a0de8b190db58e97fae98d0f7347872efd9995
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892694
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83180}
2022-09-14 09:55:38 +00:00
Leszek Swirski
c8a2d899e2 [maglev] Move compilation info out of graph processor
Move the CompilationInfo out of the GraphProcessor and into the
individual NodeProcessors, allowing them to hold it as a field rather
than getting it passed in via the various process methods. This will
allow us to write graph processors that don't have/need access to the
compilation info.

Bug: v8:7700
Change-Id: I8b91cbeaf632f05ae8bbbe8783e5a7381b5c8e53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892698
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83179}
2022-09-14 08:56:38 +00:00
Dominik Inführ
10756bea83 [heap] Add shared spaces for --shared-space
This CL adds shared spaces for regular and large objects in the shared
space isolate. Spaces aren't used for allocation yet.

Bug: v8:13267
Change-Id: If508144530f4c9a1b3c0567570165955b64cc200
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876824
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83178}
2022-09-14 08:10:39 +00:00
Michael Achenbach
ae2ef7d234 [test] Drain queues asynchroneously when terminating workers
Joining a queue-using process can deadlock if the child process is
about to write to the queue, but the parent process wants to join the
child. To fix this, we now drain elements from a separate thread of
the main process.

Bug: v8:13113
Change-Id: Ic279e66ab84eb89a4034ff1f2c025eb850b65013
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891116
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83177}
2022-09-14 05:58:47 +00:00
Liu Yu
2124146565 [loong64][mips64] Fix LoadSpillAddress on big endian
Besides, fix a wrong instruction in mips64.

Port commit ac0cedf161

Change-Id: I3c8c73eacc2aa1b5f4a583a0187261455917ad7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892526
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#83176}
2022-09-14 04:07:57 +00:00
v8-ci-autoroll-builder
b0bc960a0e Update V8 DEPS (trusted)
Rolling v8/build: 7fcb69a..4157fb6

Rolling v8/buildtools: 4276428..e713c13

Rolling v8/buildtools/third_party/libc++/trunk: 60f9078..c1e647c

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/4864449..37391a1

Rolling v8/third_party/depot_tools: 2d25dbd..9ebcfa6

Rolling v8/third_party/fuchsia-sdk/sdk: version:9.20220912.3.1..version:9.20220913.3.1

Rolling v8/third_party/zlib: 05e137d..f48cb14

Rolling v8/tools/clang: 2a5ebae..02a202a

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

Change-Id: I5cc2b3bdb94bd9786f11095169c3e193f8876ad9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893427
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@{#83175}
2022-09-14 03:59:27 +00:00
Fabrice de Gans
210563a16f [code-health] Fix syntax error in python file
Bug: v8:8594
Change-Id: I734a548b074567af3cad6359ef96640cbf0eb6f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892137
Commit-Queue: Fabrice de Gans <fdegans@chromium.org>
Auto-Submit: Fabrice de Gans <fdegans@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83174}
2022-09-13 21:58:37 +00:00
Thibaud Michaud
704c571d90 [wasm] Trap on invalid suspender object
Trap if the suspender argument provided to the JSPI import
wrapper is invalid.

For now, the suspender argument is expected to be the active
suspender. In the future, it will also be possible to suspend
to a parent of the current suspender. This will only be possible
once wasm-to-wasm suspending wrappers are supported, or if and
when JSPI suspenders become compatible with their core
stack-switching counterpart (e.g. Fibers in the fiber proposal).

R=jkummerow@chromium.org

Bug: v8:12191
Change-Id: I650454ed076bd251b0aa18656774d4c4b2d3bfdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892697
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83173}
2022-09-13 19:49:12 +00:00
Frank Tang
2847ad2e20 [Temporal] Sync to PR 2291
Remove RegulateISODate after BalanceISODate and inline one call to AddISODate
https://github.com/tc39/proposal-temporal/pull/2291/files

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal-addisodate
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.hoursinday

Bug: v8:11544
Change-Id: I4d5faaa48a26d37015c82bc06b3414698db9945d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893558
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83172}
2022-09-13 18:23:01 +00:00
Frank Tang
edb57e37ae [Temporal] Fix TimeZone get*Transition
1. Return null if the transition is out of bound.
2. Remove incorrect MAYBE_RETURN which is handled by the IsNothing check.


Bug: v8:11544
Change-Id: Ia54f68831120bd2460cb813464168b1a2c92da3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893595
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83171}
2022-09-13 18:21:57 +00:00
Andy Wingo
8366df73c3 [stringrefs] Fold wtf8 policy into instruction set
Instead of having e.g. `string.new_wtf8` that takes an immediate
specifying the particular UTF-8 flavor to parse, make one instruction
per flavor.

See https://github.com/WebAssembly/stringref/pull/46.

Bug: v8:12868
Change-Id: I2e9f2735c557b2352b6e75314037e473710d87a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892695
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#83170}
2022-09-13 15:32:27 +00:00
Teodor Dutu
6946d1dedb [csa] Enable allocation folding for builtins
This also allows allocation folding to be tested in cctests.

Bug: v8:13070
Change-Id: I7b6991461dd7ad4423539b33f59a05d6b247c3e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891257
Auto-Submit: Teo Dutu <teodutu@google.com>
Commit-Queue: Teo Dutu <teodutu@google.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83169}
2022-09-13 15:03:17 +00:00
Omer Katz
602e566e4c [heap] Minor fixes for MinorMC
1) Cast to PagedSpaceBase instead of PagedSpace in sweeper.cc
2) Free LAB before filling space in heap-utils.cc

Bug: v8:12612
Change-Id: I5820c2d2f4ab832a4b5a829fc55973d93296ec10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892690
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83168}
2022-09-13 14:56:57 +00:00
Shu-yu Guo
4084014d98 Skip shared object GetConstructorName test if cannot create shared heap
Bug: v8:12547
Change-Id: I89dbaea6b8559ada651b6ed986c842c1dc2b6df9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892129
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83167}
2022-09-13 13:51:08 +00:00
Leszek Swirski
d88d7aa70d [maglev] Weaken DCHECK on Double field load
Double-representation field loads were DCHECKing that the entry in the
descriptor array for a double-representation IC is also double
representation. With in-place map updates, however, the IC may be out of
date, so weaken this DCHECK to take into account in-place updates, and
rely on compilation dependency commit making this lookup safe.

Bug: v8:7700
Change-Id: Iff3c80d396274d14034e010dbe98f5640c9e4495
Fixed: chromium:1358872
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892692
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83166}
2022-09-13 13:12:57 +00:00
Leszek Swirski
6a69a24cb1 [maglev] Only support fully monomorphic GetKeyedProperty
ElementAccessFeedback transition groups can contain multiple maps in a
transition group if feedback is polymorphic on elements kind but not
otherwise the map kind. Maglev should treat this case as polymorphic.

Bug: v8:7700
Change-Id: I779299e4cf9d1c3a30e77f7a953d057ea5a69935
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3892691
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83165}
2022-09-13 12:39:37 +00:00
Jakob Linke
de18a05e7b [maglev] Keep receiver in a stack slot for OptimizedFrame::Summarize
For frame inspection (i.e. not deoptimization), no RegisterValues are
available to TranslatedState and thus any register-allocated value is
unavailable.

Stack trace collection require `function` and `receiver` values to be
available and thus stack-allocated. Both are immutable and have fixed
stack slots so this is not a problem; we just lost track of the receiver
inside Maglev when function parameters were wrapped inside exception Phi
nodes.

We solve this for now by special-casing the `receiver` to reuse the
InitialValue node instead of creating a new Phi.

Bug: v8:7700
Change-Id: I4f4de9a643b98e2fcbc7ee7a53688cc97a8d6f1d
Fixed: chromium:1359428
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893856
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83164}
2022-09-13 12:25:47 +00:00
Milad Fa
ac0cedf161 Fix LoadSpillAddress on big endian
BE machines use a 4 byte bias to spill/fill 32-bit values on
the stack. This is done so because TF always fills 64-bit values
even if the spilled value was 32-bits. To make sure this holds between
LO and TF we have added a 4 byte bias in this CL:
crrev.com/c/2756712

LoadSpillAddress needs to also take this into account and
add a bias if the spilled value was 4 bytes.

Change-Id: Ibd2b2071ce1fb11a9c5884611ae8edd1f17cb0c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891196
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83163}
2022-09-13 12:09:08 +00:00
Matthias Liedtke
b568d4dcd0 [wasm][test] Replace busy loops with explicit wasm tierup
Fixed: v8:12463

Change-Id: I7ca2d3db803ca6ac50c1340d747f98d03c3985a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890982
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83162}
2022-09-13 12:02:18 +00:00
Camillo
f650bdc95c [tools][profiling] Use absolute paths as command inputs
Drive-by-fixes:
- Auto-create the --perf-data-dir

Change-Id: I6801452f9c4c6b9069a29aa3ab1e25909adffb19
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893858
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83161}
2022-09-13 12:01:08 +00:00
Liu Yu
ef1b19d626 [loong64][mips64][wasm][liftoff] Fix and cleanup tracing of return value
Port commit 6f9e71fa74

Change-Id: I8aaf45c82b3787acd55de595cebe6b4b3c99efc2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893596
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#83160}
2022-09-13 11:59:47 +00:00
Matthias Liedtke
bdac0ff059 [turbofan] Avoid deopt loop for GetIterator of null / undefined
GetIterator on object o consists of two steps:
1) iter = load o[#Symbol.Iterator]
2) call iter

For null / undefined step (1) throws an exception, meaning
step (2) is never reached. Up to this change, turbofan
deopts if for either of the two steps there isn't enough
feedback, meaning that we have a deopt loop for null and
undefined.

Change-Id: Ie0eaf8e231a149313e10af9e95fd80bc77dc0beb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890980
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83159}
2022-09-13 11:17:07 +00:00
Omer Katz
e28c7178ee [heap] Fix FillCurrentPage for PagedNewSpace.
FillCurrentPage assumed that everything after top is empty, which
doesn't work with MinorMC and sweeping. Revise FillCurrentPage based
SimulateFullSpace for MinorMC.

I similar implementation is provided both in unittests and cctest.
Migrating affected cctest to unittests is left a future work.

Bug: v8:12612
Change-Id: Ie29be2fc7aaee25e1fd5f66b1c0959c2a45f007f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3885888
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83158}
2022-09-13 11:13:17 +00:00
Al Muthanna Athamina
e03af96c3d [infra] Remove old predictable Linux bots
Bug: v8:13052
Change-Id: Ida65f95547006e6fa2542362c59f20c60a63a9af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893852
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83157}
2022-09-13 10:39:37 +00:00
Leszek Swirski
3501fca7e5 Reland "[maglev] Optimize monomorphic keyed loads"
This is a reland of commit 133e7f8362

Reland: Rebase onto v8_multi_arch_build fix.

Original change's description:
> [maglev] Optimize monomorphic keyed loads
>
> Add a fast path for keyed loads that are:
>
>   1. Monomorphic,
>   2. Fast elements accesses,
>   3. Not out-of-bounds (deopt on OOB),
>   4. Not holey
>
> Bug: v8:7700
> Change-Id: I4d46f4d0ce7065c93a9b092833fb16a8c9e9f94e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3882974
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83149}

Bug: v8:7700
Change-Id: Ib48bdc8729757527c19d0b24864f8eab0570c3f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890920
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83156}
2022-09-13 10:12:56 +00:00
Samuel Groß
a9327e9394 [sandbox] Schedule GC when EPT utilization reaches certain thresholds
During ExternalPointerTable::Grow, if we cross one of a handful of
predefined utilization thresholds, we now request a (major) GC to free
up entries that are no longer used in the table.

Bug: v8:10391
Change-Id: Id2d262f0f1d4dc37aec1e4978a8be2d223fb2b2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890971
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83155}
2022-09-13 09:38:26 +00:00
Leszek Swirski
277d37e0af [build] Fix build flag deps with v8_multi_arch_build
v8_multi_arch_build toggles v8_enable_pointer_compression, but some
other flags are set depending on v8_enable_pointer_compression.
Previously the v8_multi_arch_build condition was resetting some of these
in its branch, but we can make this simpler by moving the pointer
compression toggle earlier, immediately after the default pointer
compression setting.

Change-Id: Ie5f4e73f947b693d4ba2abe4e1cf30009a2bbb2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890918
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83154}
2022-09-13 09:31:25 +00:00