Commit Graph

63357 Commits

Author SHA1 Message Date
Manos Koukoutos
0215fd7232 [wasm-gc] Implement StackEffect for GC instructions
Bug: v8:7748
Change-Id: I1c844768e09095ad85396f1752420b616048ec36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278473
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68665}
2020-07-03 08:15:50 +00:00
Z Nguyen-Huu
ecfbc749b7 Add stack load/store counters for x64
The change instruments code generation for Gap Solver so that these
counters are run-time and didn't impact register allocation.

The implementation is put behind a flag to help better register
allocation analysis.

Bug: v8:10663
Change-Id: Ia342d990e2b2bfc6a7653a770f670e51eef71312
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2269362
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68664}
2020-07-02 22:27:49 +00:00
Michael Lippautz
b804266f72 Add google_benchmark depdendency
This adds Google benchmark for microbenchmarking C++ code as an
optional dependency.

To enable, add the following to the .gclient before syncing
  "custom_vars": {
      "checkout_google_benchmark": True
  }

Change-Id: Id0eab772dd71558906658ef4bb60e31acd665948
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2275964
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68663}
2020-07-02 20:11:29 +00:00
Milad Farazmand
458702f95a Include algorithm to use std::lower_bound
Fix GCC build because of missing header:

template argument deduction/substitution failed:
../../third_party/inspector_protocol/crdtp/protocol_core.cc:123:8: note:   candidate expects 3 arguments, 4 provided
       });

Change-Id: If977c6afc3f20c2faf40e02672b04e9679c1fda7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280243
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68662}
2020-07-02 19:28:29 +00:00
Michael Lippautz
448907a30b cppgc: Refactor visitation 2/3
Split off ConservativeMarkingVisitor from MarkingVisitor.

After this change, MarkingVisitor and ConservativeMarkingVisitor are
types that are instantiated with Marking and merely forward to
MarkingState accrodingly. The two marking-related visitors can be
passed along as interface types cppgc::Visitor and
ConservativeTracingVisitor, respectively.

Change-Id: Iad103dc3053c61d1a104a8802edd420d21cdf935
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270538
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68661}
2020-07-02 15:56:09 +00:00
Michael Lippautz
822e1bc9ed cppgc: Refactor visitation 1/3
Split off MarkingState from MarkingVisitor.

With this CL the marking implementation is moved to "MarkingState"
which is the new bottleneck for marking a single object.
MarkingVisitor merely forwards to MarkingState, which knows how to set
the markbit and add the object to the worklist accordingly. This
allows to have a "UnifiedHeapMarkingVisitor" in future which can
easily reuse Marking to provide C++ marking.

Change-Id: I87ebbe37e8e8cd841e872cae9dc3490e2b55c4dd
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270172
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68660}
2020-07-02 14:30:39 +00:00
Manos Koukoutos
7c6ff8b143 [wasm] Fix heap type clusterfuzz issue
Also shuffle HeapType helper functionality a bit

Bug: chromium:1101629, v8:7748
Change-Id: I7c27dc96f02173c73dbac7b518e7936e4e0d5bf3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2275965
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68659}
2020-07-02 14:20:29 +00:00
Thibaud Michaud
a711574996 [wasm] Add tail call spec tests
R=ahaas@chromium.org

Bug: v8:7431
Change-Id: Ie416ea6048ffed792225822b053aa3ed37aa4919
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278468
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68658}
2020-07-02 14:11:49 +00:00
Andrey Kosyakov
3573d5e0fa Roll inspector_protocol library to inculude unified (de)serialization support
Note that changes in test expectation come from a more verbose
error diagnostics for expected errors around input parameter
validation.

Original change: https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2270757

Bug: chromium:1099809

Change-Id: I4fc2efc9c89d0af645dad937d719fa36e1d33489
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277142
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68657}
2020-07-02 14:08:19 +00:00
Seth Brenith
4769e1586b [regalloc] Fix issue where FindOptimalSpillingPos missed some ranges
Currently, FindOptimalSpillingPos uses GetSpillState on the loop header
block when attempting to find the live range that covers the top of the
loop. However, GetSpillState represents the state at the end of a block,
and is not written until the allocator leaves the block. So when `pos`
is within the loop header block, FindOptimalSpillingPos is incorrectly
recommending a split rather than recommending a spill of the live range
covering the loop top. This change implements a better search for the
live range that covers the beginning of the loop.

Bug: v8:10606
Change-Id: I454a009b5806d1a01ee59d6d34b9e9ef8784d294
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274308
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68656}
2020-07-02 13:34:49 +00:00
Georgia Kouveli
ee229d9e96 [arm64][cfi] Use x16/x17 for tail calls
Using x16/x17 for tail calls allows us to use a "BTI c" instead
of "BTI jc" landing pad. This means that we cannot enter functions
with a jump to a register other than x16/x17 anymore.

Bug: v8:10026
Change-Id: If5af1af861acc19f9e0dfc19c38d6a57a6fb6b6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276049
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#68655}
2020-07-02 13:13:09 +00:00
Maya Lekova
a487261196 Revert "[heap] Introduce fast path in PagedSpace::AllocateRaw"
This reverts commit 099b1cf3ef.

Reason for revert: Fails on MSAN - https://ci.chromium.org/p/v8/builders/ci/V8%20Clusterfuzz%20Linux%20MSAN%20no%20origins/16034?

Original change's description:
> [heap] Introduce fast path in PagedSpace::AllocateRaw
> 
> Introduce explicit fast path for allocation in PagedSpace. The slow path
> is moved into AllocateRawSlow which refills the LAB and retries the
> allocation.
> 
> Bug: v8:10315
> Change-Id: I807e56ccde833b0e9a42166b4883c1978d01e828
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277808
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68653}

TBR=ulan@chromium.org,dinfuehr@chromium.org

Change-Id: I11ce25da69a24a0a5ccc5e0324d1dfe71cdeaca0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10315
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2275969
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68654}
2020-07-02 12:49:23 +00:00
Dominik Inführ
099b1cf3ef [heap] Introduce fast path in PagedSpace::AllocateRaw
Introduce explicit fast path for allocation in PagedSpace. The slow path
is moved into AllocateRawSlow which refills the LAB and retries the
allocation.

Bug: v8:10315
Change-Id: I807e56ccde833b0e9a42166b4883c1978d01e828
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277808
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68653}
2020-07-02 12:36:33 +00:00
Manos Koukoutos
0a819023d1 [wasm-gc] Test improvements
- Adapt subtyping unittest to the new HeapType API
- Generalize WASM_REF_TYPE macro

Bug: v8:7748
Change-Id: Ifdb24408d7a34a6470ddccdf3dc8536cbb93dece
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274610
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68652}
2020-07-02 11:54:29 +00:00
Dominik Inführ
3b467cb52a [heap] Make slow path in concurrent allocator more explicit
Restructure code to make slow path of allocation more obvious.

Bug: v8:10315
Change-Id: Ic3e3b866b144b6f2877acac4accf87377f757172
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276273
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68651}
2020-07-02 10:57:09 +00:00
Clemens Backes
98d843c83d [wasm] Move more functionality into TraceLine
This moves some more tracing functionality into the {TraceLine} helper,
such that for most operations we only need to instantiate a {TraceLine}
object via its constructor and be done with it.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: Ide368d4a52768089a23744b9e1e25df4b8fed2ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276275
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68650}
2020-07-02 09:44:59 +00:00
Santiago Aboy Solanes
3d2501b2e4 [compiler] Add cctest for prototype chain walk
Bug: v8:7790
Change-Id: I1b9116529575f56c890f93488a0ffdebfdfe5763
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2260873
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68649}
2020-07-02 09:01:59 +00:00
Santiago Aboy Solanes
4d65587075 [compiler] Make sure to use the same DescriptorArray in LookupTransition
Call synchronized_instance_descriptors only once in LookupTransition to
make sure we have the same DescriptorArray in the method.

Bug: v8:7790
Change-Id: Ie2a610d9c1229f7f467f56365498b89f078d6347
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278043
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68648}
2020-07-02 08:49:49 +00:00
zeynepCankara
a7f9939d0b [tools][system-analyzer] Map Panel parameterized
This CL does attempt to modify Map Panel to ensure it follows web
component standards.

Change-Id: I1432d536d77233b6b8c45ff92dc8aba127f93510
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276044
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68647}
2020-07-02 08:34:19 +00:00
Manos Koukoutos
b72e8d5fdf [wasm-gc] Make table type restrictions explicit
Bug: v8:7748
Change-Id: Ib5beeb55c3a9eba8fb23680e3845f80d55f3f154
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274633
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68646}
2020-07-02 07:31:39 +00:00
Sigurd Schneider
9b5971d76f Make Thibaud a register allocator owner
Change-Id: I24c70265bca0f6c5c9c55fabfa81eb34f2994407
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278042
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68645}
2020-07-02 07:24:09 +00:00
v8-ci-autoroll-builder
a973502d0f Update V8 DEPS.
Rolling v8/build: 29bc352..cee6c15

Rolling v8/buildtools: 6099f10..6b2a302

Rolling v8/buildtools/linux64: git_revision:7d7e8deea36d126397bda2cf924682504271f0e1..git_revision:cd3869be2477f7ee1aa3f27f43ee934e74722dfb

Rolling v8/third_party/aemu-linux-x64: OQ8c-S6dNd0LdVeElhAYBgsHeiiM4xyJ8E6hy3pRIUMC..NwKjfDOL_ugbEGGNcm2u6NzakaOJ9ad36bFd7bUVpXIC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/3f5d1ca..7bb44ab

Rolling v8/third_party/depot_tools: fdd2cd6..95099f4

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

Change-Id: I58603a49de4941abc054b659ebe39a7dfce5c09d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278769
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@{#68644}
2020-07-02 03:44:59 +00:00
Deepti Gandluri
871183ea12 [wasm-simd] Implement v128.const on x64, Arm64
- Add wasm opcode, decode and compiler code for v128.const
 - Add codegen implementations for v128.const on x64/Arm64
 - Reuse/Rename some shuffle specific methods to handle generic
 128-bit immediates
 - Tests

Bug: v8:8460
Change-Id: Idc365c8f6402c13259400eac92e0b75bd0f991a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276176
Commit-Queue: Deepti Gandluri (OOO Till November) <gdeepti@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68643}
2020-07-02 01:26:09 +00:00
Jakob Kummerow
5902846347 Reland: [wasm-gc] Implement ref.test and ref.cast
No changes, just rebasing.
Original review: https://chromium-review.googlesource.com/c/v8/v8/+/2277889

Bug: v8:7748
Change-Id: Iea3bc881eaab28b14d4e2af9892ee74848c59f04
Tbr: ahaas@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278463
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68642}
2020-07-01 21:45:47 +00:00
Jakob Kummerow
5629424781 Revert "[wasm-gc] Implement ref.test and ref.cast"
This reverts commit 3f74ece91b.

Reason for revert: build breakage, rebasing issue

Original change's description:
> [wasm-gc] Implement ref.test and ref.cast
> 
> Bug: v8:7748
> Change-Id: If0023edf2f27448c605bd8aa6402bf76c7983a6e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277889
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68640}

TBR=jkummerow@chromium.org,ahaas@chromium.org

Change-Id: Idd4eee1711aed3c0a9f89a36793738c72a34c783
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7748
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278462
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68641}
2020-07-01 20:31:59 +00:00
Jakob Kummerow
3f74ece91b [wasm-gc] Implement ref.test and ref.cast
Bug: v8:7748
Change-Id: If0023edf2f27448c605bd8aa6402bf76c7983a6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277889
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68640}
2020-07-01 20:21:37 +00:00
Santiago Aboy Solanes
d432b2185c [runtime] Add thread-safety to TransitionAccessor via shared mutex
What we need is a multiple readers single writer (MRSW) lock. The
main thread is the only one that is going to be writing, while the
readers might be either the main thread or background threads.

The shared_mutex is in the isolate itself, so that different isolates
will not block each other.

Bug: v8:7790
Change-Id: Idd6bb1826bd0cc6279df1c0694a84e00d53a7eae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2241513
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68639}
2020-07-01 17:27:36 +00:00
Clemens Backes
dbb8a84226 [wasm] Untangle decoding of different opcodes
This CL mostly removes code paths which join again after a big switch.
Instead of updating a local variable (for the length of the decoded
operation), and then breaking out of the switch just to return the value
of that local variable, we now just return directly from within the
switch.
This will allow to
1) split the switch into individual methods per opcode, and
2) tail-call to helpers like {BuildSimpleOperator} or
   {DecodeNumericOpcode}.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: I466068d3566c6bff8bd3ac78a2bba60c3663dd52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276274
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68638}
2020-07-01 16:27:11 +00:00
Kim-Anh Tran
b7bbe0af0f [v8] Change TypedArray max length definition for 32 bit builds
This makes the 4GB max length compilable for 32 bit MSVC.

Bug: chromium:1095721
Change-Id: I2be9f69668687f18beb86028debb3fd5ff350202
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2272558
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68637}
2020-07-01 15:32:11 +00:00
Victor Gomes
367b0c1e7a [runtime] Change default scope info for SyntheticFunctionContexts
This changes the default scope info for SyntheticFunctionContexts
to the EmptyScopeInfo which does not contain an extension slot.

The bug happened because, previously, the native context scope info
was used as dummy.

Change-Id: I4d6bf6918c11c79201d16bde99ed76800ad6f6c5
Bug: v8:10629
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277806
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68636}
2020-07-01 14:13:50 +00:00
Georg Neis
f6726358d6 [deoptimizer] Turn always-true condition into (D)CHECK
Also fix a typo in a log message.

Change-Id: I247e5347b7f7d71b08630489896da463dd76b8a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277885
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68635}
2020-07-01 13:39:50 +00:00
Clemens Backes
3a4a0235c5 [tools] Make killing of processes more robust
We spawn individual tests in their own shell, and then just kill that
shell later. This often leaves the tests running (see linked bugs).
By spawning the shell in its own new process group, we can just kill
that whole process group later, which seems to work reliably for hanging
tests.

R=machenbach@chromium.org

Bug: v8:8292, v8:8700
Change-Id: I6e38467d687cc0b395467d4b377644de7700f066
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274634
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68634}
2020-07-01 13:35:50 +00:00
Manos Koukoutos
5df74c351f [wasm] Properly implement parsing of s33 values
Motivation:
We used to approximate s33/i33 value parsing by first checking for
specific negative codes, and then parsing an u32 value if that failed.
This is not correct in all cases.

Changes:
- Implement i33 parsing in Decoder.
- Factor out parsing of heap types into read_heap_type.
- Introduce HeapType::kBottom.
- Introduce helper functions in WasmFeatures and value_type_reader.
- Remove macros from the parsing of value types.
- HeapType::code now returns an i32 for compatibility with the i33
  requirement.
- Introduce HeapType::Repr.
- Renamings: HeapType::type() -> representation(),
             ValueType::heap() -> heap_representation()

Bug: v8:7748
Change-Id: I04deabce8837a48af2226411cd706a397f9e5725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274118
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68633}
2020-07-01 12:27:40 +00:00
Marja Hölttä
e76072bf00 [futex emulation layer] Cast to atomics before accessing shared memory
It's actually not an atomic variable, just raw memory, so this is
technically not correct. However, the expert advice is to do this
until atomic_ref is available.

Change-Id: I4b74aa7123ed6ffeb2a06800c35b03e428861e80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270162
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68632}
2020-07-01 12:25:50 +00:00
Camillo Bruni
71dd648fb7 [js-perf-test] Add flags for async benchmark
Skip unhandled promises for AsyncAwait performance test.

Bug: v8:1099632
Change-Id: I21d69d5700860f0b05fb8c6c90ea85dc28cb3890
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274606
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68631}
2020-07-01 12:04:46 +00:00
Camillo Bruni
7b848f07ef [tools] Add script to convert telemetry json files for callstats.html
tools/callstats-from-telemetry.sh converts multiple telemetry results
form benchmark runs into a single callstats-compatible json file.

Change-Id: I775109d4274c2cf8d87797b73695497d82d59d4a
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276043
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68630}
2020-07-01 09:31:16 +00:00
Salome Thirot
e6c22a06c9 Modify --trace-deopt output for signed addresses
Modify the output of --trace-deopt to specify which version of the
caller's pc (signed with PAC or unsigned) is shown when CFI is enabled.

Change-Id: I77006839997a5f50d37d65facbba24d8a86a1509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274867
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68629}
2020-07-01 09:16:26 +00:00
Jakob Gruber
1dceb9708f [compiler] Refactor FastApiCall reduction
This refactors the FastApiCall reduction to be more explicit about
which inputs of the JSCall node are used.

Bug: v8:8888
Change-Id: Ia950bbfcf359ec4ae232b8dd21adafb0b4a05177
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276032
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68628}
2020-07-01 09:09:56 +00:00
Michael Lippautz
4d52549a6f cppgc: Remove -inl.h files
Move inlined methods to .h files accordingly, follwing style guide
rule:
https://google.github.io/styleguide/cppguide.html#Self_contained_Headers

Bug: chromium:1056170
Change-Id: Ia6c4f82bd4352d507eece36e540ad0d318e56920
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2273858
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68627}
2020-07-01 08:46:26 +00:00
Jakob Gruber
86a6337829 [compiler] Remove untyped RelyOnMapsPreferStability
The typed version takes Effect/Control arguments instead of untyped
Node* arguments.

Bug: v8:8888
Change-Id: Ia4b9895256ab9ea2a22f9e590490280d7536eac7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274609
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68626}
2020-07-01 07:41:46 +00:00
Zhao Jiazhong
76a60e15ce [mips][wasm-simd] Prototype f32x4 and f64x2 rounding
Port ef1d6a3b7f
https://crrev.com/c/2227257

Change-Id: Id829db611fdfd475462efec2aa0ab6f94d3ddce3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2251680
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68625}
2020-07-01 04:16:52 +00:00
v8-ci-autoroll-builder
83dddaca4f Update V8 DEPS.
Rolling v8/base/trace_event/common: ef35868..23ef533

Rolling v8/build: 3a5fbeb..29bc352

Rolling v8/buildtools: 1ed9957..6099f10

Rolling v8/third_party/aemu-linux-x64: I_sHBnheTA3cmFAjzkyUAhsmhpWXu82YLidstkjgsvIC..OQ8c-S6dNd0LdVeElhAYBgsHeiiM4xyJ8E6hy3pRIUMC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/de622ae..3f5d1ca

Rolling v8/third_party/depot_tools: d9391fd..fdd2cd6

Rolling v8/tools/clang: 6849229..b49c12a

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

Change-Id: Ibab2c61210b9142ddd269b48aadc5a39c6996ede
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2275116
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@{#68624}
2020-07-01 03:49:42 +00:00
Jake Hughes
c96db961b2 Add flag for enabling unconditional write barrier
Whether or not a store requires a write barrier depends on several
invariants within V8. Some flags can break these invariants. In
particular, it's not possible to use enable_single_generation with
incremental marking because marking barriers are omitted in places where
it is assumed an object will be allocated in the young generation.

This CL introduces a new flag, enable_unconditional_write_barriers,
which allows us to specify that full write barriers should always
happens. The main purpose of this is to support single generation GC
with incremental marking, but it can also aid as a debugging tool to
check for missed write barriers.

Bug: v8:10614
Change-Id: I3ab640436bcefc118c9c5c34765421cb9ea4896f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270546
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jake Hughes <jakehughes@google.com>
Cr-Commit-Position: refs/heads/master@{#68623}
2020-06-30 23:10:12 +00:00
Dominik Inführ
b9c3d26ba9 Increase bytecode_age with relaxed operation
Release operation uses more expensive operations on some architectures.

Change-Id: Iab84d92c84c791d429b6635641daadb2d608f791
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276039
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68622}
2020-06-30 20:34:12 +00:00
Daniel Clifford
c0e2479106 [torque] Make more classes eligible for direct map Cast<> checks
Also should address minor performance regressions for instance types
that should (and used to) use map compare rather than instance_type
comparison.

In the process, convert a bunch of IsXXX methods from the CSA into
exported Torque methods that call through to the Cast<> to ensure
there is only a single implementation of the type checkers. Also clean
up and remove duplicate/redundant code and unused Torque imports.

Bug: v8:7793, chromium:1098481
Change-Id: I3cd5146d913bb75bab4f73415b1b94bc30924725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270545
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68621}
2020-06-30 20:01:01 +00:00
Jakob Kummerow
26626f8731 [wasm-gc] Implement struct.new_with_rtt
Bug: v8:7748
Change-Id: I6bbb73ceb397b102783ecfcc553264d83e926df2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2273126
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68620}
2020-06-30 18:59:55 +00:00
Ng Zhi An
8e54afbe24 [wasm-simd][arm] Prototype f64x2.nearest
Prototype f64x2.nearest on ARM for both ARM v7 and ARM v8. ARM v8 has
support for vrintn, and for ARM v7 we fallback to runtime.

Since ARM v8 uses vrintn, which is the same instruction used for
F64RoundTiesEven (scalar), wasm-compiler reuses the Float64RoundTiesEven
check.

Bug: v8:10553
Change-Id: Ia4c4245cac87c132331f54e81dad323fc3fb9f6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2268358
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68619}
2020-06-30 17:57:21 +00:00
Daniel Clifford
9bd8e5f247 [torque] Unused implicit parameters can be undefined
e.g. the following is now valid Torque code:

  macro TestA(implicit c: Context)() {}

  macro TestB(): bool {
    return TestA();
  }

This is handy for more flexible usage of generics that may or may not
use implicit parameters deep inside their specializations.

Note that this change doesn't change the fundamental rigor (or lack
thereof) around checking the usage of implicit parameters, which
already do not require '_' before their parameter identifier if
unused. It just silences errors in cases where a call site doesn't
implicitly pass a parameter that ultimately doesn't have a use site
and adds meaningful error messages in the case that it does.

Bug: v8:7793
Change-Id: I559d06c0864a7e79fe52bee5a9a7af9941889748
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274127
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68618}
2020-06-30 16:32:23 +00:00
Mike Stanton
0d3e5872a1 Add %DebugPrintPtr(0x...) for exploring metadata
Often at the d8 prompt, you'd like to explore some pointer found
from calls to %DebugPrint(). %DebugPrintPtr() takes a pointer and
attempts to print it as an object.

Change-Id: Ibc3368136a2ed92f400b52dbf2855f3c7d80d887
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276046
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68617}
2020-06-30 15:54:00 +00:00
Jakob Gruber
2b236e3333 [nci] Add feedback input to Call nodes
This is likely the major change of the series, as Call nodes are the
focus of call reducer (and to a lesser extent other phases like
inlining).

This CL essentially adds the new input to Call nodes, and updates the
rest of the pipeline. As a (fairly large) drive-by, I also introduce
the JSCallNode wrapper class and apply it in call reducer.

This change, although large, will hopefully make future refactorings
*much* easier, since it is now clear where certain assumptions about
Call node layout are made.

Bug: v8:8888
Change-Id: Ia15fe0ba459b6034863a5815a4e4662cee41fc83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2264353
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68616}
2020-06-30 14:18:36 +00:00