Commit Graph

70933 Commits

Author SHA1 Message Date
Ng Zhi An
360fdbdee5 [wasm-simd] Reduce number of cases tested by ShiftAdd
ShiftAdd tests lane_size * len(test_arr)^2, which is a lot of cases. In
local runs of test-run-wasm-simd, I see I32x4ShiftAdd show up
consistently as taking up a lot of time. We reduce the number of cases
tested to lane_size * len(test_arr), which stills give us very good
coverage.

Change-Id: Ida99a378f0dd9b513e8c84a2da3beebf65f0f356
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3105374
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76441}
2021-08-23 22:09:18 +00:00
Junliang Yan
3927fefe46 ppc: [liftoff] implement CallC function
Change-Id: I3a8bdf607ddad2d1a64ea634615105c48116701c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114847
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76440}
2021-08-23 19:39:10 +00:00
Junliang Yan
e4ab421770 ppc: [liftoff] implement De/AllocateStackSlot
Change-Id: Iec0fdde1086b148f4be59815c48262333fd4a5dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114848
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76439}
2021-08-23 19:26:09 +00:00
Corentin Pescheloche
731fd3f581 [cpu-profiler] Add method to estimate mem size of ProfilerCodeObserver
This patchset introduces instrumentation of the memory usage of the
datatructures maintained by the CPU profiler.
It captures:
* The total size of the strings held in StringsStorage for CodeEntries
* Estimated size held by CodeMap's entries.

The target is to surface that metric through telemetry to get better
visibility into the memory profile of CpuProfiler.

For now, STL containers overhead is ignored as it is implementation
specific.

Change-Id: I8c6a0cd4f14348fe8832dec1f24861befc67d700
Bug: chromium:1241491
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101580
Auto-Submit: Corentin Pescheloche <cpescheloche@fb.com>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76438}
2021-08-23 19:07:15 +00:00
Milad Fa
7c25cfcf72 PPC/S390: Fix load ops in the instruction selector
This is addition to https://crrev.com/c/3108289 to
fix load ops for atomic and regular ops.

Change-Id: I1107e0571eb40d858562b12646308b9fe46cc88d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114025
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76437}
2021-08-23 18:08:58 +00:00
Junliang Yan
1b02d21a63 ppc: [liftoff] implement RecordSpillsInSafepoint
Change-Id: I6c87c974b75b8d13e546a19a5c204362ca8536ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114026
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76436}
2021-08-23 16:30:35 +00:00
Victor Gomes
de32a0dc24 [bazel] Adds caged-heap.h
No-Try: true
Change-Id: Ibce0c1bf256102ffa71845faf563dc75057b7813
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110612
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76435}
2021-08-23 16:13:24 +00:00
Ilja Iskovs
584b3d0fc7 [arm64] Merge some WASM SIMD opcodes using LaneSizeField
We are running out of encoding space for opcodes on arm64. This patch
merges some wasm simd opcodes of different simd types, encoding the lane
size in the instruction code using LaneSizeField instead. This reduces
the total number of opcodes on arm64 by 71.

Bug: v8:12093
Change-Id: Ib4d96d1db1ff9b08fafd665974f3494a507da770
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3109676
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/main@{#76434}
2021-08-23 16:05:25 +00:00
Junliang Yan
34687291c6 ppc: [liftoff] Push the instance as part of frame construction
Port 593fbb69c4

Change-Id: If97973df5f30af47894e0ba7924cc1c23a5c979a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3111298
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76433}
2021-08-23 15:01:55 +00:00
Benedikt Meurer
af03c93bda [inspector] Treat rejected promises like exceptions for eager eval.
When eagerly evaluating native accessors in the inspector, treat
rejected promises the same way that we treat exceptions, and also make
sure to mark them as handled, so they are not logged as unhandled
promise rejections by Chromium.

Also-By: jarin@chromium.org
Bug: chromium:1076820, chromium:1199247
Change-Id: I3cef1e7c04ecbf9e734db946d669a3b5186eca5b
Fixed: chromium:1241298
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110610
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76432}
2021-08-23 13:43:54 +00:00
Rakhim Khismet
787aa57154 [fuzzer] Add ref.func and ref.is_null to fuzzer
We add ref.func and ref.is_null to the fuzzed module.
ref.is_null returns i32, so it is added to i32 generator.
ref.func is added to GenerateOptRef.
GetRefType function is added to generate reftypes.

Bug: v8:11954
Change-Id: Ia1add950bed573a02b6bec1cba401273d401919e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3106925
Commit-Queue: Rakhim Khismet <khismet@google.com>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76431}
2021-08-23 13:24:35 +00:00
Manos Koukoutos
7b072d5bce [fuzzer] Add proper support for abstract ref types
Abstract reference types in the fuzzer have only generated trivial
values. This CL adds the capability for them to generate values of their
subtypes in addition.
Drive-by: Fix emission of multiple tables in wasm-fuzzer-common.

Bug: v8:11954
Change-Id: Id434109c9ae6c1e1b799414c90f18180b8895755
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3109672
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76430}
2021-08-23 12:05:17 +00:00
Anton Bikineev
19b523fdf6 cppgc: Perform caged-heap fast check when conservatively scanning
This aims to speed up stack scanning with a fast on-heap check. The
blooom-filter (at least with caged-heap enabled) is probably not needed
anymore.

Change-Id: I05536025c73df0cacdbbf6c474339dc71ecf33e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2825590
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76429}
2021-08-23 12:04:06 +00:00
Dan Elphick
44fe02ced6 Revert "[include] Split out v8.h"
This reverts commit d1b27019d3.

Reason for revert: Broke vtune build, tsan build and possibly others

Original change's description:
> [include] Split out v8.h
>
> This moves every single class/function out of include/v8.h into a
> separate header in include/, which v8.h then includes so that
> externally nothing appears to have changed.
>
> Every include of v8.h from inside v8 has been changed to a more
> fine-grained include.
>
> Previously inline functions defined at the bottom of v8.h would call
> private non-inline functions in the V8 class. Since that class is now
> in v8-initialization.h and is rarely included (as that would create
> dependency cycles), this is not possible and so those methods have been
> moved out of the V8 class into the namespace v8::api_internal.
>
> None of the previous files in include/ now #include v8.h, which means
> if embedders were relying on this transitive dependency then it will
> give compile failures.
>
> v8-inspector.h does depend on v8-scripts.h for the time being to ensure
> that Chrome continue to compile but that change will be reverted once
> those transitive #includes in chrome are changed to include it directly.
>
> Full design:
> https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
>
> Bug: v8:11965
> Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76424}

Bug: v8:11965
Change-Id: Id57313ae992e720c8b19abc975cd69729e1344aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113627
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76428}
2021-08-23 11:54:09 +00:00
Dan Elphick
0ca76d05e6 Revert "[bazel] Missing v8-initialization.h file"
This reverts commit 0179f6a6f8.

Reason for revert: reverting the CL this fixes

Original change's description:
> [bazel] Missing v8-initialization.h file
>
> No-Try: true
> Change-Id: I1ff26433f68ed9318ddc0f7d9a840df3699cdd4f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113625
> Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> Reviewed-by: Dan Elphick <delphick@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76425}

Change-Id: I8fe8d811badf478c2f8d6761e503e322cfd4e6fb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110609
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76427}
2021-08-23 11:52:07 +00:00
Maya Lekova
a92cba8cfb [fastcall] Fix internal OOB in FastCAPI.fast_call_count
The fast_call_count getter in d8 was not properly initialised as
throwing when called as a constructor. As a result, it was possible
to pass a new object as its `this` and then attempt to "unwrap" it,
resulting in reading OOB in the new object. This CL also strenghtens
slow_call_count and reset_counts and adds a regression test.

Bug: chromium:1241464
Change-Id: I9b6e9a4e38a974dc111a53b911c73514c30de9df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110369
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76426}
2021-08-23 11:36:16 +00:00
Victor Gomes
0179f6a6f8 [bazel] Missing v8-initialization.h file
No-Try: true
Change-Id: I1ff26433f68ed9318ddc0f7d9a840df3699cdd4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113625
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76425}
2021-08-23 10:12:34 +00:00
Dan Elphick
d1b27019d3 [include] Split out v8.h
This moves every single class/function out of include/v8.h into a
separate header in include/, which v8.h then includes so that
externally nothing appears to have changed.

Every include of v8.h from inside v8 has been changed to a more
fine-grained include.

Previously inline functions defined at the bottom of v8.h would call
private non-inline functions in the V8 class. Since that class is now
in v8-initialization.h and is rarely included (as that would create
dependency cycles), this is not possible and so those methods have been
moved out of the V8 class into the namespace v8::api_internal.

None of the previous files in include/ now #include v8.h, which means
if embedders were relying on this transitive dependency then it will
give compile failures.

v8-inspector.h does depend on v8-scripts.h for the time being to ensure
that Chrome continue to compile but that change will be reverted once
those transitive #includes in chrome are changed to include it directly.

Full design:
https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing

Bug: v8:11965
Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76424}
2021-08-23 09:35:06 +00:00
Jakob Kummerow
2f9599faf5 [wasm] Reset g_thread_in_wasm_code in Runtime_Allocate
As a short-term mitigation for the abort() crash that happens
when the g_thread_in_wasm_code flag is set while we attempt to
free a Wasm code object as part of a GC cycle, clear the flag
in Runtime_AllocateInYoungGeneration. (The ...OldGeneration
counterpart is not affected because Wasm code does not request
pretenured allocations currently.)

Bug: chromium:1236668
Change-Id: I97ab9f67935de9aaeca0815e374bdfd8076acf6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110195
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76423}
2021-08-23 08:45:56 +00:00
Lu Yahan
d7d71adcba [riscv64] Fix align failed
Bug: v8:12130
Change-Id: I2cf3513fb09e5844ef827901cbbe73f70b2a3edd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3112986
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76422}
2021-08-23 06:44:36 +00:00
Camillo Bruni
7b07aa0e13 [modules] Handle missing eval origin with dynamic imports
Bug: chromium:1237730
Change-Id: Ib604a5d3dc8931f195d6508048937ee735e18fd8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3107306
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@{#76421}
2021-08-23 06:23:04 +00:00
Milad Fa
475054866d S390 [liftoff]: implement simd shift operations
This CL implements both the Register-Register and the
Register-Immediate variants needed by liftoff.

Change-Id: I148df8418097004710a17e0b216c2f18db808b8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3105085
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76420}
2021-08-22 15:15:35 +00:00
v8-ci-autoroll-builder
67b6a9bf94 Update V8 DEPS.
Rolling v8/build: d4924be..3d596a3

Rolling v8/buildtools/third_party/libc++abi/trunk: e4b161d..ffda034

Rolling v8/third_party/aemu-linux-x64: 6VzMt4Yj2cR2686nGtmYD_6idAkR2f0lTHjpGAYPr1oC..GG_dhOWH4FV08NLnsuMmrvJIzuPs-hEVC4Dt900CDY0C

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

Change-Id: I7df6641a8798cf335cc35eae25314727e3e2c6d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3112527
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@{#76419}
2021-08-22 03:54:53 +00:00
Yu Yin
140b00d8fb [mips] Support acq/rel accesses and atomic accesses on tagged
Port commit 6a487504ed

Change-Id: Icfff8241e6e920970f0168ebfae535291c4d9e72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3111275
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#76418}
2021-08-21 09:31:13 +00:00
Yu Yin
5eb08ce238 [mips64][loong64] Support acq/rel accesses and atomic accesses on tagged
Port commit 6a487504ed

Change-Id: I6fd1a15f1f35fd3b8cd3cfb72d7c428d018273c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3109087
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#76417}
2021-08-21 07:01:03 +00:00
v8-ci-autoroll-builder
3c81b4d8a7 Update V8 DEPS.
Rolling v8/build: 536c882..d4924be

Rolling v8/buildtools: 6f9b470..88e9a29

Rolling v8/buildtools/third_party/libc++abi/trunk: 671803f..e4b161d

Rolling v8/buildtools/third_party/libunwind/trunk: 83f8edb..5f26300

Rolling v8/third_party/aemu-linux-x64: JV2fBSeIQc_xaqKsVDvLIvDmvx2ejeL-Y75N37PloLMC..6VzMt4Yj2cR2686nGtmYD_6idAkR2f0lTHjpGAYPr1oC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/77a7089..ebf22ea

Rolling v8/third_party/depot_tools: c4e2b36..52b4510

Rolling v8/third_party/googletest/src: 0134d73..2f80c2b

Rolling v8/third_party/jinja2: 6ac5f7e..6db8da1

Rolling v8/tools/clang: f1ab49b..6002926

Rolling v8/tools/luci-go: git_revision:a5735121c6339dee9b1b3644535e230744daaac9..git_revision:24b519169c7848dbeae2dba04698c41666388a45

Rolling v8/tools/luci-go: git_revision:a5735121c6339dee9b1b3644535e230744daaac9..git_revision:24b519169c7848dbeae2dba04698c41666388a45

Rolling v8/tools/luci-go: git_revision:a5735121c6339dee9b1b3644535e230744daaac9..git_revision:24b519169c7848dbeae2dba04698c41666388a45

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

Change-Id: I3cb55842d72cf0e8bd892f0cce24ebd5c8465cbc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3111616
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@{#76416}
2021-08-21 03:57:04 +00:00
Michael Lippautz
44f284343b cppgc: Fix benign data race in CTP destruction
Consider reading the internal node pointer instead of the actual pointer
when trying to figure out whether a node needs to be destroyed. This
preserves the non-atomiticity of the actual pointer which highlights
races using TSAN while fixing destruction.

Bug: chromium:1239081
Change-Id: I1d1fa29d40d86e4b156269abc90142ee71a8d8f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110199
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76415}
2021-08-20 21:34:52 +00:00
Adam Klein
64d0ceb37a Revert "[wasm] Move write scope out of NativeModule::AddCode"
This reverts commit 6ae18c2d3c.

Reason for revert: breaks a bunch of tests on Mac arm64 bots:

https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20release/5754/overview
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug/2421/overview

Original change's description:
> [wasm] Move write scope out of NativeModule::AddCode
>
> {NativeModule::AddCode} is a central method that should usually be
> called in batches, where the caller holds a {CodeSpaceWriteScope} for a
> longer time (over several compilations).
> This CL moves us closer to that by removing the scope from that central
> method and instead putting it in callers where it becomes more visible.
> There are already TODOs to introduce caching or batching to avoid some
> switching, and one more TODO is added.
>
> Drive-by: Remove an unneeded {CodeSpaceMemoryModificationScope}.
>
> R=​jkummerow@chromium.org
>
> Bug: v8:11974
> Change-Id: Ia13c601abc766e5fca6ca053bf1fc4d647b53ed0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3098186
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#76344}

Bug: v8:11974
Change-Id: Ia6a6814f153f7602d5d691bc5c930601ff4622a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3111268
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76414}
2021-08-20 19:19:52 +00:00
Nico Weber
5e47fccd7b Fix -Wunreachable-code-aggressive warning in debug build
Bug: chromium:1066980
Change-Id: I4e149f5dd9ac2d3b8f51afd2c63451d509441e64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110652
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76413}
2021-08-20 19:06:32 +00:00
Santiago Aboy Solanes
cc8fb4f7f3 Remove solanes@ from OWNER files
End of an era https://www.youtube.com/watch?v=jbf9ZYi8eac

Change-Id: I64eb201a9073df55564a3ba38ac5511974485c08
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103316
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76412}
2021-08-20 17:16:02 +00:00
Michael Lippautz
703e5387b7 heap: Sweeper: Only emit trace scope when running
Avoids emitting scopes when not even running. This can be a problem for
metrics computation which may recursively invoke
EnsureSweepingCompleted() when starting marking even though the sweeper
is guaranteed to be not running at this point.

Bug: chromium:1211795
Change-Id: I8d7692f4e8c640f38d3c52df5c111fff4f06df9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3109674
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76411}
2021-08-20 17:06:30 +00:00
Nico Weber
d2fd28ea12 Fix a recent -Wunreachable-code-aggressive regression
Bug: chromium:1066980
Change-Id: Ib7d38cb46f25b69431fa965eb6b951af3f24bc95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3111005
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76410}
2021-08-20 16:11:17 +00:00
Al Muthanna Athamina
eae0a9a390 Add infra-staging flag to test runner
Add infra-staging flag to test runner
which adds the no-fail flag. This will
be used to see the accuracy of numfuzz
builders when we ignore exit code 1.

Bug: v8:11826
Change-Id: I6684331efe9c801d02716d94cb16e8ba816d9c68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110196
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76409}
2021-08-20 15:44:52 +00:00
Al Muthanna Athamina
340a114cf4 Skip compiler/concurrent-inlining-1 on gc_fuzzer
Bug: v8:12013
Change-Id: Ied041acd5e8898eae0beca2d2b49b90846b3f047
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110191
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76408}
2021-08-20 14:44:32 +00:00
Milad Fa
4629bc06d6 PPC/s390: Reland "[compiler] Support acq/rel accesses and atomic accesses on tagged"
Port 6a487504ed

Original Commit Message:

    This is a reland of faf2208a0b

    Changes since revert:
    - Fix arm64 codegen for full pointer mode

    Original change's description:
    > [compiler] Support acq/rel accesses and atomic accesses on tagged
    >
    > This CL adds an AtomicMemoryOrder parameter to the various atomic load
    > and store operators. Currently only acquire release (kAcqRel) and
    > sequentially consistent (kSeqCst) orders are supported.
    >
    > Additionally, atomic loads and stores are extended to work with tagged
    > values.
    >
    > This CL is a pre-requisite for supporting atomic accesses in Torque,
    > which is in turn a pre-requisite for prototyping shared strings.
    >
    > Bug: v8:11995
    > Change-Id: Ic77d2640e2dc7e5581b1211a054c93210c219355
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101765
    > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    > Reviewed-by: Zhi An Ng <zhin@chromium.org>
    > Commit-Queue: Shu-yu Guo <syg@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#76393}

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

Change-Id: I859320f1e752a8e79a0855ecad8651c635092f46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3108289
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76407}
2021-08-20 12:59:36 +00:00
Seth Brenith
c52236ab61 Avoid incorrect retaining paths through Code objects in heap snapshots
The heap snapshot view in the dev tools reports some incorrect retaining
paths involving weak references from relocation data in Code objects.
This change updates IndexedReferencesExtractor::VisitEmbeddedPointer to
better match the behavior in MarkingVisitorBase.

Drive-by cleanup: ObjectVisitor::VisitRelocInfo needn't be virtual
because there's only one implementation.

Bug: v8:12126
Change-Id: I669a7408e7a46e797b8c2b372235b4ea42ee22e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3107214
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#76406}
2021-08-20 12:10:34 +00:00
Victor Gomes
6a76a3a12a [bazel] Adds atomic-memory-order.h
No-Try: true
Change-Id: Ie9ccef9034d42c483c4d39aa949c85811fd65d9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3109678
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76405}
2021-08-20 11:45:34 +00:00
Jakob Kummerow
dd5e5535ea [bigint] Faster parsing from long strings
Combining parts in a balanced-binary-tree like order allows us to
use fast multiplication algorithms.

Bug: v8:11515
Change-Id: I6829929671770f009f10f6f3b383501fede476ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3049079
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76404}
2021-08-20 10:54:34 +00:00
Al Muthanna Athamina
45424f1a58 Skip flakey tests on NumFuzz
The skipped tests have been flaking on the last
ten runs on V8 NumFuzz - debug.

Bug: v8:11826
Change-Id: I925c8e581b34c1b08fb295856278e506b8d62f26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103305
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76403}
2021-08-20 09:01:56 +00:00
Lu Yahan
cb0afa5b7d [riscv64]Fix test-atomic-load-store-codegen failed
Change-Id: I5b3001cebcf97a239c259af7fc4ddc889c9a84a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3108947
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76402}
2021-08-20 06:06:55 +00:00
v8-ci-autoroll-builder
1ebc36ee67 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: c4b06e5..8fd49d6

Fix a -Wunreachable-code-aggressive warning (#1214) (Nico Weber)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/8fd49d6

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

Change-Id: I1442e530778245ed2252fbed092147dd496e61da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3108868
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@{#76401}
2021-08-20 05:45:15 +00:00
Lu Yahan
66798ddde0 [riscv64] Fix build error
Port 3107220: Reland "[compiler] Support acq/rel accesses and atomic accesses on tagged" | 3107220

Change-Id: I190f6b62458b0abe193ca7f5ea9d6912117439fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3108945
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76400}
2021-08-20 03:13:54 +00:00
Shu-yu Guo
6a487504ed Reland "[compiler] Support acq/rel accesses and atomic accesses on tagged"
This is a reland of faf2208a0b

Changes since revert:
- Fix arm64 codegen for full pointer mode

Original change's description:
> [compiler] Support acq/rel accesses and atomic accesses on tagged
>
> This CL adds an AtomicMemoryOrder parameter to the various atomic load
> and store operators. Currently only acquire release (kAcqRel) and
> sequentially consistent (kSeqCst) orders are supported.
>
> Additionally, atomic loads and stores are extended to work with tagged
> values.
>
> This CL is a pre-requisite for supporting atomic accesses in Torque,
> which is in turn a pre-requisite for prototyping shared strings.
>
> Bug: v8:11995
> Change-Id: Ic77d2640e2dc7e5581b1211a054c93210c219355
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101765
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Zhi An Ng <zhin@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76393}

Bug: v8:11995
Change-Id: I23577486334fec6b08fb3a2f5be1f6e5e16db11b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3107220
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76399}
2021-08-19 18:23:57 +00:00
Ng Zhi An
1cbb68a550 [wasm-simd] Optimize I64x2UConvertI32x4High
Fixed: v8:12095
Bug: v8:12095
Change-Id: If2021397000958ccdd058b99ce8f4d6e8d4d2836
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097106
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76398}
2021-08-19 18:14:17 +00:00
Ng Zhi An
5e8e2d04a3 [gdbjit] Fix overlapping AddressRegion check
Whenever we are adding a new AddressRegion to the CodeMap, we first
remove all overlapping regions. The logic to check for overlapping
region is incomplete. For example, if all existing regions are less than
the region to be added, we incorrectly remove all regions, effectively
deleting all JITCodeEntry we have constructed.

We extract this overlapping check into a helper function, so that we can
unittest this without worrying about JITCodeEvent functionality, and also
without dealing with V8 internals (like Isolate and SFI).

The overlapping logic is rather hard to understand, has many special
cases, it will probably be much easier to just loop through all the
entries, rather than using lower_bound. Ideally, we can refactor this to
use some sort of sweep-line algorithm. Hopefully the unittests catch the
most obvious cases.

Bug: v8:11908
Change-Id: Id96975599ac59974185c3dbf64cdfceb17e98d18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3105381
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76397}
2021-08-19 17:29:57 +00:00
Ross McIlroy
13f6c055c7 Remove rmcilroy from OWNERS.
Change-Id: I32fc41124c6c16efe1150d60e72dc2bba90782c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3106745
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76396}
2021-08-19 16:30:27 +00:00
Ross McIlroy
71c9f172ce Replace rmcilroy with syg as interpreter/OWNER
Change-Id: Ie96be7e4d1c37de92cbb6271fb0c8779ea9d4ae4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3106746
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76395}
2021-08-19 16:01:57 +00:00
Nico Hartmann
746d62d4b9 Revert "[compiler] Support acq/rel accesses and atomic accesses on tagged"
This reverts commit faf2208a0b.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20arm64%20-%20sim%20-%20pointer%20compression/10870/overview

Original change's description:
> [compiler] Support acq/rel accesses and atomic accesses on tagged
>
> This CL adds an AtomicMemoryOrder parameter to the various atomic load
> and store operators. Currently only acquire release (kAcqRel) and
> sequentially consistent (kSeqCst) orders are supported.
>
> Additionally, atomic loads and stores are extended to work with tagged
> values.
>
> This CL is a pre-requisite for supporting atomic accesses in Torque,
> which is in turn a pre-requisite for prototyping shared strings.
>
> Bug: v8:11995
> Change-Id: Ic77d2640e2dc7e5581b1211a054c93210c219355
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101765
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Zhi An Ng <zhin@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76393}

Bug: v8:11995
Change-Id: Id9936672f9e96c509b1cdf866de1ac5303996945
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3107229
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#76394}
2021-08-19 15:49:18 +00:00
Shu-yu Guo
faf2208a0b [compiler] Support acq/rel accesses and atomic accesses on tagged
This CL adds an AtomicMemoryOrder parameter to the various atomic load
and store operators. Currently only acquire release (kAcqRel) and
sequentially consistent (kSeqCst) orders are supported.

Additionally, atomic loads and stores are extended to work with tagged
values.

This CL is a pre-requisite for supporting atomic accesses in Torque,
which is in turn a pre-requisite for prototyping shared strings.

Bug: v8:11995
Change-Id: Ic77d2640e2dc7e5581b1211a054c93210c219355
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101765
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76393}
2021-08-19 15:18:11 +00:00
Patrick Thier
89933af67f [masm] Create helpers to manipulate arguments on the stack.
- Introduce helper to push arguments onto the stack (Standalone this
change doesn't make a lot of sense, but is in preparation for including
the receiver in argc).
- Introduce helper to shift arguments already on the stack to make room
for new arguments (Varargs).
- arm64 is not included because a) there was already a helper similar
to ShiftArguments and b) PushArguments is not similar enough to make
sense for arm64 because of small differences (e.g. also pushing the
function) in conjunction with stack alignment.

Drive-by: Use masm DropArguments in Sparkplug EmitReturn

Bug: v8:11112
Change-Id: Id7a3a5f025abb19e2a52dae27b3b484fe87e9faf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097275
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76392}
2021-08-19 15:04:27 +00:00