Previously, StoreStoreElimination handled allocations as
"can observe anything". This is pretty conservative and prohibits
elimination of repeated double stores to the same field.
With this CL allocations are changed to "observes initializing stores".
This way it is guaranteed that initializing stores to a freshly created
object are not eliminated before allocations (that can trigger GC), but
allows elimination of non-initializing, unobservable stores in the
presence of allocations.
Bug: v8:12200
Change-Id: I5ef1ca8892a84a3b332e081e2fa6285d0eba9d46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3211585
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77299}
This allocator was only required to ensure zero-initialization of pages
returned by the BoundedPageAllocator. With crrev/c/3208812, this is now
possible in a (hopefully) more efficient way by using the
kAllocatedPagesMustBeZeroInitialized PageInitializationMode.
Bug: chromium:1218005
Change-Id: I504248107a54c90285aa9a3a616b334aaa3fcb7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3211583
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77298}
On Windows pre 8.1, reserving a large virtual memory region for the cage
is too expensive as it (apparently) creates PTEs. As such, we can only
create a cage with the minimum size and without guard regions.
Bug: chromium:1218005
Change-Id: Ib19b9a08f8c965d9739c1d539a0153b32a290826
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3212507
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77296}
For debugging purposes, we print the validation error if the module
generated by WasmCompileFuzzer fails to validate.
Change-Id: I79d2827e489194d02150484ab5a196e979a302af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3211574
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77295}
x64 already had logic to enable a lower CPU extension if a higher
level one was supported. Add this to ia32. And also add SSSE3->SSE3
logic.
Drive-by cleanup to remove an extra CpuFeatureScope.
Bug: v8:11154
Change-Id: I12e3aa990cc07149da213911c624468a39f4e1a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3212811
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77291}
This is a reland of a1e6efd80c
Fix Android issue by checking the resources is not filtering out.
Original change's description:
> [intl] Fix consistency in Intl API
>
> Fix several edge cases consistency issues with ICU discovered by test262 test by
> using Intl Enumeration API
> 1. Work around ICU short coming of always fallback in currency display
> name so when the fallback is "none" in DisplayNames, the force fallback
> code will produce the correct undefined from the of(currency_code) method.
> 2. Always check numbering system is not algorithm based numbering system
> to fix DateTimeFormat/RelativeTimeFormat/NumberFormat
> resolvedOptions().numberingSystem when the reqested numberingSystem is one
> of the numbering systems that we filter out the resources and not supported.
> 3. Generalize the iso8601 bit solution in DateTimeFormat and rename it to
> alt_calendar bit to also fix DateTimeFormat resolvedOptions report
> calendar as "islamic" while requesting "islamic-rgsa".
> 4. Work around reporting inconsistency of currency code and display name
> in ICU.
>
> Bug: v8:12209
> Change-Id: Ibd349ee55426fad7d6f20a5e93fb35ff7438e111
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3153576
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77242}
Bug: v8:12209
Change-Id: I96e1ba33e97f6a4abbe20e23a8fdff6cdf8bc131
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3207380
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77290}
Add support for the i8 and i16 packed types.
Because i8 and i16 do not exist as value types
we need an i32 to instantiate a packed field.
Bug: v8:11954
Change-Id: Ib311fee537c4c9e4aed0ac366172b9b5fb1ee88e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3210267
Commit-Queue: Maria Tîmbur <mtimbur@google.com>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77288}
This patch adds infrastructure for collecting feedback about call_ref
call targets in Liftoff code, and using that feedback for turning
such calls into inlineable direct calls when building Turbofan graphs.
The feature is considered experimental quality and hence off by default,
--wasm-speculative-inlining turns it on.
Bug: v8:7748
Change-Id: I0d0d776f8a71c3dd2c9124d3731f3cb06d4f5821
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3205902
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77287}
Currently, when compiling with V8_VIRTUAL_MEMORY_CAGE enabled, the
behavior of the BoundedPageAllocator changes from simply making freed
pages inaccessible to decommitting them, which guarantees that they will
be zero-initialized after the next allocation. As this seems to cause
some performance regressions on Mac, this CL introduces a new enum that
specifies how the allocator should behave:
kAllocatedPagesMustBeZeroInitialized causes the pages to be decommitted
during FreePages() and ReleasePages() and thus guarantees
zero-initialization during AllocPages().
kAllocatedPagesCanBeUninitialized only causes the pages to be made
inaccessible, and so does not generally guarantee zero-initialization
for AllocPages().
Finally, this CL also removes some dead code in allocation.cc.
Bug: chromium:1257089
Change-Id: I53fa52c8913df869bee2b536efe252780d1ad893
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3208812
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77285}
Certain collators and subject strings may take this new fast
path without calling into the (slow) ICU comparison functions.
This CL can be roughly split into three topics:
1. The fast path check, precomputed and implemented as a whitelist
on the current locale string.
2. The actual fast path, which checks subject string eligibility
and performs L1 and L3 collation weight comparisons all in one pass.
3. Resuming from an aborted fast-path into the generic path.
A longer overview is available at
https://docs.google.com/document/d/1oyDwjYn2JyHsx2YnJJKhjX0WMNQXb8ao86-DRzqiYNg/edit?usp=sharing
JetStream2/cdjs scores improve by roughly 40%.
Bug: v8:12196
Change-Id: I5e1bbd731a36c361af9667f9104d6fa15c42e117
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149463
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77284}
So far the slot is set to 0; in an upcoming CL it will be
used for an actual feedback vector.
Bug: v8:7748
Change-Id: I79f7502757d2cd8b07ced7105bf7532f5bc9b4f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3205898
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77279}
In addition, trigger the observer only every ~256KiB to avoid
excessive incremental marking steps on fragemented heaps that have to
set up LABs repeatedly.
Bug: v8:12285
Change-Id: Id3d85d2c3f96d9d914c731f998df827898e1863d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3208810
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77278}
The current implementation of the default ArrayBufferAllocator for the
virtual memory cage is highly inefficient as it simply forwards all
requests to the cage's PageAllocator. With this CL, this allocator is
now only used when the heap sandbox is enabled, in which case
ArrayBuffer backing stores must be located inside the cage. In all other
cases, in particular when only the virtual memory cage is enabled, the
backing stores can be located outside the cage and so the malloc-based
ArrayBufferAllocator is used.
This change only affects configurations in which V8's default
ArrayBufferAllocator is used.
Bug: chromium:1218005
Change-Id: I39cb5de3034ccd4b6975dc5193d8c7309857433b
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3205018
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77276}
Rolling v8/build: ebad853..c40c33e
Rolling v8/buildtools/third_party/libc++abi/trunk: 9959b06..fdbb919
Rolling v8/buildtools/third_party/libunwind/trunk: a002c72..15999e7
Rolling v8/third_party/aemu-linux-x64: FAd7QuRV-mCjbKgg2SO4BBlRCvGIsI672THjo3tEIZAC..ekZcu3VD0XVbtKxyJwVgI96y6Sr0eYcdLkgCt6ejF0gC
Rolling v8/third_party/android_platform: 7a11b79..1a68ade
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c0b9d25..ee3f2f4
Rolling v8/third_party/depot_tools: 0e2fb33..281edf7
Rolling v8/third_party/googletest/src: 3b49be0..075810f
Rolling v8/third_party/icu: 3f44383..4df07a2
Rolling v8/third_party/zlib: dfa96e8..bffc82b
Rolling v8/tools/clang: c06edd1..8640ca8
Rolling v8/tools/luci-go: git_revision:a373a19da0fbbbe81b2b684e3797260294393e40..git_revision:293cb303c8d63cc435a32b2fd1e834db15bfc069
Rolling v8/tools/luci-go: git_revision:a373a19da0fbbbe81b2b684e3797260294393e40..git_revision:293cb303c8d63cc435a32b2fd1e834db15bfc069
Rolling v8/tools/luci-go: git_revision:a373a19da0fbbbe81b2b684e3797260294393e40..git_revision:293cb303c8d63cc435a32b2fd1e834db15bfc069
TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com
Change-Id: I99dbd70ee899e1d1c9fafcf72509f2f50b1ae8a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3210331
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@{#77275}
IsActive() is only supposed to be used in DCHECKs and supporting
this is going to get harder when introducing safepoints across multiple
isolates because there won't be this single counter anymore to check.
With AssertActive() we can just invoke AssertHold() on our mutex.
No functional changes.
Bug: v8:11708
Change-Id: Ic8d17738afdc90e92e6b54f615ec9757a826cc64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3207903
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77272}
... to support creation of fillers in external code space.
Bug: v8:11880
Change-Id: I47b352b8b44733c529b6b0cb2b39cf676ce83923
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3208813
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77271}
We are going to introduce safepoints across multiple isolates, with
this the name GlobalSafepoint might be misleading. Use IsolateSafepoint
as name to emphasise this class reaches a safepoint for a single
isolate only.
No functional changes.
Bug: v8:11708
Change-Id: I8254031dd0bc8e6dcf9f7353297803c37dba47ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3207901
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77268}
Marking the labels as unused is only needed when we abort code
generation. Otherwise the DCHECKs in the label destructors are useful to
catch bugs.
R=jgruber@chromium.org
Bug: v8:12244
Change-Id: I63198f98a7acd1f2528d31964c01bc6815ba99a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3205899
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77267}
Liftoff is temporarily disabled on PPC.
After https://crrev.com/c/3202593 the newly skipped tests
are failing with this error:
```
Check failed: tester.native_module()->GetCode(0)->is_liftoff()
```
Change-Id: I681a27930909fd6ac4e5087c2d03608b891a6066
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3208070
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77265}
Use a url-like source position format for emited defnition
locations. Hopefully this will make links clickable on codesearch.
Change-Id: I343c6bc3cc4f159d5e3974d7ec5af4a578aaf03a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3207887
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77261}
This is a reland of 16df1dfa13
No changes have been made to this reland as previous commit was reverted
due to a new test revealing an existing bug. This bug has now been fixed.
Original change's description:
> [arm64][wasm-simd] Use Cm(0) for integer comparison with 0
>
> Use an immediate zero operand for integer comparison when possible. This
> gives ~1% runtime performance improvement in some benchmarks on Neoverse
> N1.
>
> Change-Id: I727a8104f8e6ca3d122d6b5b8b3d38d7bdd76c47
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158327
> Reviewed-by: Zhi An Ng <zhin@chromium.org>
> Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
> Cr-Commit-Position: refs/heads/main@{#76847}
Change-Id: I77d6923d79407a83becbd39970c6a3f62d3a304d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3178482
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Rodolph Perfetta <rodolph.perfetta@arm.com>
Cr-Commit-Position: refs/heads/main@{#77260}
This method had been marked as deprecated over a year ago and since
then only `0` on every invocation, and it's not used in Chromium
anymore.
Fixed: chromium:1246908
Change-Id: Id92a48ac6e42608b1bc023187436f57939466b2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3208031
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77259}
_ReadWriteBarrier() is deprecated, and <atomic> has been available for
a while now.
Ports part of https://chromium-review.googlesource.com/c/chromium/src/+/2365092
to v8.
No behavior change.
Bug: chromium:1255114
Change-Id: I9954193a69dad9396a5e9e7450066382de2fb172
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3204827
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77258}
WebAssembly dynamic tiering should be tested with an origin trial. For
the origin trial the feature flag value has to be loaded from blink.
This CL stores the value of the --wasm-dynamic-tiering flag in the
compilation state, from where it gets passed forward to all uses of the
flag. The flag value gets loaded from blink when a new NativeModule is
created.
R=clemensb@chromium.org
Bug: v8:12281
Change-Id: Ia26355a665b7dfcdb47144863c1bec296774abb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3204963
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77256}
The expected assertion is specific to irregexp codegen.
Bug: chromium:1255368
Change-Id: I14d033285014727de2e63582ed798fc82570497d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3207892
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77254}
Replace 'virtual' by 'override' when overriding methods.
This uncovered one method which was unnecessarily virtual:
{RegExpMacroAssemblerARM64::CheckCharacters}.
R=jgruber@chromium.org
Bug: v8:12244
Change-Id: Ia4480b7b234d3d40cc5821c38ef83f74f8421b6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3204966
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77252}
With dynamic tiering, typically not all functions of a WebAssembly
module get compiled with TurboFan, and therefore the code caching would
never get triggered. With this CL code caching is triggered whenever
{FLAG_wasm_caching_threshold} bytes of TurboFan code are generated.
This new caching event is only triggered when --wasm-dynamic-tiering is
enabled.
R=clemensb@chromium.org
Bug: v8:12281
Change-Id: I939325aea7e4310aa76c936636799661c05d4079
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3202593
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77251}