Commit Graph

72341 Commits

Author SHA1 Message Date
Victor Gomes
553815a512 [heap] Remove code space depth check in CodePageCol**Scope
The check is a simple shortcut, but this is not safe in multithreading.

In a multi-threaded situation, if a CodePageCol**Scope is open while
a CodeSpaceMem**Scope is already opened, the result is a noop.
If the latter finishes first, then we would decrement a wrong
depth in ~CodePageCollectionMemoryModificationScope.

Bug: v8:12054
Change-Id: I7e1016628ffbd37b343ea130eb8d7d8e60abec98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275562
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77849}
2021-11-11 16:42:51 +00:00
Andreas Haas
f8afe9cf40 [wasm] Update spec tests
R=ecmziegler@chromium.org

Change-Id: Ia2502f8fec849b6622bf3cad9d65dae7bc0b83e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275567
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77848}
2021-11-11 16:24:33 +00:00
Camillo Bruni
7126db2f51 [api] Remove deprecated TraceObject::ArgValue::as_bool
Bug: v8:11165
Change-Id: Iff70b6fcf1a68f330750afb5fb94787673de3bbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275565
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77847}
2021-11-11 15:21:42 +00:00
Leszek Swirski
18b6362551 [interpreter] Fix block resurrection by LoopHeader
Loop headers in the interpreter would start a new basic block, which
among other things would reset the liveness of that block. This meant
that a loop created after dead code, without a check for whether the
code is currently dead or not, would "resurrect" that block's liveness,
making the inside of the loop live even though the loop itself is
unreachable.

This works fine, since the loop is still unreachable, but can breaks
DCHECKs in bytecode liveness analysis for cases where a register is
supposed to be initialised before the loop, in the dead code, and is
then used inside the loop, in the resurrected code.

Normally this wouldn't be a problem, since blocks are normally killed on
the statement level and we check for deadness during statement
iteration, but `foo() = x` introduces an expression-level block killer
(being re-written to `foo[throw ReferenceError] = x`) and we don't check
for deadness after assignment Lhs preparation.

This does mean that we have to fix the InterpreterJumps test, to not try
to jump into the middle of a loop (since this could revive the loop).
This can only happen when manually creating bytecode, bytecode generated
from JavaScript is always reducible.

Bug: chromium:1230597
Change-Id: I8403ccdeae7e5450adf629026e2ca8a134c81877
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275557
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77846}
2021-11-11 13:59:32 +00:00
Dominik Inführ
2f98fb28d6 Revert "[heap] Support multiple clients in shared GC"
This reverts commit 90a9d6cb13.

Reason for revert: Seems to make some test to fail flakily. Revert for now until this is fixed.

Original change's description:
> [heap] Support multiple clients in shared GC
>
> Add support for safepointing multiple isolates as described in the
> design doc (link is below). A safepoint across multiple isolates is
> considered a global safepoint to distinguish it from regular safepoints.
>
> The basic idea behind the implementation is that we reach a
> safepoint for each client. What's new is that now also main threads
> need to participate in the safepointing protocol and need to give up
> control in time. The slow paths of Park(), Unpark() and Safepoint() on
> the main thread need to be adjusted for this reason as well.
>
> This CL introduces GlobalSafepoint and GlobalSafepointScope to mirror
> IsolateSafepoint and IsolateSafepointScope.
>
> This CL adds the type IgnoreLocalGCRequests, it is used to prevent
> Park() and Unpark() from honoring the request from background threads
> to perform a local GC. This is used heap-internally to not have GCs
> (or even nested GCs) in certain locations. E.g. when initiating a
> safepoint to perform a GC we don't want a "recursive" GC to occur.
>
> Design doc: https://docs.google.com/document/d/1y6C9zAACEr0sBYMIYk3YpXosnkF3Ak4CEuWJu1-3zXs/edit?usp=sharing
>
> Bug: v8:11708
> Change-Id: I5aca8f5f24873279271a53be3bb093fc92a1a1eb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009224
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77812}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:11708
Change-Id: I85fbf896c59492fc571b3bfaa7f9e3ea8a883260
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275552
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77845}
2021-11-11 12:38:37 +00:00
Dominik Inführ
c26cdb40b2 [test] Skip test with FLAG_single_generation
Test needs young generation to work properly.

Bug: v8:12380
Change-Id: I5dca5bd6be10371ee9aabf263c4f8491917b9803
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275556
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77844}
2021-11-11 12:17:28 +00:00
Leszek Swirski
8d494873b9 Revert "[baseline] Enable concurrent sparkplug on future"
This reverts commit 0e4554b484.

Reason for revert: Breaks due to read-only flags https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug%20builder/3926/overview

Original change's description:
> [baseline] Enable concurrent sparkplug on future
>
> Bug: v8:12054
> Change-Id: I9d5040c806232ecbe71c26b7d65acbc8005bbd00
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3233139
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77842}

TBR=leszeks@chromium.org,v8-scoped@luci-project-accounts.iam.gserviceaccount.com,victorgomes@chromium.org

Change-Id: I25bbe7f38d87fcc13931782d26cd6b75bba50848
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:12054
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275555
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77843}
2021-11-11 11:04:49 +00:00
Victor Gomes
0e4554b484 [baseline] Enable concurrent sparkplug on future
Bug: v8:12054
Change-Id: I9d5040c806232ecbe71c26b7d65acbc8005bbd00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3233139
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77842}
2021-11-11 10:48:31 +00:00
Camillo Bruni
ba713b8e55 [torque] Emit full codesearch links for source positions
Change-Id: I80affc4c813dff2a42afcdcea60e3856eaf346aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272576
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77841}
2021-11-11 10:38:47 +00:00
Manos Koukoutos
77d9e997e6 [wasm-gc] Improve wasm escape analysis/allocation folding
Changes:
- Enable allocation folding for wasm-gc graphs.
- Improve structure of wasm escape analysis code. Kill dead nodes.
- Revisit object node after eliminating a load or a store to that node.
- Add a couple of tests, rename one test file.

Bug: v8:11510
Change-Id: I8b3c5186cd0a8827744a05eba366ff79bc7bc975
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3264215
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77840}
2021-11-11 10:27:50 +00:00
Michael Lippautz
bfea0fda88 cppgc: Fix hello world example
Properly scope unique_ptr for Heap.

Change-Id: I9ce65f326065333f2600e6057ae3015a41d4c39a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3273815
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77839}
2021-11-11 10:16:08 +00:00
Camillo Bruni
0d61714b64 [api][tracing] Add more startup traces
Change-Id: I7e07821ed56f2813ad90d21bd36382aa25351d21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3273813
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77838}
2021-11-11 10:03:28 +00:00
Igor Sheludko
4849014944 [ext-code-space] Fix external code range allocation logic
... by
1) using platform-specific kMaxPCRelativeCodeRangeInMB constant
   instead of fixed 2GB for computing a region around embedded builtins
   from which the builtins could be reachable by pc-relative call/jump
   instructions,
2) remapping builtins into the code range if the latter happened to be
   allocated too far from embedded builtins (so that the pc-relative
   calls/jumps can't reach the embedded builtins blob).

Bug: v8:11880
Change-Id: I3c8df6836a8f0156d5360edd9c4ae8c295ec7100
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270543
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77837}
2021-11-11 08:25:47 +00:00
Jakob Gruber
a327708028 [handles] Branch hints and force-inline in HandleScope
Force-inline the HandleScope constructor and destructor, and
add branch hints for two commonly-mispredicted branches. This
moves the overall JetStream2/cdjs score by roughly 4% on d8. I
suspect no change will be visible in chromium builds (with PGO).

Bug: v8:12196
Change-Id: I0fd7b67aa554876d2dad2d706b874df21dbb72e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270542
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77836}
2021-11-11 07:56:47 +00:00
Benedikt Meurer
e60dc99e7f [inspector] Cache StackFrames by script, line and column number.
This introduces a stack frame cache on the V8Debugger level, which
de-duplicates StackFrame instances based on their scriptId, line and
column number.

This greatly reduces the memory pressure when debugging huge Web
applications that have a lot of async activity (and potentially
have scripts with huge URLs). This is guided by the observation
that even in huge applications, there are only a very limited
number of call sites that initiate async activity and hence we
only have a limited number of distinct StackFrames to worry
about (despite having to maintain a large number of async stack
traces overall).

As a nice side effect, this CL also greatly reduces the negative
performance impact of collecting async stack traces in these
huge applications.

Generally speaking this is mostly duct tape however, and we might
want to follow up with changes to make capturing (and storing)
stack frames even cheaper.

Fixed: chromium:1268436
Change-Id: Ib212b3c97dce2bb7ca47d5875d45cf20b9b97afe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272577
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77835}
2021-11-11 07:34:27 +00:00
v8-ci-autoroll-builder
f9116dee54 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 431abd1..b3c08f6

check clang format on pull requests and merges (#1281) (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/b3c08f6

format tests with clang-format (#1282) (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/c07a498

clang-format Google on {src/,include/} (#1280) (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/fcef4fb

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

Change-Id: I32740a6899832fdfbb89b41e4b082eddb5c94063
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3273787
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#77834}
2021-11-11 05:48:27 +00:00
Liu Yu
9a900169f8 [loong64][mips64] Fix a Int64Mul error in instruction selection.
The second parameter of Int64Mul may be a 64-bit immediate value,
treating it as a 32-bit value will lose the upper 32 bits.
Besides, add a test for this error.

Bug: v8:12373
Change-Id: I92e95f7906051c91f9076730e5490b0956416d68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272195
Auto-Submit: Liu yu <liuyu@loongson.cn>
Commit-Queue: Liu yu <liuyu@loongson.cn>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77833}
2021-11-11 03:47:27 +00:00
v8-ci-autoroll-builder
27f0d28f65 Update V8 DEPS.
Rolling v8/build: 3a26983..2f14357

Rolling v8/third_party/aemu-linux-x64: f0uJsXEjFFbo2nVGo8XXghmC5jioFclKgH_jzEObMmYC..j1lOwTKOsgGUj2jDFDa6IhTVhwEoPPzmdxFksCvz278C

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5c5e5a1..0dab16a

Rolling v8/third_party/depot_tools: ea9285c..2df8443

Rolling v8/third_party/googletest/src: aa486f1..79efd96

Rolling v8/third_party/instrumented_libraries: 8bed2fb..286f857

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

Change-Id: Idc46d13ab8010d5d1f86d03bdcf3eb24c6595bc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3273786
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#77832}
2021-11-11 03:44:47 +00:00
Shu-yu Guo
821c2c17d2 [string] Add a is_shared bit to strings and String::Share
The is_shared bit bumps the number of reserved bits for Strings'
InstanceType from 6 to 7. This has the side effect of shuffling the
InstanceType enum values.

There are no users of this bit yet. This is steps 1-2 from the following
design doc [1], in preparation for sharing internalized and
in-place-internalizable strings.

[1] https://docs.google.com/document/d/1c5i8f2EfKIQygGZ23hNiGxouvRISjUMnJjNsOodj6z0/edit?usp=sharing

Bug: v8:12007
Change-Id: Idf11a6035305f0375b4f824ffd32a64f6b5b043b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3266017
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77831}
2021-11-10 23:55:47 +00:00
Vasili Skurydzin
2b01c8286b ppc: Don't emit unsupported isns on Power8 arch
Don't emit modsd, modud, modsw, moduw if Power proc. version is less
than 9.

Change-Id: I20a33930c5887921cf1943558b3ab6ac8d8a53ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3271636
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/main@{#77830}
2021-11-10 20:09:08 +00:00
Al Muthanna Athamina
d50443b19c [infra] Clean up mb_config after splitting the rest of the ports console builders
Bug: chromium:1136844
Change-Id: I1c9be9ff38114f548b5f40462d96968dbf1565ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272580
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77829}
2021-11-10 19:43:07 +00:00
Ng Zhi An
d913f5a1e5 [compiler] Fix -Wshadow warnings
Bug: v8:12244,v8:12245
Change-Id: I678296c3ebf5d78dac7697a25b27c583406e02cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3269179
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77828}
2021-11-10 17:54:45 +00:00
Victor Gomes
8a6b7d8bd2 [heap] Support mprotect off thread
While compiling concurrently, we change the permissions of the page
containing the new code object to RWX, so the main thread can continue
executing a potential code in the same page.

If no thread is compiling the new code, we change the permissions
of all pages affected back to RX.

We also initialises code object page to immediately RWX by default.
Otherwise, a new code could be allocated in the same page, it will call
UnprotectAndRegister, and since write_unprotect_counter_ is now at
least 2, the code ignores the permission change. We then sigfault
when trying to run the new code.

Change-Id: Id18bcb9a44843b4ff747b1e4ac91913e80b74d80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3257606
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77827}
2021-11-10 17:52:37 +00:00
Junliang Yan
cb4e08c301 s390x: [baseline] port Generate_BaselineOnStackReplacement
Change-Id: Id60f3552af2ba12a8ac8fd88ad43a88a9076774d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272582
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77826}
2021-11-10 17:51:35 +00:00
Junliang Yan
98502536af s390x: [baseline] implement Generate_BaselineOrInterpreterEntry
Change-Id: I48384ff3282e32108cc439bdb56097ca59bedefb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270002
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77825}
2021-11-10 16:57:35 +00:00
Scott Violet
581355befe Adds counter for snapshot decompress time when creating context
BUG=chromium:1257321
TEST=none

Change-Id: I59f34e8b41ba08f5046754c13be8f1df6a335655
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3271389
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77824}
2021-11-10 16:01:25 +00:00
Vasili Skurydzin
937d44e9ec ppc: Don't emit cnttzd, cnttzw if Power proc. version is less than 9
Change-Id: Ic868b6f9bb17bb9d6e6fe2a7203a41383aef5cf7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272206
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/main@{#77823}
2021-11-10 15:41:24 +00:00
v8-ci-autoroll-builder
fe0ec12ab8 Update V8 DEPS.
Rolling v8/build: 6d2bdd8..3a26983

Rolling v8/buildtools/third_party/libc++abi/trunk: ee43952..707d75f

Rolling v8/third_party/aemu-linux-x64: v2iF9qvnOnVHoqJpdbZJYOqXwQzHFLq1S6pnFoNhtEgC..f0uJsXEjFFbo2nVGo8XXghmC5jioFclKgH_jzEObMmYC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c9cf63a..5c5e5a1

Rolling v8/third_party/depot_tools: 1b2f8f0..ea9285c

Rolling v8/third_party/instrumented_libraries: 565ca2d..8bed2fb

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

Change-Id: I52def08a4fc2d0839a80313b1930ea4197dc9d6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3271747
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#77822}
2021-11-10 15:25:04 +00:00
Liviu Rau
dd68aab479 DEPS: remove isolated client
Bug: chromium:1268452
Change-Id: Idbddd1a2079cfa1e38ce5209799bfb656e5b7911
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270544
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77821}
2021-11-10 14:30:46 +00:00
Igor Sheludko
ba80e8c676 [sparkplug] Make --short-builtin-calls flag modifiable
The feature is controlled by a boolean flag on Isolate, so there's no
need to keep the flag read-only.

Bug: v8:11527, chromium:1241665
Change-Id: I377452fed10b319a4a512c090706c754603c2ae8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270547
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77820}
2021-11-10 14:06:15 +00:00
Victor Gomes
771f3dab54 [heap] Don't create a filler object when setting up a LAB
The LocalAllocationBuffer (LAB) doesn't need to be iterable, when the
heap needs to be iterable we have explicit calls to `MakeIterable()`
anyways for the LABs.

Also creating that filler object initially isn't enough, we would need
to do this after each and every allocated object.

Change-Id: Iedb011205d7590a75ea17d518e78e340f1d4b63d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270546
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77819}
2021-11-10 13:02:34 +00:00
Leszek Swirski
7e39467c51 Revert "[SharedFunctionInfo] Add available_baseline_code flag"
This reverts commit 5e16d853d9.

Reason for revert: TSAN https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20no-concurrent-marking/6432/overview

Original change's description:
> [SharedFunctionInfo] Add available_baseline_code flag
>
> Checks that flags1 are ReadOnly after SFI is finalised.
>
> Bug: v8:12054
> Change-Id: Ia2518b8f136a81aa076fd429bf4fcaf742a314e3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3263897
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77816}

TBR=leszeks@chromium.org,v8-scoped@luci-project-accounts.iam.gserviceaccount.com,victorgomes@chromium.org,nicohartmann@chromium.org

Change-Id: Ifb28601a6f6dbe24b38e2e9ea2a5a7e576c0c511
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:12054
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270545
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77818}
2021-11-10 12:14:15 +00:00
Camillo Bruni
875675846f [runtime][json] Add IncrementalStringBuilder::AppendCStringLiteral
Directly memcpy char* literals if they fit in the current pending
part. This avoids incremental checks for the current part size.

This will improve JSON.stringify for objects with lots of
true, false, null values by roughly 10%;

Drive-by-fix:
- Improve JSON.stringify for empty [] and {}
- Add IncrementalStringBuilder::NoExtend DECHECKs

Bug: v8:12195
Change-Id: I81ebc9e088cf983adbcfb2d768137e4a3cef9a7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3260524
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77817}
2021-11-10 11:58:54 +00:00
Victor Gomes
5e16d853d9 [SharedFunctionInfo] Add available_baseline_code flag
Checks that flags1 are ReadOnly after SFI is finalised.

Bug: v8:12054
Change-Id: Ia2518b8f136a81aa076fd429bf4fcaf742a314e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3263897
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77816}
2021-11-10 11:17:35 +00:00
v8-ci-autoroll-builder
604ebab1b5 Update V8 DEPS.
Rolling v8/build: 0a9d641..6d2bdd8

Rolling v8/buildtools: 80e4f83..b138e6c

Rolling v8/buildtools/third_party/libc++abi/trunk: bc060a2..ee43952

Rolling v8/third_party/aemu-linux-x64: JOROMO2u_x7WbmPlWROhQxdCaIY-Q639bZpu8IWRc30C..v2iF9qvnOnVHoqJpdbZJYOqXwQzHFLq1S6pnFoNhtEgC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/462705b..c9cf63a

Rolling v8/third_party/depot_tools: 266129c..1b2f8f0

Rolling v8/third_party/googletest/src: bf0701d..aa486f1

Rolling v8/third_party/instrumented_libraries: fe0d17a..565ca2d

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

Change-Id: Ie3bd2ad8e1c7b6bb5e5766640e8ba1a873f426df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3271738
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77815}
2021-11-10 11:04:26 +00:00
Dominik Inführ
a760f03a6e Remove all leftovers of store buffer
V8's write barrier doesn't use a store buffer anymore but inserts
directly into the remembered set. However, there were still some
comments/method definitions left.

Bug: v8:9454
Change-Id: Ic3bc3394750f1d4989027e07dbc9201c3f484ccd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270536
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77814}
2021-11-10 09:29:41 +00:00
Michael Lippautz
c88140fed6 heap: Rename compaction flags
Rename flags to align them with other flags that are named in an
enabled way and drop the "never" prefix.

Drive-by: Refactor compaction entry point.

Bug: v8:12251
Change-Id: If2b189152f3cd22038b87fe3cc2ba0db4953ae23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270534
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77813}
2021-11-10 09:01:59 +00:00
Dominik Inführ
90a9d6cb13 [heap] Support multiple clients in shared GC
Add support for safepointing multiple isolates as described in the
design doc (link is below). A safepoint across multiple isolates is
considered a global safepoint to distinguish it from regular safepoints.

The basic idea behind the implementation is that we reach a
safepoint for each client. What's new is that now also main threads
need to participate in the safepointing protocol and need to give up
control in time. The slow paths of Park(), Unpark() and Safepoint() on
the main thread need to be adjusted for this reason as well.

This CL introduces GlobalSafepoint and GlobalSafepointScope to mirror
IsolateSafepoint and IsolateSafepointScope.

This CL adds the type IgnoreLocalGCRequests, it is used to prevent
Park() and Unpark() from honoring the request from background threads
to perform a local GC. This is used heap-internally to not have GCs
(or even nested GCs) in certain locations. E.g. when initiating a
safepoint to perform a GC we don't want a "recursive" GC to occur.

Design doc: https://docs.google.com/document/d/1y6C9zAACEr0sBYMIYk3YpXosnkF3Ak4CEuWJu1-3zXs/edit?usp=sharing

Bug: v8:11708
Change-Id: I5aca8f5f24873279271a53be3bb093fc92a1a1eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009224
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77812}
2021-11-10 08:40:09 +00:00
Jakob Gruber
b8f002ce5a [intl] Extend the localeCompare locale whitelist
.. for convenience in local testing.

Bug: v8:12196
Change-Id: I12d772edee69acba45f71dc1960f3023a79798a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268739
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77811}
2021-11-10 08:18:53 +00:00
Manos Koukoutos
7b68ff6261 [wasm] Grow indirect function tables exponentially
Growing them linearly might result in quadratic allocation and gc time.

Bug: chromium:1267973
Change-Id: I8b9d400d9949b4062dd860edec6d98aa25c9550f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268731
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77810}
2021-11-10 06:23:32 +00:00
Ng Zhi An
ae9d1565a7 [wasm-relaxed-simd][ia32] Prototype i8x16 relaxed swizzle
ia32 port of 9ffb482926

Bug: v8:12284
Change-Id: Id396ee6d169c893804297934df63120704cef745
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3255663
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77809}
2021-11-10 00:48:17 +00:00
Ng Zhi An
3288fb6368 [ia32] Fix some instruction code names
F64x2ExtractLane and F64x2ReplaceLane were missing the IA32 prefix that
is used by all the other instruction codes.

Bug: v8:12244
Change-Id: Ib99cd9b62161a13305ad01d6e7e0aa82046dd25a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3255662
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77808}
2021-11-10 00:27:41 +00:00
Ng Zhi An
4f1dbc7208 [wasm-relaxed-simd][ia32] Prototype relaxed int-float trunc
4 instructions, int32x4.trunc_f32x4_{s,u},
int32x4.trunc_f64x2_{s,u}_zero.

ia32 port of a7b208739d2dabe11ca4e792085aed3455e879d5.

Bug: v8:12284
Change-Id: Ia94ff572b63f9fd8e3bfe2dd8e5fa41212f84a76
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3255661
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77807}
2021-11-10 00:05:39 +00:00
Dominik Inführ
ef1640b8b1 [heap] Remove flag always_promote_young_mc
This flag is now enabled by default for quite some time in production.
In addition that flag was already defined readonly and couldn't be
disabled, so let's remove this flag for good.

Bug: v8:10064
Change-Id: I0e71eee9d25960a96324d56c8f0191fe678dc6e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268907
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77806}
2021-11-09 19:37:39 +00:00
Seth Brenith
6366f3347b Fix leaks due to deoptimization literals
The GC already treats some embedded object pointers in Code as weak,
based on Code::IsWeakObject. If one of those embedded objects ends up
unmarked during a full mark-collect GC, then the Code is marked for lazy
deoptimization and the embedded objects are cleared. However, many of
those same objects are often held strongly by the deoptimization literal
array for the Code, which causes memory leaks. This change updates the
deoptimization literals array to store those objects weakly. Any Code
currently executing on the stack might need those deoptimization
literals in order to deoptimize, so the deoptimization literal array is
marked strongly in that case.

Design document:
https://docs.google.com/document/d/1gFRBYCeqz9Mysx8CVYQkldBbk3AZLo8UX0DMLZV_7qw/edit?usp=sharing

Bug: v8:4578
Change-Id: I02e86683c59371e9f88ecf523750c9c6afebdb39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3160299
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#77805}
2021-11-09 19:02:59 +00:00
Ng Zhi An
9ab034ec5b [objects] Fix -Wshadow warnings
Bug: v8:12244,v8:12245
Change-Id: I1ec0d96b645afa9bbda670918ce57be3698f50ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3265684
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77804}
2021-11-09 17:58:38 +00:00
Ng Zhi An
1d7ba96e83 [compiler] Fix -Wshadow warnings
Bug: v8:12244,v8:12245
Change-Id: I7f5067c9a329ac27bb4ec72d97a7509028ae648a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3269176
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77803}
2021-11-09 17:15:49 +00:00
v8-ci-autoroll-builder
1b439747c8 Update V8 DEPS.
Rolling v8/build: f7f53e9..0a9d641

Rolling v8/buildtools/third_party/libc++abi/trunk: 4c6e099..bc060a2

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e5067b0..462705b

Rolling v8/third_party/depot_tools: 6500963..266129c

Rolling v8/third_party/instrumented_libraries: a736941..fe0d17a

Rolling v8/tools/clang: af96b7b..92efe5e

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

Change-Id: I4a5d7a8bc8725b4eab5ca35837c1c702e6cd76d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3269624
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77802}
2021-11-09 17:11:13 +00:00
Ng Zhi An
1a40039330 [compiler] Fix -Wshadow warnings in js-call-reducer
Bug: v8:12244,v8:12245
Change-Id: I794fff2dee42d16c5e75457cc905fd5ac68919cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3269173
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77801}
2021-11-09 17:10:06 +00:00
Ng Zhi An
d085534fb7 [compiler] Fix -Wshadow warnings in js-inlining
Bug: v8:12244,v8:12245
Change-Id: I2aaa01215276cbfdf269b2e60dc2482d0aebc0dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3269174
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77800}
2021-11-09 17:09:04 +00:00