Commit Graph

66886 Commits

Author SHA1 Message Date
Omer Katz
7cc78c535d cppgc: Align cppgc::MetricRecorder with v8::metrics::Recorder
Update the MetricRecorder struct to have a similar structure and similar
fields to the GC struct defined in v8-metrics.h

Bug: chromium:1056170
Change-Id: Ieb77412476353557134aeac5cf8f66ab257e22dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653236
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72394}
2021-01-28 11:29:29 +00:00
Marja Hölttä
ab7c7c7887 Revert "[debug][api] Move debugger support to debug-interface.cc."
This reverts commit 1b4811f716.

Reason for revert: makes "git cl upload" fail (the change related to files_to_skip)

Original change's description:
> [debug][api] Move debugger support to debug-interface.cc.
>
> Previously we had the debugger / inspector support declared in
> debug-interface.h, but the implementation was sprinkled all across
> api.cc, which was quite messy. This moves the relevant macros and
> other bits into api-macros.h (with api-macros-undef.h to support
> jumbo builds), and moves the debugger interface implementation to
> src/debug/debug-interface.cc.
>
> Bug: chromium:1162229
> Change-Id: I6965ebf2301459c89e3217bd87396ec353d814e9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653154
> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72392}

TBR=yangguo@chromium.org,bmeurer@chromium.org

Change-Id: Ib9460709df799cd63b221f9f30dc33dff53075bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1162229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2655508
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72393}
2021-01-28 11:18:51 +00:00
Benedikt Meurer
1b4811f716 [debug][api] Move debugger support to debug-interface.cc.
Previously we had the debugger / inspector support declared in
debug-interface.h, but the implementation was sprinkled all across
api.cc, which was quite messy. This moves the relevant macros and
other bits into api-macros.h (with api-macros-undef.h to support
jumbo builds), and moves the debugger interface implementation to
src/debug/debug-interface.cc.

Bug: chromium:1162229
Change-Id: I6965ebf2301459c89e3217bd87396ec353d814e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653154
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72392}
2021-01-28 10:44:19 +00:00
Marja Hölttä
12f8ac4713 Revert "Reland [super] Store home object in Context instead of JSFunction"
This reverts commit f6450b97ec.

Reason for revert: ClusterFuzz bugs

Original change's description:
> Reland [super] Store home object in Context instead of JSFunction
>
> 1) Computed property keys (esp functions in them) shouldn't be inside
> the object literal scope.
>
> 2) I was using an imprecise "maybe uses super" and storing it to
> preparse data. This won't fly, since it pollutes sister scopes and
> leads to confusion wrt whether an object literal needs a home object
> or not. Made it precise (mostly cancelling changes in the original CL).
>
> 3) PreParser::NewSuperPropertyReference was creating a VariableProxy for
> this_function (which made it used) -> inconsistent scopes between
> parsing and preparsing.
>
> 4) MultipleEntryBlockContextScope was messing up the accumulator
>
> Original: https://chromium-review.googlesource.com/c/v8/v8/+/2563275
>
> This saves memory (the home object doesn't need to be stored for each
> method, but only once per class) and hopefully makes the home object
> a constant in the optimized code.
>
> Detailed documentation of the changes:
> https://docs.google.com/document/d/1ZVXcoQdf9IdMsnRI9iyUjyq9NDoEyx9nA3XqMgwflMs/edit?usp=sharing
>
> Bug: v8:9237, chromium:1167918, chromium:1167981, chromium:1167988, chromium:1168055
> Change-Id: I4f53f18cc18762c33e53d8c802909b42f1c33538
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637220
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72169}

TBR=marja@chromium.org,leszeks@chromium.org

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

Bug: v8:9237
Bug: chromium:1167918
Bug: chromium:1167981
Bug: chromium:1167988
Bug: chromium:1168055
Bug: chromium:1171195
Bug: chromium:1171600
Change-Id: I15209f50c3fc8acf385a23f031ebb64139e2f519
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653158
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72391}
2021-01-28 10:39:41 +00:00
Camillo Bruni
5c1e0c0a23 [Tools] Improve callstats.html .txt file handling
- Deduplicate entries when writing multiple runs into a single .txt file
- Add support to load multiple files directly via url params
- Display graphs after appending new files
- Fix tracing .json import script

Change-Id: I06349df57faf206d6a215cfc279c79d1f0dd684c
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650211
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72390}
2021-01-28 10:37:09 +00:00
Jakob Gruber
0a480c30d5 Remove unused flags from flag-definitions.h
--collect-heap-spill-statistics
--concurrent-array-buffer-freeing
--concurrent-store-buffer
--es-staging
--fast-math
--gc-experiment-background-schedule
--gc-experiment-reduce-concurrent-marking-tasks
--minor-gc-parallel-marking
--sodium

Change-Id: I2cb2626473baef4b800b86e8acd5012b5b651758
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653228
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72389}
2021-01-28 09:43:29 +00:00
LiuYu
8dbd200c6b [mips][wasm][liftoff] Record correct offset in StoreTaggedPointer
Besides, change kSpeculationPoisonRegister from t3 to a7.

Port: a1616e6f7f

Bug: v8:7581
Change-Id: Id25850ddebce7250997e3b042ef094afd5d37d36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2651699
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72388}
2021-01-28 09:35:39 +00:00
Toon Verwaest
3965dcd5cb [interpreter] Encode BytecodeSizes as uint8_t for better cache locality
This very slightly improves the performance of bytecode array visitors.

Change-Id: I39df381a26106b5576df74c8c204279b224a92af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653227
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72387}
2021-01-28 09:14:19 +00:00
Sami Kyostila
9784c52d69 debug_helper: Add missing tracing dependency
Bug: chromium:1006541
Change-Id: Ia3f1b16a4becd10bd4041f35e125aad7acc33949
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653235
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72386}
2021-01-28 08:26:39 +00:00
Liu Yu
e80f34ee23 [mips][wasm-simd][liftoff] Implement i64x2.eq
Besides, move load/store lane out of post-mvp.

Port: 97a935eeab

Port: 848137c47c

Change-Id: I8d98ed9949ba76648deefb1779057b76dff1304a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2654865
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72385}
2021-01-28 07:57:39 +00:00
Sathya Gunasekaran
8d3468a1a6 [infra] Fix v8gen.py
Looks like this was broken by the renaming in
https://chromium-review.googlesource.com/c/v8/v8/+/2627309

Bug: v8:11361
Change-Id: I07c74a847171070a6a9296f3f6e1ef1f45002c66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2651700
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72384}
2021-01-28 04:51:18 +00:00
v8-ci-autoroll-builder
abe25c8355 Update V8 DEPS.
Rolling v8/build: fcaf1b1..5e38be7

Rolling v8/buildtools: 71044df..e3db55b

Rolling v8/test/test262/harness: 4555345..278bcfa

Rolling v8/third_party/aemu-linux-x64: DUWCHyibCTWCe-ijlAKpinTlXaJQW2jg8hs7uRUfK0gC..2AjFHxe4t1iSrrSx8ayS9uaUpVgbf4uevQoAj-Pt5_0C

Rolling v8/third_party/android_ndk: https://chromium.googlesource.com/android_ndk/+log/27c0a8d..401019b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f8d79d2..9d5ec46

Rolling v8/third_party/depot_tools: 6d0c0ff..9a18e37

Rolling v8/third_party/icu: 899e183..2eefd9a

Rolling v8/tools/clang: eb5ab41..0d2b891

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I705e9f7527d2cd45e4dd7ff0b536ace8ee135b09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2654638
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/master@{#72383}
2021-01-28 03:58:18 +00:00
Ng Zhi An
9c120b753d [wasm-simd][x64] Fix encoding of vcvtdq2pd
vcvtdq2pd was incorrectly declared to take 3 operands, the use of the
macro Cvtdq2pd meant that the call was vcvtdq2pd(dst, dst, src). This
is an incorrect encoding. Our tests happen to pass because dst was xmm0,
which made it accidentally correct.

This fixes it by moving cvtdq2pd out of the macro list.

Bug: v8:11265
Change-Id: I8b1baf4dd2c670021eafa76dc1a10b442f812805
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2654003
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72382}
2021-01-27 22:48:59 +00:00
Milad Fa
5b17a28f28 PPC/s390: [wasm-simd] Move load/store lane out of post-mvp
Port 848137c47c

Original Commit Message:

    Define a new macro list, since this has 1 immediate operand (lane index)
    compared to other SIMD load/stores.

    Also remove all the ifdef guards.

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

Bug: v8:10975
Change-Id: I5eb08035c178808fb5033d001e0800956105c8f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2654186
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72381}
2021-01-27 21:38:50 +00:00
Ng Zhi An
ca0c1f8f37 [wasm-simd][liftoff][arm][arm64] Implement i64x2.eq
For ARM, factor the code sequence out into a macro-assembler function to
allow sharing between TurboFan and Liftoff.

Bug: v8:11215
Change-Id: Ib337e3f3dd90174b71a9bcd951b3779275c7465c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2648820
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72380}
2021-01-27 21:28:41 +00:00
Milad Fa
7f91017a28 PPC/s390: [wasm-simd][liftoff][ia32][x64] Implement i64x2.eq
Port 97a935eeab

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

Change-Id: I68e7e783c22a420d137ebf777f743780fc90e4d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653070
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72379}
2021-01-27 20:33:29 +00:00
Milad Fa
6c9c3569da s390 [wasm-simd]: Prototype sign select
Code fo Instruction Selection is added to the comments
and should be added when opcode is moved out of being a prototype.

Bug: v8:10983
Change-Id: I3d7a0435d7b7c8f21217863c3aa894ae5b90afae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653808
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72378}
2021-01-27 20:02:49 +00:00
Ng Zhi An
848137c47c [wasm-simd] Move load/store lane out of post-mvp
Define a new macro list, since this has 1 immediate operand (lane index)
compared to other SIMD load/stores.

Also remove all the ifdef guards.

Bug: v8:10975
Change-Id: Ib0a1f7bb6c4bdf83d81a65b4e02199b792d13837
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645568
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72377}
2021-01-27 19:00:38 +00:00
Ng Zhi An
97a935eeab [wasm-simd][liftoff][ia32][x64] Implement i64x2.eq
Bug: v8:11215
Change-Id: Ib91d8e4cb2cd72a779f498827e154173c97a85cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2648819
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72376}
2021-01-27 18:59:29 +00:00
Clemens Backes
591db5d98b [wasm] Fix data race in lazy compilation
Instead of updating the detected features set directly, use the
synchronized {OnCompilationStopped} method.
In order to avoid this error in the future, the whole
{detected_features()} getter is removed, as it returns a pointer which
can only be accessed when holding the mutex anyway. Also, the refactored
code was the only user of this dangerous method.

Drive-by: Pass the WasmFeatures set by value, since it's just an
EnumSet.
Drive-by 2: Remove a print line from the regression test which can be
confusing if the test is picked up again by foozzie.

R=ahaas@chromium.org
CC=zhin@chromium.org

Bug: v8:11357
Change-Id: I75b5c8f35983d2bc1fd2b61adcb2ecfc18564f39
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653226
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72375}
2021-01-27 17:37:29 +00:00
Ng Zhi An
7331739fa0 [wasm] Use saturated_cast in wasm-interpreter
We have saturated_cast from safe_conversions, use it in the interpreter
instead of implementing it ourselves for each pair of types to convert
between.

Bug: v8:11074
Change-Id: I81115458d2bc456cbc3e4cd9fb40f01abe33246f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649147
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72374}
2021-01-27 17:25:58 +00:00
Ng Zhi An
dfe7c465d3 [wasm-simd][arm64] Prototype double precision conversion
Prototype these 6 instructions on arm64:

- f64x2.convert_low_i32x4_s
- f64x2.convert_low_i32x4_u
- i32x4.trunc_sat_f64x2_s_zero
- i32x4.trunc_sat_f64x2_u_zero
- f32x4.demote_f64x2_zero
- f64x2.promote_low_f32x4

Drive-by fix:

- f64x2.promote_low_f32x4 accesses out of bounds for the global, the
result only has 2 doubles
- fcvtn in simulator needs to clear top bits of the Q reg

Bug: v8:11265
Change-Id: Icfb3338942f0d0374448fdcfef3847a6e3ce8ff6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644066
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72373}
2021-01-27 17:03:09 +00:00
Michael Lippautz
cf380f5965 cppgc: Fix CustomSpace trait
Expose kSupportsCompaction to be able to refer to it from other traits.

Change-Id: I3a0870853fabfac993eff22886a0a31a52d90055
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653225
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72372}
2021-01-27 16:48:28 +00:00
Mythri A
aa4ee8d534 Add option to allocate feedback vector based on bytecode size
Currently, feedback vectors are allocated on a fixed budget of 1024.
In some cases it might be beneficial to allocate feedback vectors based
on invocation count rather than fixed budget. For example, if we have
a large function that is only run once. This cl adds an option to
use interrupt budget based on the bytecode size. It kind of mimics
invocation count. We would allocate feedback vectors early when we
have loops which is also required.

This flag is turned off by default. In followup cl, we will enable it
and if the memory / performance tradeoff is good we might make it
default.

Change-Id: I9f7231119b5fd65fb3268e665e2e315fb2625e1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584960
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72371}
2021-01-27 16:36:28 +00:00
Omer Katz
37d24e5647 cppgc: Change histograms from ms to us
Bug: chromium:1056170
Change-Id: Iaa3cefc652657246fffe7998dd8faa9d008d9195
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2652496
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72370}
2021-01-27 16:34:08 +00:00
Omer Katz
7af731c93d cppgc: Implement lazy sweeping on allocation
Sweep page by page in the space until we find a slot big enough for the
current allocation.

Bug: chromium:1056170
Change-Id: Id6dcf2d4db20268090b4626340bbed44f67d053c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649259
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72369}
2021-01-27 16:28:19 +00:00
Nico Hartmann
3e62220446 [TurboFan] Relax DCHECK that is too strong
Bug: chromium:1170261
Change-Id: Id2c5d18df892ece2823f7784dee4e69e54b7454c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2652491
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72368}
2021-01-27 15:49:08 +00:00
Omer Katz
ae1d7f8ed1 cppgc: Add additional memory metrics
Bug: chromium:1056170
Change-Id: Ia312e96b421d596d25cccf584c2df823bd9e1ea0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2652498
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72367}
2021-01-27 15:45:08 +00:00
Clemens Backes
c7375b20f7 [wasm][serialization] Parallelize copy and relocate
The copy&relocate work is fully parallelizable. Even though it's not the
bottleneck, there is no reason to restrict it to a single thread.

R=thibaudm@chromium.org

Bug: v8:11164
Change-Id: I7d0fea66b2a14e36cb60438cff84e4722b7a7993
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644949
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72366}
2021-01-27 15:22:59 +00:00
Clemens Backes
dc18dce635 Reland "[wasm][debug] Garbage-collect stepping code"
This is a reland of 0938188f85.
The test is skipped for now, until we figure out a way to make wasm
code GC deterministic.

Original change's description:
> [wasm][debug] Garbage-collect stepping code
>
> All wasm code has an initial ref count of 1, in the expectation that it
> will be added to the code table. When the code is removed from that
> table, the ref count will be decremented.
> Stepping code (and also other code under special circumstances) will not
> be added to the code table though. Hence the ref count will never be
> decremented below 1, and the code will never be garbage-collected.
>
> This CL fixes this, by decrementing the ref count if the code is not
> added to the code table.
> Note that the code will only be collected if no isolate is currently
> using it, so it won't be collected while still in use for stepping.
>
> R=thibaudm@chromium.org
>
> Bug: chromium:1168564
> Change-Id: I3047753591cbc52689ca019e9548ec58c237b835
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649040
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72354}

Bug: chromium:1168564
Cq-Include-Trybots: luci.v8.try:v8_linux64_asan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac64_asan_rel_ng
Change-Id: Idb3baec713e0732e51e13b665ac6ac86fdfec969
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2652488
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72365}
2021-01-27 13:16:38 +00:00
Ulan Degenbaev
2ff3bbbc70 [api, heap] Add GC events to v8::metrics::Recorder
The naming follows the scheme outlined in bit.ly/v8-gc-stats-collection
and in the UMA document referenced from it.

Bug: chromium:1154636
Change-Id: I872520de06e62f58d771383fd87d8aa06386bf0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650213
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72364}
2021-01-27 13:10:18 +00:00
Clemens Backes
a54efa43d8 [wasm] Skip flaky test on TSan
The bot is pretty red, so skip the test until we have a fix.

TBR=zhin@chromium.org

Bug: v8:11357
Change-Id: I38bad23ba66518f95de0f13017a6b408623a519d
No-Try: true
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2652493
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72363}
2021-01-27 13:01:38 +00:00
Manos Koukoutos
1ad3d77c43 [wasm-gc] Refactor type checks in wasm-compiler
ref.test, ref.cast, and br_on_cast instructions all need to type check
a value against an rtt. With new classification functions on the
horizon, the wasm-compiler code needed to be refactored to avoid
excessive code duplication.
This CL factors out a function TypeCheck that takes as arguments a set
of three callbacks functions: a conditional success, a conditional
failure, and a negated conditional failure. Each of RefTest, RefCast,
and BrOnCast call TypeCheck with a different set of callbacks.

Bug: v8:7748
Change-Id: I1dd8893fc26d5b0228f85587c9250706d0ce16cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647262
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72362}
2021-01-27 12:43:38 +00:00
cjihrig
8dacbacb30 log: remove --log-regexp from comments
--log-regexp was removed in
https://codereview.chromium.org/2422593003. This commit removes
references to that flag in src/logging/log.h.

Change-Id: Idc965f06dd1f85370b5391c495ae113306655b75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2646246
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/master@{#72361}
2021-01-27 12:23:38 +00:00
Ulan Degenbaev
f1539c1059 [heap] Add the GC epoch to more trace events
Bug: chromium:1154636
Change-Id: I69fb396d5ed5d4fd2823bfb0db1d994517aead91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650212
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72360}
2021-01-27 11:56:26 +00:00
Michael Lippautz
35dcecf607 cppgc: Add HeapState API
The API allows for querying
- IsAllocationAllowed: Certain GC phases prohibit allocation which can
  be queried; Should be mostly used for debugging checks.
- IsMarking: Allows for querying whether the garbage collector is
  currently marking.

Bug: chromium:1056170
Change-Id: I20ba5fb5be9de6694e8418fa885920eb04bd75ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649257
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72359}
2021-01-27 10:58:36 +00:00
Manos Koukoutos
4b03f02467 [wasm-gc] ref.cast forwards null input
According to the new wasm-gc spec, ref.cast should forward a null input
without trapping.

Bug: v8:7748
Change-Id: Ifee17f02a572e7028c14482bc94f0e1c7fc82a5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647261
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72358}
2021-01-27 10:21:46 +00:00
Clemens Backes
2919e54341 Revert "[wasm][debug] Garbage-collect stepping code"
This reverts commit 0938188f85.

Reason for revert: new test times out on tsan: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN/35152/overview

Original change's description:
> [wasm][debug] Garbage-collect stepping code
>
> All wasm code has an initial ref count of 1, in the expectation that it
> will be added to the code table. When the code is removed from that
> table, the ref count will be decremented.
> Stepping code (and also other code under special circumstances) will not
> be added to the code table though. Hence the ref count will never be
> decremented below 1, and the code will never be garbage-collected.
>
> This CL fixes this, by decrementing the ref count if the code is not
> added to the code table.
> Note that the code will only be collected if no isolate is currently
> using it, so it won't be collected while still in use for stepping.
>
> R=​thibaudm@chromium.org
>
> Bug: chromium:1168564
> Change-Id: I3047753591cbc52689ca019e9548ec58c237b835
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649040
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72354}

TBR=clemensb@chromium.org,thibaudm@chromium.org

Change-Id: I84f84324d2c4a3cae2ae6b97f469e3f22b0e3b3f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1168564
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2652485
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72357}
2021-01-27 10:16:39 +00:00
Mike Stanton
08bb94e971 Revert "[turbofan] refactor MachineOperatorBuilder to use less macros"
This change was made in one file as a prototype to see if we should
do it elsewhere. Backing the change out as we aren't planning to
continue the work into the other builders.

Change-Id: I10f24a897d86b86d3c53288006cf41fb3255f1b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642376
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72356}
2021-01-27 09:42:36 +00:00
Manos Koukoutos
d3b41d07a9 Reland "[wasm-gc] Remove abstract rtts"
This is a reland of b77deeca4b

Changes compared to original: Add explicit narrowing casts in tests
for MSVC.

Original change's description:
> [wasm-gc] Remove abstract rtts
>
> In the latest wasm-gc spec, rtts of abstract types are no longer
> allowed. Consequently, canonical rtts of concrete types always have
> a depth of 0.
>
> Changes:
> - Change the immediate argument of rtts to a type index over a heap
>   type. Abstract it with TypeIndexImmediate in function body decoding.
>   This affects:
>   value_type.h, read_value_type(), decoding of relevant opcodes,
>   wasm subtyping, WasmInitExpr, consume_init_expr(), and
>   wasm-module-builder.cc.
> - In function-body-decoder-impl.h, update rtt.canon to always produce
>   an rtt of depth 0.
> - Pass a unit32_t type index over a HeapType to all rtt-related
>   utilities.
> - Remove infrastructure for abstract-type rtts from the wasm compilers,
>   setup-heap-internal.cc, roots.h, and module-instantiate.cc.
> - Remove ObjectReferenceKnowledge::rtt_is_i31. Remove related branches
>   from ref.test, ref.cast and br_on_cast implementations in the wasm
>   compilers.
> - Remove unused 'parent' field from WasmTypeInfo.
> - Make the parent argument optional in NewWasmTypeInfo, CreateStructMap,
>   and CreateArrayMap.
> - Use more convenient arguments in IsHeapSubtypeOf.
> - Update tests.
>
> Bug: v8:7748
> Change-Id: Ib45efe0741e6558c9b291fc8b4a75ae303146bdc
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642248
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72321}

Bug: v8:7748
Change-Id: I22b204b486fd185077cd6c7f15d492f5143f48fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650207
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72355}
2021-01-27 09:29:06 +00:00
Clemens Backes
0938188f85 [wasm][debug] Garbage-collect stepping code
All wasm code has an initial ref count of 1, in the expectation that it
will be added to the code table. When the code is removed from that
table, the ref count will be decremented.
Stepping code (and also other code under special circumstances) will not
be added to the code table though. Hence the ref count will never be
decremented below 1, and the code will never be garbage-collected.

This CL fixes this, by decrementing the ref count if the code is not
added to the code table.
Note that the code will only be collected if no isolate is currently
using it, so it won't be collected while still in use for stepping.

R=thibaudm@chromium.org

Bug: chromium:1168564
Change-Id: I3047753591cbc52689ca019e9548ec58c237b835
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649040
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72354}
2021-01-27 09:19:26 +00:00
Clemens Backes
21a0a5f128 [wasm][serialization] Look up jump tables only once
... per code space. This avoids redudant work, including potentially
locking the NativeModule.

R=thibaudm@chromium.org

Bug: v8:11164
Change-Id: I34d5aa9aaff5a487042889613676d2a8d96497e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644948
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72353}
2021-01-27 08:14:25 +00:00
Jakob Gruber
e75d8dbcb8 [compiler] Add more StartNode helpers
Start nodes for JS functions have the following Parameter node value
outputs:

 closure, ...args_including_receiver, new_target, argc, context

This CL adds helper functions for these. There's two interesting
gotcha's:

- Each Parameter node is associated with an index, starting at -1.
Value output indices obviously start at 0, so there's an off-by-one
between the value output of the Parameter node, and the Parameter
node's associated index.
- CSA/Torque graphs use different Start node layouts, yet these are
not reflected in compiler logic. There's potential for confusion here.
The two layouts should be unified or made explicit.

Finally, tests create Start nodes with arbitrary layouts. This blocks
removal of methods marked _MaybeNonStandardLayout.

In an ideal world, the parameter index would equal the start node
output index, and the layout of all Start nodes would be equal. Future
work..

Change-Id: I908909880817979062d459b7a80ed4fede40e2ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649035
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72352}
2021-01-27 07:58:45 +00:00
LiuYu
5f28b637cb [mips][wasm-simd][liftoff] Prototype load lane and store lane
Port: 9db3cb75ba

Port: 22e06c7b85

Change-Id: Ib42f9729220365f1803cfbc634e3f37f5209e142
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650045
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72351}
2021-01-27 04:27:54 +00:00
v8-ci-autoroll-builder
b93cd782ab Update V8 DEPS.
Rolling v8/build: 32fd3b2..fcaf1b1

Rolling v8/buildtools: 450b6b6..71044df

Rolling v8/buildtools/linux64: git_revision:d62642c920e6a0d1756316d225a90fd6faa9e21e..git_revision:55ad154c961d8326315b1c8147f4e504cd95e9e6

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/957dfea..f8d79d2

Rolling v8/third_party/depot_tools: 1076f38..6d0c0ff

Rolling v8/tools/clang: 94a96af..eb5ab41

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ic3d42a67d8590ee5f1d0c7cc7d6df3848372b337
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2651163
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/master@{#72350}
2021-01-27 03:56:14 +00:00
Milad Fa
cbf710514e S390: Push the full simd register before lazy compile
If a lazy compilation happens in between 2 Wasm calls, we need to save
the full Simd register, since we can have live v128 values.

Port: 3b302d5cfe

Bug: chromium:1161555
Change-Id: Id79c609cc01e896f48aff39fdcbf4aa76ae6996e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649260
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72349}
2021-01-27 01:51:44 +00:00
Ng Zhi An
03482bb35c [wasm-simd][x64] Optimize extended pairwise add
Use external references to hold splat values.

Bug: v8:11349,v8:11086
Change-Id: I829d136ae7c7f8e28de991d06f6a321551402ae1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2648972
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72348}
2021-01-27 00:59:09 +00:00
Ng Zhi An
bc67a3b592 [wasm-simd][fuzzer] Add i64x2.eq to fuzzer
Bug: v8:11215
Change-Id: I311729509f40ff6e03fc93ef4abdf3b3ce3a65e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650766
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72347}
2021-01-27 00:58:04 +00:00
Michael Lippautz
791d521438 cppgc: Add WeakMember handler to LivenessBroker
WeakMember references are used in ephemerons which uses the ordinary
LivenessBroker for determining whether an object is dead or not.

Bug: chromium:1056170
Change-Id: I7f25da22637fba24603bccb76e266357b0371525
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649042
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/master@{#72346}
2021-01-27 00:33:09 +00:00
Michael Lippautz
a2cf158ad4 cppgc-js: Report C++ memory to V8's heap growing
Add reporting of C++ memory to V8's heap growing strategy via
existing EmbedderHeapTracer interface.

In addition, introduce API-level NoGarbageCollectionScope which
allows to temporarily avoid scheduling GC finalizations. Replace
internal NoGCScope with NoGarbageCollectionScope and remove
NoGCScope.

Bug: chromium:1056170
Change-Id: I0ad3dfd67eb81f09f48e2ab87f9bbece7491ed71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650210
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72345}
2021-01-27 00:32:05 +00:00