Commit Graph

57097 Commits

Author SHA1 Message Date
Tobias Tebbi
7d3c9bce1f [csa][turbofan] Prevent large object allocations unless allowed
The slow-path emitted by the memory optimizer now checks if large
object allocations were allowed before going ahead and allocating
a large object. This is important because manual allocation folding
in CSA must not be performed on a large object.

Bug: v8:9388
Change-Id: I74b840c9c9276bd17611842e0eae7b0e58b142d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1675960
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62605}
2019-07-09 14:30:48 +00:00
Dominik Inführ
54a3636641 [heap] No more old-to-new slot deletion during GC pause
Right trimming of arrays was deleting old-to-new slots during a GC pause.
Disable slots removal for right trimming of arrays and ensure no more slots
are deleted during a GC pause.

Bug: v8:9454
Change-Id: I6268d63b82713d765247dca4aaadadfe275b7dcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691915
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62604}
2019-07-09 14:22:58 +00:00
Pierre Langlois
f8c2b2101b [turbolizer] Fix keyboard shortcuts in info tab to reveal input/output nodes.
The info tab says that 'i' reveals outputs and 'o' reveals inputs, it should be
the opposite.

Bug: v8:7327
Change-Id: I1bf96653129e14ef315a01dc2c7a3083c9caa5bb
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692929
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Auto-Submit: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62603}
2019-07-09 14:15:52 +00:00
Santiago Aboy Solanes
d4ee39231c [ptr-compr][turbofan] Use Mach Rep information to choose the decompression
Decompressing with Any just chooses one of the decompressions (Signed or
Pointer). Since we already know which decompression it is going to choose,
we save ourselves a whole bunch of instructions by just skipping that.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:7703
Change-Id: I0173931536e7ba83fa3572ceb50b176409f0b6c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691916
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62602}
2019-07-09 13:54:38 +00:00
Ana Pesko
9f8463e081 [regexp] Faster duplicate checking for named captures/back references
This CL changes the use of a ZoneList for keeping track of named captures
in a regular expression to a ZoneMap, to optimize finding the named
capture in the structure.

Bug: v8:9423
Change-Id: Id952ac8f86c1dc5d69a3b0251ff724d1509879dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687413
Commit-Queue: Ana Pesko <anapesko@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62601}
2019-07-09 12:53:12 +00:00
Jakob Kummerow
a0da3d5465 [wasm-c-api] Add test for Memory
Change-Id: Ide762b9af9bd23d376025e9b3e6f5ccab7b0f1a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691026
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62600}
2019-07-09 12:49:18 +00:00
Andreas Haas
25e7c9192c [wasm] Implement table.grow and table.size in the interpreter
R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: I958c622387e2e3520fae051ae893623238393550
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691021
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62599}
2019-07-09 12:21:08 +00:00
Nico Hartmann
b2a204c7f9 [turbofan] DCHECK use of TypeCheckKind
TypeCheckKind may be propagated only by operators that
can potentially deopt and sit in the effect chain.
This CL introduces a DCHECK to detect that it is not set
for other operators.

Change-Id: I002c7c36ab2d2612a41a2f280927cb85c112b9b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691912
Commit-Queue: Nico Hartmann <nicohartmann@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62598}
2019-07-09 12:16:48 +00:00
Igor Sheludko
b51cddc154 [ptr-compr] Isolatify LookupIterator implementation and friends
Tbr: verwaest@chromium.org
Bug: v8:9353
Change-Id: I8164e2235ca43e203410277b86e6f166010c11d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687673
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62597}
2019-07-09 12:07:48 +00:00
Andreas Haas
ad9ead7644 [wasm][interpreter] Support indirect function calls through all tables
R=clemensh@chromium.org

Bug: v8:7581
Change-Id: I6fd538f2e90bf5a4addcfe7d8f4b427850ac6fca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690960
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62596}
2019-07-09 11:51:28 +00:00
Tamer Tas
c1c6e3edf7 Revert "[browser-stories] gate features behind {experimental} flag"
This reverts commit 1db33e5fff.

Reason for revert: {AttributeError} 'Namespace' object has no attribute 'experimental'

Original change's description:
> [browser-stories] gate features behind {experimental} flag
> 
> Performance infra recipes use callstats.py to run web page replays. Split (v8,
> infa, perf-infra) repositories make experimenting with callstats.py hard.
> 
> This CL creates feature gating for simplifying performance infra experiments.
> 
> R=​ulan@chromium.org
> 
> No-Try: true
> Bug: v8:9448
> Change-Id: I2c3e139f4b9d6bce1ea4fdda1a44960d74d7d414
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690950
> Auto-Submit: Tamer Tas <tmrts@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Tamer Tas <tmrts@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62565}

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

Change-Id: If40be01a2edebf0538ad306fa5ded0dfa2aaf147
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9448
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692922
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62595}
2019-07-09 11:43:30 +00:00
Clemens Hammacher
c762f127bf [disasm] Clean up decoding of immediates
Instead of having hard to read reinterpret_casts all over the place,
extract this to separate methods.

R=mstarzinger@chromium.org

Bug: v8:9396
Change-Id: Id8d47b5dda8f5b32dedfe9f76c4f526ffcff0674
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691024
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62594}
2019-07-09 10:40:30 +00:00
Mike Stanton
4d40e867f0 [turbofan] Serialize source position table
... for concurrent graph building.

This is a reland of jarin@chromium.org's CL
https://chromium-review.googlesource.com/c/v8/v8/+/1682027

with support to access the source positions through a handle
when running without concurrent inlining, because the positions
may move due to GC allocation.

Bug: v8:7790
Change-Id: I1b2cc84c8cb801cb82f1a527fce736c74c156c1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1683726
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62593}
2019-07-09 10:35:48 +00:00
Clemens Hammacher
c52eefe932 [d8] Remove non-const reference arguments
R=jgruber@chromium.org

Bug: v8:9429, v8:9396
Change-Id: I0e51e8478d7232bc51bed26bc26560c6e6450366
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690946
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62592}
2019-07-09 10:13:19 +00:00
Jakob Gruber
1b06c23b14 [regexp] Handle large named capture groups object
The name dictionary allocated to store named captures on the regexp
result object could be too large for regular heap spaces and
ConstructNewResultFromMatchInfo must thus also handle the large object
case.

Bug: chromium:980891
Change-Id: Ia1dbecd0a9d9d6b39f80e77680386c385d95c97c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691907
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62591}
2019-07-09 09:28:46 +00:00
Mike Stanton
c134e421a2 [TurboFan] Don't cache tagged templates in the feedback vector
In the rare case that a tagged template is not initialized before
optimization time, we currently cache this created template in the
feedback vector. If we stop doing this, we simplify the interface
usefully for concurrent compilation and pay little for it.

Bug: v8:7790
Change-Id: Ifc82b0eb931a706767596febd4f4b312e167fd25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690837
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62590}
2019-07-09 08:56:40 +00:00
Yutaka Hirano
925b17ba2f Revert "Serialize native errors"
This reverts commit 85bc4ef6c2.

Reason for revert: The tag 'e' conflicts with a blink serialization tag: kFileIndexTag.

Original change's description:
> Serialize native errors
> 
> Make native errors serializable.
> 
> The implementation is mostly straightforward, but there is one
> exception: the stack property. Although the property is not specified,
> the spec for error cloning asks us to preserve the property if
> possible. This implementation serializes the property only when it is
> a string, and otherwise ignores it.
> 
> Spec: https://github.com/whatwg/html/pull/4665
> Intent-to-Ship: <TBD>
> 
> Bug: chromium:970079
> Change-Id: I7f36b8b4fc5dff22d726d849ccfb9748d0888365
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649257
> Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62584}

TBR=jbroman@chromium.org,yhirano@chromium.org,adamk@chromium.org,domenic@chromium.org,szuend@chromium.org

Change-Id: Ia0cc902eaa1419cdb0cfec377d8a40fa914612c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:970079
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692365
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62589}
2019-07-09 08:49:07 +00:00
Ulan Degenbaev
c8fbe8e837 [heap] Fix cpplint 'runtime/references' warnings
This replaces non-const reference arguments by pointers.

Bug: v8:9429
Change-Id: I5e5d94b020dedf3005f8d74202d31e3a50bdf754
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690943
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62588}
2019-07-09 08:48:02 +00:00
Patrick Thier
17b9d8728a [regexp] Add missing case for EscapeRegExpPattern
EscapeRegExpPattern should return a string representation of a
RegExp instance that in turn can be used to construct a new
RegExp instance with the same internal state as the original one.

Previous versions incorrectly escaped '/' also inside character classes
(e.g. /[/]/ returned "[\/]").

This patch properly escapes '/' when necessary and omits unnecessary
escapes.

Bug: v8:8615, v8:1982, v8:9446
Change-Id: I4ecb993dc69d6976f4637cedf43465cd0c32e427
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1688050
Commit-Queue: Patrick Thier <pthier@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62587}
2019-07-09 08:11:51 +00:00
Georg Neis
a6eabacfee Disabe FLAG_turbo_control_flow_aware_allocation again
A few changes have been made to this feature and disabling it lets us
best see its current performance impact.

Bug: v8:9088
Change-Id: I54d5e09f3fcece215e29d66d5bdb3f19ba07bda0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690954
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62586}
2019-07-09 07:57:06 +00:00
Ng Zhi An
2e54e9af61 [wasm simd] Implement I64x2 LtS, LtU, GtS, GtU, LeS, LeU, GeS, GeU
Bug: v8:8460
Change-Id: I837b7dc3f575d69ccbf2cd76332c0bf775724675
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1684362
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62585}
2019-07-09 07:47:10 +00:00
Yutaka Hirano
85bc4ef6c2 Serialize native errors
Make native errors serializable.

The implementation is mostly straightforward, but there is one
exception: the stack property. Although the property is not specified,
the spec for error cloning asks us to preserve the property if
possible. This implementation serializes the property only when it is
a string, and otherwise ignores it.

Spec: https://github.com/whatwg/html/pull/4665
Intent-to-Ship: <TBD>

Bug: chromium:970079
Change-Id: I7f36b8b4fc5dff22d726d849ccfb9748d0888365
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649257
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62584}
2019-07-09 05:49:48 +00:00
Simon Zünd
2d546908c3 [cleanup] Avoid non-const reference arguments in src/torque
This CL changes non-const reference arguments to either a const
reference, or pass-by-value combined with std::move.

Bug: v8:9429
Change-Id: Iabace132f855462612ac31922fbd8b456d8ae20d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690827
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62583}
2019-07-09 05:14:28 +00:00
Daniel Clark
749f0727a2 [modules] Implement SyntheticModule::ResolveExport and SyntheticModule::Evaluate.
ResolveExport and Evaluate are the final unimplemented SyntheticModule methods; with this
change the implementation is complete.

Test-api unit tests are also provided.

Bug: v8:9292
Change-Id: Ieb7643cc5b6495dd201a51f04199d2406a703e52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1681187
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#62582}
2019-07-09 00:09:32 +00:00
Bill Budge
e6b853ef16 [wasm] Rename 'anyfunc' to 'funcref'.
Change-Id: Ia506f4741e6ff9f024199d1b1fa7abb7dafe2b25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682835
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62581}
2019-07-08 21:21:21 +00:00
Bill Budge
5f9dfee548 [wasm] Clean up export processing for asm.js
Defers some work in the non-asm.js case

Change-Id: Id20863fb2af83148271408b0242d49e03be29d3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682213
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62580}
2019-07-08 20:50:51 +00:00
Irina Yatsenko
ef332f7a69 Make adding crash keys a platform API
The current integration of crash keys into v8 got the dependencies wrong: it introduced into v8 a dependency on components and base. This change will allow moving the implementation into "gin" (via Platform's abstraction), which is ok to depend on components and base, while providing the default noop implementation for the embedders that don't care to collect crash keys. Gin's side: https://chromium-review.googlesource.com/c/chromium/src/+/1690003.

Bug: v8:9323
Change-Id: I7b6e3e2cdc4b5f14f61ad20d2c362344d53896c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1689834
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62579}
2019-07-08 17:23:49 +00:00
Clemens Hammacher
bf92fbf4c8 Revert "[arraybuffer] Rearchitect backing store ownership"
This reverts commit 31cd5d83d3.

Reason for revert: It breaks my heart to revert this, but it fails differently on several bots, e.g. https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20debug/26671.

Original change's description:
> [arraybuffer] Rearchitect backing store ownership
> 
> This CL completely rearchitects the ownership of array buffer backing stores,
> consolidating ownership into a {BackingStore} C++ object that is tracked
> throughout V8 using unique_ptr and shared_ptr where appropriate.
> 
> Overall, lifetime management is simpler and more explicit. The numerous
> ways that array buffers were initialized have been streamlined to one
> Attach() method on JSArrayBuffer. The array buffer tracker in the
> GC implementation now manages std::shared_ptr<BackingStore> pointers,
> and the construction and destruction of the BackingStore object itself
> handles the underlying page or embedder-allocated memory.
> 
> The embedder API remains unchanged for now. We use the
> v8::ArrayBuffer::Contents struct to hide an additional shared_ptr to
> keep the backing store alive properly, even in the case of aliases
> from live heap objects. Thus the embedder has a lower chance of making
> a mistake. Long-term, we should move the embedder to a model where they
> manage backing stores using shared_ptr to an opaque backing store object.
> 
> R=​mlippautz@chromium.org
> BUG=v8:9380,v8:9221
> 
> Change-Id: I48fae5ac85dcf6172a83f252439e77e7c1a16ccd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584323
> Commit-Queue: Ben Titzer <titzer@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62572}

TBR=ulan@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,titzer@chromium.org,gdeepti@chromium.org,mlippautz@chromium.org

Change-Id: Ib35788ba8c31192d90cbc72df3dbc41030f109de
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9380, v8:9221
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691034
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62578}
2019-07-08 17:20:51 +00:00
Santiago Aboy Solanes
6ad6dd1a7a [ptr-compr] Use branchful pointer decompression in generated code
Locally tested, octane results are the same or better when using
branchful decompression in generated code.

The biggest one is DeltaBlue in x64 which improves about 25%.
x64's EarleyBoyer is another important one with ~10% improvement.

Bug: v8:7703
Change-Id: Ie1edd6e216b307a1f5263b22472c0a64f76400fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690955
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62577}
2019-07-08 17:15:49 +00:00
Andreas Haas
e9169905ab [wasm][anyref] Increase table count limit
Update for a recent spec change: https://github.com/WebAssembly/reference-types/pull/38

R=binji@chromium.org

Bug: v8:7581
Change-Id: I4ac4a4c351dfc100f978e1aead308cbed59149e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690832
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62576}
2019-07-08 17:06:18 +00:00
Ulan Degenbaev
e967b449b2 Revert "[heap] Replace ConcurrentSweepingState with a MemoryChunk local epoch counter."
This reverts commit 907f3a64b7.

Reason for revert: speculative revert for v8:9445
I will reland if the crash is not fixed by the revert.

Original change's description:
> [heap] Replace ConcurrentSweepingState with a MemoryChunk local epoch counter.
>
> Bug: v8:9093
> Change-Id: I7c415fd0ea9e48f7ee189115f164825cb120695b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624213
> Commit-Queue: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62423}

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

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

Bug: v8:9093, v8:9445
Change-Id: Ia81a52579dc0a89f57ee41c7d0f8b1ba0f9bba81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691025
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62575}
2019-07-08 16:40:28 +00:00
Maciej Goszczycki
590a9f78ae [roheap][snapshot] Add a new snapshot specific allocation space enum
This change partially decouples the heap's allocation space numbering
from the snapshot space encoding. This allows encoding read-only
heap allocations when RO_SPACE is removed.

A few pieces of src/snapshot also get cleaner as they no longer need to
check for extraneous AllocationSpace values.

Bug: v8:7464
Change-Id: I984c039b0e50e233209911ac3e655eb39be2551b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690956
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62574}
2019-07-08 16:26:58 +00:00
Ulan Degenbaev
cb47987912 [heap] Clean up initialization of heap limits and fix global limits
This moves initialization of heap limits to one place: ConfigureHeap
and also initializes the global limits there.

Change-Id: I7ca76073680a97627a8b1da9a8310af003794a93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648259
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62573}
2019-07-08 16:10:28 +00:00
Ben L. Titzer
31cd5d83d3 [arraybuffer] Rearchitect backing store ownership
This CL completely rearchitects the ownership of array buffer backing stores,
consolidating ownership into a {BackingStore} C++ object that is tracked
throughout V8 using unique_ptr and shared_ptr where appropriate.

Overall, lifetime management is simpler and more explicit. The numerous
ways that array buffers were initialized have been streamlined to one
Attach() method on JSArrayBuffer. The array buffer tracker in the
GC implementation now manages std::shared_ptr<BackingStore> pointers,
and the construction and destruction of the BackingStore object itself
handles the underlying page or embedder-allocated memory.

The embedder API remains unchanged for now. We use the
v8::ArrayBuffer::Contents struct to hide an additional shared_ptr to
keep the backing store alive properly, even in the case of aliases
from live heap objects. Thus the embedder has a lower chance of making
a mistake. Long-term, we should move the embedder to a model where they
manage backing stores using shared_ptr to an opaque backing store object.

R=mlippautz@chromium.org
BUG=v8:9380,v8:9221

Change-Id: I48fae5ac85dcf6172a83f252439e77e7c1a16ccd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584323
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62572}
2019-07-08 16:06:48 +00:00
Jakob Kummerow
97c75d37ad [wasm-c-api] Add test for globals
Change-Id: I05bfc6eb98ea31b559d4195364e722ddf472afee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687677
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62571}
2019-07-08 14:24:56 +00:00
Andreas Haas
5f97de9b8b [wasm] Implement table.get and table.set in the interpreter
R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: Ie5372e37acf31cd20f7914423fe4c802b5903b95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690944
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62570}
2019-07-08 13:48:56 +00:00
Clemens Hammacher
4c9d52e1c8 [wasm] Remove non-const reference args from fuzzers
R=ahaas@chromium.org

Bug: v8:9429, v8:9396
Change-Id: Ie6119ff58fdf48612d81fe0616986a4da95135d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690836
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62569}
2019-07-08 13:46:46 +00:00
Peter Marshall
edd383fbcd [tracing] Use the new perfetto client API
The client API provides a much simpler interface so that we don't have
to deal with producers, consumers etc. directly. This CL removes all the
code that dealt with the more complex API used previously.

The architecture used here requires that the embedder call into
Tracing::Initialize() to set up the tracing backend. The tracing
controller then connects to this backend when calling
DataSource::Register() and Tracing::NewTrace(). This will ultimately
avoid the need for a virtual call (or two) for every trace event that
need to be dispatched over the API - chrome can provide a backend
and V8 will connect to it opaquely with the same code when tracing is
enabled.

Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
Bug: v8:8339
Change-Id: I6b74fbb49ffcc89638caeb59ed3d5cc81238f3e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1634916
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62568}
2019-07-08 13:37:16 +00:00
Michael Starzinger
326f23782b [cleanup] Fix NOLINT(runtime/references) for asm.js parser.
R=clemensh@chromium.org
BUG=v8:9429,v8:9396

Change-Id: I35c6ef903e760ac3797ebe51722b4e6bccd4d105
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690945
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62567}
2019-07-08 13:30:26 +00:00
Ulan Degenbaev
5c6e407d9d [heap] Spawn parallel scavenging task per page in the from space
This makes the heuristic for computing the number of parallel tasks
in Scavenger consistent with that in Mark-Compactor.

The patch helps mobile devices where even 1 MB new space can take
10ms to scavenge.

Change-Id: I979de5e8485b93808ea079af2756f53d9b720e10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1685612
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62566}
2019-07-08 13:21:06 +00:00
Tamer Tas
1db33e5fff [browser-stories] gate features behind {experimental} flag
Performance infra recipes use callstats.py to run web page replays. Split (v8,
infa, perf-infra) repositories make experimenting with callstats.py hard.

This CL creates feature gating for simplifying performance infra experiments.

R=ulan@chromium.org

No-Try: true
Bug: v8:9448
Change-Id: I2c3e139f4b9d6bce1ea4fdda1a44960d74d7d414
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690950
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62565}
2019-07-08 13:09:46 +00:00
Clemens Hammacher
1f237492f9 [base] Remove non-const reference
This fixes the only violation of the 'runtime/references' warning in
src/base by using a forwarding reference.

R=mlippautz@chromium.org

Bug: v8:9429, v8:9396
Change-Id: Ide2d28ab647e1cec78979c3f6d664b53c92a7d6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690839
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62564}
2019-07-08 13:03:08 +00:00
Andreas Haas
9efaf55495 [wasm] Rename (Get|Set)Table to Table(Get|Set)
When I implemented these instructions, I copied the naming scheme of
{GetGlobal}. That's not appropriate for the table.get instruction
though, and I decided I suffered enough from that bad name now.

R=clemensh@chromium.org

Bug: v8:7581, v8:9396
Change-Id: Id1796425458f3d06a2da774374f02c49d665d2c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690835
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62563}
2019-07-08 12:55:14 +00:00
Peter Marshall
011a6f35d7 Add myself as libplatform/tracing/* owner
Change-Id: Iee9967b419fbb7cb7a20137a8325097ce9525ee1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690840
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62562}
2019-07-08 12:46:54 +00:00
Clemens Hammacher
5aa15fd822 [zone] Fix allocate method of ZoneAllocator
This removes two unneeded casts and an unused parameter.
Note that according to the specification, {Allocator}s need to provide
an {allocate} method receiving the size {n}, and *optionally* they can
support {allocate} with a second pointer parameter which they can use
in an unspecified manner. Since we do not use the second argument, we
should just not provide that method.

Drive-by: Remove else-after-return.

R=mlippautz@chromium.org

Bug: v8:9396
Change-Id: I776c5ae2f6652e20c9f9bfd511c41ce6ad1c1329
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690831
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62561}
2019-07-08 12:31:34 +00:00
Simon Zünd
b658d9c749 Reland "[snapshot] Add '.note.GNU-stack' marker section for ELF snapshots"
This is a reland of f24e995809

Speculatively relanding the CL. LLD ignores the added section, so the
output should not be any different. The issue was also not reproducible
locally. Keeping an eye on the bot/roll to quickly revert, in case this
CL really breaks the deterministic build.

Original change's description:
> [snapshot] Add '.note.GNU-stack' marker section for ELF snapshots
>
> This snapshot adds a marker section to the output assembly of
> mksnapshot. Omitting this section can imply an executable stack, which
> can result in linker warnings.
>
> R=jgruber@chromium.org
>
> Change-Id: I6f5dacb24de3a852faf6ce0caf18c32b499ba5a9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687669
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62504}

TBR=jgruber@chromium.org

Bug: chromium:981138
Change-Id: I2ddbaa7aa33f125ea0a0854cd9a94108c3a3845f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690825
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62560}
2019-07-08 12:29:38 +00:00
Clemens Hammacher
a495c35e99 [zone] Remove unneeded ZoneAllocator::address
This method is not specified as part of the Allocator requirement, as
is deprecated on std::allocator since C++17.

This also removes the only violation of the 'runtime/references'
cpplint check in the zone directory.

R=mlippautz@chromium.org

Bug: v8:9429, v8:9396
Change-Id: I77c28afbf3c0e122c5ac27796b9f46b6c9455e61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690830
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62559}
2019-07-08 12:26:38 +00:00
Georg Neis
6786707fb7 Prefer type NativeContext over Context in more places
Change-Id: Ie0f54dd36a7af9503306d756182d98fc2273b48a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690828
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62558}
2019-07-08 12:24:28 +00:00
Santiago Aboy Solanes
bda32bcbd0 [ptr-compr] Specialize CompressedSigned -> Word32 conversion
This CL aims to address the regressions that we saw in Octane 2.1,
particularly in the DeltaBlue test.

This CL brings a 5% improvement in said test by doing
CompressedSigned -> Word32 conversion (instead of
CompressedSigned -> TaggedSigned -> Word32).

There seems to be room for optimizations doing more specialized conversions
regarding representation changes.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:7703
Change-Id: I24e5b6c06436fdda9fa6a1ac4699dc55c3d67abd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1684075
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62557}
2019-07-08 12:21:58 +00:00
Clemens Hammacher
af4905d391 [wasm] Remove non-const arguments from decoder
R=ahaas@chromium.org

Bug: v8:9429, v8:9396
Change-Id: I79e5d707f6c3970c96eb2186604d8b26fda787e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687897
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62556}
2019-07-08 12:18:58 +00:00