Commit Graph

55535 Commits

Author SHA1 Message Date
Michael Achenbach
ce90b8e3bc [test] Mark more slow tests
TBR=sigurds@chromium.org
NOTRY=true

Bug: v8:9145
Change-Id: I01829358bc2729d39d06ee40af108b3218e7339d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585841
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61043}
2019-04-26 11:51:21 +00:00
Hannes Payer
aad7b143a4 [heap] Simplify FreeList clearing friends.
Bug: v8:9093
Change-Id: I3e4187f8d47a8a6cf80cc2fa2d2b96d89628af35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585738
Auto-Submit: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61042}
2019-04-26 11:42:11 +00:00
Clemens Hammacher
829ceb70d9 [wasm][gc] Remove dead code references when NativeModule dies
If a {NativeModule} dies while a GC is running, we could leave behind
references to code of that deleted module. This CL fixes that.
This issue was found by running with --stress-wasm-code-gc.

R=mstarzinger@chromium.org

Bug: v8:8217
Change-Id: I7f0d98977e6510899170306952936c4a7f7d3c10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585722
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61041}
2019-04-26 11:36:02 +00:00
Andreas Haas
eb131dcc7b [wasm] Disable asan for memory_copy_wrapper
The function {memory_copy_wrapper} is called directly from WebAssembly.
Before calling {memory_copy_wrapper} we do not reset the
tread-in-wasm flag. On asan builds on Windows this causes the problem
observed in the crash report.

My theory is the following: asan on Windows uses exceptions to allocate
shadow memory lazily. When {memory_copy_wrapper} accesses memory, asan
causes an exception to allocate shadow memory. This exception is first
caught by the WebAssembly trap handler, which resets the
thread-in-wasm flag but then does not handle the exception because it
cannot find a proper landing pad. Asan then handles the exception and
continues execution. However. the thread-in-wasm flag is not set
anymore. A later check of the thread-in-wasm flag then fails.

This CL disables asan for {memory_copy_wrapper} and thereby fixes the
problem. As indicated above, another solution would be to reset and set
the thread-in-wasm flag before and after the call to the C function,
respectively. However, we do not do that for other uses of direct calls
to C.

R=binji@chromium.org

Bug: chromium:952342
Change-Id: I2adb2eccf2ac25be58392d21f8f43a04414c7811
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584326
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61040}
2019-04-26 11:21:21 +00:00
Clemens Hammacher
2300b5256d [wasm][gc] Add stress GC mode
Add a flag which causes wasm code gc to be triggered whenever any code
is found to be potentially dead. This mode found several bugs already,
and I plan to enable it in 'gc-stress' mode once all issues are fixed.

R=mstarzinger@chromium.org

Bug: v8:8217
Change-Id: If28d980ded98b77b9efe7446da74d857e3c5e1b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585720
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61039}
2019-04-26 10:37:40 +00:00
Ross McIlroy
dd6c953601 Revert "[csa] verify skipped write-barriers in MemoryOptimizer"
This reverts commit da7322c05f.

Reason for revert: Breaking the pointer compression bots, e.g.:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20pointer%20compression/3047

Original change's description:
> [csa] verify skipped write-barriers in MemoryOptimizer
> 
> With very few exceptions, this verifies all skipped write-barriers in
> CSA and Torque, showing that the MemoryOptimizer together with some
> type information on the stored value are enough to avoid unsafe skipped
> write-barriers.
> 
> Changes to CSA:
> SKIP_WRITE_BARRIER and Store*NoWriteBarrier are verified by the
> MemoryOptimizer by default.
> Type information about the stored values (TNode<Smi>) is exploited to
> safely skip write barriers for stored Smi values.
> In some cases, the code is re-structured to make it easier to consume
> for the MemoryOptimizer (manual branch and load elimination).
> 
> Changes to the MemoryOptimizer:
> Improve the MemoryOptimizer to remove write barriers:
> - When the store happens to a CSA-generated InnerAllocate, by ignoring
>   Bitcasts and additions.
> - When the stored value is the HeapConstant of an immortal immovable root.
> - When the stored value is a SmiConstant (recognized by BitcastToTaggedSigned).
> - Fast C-calls are treated as non-allocating.
> - Runtime calls can be white-listed as non-allocating.
> 
> Remaining missing cases:
> - C++-style iterator loops with inner pointers.
> - Inner allocates that are reloaded from a field where they were just stored
>   (for example an elements backing store). Load elimination would fix that.
> - Safe stored value types that cannot be expressed in CSA (e.g., Smi|Hole).
>   We could handle that in Torque.
> - Double-aligned allocations, which are not lowered in the MemoryOptimizer
>   but in CSA.
> 
> Drive-by change: Avoid Smi suffix for StoreFixedArrayElement since this
> can be handled by overload resolution (in Torque and C++).
> 
> R=​jarin@chromium.org
> TBR=mvstanton@chromium.org
> 
> Change-Id: I0af9b710673f350e0fe81c2e59f37da93c024b7c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1571414
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61016}

TBR=mvstanton@chromium.org,jarin@chromium.org,tebbi@chromium.org

Change-Id: I36877cd6d08761726ef8dce8a3e3f2ce3eebe6cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585732
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61038}
2019-04-26 10:03:33 +00:00
Sergiy Belozorov
631c4d4f6b [tools] Refactor Results class into ResultsTracker class based on dicts
This is part of the refactoring needed to implement a feature that allows
re-running benchmarks until needed confidence is reached.

R=machenbach@chromium.org

No-Try: true
No-Tree-Checks: true
Bug: chromium:880724
Change-Id: I45f584a3503ecf567f4c2661a302a74fc5e516af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581605
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61037}
2019-04-26 09:57:50 +00:00
Anna Henningsen
5d0cf6bcd5 [snapshot] Use Handle to track name in CodeSerializer::Deserialize
The `Script::InitLineEnds(Handle<Script>(script, isolate));` line
may lead to objects being moved around on the heap, so it’s necessary
to use a `Handle` to track that.

This was causing crashes in Node.js in Debug mode when using the
code cache in combination with the CPU profiler.

Refs: https://github.com/nodejs/node/issues/27307
Change-Id: I392b4c00c6ebad44753f87fcbf2e3278ea7799a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1575698
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61036}
2019-04-26 09:43:40 +00:00
Jakob Kummerow
b422b1739d [wasm-c-api] Move most things to v8::internal:: API
Peeling away layers of indirection. More to follow.

Change-Id: Ide15b9ece926f51d957de8fdc37829f02d86ca49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1573700
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61035}
2019-04-26 09:11:09 +00:00
Clemens Hammacher
34554ec00e [wasm][gc] Fix potential deadlock
This fixes a deadlock that was detected by layout tests executing with
--future (hence enabling wasm code gc). It did not fail anywhere in v8
because GC is only triggered once we have > 1MB potentially dead code.
I plan to add a '--stress-wasm-code-gc' flag, which lowers this limit
to zero, thereby triggering GC when finding a single potentially dead
code. This mode found this issue, but also finds more, so I need to fix
other issues before enabling these stress tests.

R=mstarzinger@chromium.org

Bug: v8:8217
Change-Id: I373955b90c8b79d7b9e16184729f45db947eeeab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583728
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61034}
2019-04-26 08:36:49 +00:00
Hannes Payer
f5124b42a1 [heap] Clear wasted_memory_ counter right before sweeping a page.
Bug: v8:9093
Change-Id: I1172f7de24683aea05648f5c6fe1ab3d0dad6655
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585724
Auto-Submit: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61033}
2019-04-26 08:30:09 +00:00
Michael Achenbach
47b325db92 [test] Skip and mark slow tests
NOTRY=true

Bug: v8:9145
Change-Id: I0751ad840bb5a93ae0d0988e1b69dd9b1b215f6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585727
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61032}
2019-04-26 08:27:19 +00:00
Michael Achenbach
a01de42600 [test] Skip test unsuitable for gc fuzzing
Test was wrongly unskipped in:
https://chromium-review.googlesource.com/c/v8/v8/+/1565892

TBR=sigurds@chromium.org
NOTRY=true

Bug: v8:9127
Change-Id: I2d223dafd248486ca9291af874278f1fd499f8ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585723
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61031}
2019-04-26 07:29:49 +00:00
Michael Achenbach
078d65d6c4 [test] Allow overriding run count in run_perf
This will allow running the integration tests with minimal runs.

NOTRY=true

Bug: chromium:775123
Change-Id: I3f5b975609c6af6f29fc5cf657d9aa5c2d0a7db6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583719
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61030}
2019-04-26 07:04:38 +00:00
Sigurd Schneider
da41977d09 Revert "[Inspector] Adjust the length of some of the console functions."
This reverts commit 2974a184fd.

Reason for revert: For this change to land, layout tests have to 
be changed on the chromium side:
https://ci.chromium.org/p/v8/builders/ci/V8-Blink%20Linux%2064/31448
https://test-results.appspot.com/data/layout_results/V8-Blink_Linux_64/31448/webkit_layout_tests%20%28with%20patch%29/layout-test-results/results.html

Original change's description:
> [Inspector] Adjust the length of some of the console functions.
> 
> The function lengths on a number of the console methods was set to 1.
> The arguments to these functions are either variadic or optional so they
> should have length of 0.
> 
> R=​dgozman@chromium.org,ulan@chromium.org
> BUG=chromium:948678
> 
> Change-Id: I183262e230145a565732396688a0541034931500
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1548948
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Pavel Feldman OOO <pfeldman@chromium.org>
> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61021}

TBR=dgozman@chromium.org,ulan@chromium.org,pfeldman@chromium.org,yangguo@chromium.org,dtapuska@chromium.org,kozyatinskiy@chromium.org

Change-Id: Iba25e9351641c5d2730eb727f3da91f86d5b1203
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:948678
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585719
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61029}
2019-04-26 06:36:41 +00:00
v8-ci-autoroll-builder
7bbb9b8bfe Update V8 DEPS.
Rolling v8/build: 8ab7b3e..d1791e1

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/ab7b8fe..ed59989

Rolling v8/third_party/depot_tools: bdc80cb..7491399

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Ief61912e20b744ce58a45e45ccd2db56b9335131
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584747
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@{#61028}
2019-04-26 03:28:23 +00:00
Andrew Comminos
7ee416be2d [cpu-profiler] Cleanup is_logging/is_profiling state tracking
Refactors logging suppression and profiling state tracking on isolates
to be tied to a RAII ProfilerScope. Fixes the case where multiple
concurrent profilers on the same isolate restore the wrong value of
is_logging.

Change-Id: I34b59422a4e6e077ae0abb46eb09d78a77870d46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1575918
Commit-Queue: Andrew Comminos <acomminos@fb.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61027}
2019-04-25 22:23:13 +00:00
Irina Yatsenko
9a3d5dd23c Torquefy a few types
AllocationMemento, CoverageInfo, DebugInfo, DescriptorArray, FeedbackCell, FeedbackVector

Bug: v8:8952
Change-Id: I17297706a8d9bd4a0ee01b0b133ca613dbc31cf9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521910
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61026}
2019-04-25 20:23:53 +00:00
Sergiy Belozorov
8dbfc148f6 [test] Remove duplicated traces from the JSTests3 config
TBR=machenbach@chromium.org

Bug: chromium:880724
Change-Id: I6006bb642cab4e9dfcfb4cba43eeb959fe01f046
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584327
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61025}
2019-04-25 18:28:45 +00:00
Sathya Gunasekaran
18800c24a8 [promise] Ship Promise.allSettled
Bug: v8:9060
Change-Id: I37282dd362cfdd0a162a76b122870f643ef5c8eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582483
Commit-Queue: Adam Klein <adamk@chromium.org>
Auto-Submit: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61024}
2019-04-25 16:46:45 +00:00
Dave Tapuska
36a9a4bfb1 [Inspector] Don't catch throwable on toString calls for inspector.
An additional wpt test (console-label-conversion.any.js) verifies that
calling toString will cause exception propagation.
Remove the TryCatch block.

BUG=chromium:948257
R=dgozman@chromium.org

Change-Id: Idaaf264b7675f7df8ead128c085ac4d4c044005d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1579541
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61023}
2019-04-25 16:12:36 +00:00
Irina Yatsenko
ca88d04923 Derive SourcePositionTableWithFrameCache directly from Struct
Bug: v8:9158
Change-Id: I40a419a65485a5f407710cbe0cc44275c3fc9739
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1575037
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#61022}
2019-04-25 16:03:16 +00:00
Dave Tapuska
2974a184fd [Inspector] Adjust the length of some of the console functions.
The function lengths on a number of the console methods was set to 1.
The arguments to these functions are either variadic or optional so they
should have length of 0.

R=dgozman@chromium.org,ulan@chromium.org
BUG=chromium:948678

Change-Id: I183262e230145a565732396688a0541034931500
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1548948
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Pavel Feldman OOO <pfeldman@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61021}
2019-04-25 15:59:45 +00:00
Paolo Severini
efd8c2d975 Remove --win64-unwinding-info flag and always generate unwind info on Win/x64
The generation of unwind info to enable stack walking on Windows/x64
(https://chromium-review.googlesource.com/c/v8/v8/+/1469329) was implemented
behind a temporary flag, in order to coordinate these changes with the
corresponding changes in Chromium.

The required changes to Chromium
(https://chromium-review.googlesource.com/c/chromium/src/+/1474703) have also
been merged, so we can now remove the flag and enable the generation of stack
unwinding info by default on Windows/x64.

Bug: v8:3598
Change-Id: I88814aaeabecc007f5262227aa0681a1d16156d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1573138
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#61020}
2019-04-25 15:56:55 +00:00
Frederik Gossen
be913785df [wasm-hints] Refactor Compilation Progress
Simplify accounting for compilation progress. Instead of complicated
logic in {OnUnitsFinished} the compilation progress is initialized in
{InitializeCompilationProgress}. We now keep tack of
  - the required baseline tier,
  - the required top tier, and
  - the currently reached tier.
With this information {OnUnitsFinished} determines whether baseline and
top tier compilation are completed.

Bug: v8:9003
Change-Id: I3d147613f30363aade9ad5bf65be6e4d105e561e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583722
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61019}
2019-04-25 15:48:35 +00:00
Peter Marshall
eeb8ac685d [tracing] Roll perfetto to fix perfetto build
There was an issue where the perfetto unit tests would be built when
the gn target was 'all' despite us not pulling them in intentionally.

This CL rolls perfetto to the tip-of-tree which contains a fix for
this issue.

Bug: chromium:932115
Change-Id: I0195c623999f0bb1711c51ac25ea443b6580fc29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584321
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61018}
2019-04-25 15:22:45 +00:00
Sigurd Schneider
9b74f77377 Revert "[snapshot] Align internal snapshot data"
This reverts commit 4f9d7a94a1.

Reason for revert: breaks roll:
https://chromium-review.googlesource.com/c/chromium/src/+/1583053

Original change's description:
> [snapshot] Align internal snapshot data
> 
> When the snapshot blob is not aligned properly, loading it can cause a
> crash on platforms such as arm.
> 
> This was exposed by a SIGBUS/BUS_ADRALN crash on arm when accessing
> the blob_data symbol (declared as a byte array) through a reinterpret
> cast to uintptr_t in an internal snapshot build.
> 
> Thanks to florian.dold@gmail.com for the initial patch.
> 
> Bug: v8:9171
> Change-Id: I99b071dec3733416f2f01b58a770e30d8f2dcdf2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582402
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Auto-Submit: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61000}

TBR=jgruber@chromium.org,delphick@chromium.org

Change-Id: Ie329fa8948b46d5434a0db72d4bfb539bd25a967
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9171
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584324
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61017}
2019-04-25 15:09:39 +00:00
Tobias Tebbi
da7322c05f [csa] verify skipped write-barriers in MemoryOptimizer
With very few exceptions, this verifies all skipped write-barriers in
CSA and Torque, showing that the MemoryOptimizer together with some
type information on the stored value are enough to avoid unsafe skipped
write-barriers.

Changes to CSA:
SKIP_WRITE_BARRIER and Store*NoWriteBarrier are verified by the
MemoryOptimizer by default.
Type information about the stored values (TNode<Smi>) is exploited to
safely skip write barriers for stored Smi values.
In some cases, the code is re-structured to make it easier to consume
for the MemoryOptimizer (manual branch and load elimination).

Changes to the MemoryOptimizer:
Improve the MemoryOptimizer to remove write barriers:
- When the store happens to a CSA-generated InnerAllocate, by ignoring
  Bitcasts and additions.
- When the stored value is the HeapConstant of an immortal immovable root.
- When the stored value is a SmiConstant (recognized by BitcastToTaggedSigned).
- Fast C-calls are treated as non-allocating.
- Runtime calls can be white-listed as non-allocating.

Remaining missing cases:
- C++-style iterator loops with inner pointers.
- Inner allocates that are reloaded from a field where they were just stored
  (for example an elements backing store). Load elimination would fix that.
- Safe stored value types that cannot be expressed in CSA (e.g., Smi|Hole).
  We could handle that in Torque.
- Double-aligned allocations, which are not lowered in the MemoryOptimizer
  but in CSA.

Drive-by change: Avoid Smi suffix for StoreFixedArrayElement since this
can be handled by overload resolution (in Torque and C++).

R=jarin@chromium.org
TBR=mvstanton@chromium.org

Change-Id: I0af9b710673f350e0fe81c2e59f37da93c024b7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1571414
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61016}
2019-04-25 14:59:16 +00:00
Andrew Comminos
b08412723b [cpu-profiler] Split out debug mode for CPU profiler naming
Adds a new flag to CpuProfiler to control whether or not "debug" names
(potentially inferred from scope) are used for captured frames
associated with a SharedFunctionInfo instance.

Bug: v8:9135
Change-Id: Ia1db20e389f3d0beb60eb47798820fb11d501c88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583042
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61015}
2019-04-25 14:29:25 +00:00
Clemens Hammacher
11b7308f23 [utils] Modernize BitField
The main change is the reduction of the number of declared classes by
four by using templatized 'using' declarations instead of subtypes.
This also uses 'constexpr' to define constants, uses the defined
constants consistently, and adds static asserts.

R=jkummerow@chromium.org

Bug: v8:8834
Change-Id: I3868c9069f25261d428ec0847dea46de2cbc7a44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583763
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61014}
2019-04-25 13:38:56 +00:00
Frederik Gossen
82eb50eb31 [wasm-hints] Refactor Compile Strategy
Introduce {CompileStrategy} to determine whether functions or an entire
module is compiled lazily. This replaces the previously used function
{IsLazyCompilation} and allows to introduce other compile strategies in
the future.

Bug: v8:9003
Change-Id: I3b8a32f1ccb55530afba07a02ccd7a0c10be3fac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583720
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Frederik Gossen <frgossen@google.com>
Cr-Commit-Position: refs/heads/master@{#61013}
2019-04-25 13:33:36 +00:00
Simon Zünd
bb1b538abf [torque-ls] Fix crash when looking up definitions
This CL fixes a crash that happens on a goto definition lookup for a
file with no data attached to it.

Drive-by: Collect language server data even on compilation failures.

R=tebbi@chromium.org

Bug: v8:8880
Change-Id: Ia6323204391da3e64058e1fe47f87162186c15cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583721
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61012}
2019-04-25 12:50:26 +00:00
Simon Zünd
ff3a26aff3 Reland "[typedarray] Fix crash when sorting SharedArrayBuffers"
This is a reland of 3d846115d6

Reland changes mjsunit.status to skip the regression test on
all bots except ASAN.

Original change's description:
> [typedarray] Fix crash when sorting SharedArrayBuffers
>
> TypedArray#sort has a fast-path when the user does not provide a
> comparison function. This fast-path utilizes std::sort which operates
> directly on the raw data. Per spec, std::sort requires the "less than"
> operation to be anti-symmetric and transitive.
>
> When sorting SharedArrayBuffers (SAB) that are concurrently modified during
> sorting, the "less than" operator stops being consistent as the
> underlying data is constantly modified. This breaks some invariants
> in std::sort resulting in infinite loops or straight out segfaults.
>
> This CL fixes this by copying the data before sorting SABs and
> writing the sorted result back.
>
> Note: The added regression test is tailored for ASAN bots as a
> normal build would need too many iterations to consistently crash.
>
> R=neis@chromium.org, petermarshall@chromium.org
>
> Bug: v8:9161
> Change-Id: Ic089928652f75865bfdb11e7453806faa6ecb988
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581641
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61004}

Bug: v8:9161
Change-Id: Idffc3fbb5f28f4966c8f1ac6770d5b5d6003a7e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583726
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61011}
2019-04-25 12:18:56 +00:00
Frederik Gossen
718454728f [wasm-hints] Verify Baseline/Top Tier Finished
Verify that baseline and top tier compilation are finished when
expected. Test cases will use the newly exposed functions
{baseline_compilation_finished} and {top_tier_compilation_finished} for
this.

Bug: v8:9003
Change-Id: I023af3390ed5e087a3b40efe7c340d7e93071a51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581941
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Frederik Gossen <frgossen@google.com>
Cr-Commit-Position: refs/heads/master@{#61010}
2019-04-25 11:42:56 +00:00
Michael Achenbach
475741d563 [build] Add configs for nodcheck trybot
TBR=sergiyb@chromium.org
NOTRY=true

Bug: v8:9176
Change-Id: I83dd4a76f8b112f4e134d303cc6247ad6636a994
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583766
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61009}
2019-04-25 11:40:11 +00:00
Frederik Gossen
0e25764997 [wasm-hints] Print Callee
Print callee in mjsunit tests.

Bug: v8:9003
Change-Id: I9d2abf52a61288f3a58bfd2aee7aeea4a19a25b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582410
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Frederik Gossen <frgossen@google.com>
Cr-Commit-Position: refs/heads/master@{#61008}
2019-04-25 11:39:06 +00:00
Michael Achenbach
a5941ac99f Revert "[typedarray] Fix crash when sorting SharedArrayBuffers"
This reverts commit 3d846115d6.

Reason for revert: The test hangs flakily on windows:
https://ci.chromium.org/p/v8/builders/ci/V8%20Win32/20612
https://ci.chromium.org/p/v8/builders/ci/V8%20Win32%20-%20nosnap%20-%20shared/33147
https://ci.chromium.org/p/v8/builders/ci/V8%20Win32%20-%20debug/19945

Original change's description:
> [typedarray] Fix crash when sorting SharedArrayBuffers
> 
> TypedArray#sort has a fast-path when the user does not provide a
> comparison function. This fast-path utilizes std::sort which operates
> directly on the raw data. Per spec, std::sort requires the "less than"
> operation to be anti-symmetric and transitive.
> 
> When sorting SharedArrayBuffers (SAB) that are concurrently modified during
> sorting, the "less than" operator stops being consistent as the
> underlying data is constantly modified. This breaks some invariants
> in std::sort resulting in infinite loops or straight out segfaults.
> 
> This CL fixes this by copying the data before sorting SABs and
> writing the sorted result back.
> 
> Note: The added regression test is tailored for ASAN bots as a
> normal build would need too many iterations to consistently crash.
> 
> R=​neis@chromium.org, petermarshall@chromium.org
> 
> Bug: v8:9161
> Change-Id: Ic089928652f75865bfdb11e7453806faa6ecb988
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581641
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61004}

TBR=neis@chromium.org,petermarshall@chromium.org,szuend@chromium.org

Change-Id: I046da3e4228bb1a8a3aa89d9c9d8de11875a9273
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9161
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1583725
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61007}
2019-04-25 11:22:37 +00:00
Georg Neis
56f9ed7c26 Split an AUTHORS entry in two
An email pattern like *@*foo.bar matches unintended addresses such as
bla@foofoo.bar. Split it into *@foo.bar and *@*.foo.bar instead.
This corresponds to what is done in chromium's AUTHORS file.

Change-Id: I2f463fbc41cfcfced1151542f64d054dbe85e563
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581642
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61006}
2019-04-25 11:02:55 +00:00
peterwmwong
3632d5aedf Remove always-true --harmony-string-matchall runtime flag
It shipped in Chrome 73.

Bug: v8:6890
Change-Id: Idd8c98cf05a0d6e8fa58c5b0a34d079631f68b1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582879
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#61005}
2019-04-25 10:46:05 +00:00
Simon Zünd
3d846115d6 [typedarray] Fix crash when sorting SharedArrayBuffers
TypedArray#sort has a fast-path when the user does not provide a
comparison function. This fast-path utilizes std::sort which operates
directly on the raw data. Per spec, std::sort requires the "less than"
operation to be anti-symmetric and transitive.

When sorting SharedArrayBuffers (SAB) that are concurrently modified during
sorting, the "less than" operator stops being consistent as the
underlying data is constantly modified. This breaks some invariants
in std::sort resulting in infinite loops or straight out segfaults.

This CL fixes this by copying the data before sorting SABs and
writing the sorted result back.

Note: The added regression test is tailored for ASAN bots as a
normal build would need too many iterations to consistently crash.

R=neis@chromium.org, petermarshall@chromium.org

Bug: v8:9161
Change-Id: Ic089928652f75865bfdb11e7453806faa6ecb988
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581641
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61004}
2019-04-25 09:54:25 +00:00
Simon Zünd
694db615d0 [torque-ls] Send lint warnings to the client after compilation
This CL refactors and extends the infrastructure around sending
diagnostic notifications. This enables publishing lint errors as
warnings after a compilation run.

R=sigurds@chromium.org, tebbi@chromium.org

Bug: v8:8880
Change-Id: Ia64d2d490c1449021c92f5dc45eb7f8dab21e60a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582405
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61003}
2019-04-25 09:47:45 +00:00
Michael Achenbach
ed042d62dd [test] Add perf-integration testing to FYI bot
Bug: chromium:775123
Change-Id: I970bdbb9759f765257167531110a16cb4257af10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581607
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61002}
2019-04-25 08:31:13 +00:00
Michael Achenbach
fa5f08abf6 [build] Add configs for perfetto builders
NOTRY=true
TBR=sergiyb@chromium.org

Bug: v8:9058
Change-Id: I61a3f28565e703304315ef5758c7d1796ec4cb1e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582406
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61001}
2019-04-25 08:25:34 +00:00
Jakob Gruber
4f9d7a94a1 [snapshot] Align internal snapshot data
When the snapshot blob is not aligned properly, loading it can cause a
crash on platforms such as arm.

This was exposed by a SIGBUS/BUS_ADRALN crash on arm when accessing
the blob_data symbol (declared as a byte array) through a reinterpret
cast to uintptr_t in an internal snapshot build.

Thanks to florian.dold@gmail.com for the initial patch.

Bug: v8:9171
Change-Id: I99b071dec3733416f2f01b58a770e30d8f2dcdf2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582402
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61000}
2019-04-25 08:20:23 +00:00
Jakob Gruber
78dfde9d27 Revert "[arm64] Cleanup TODO around handling of x18"
This reverts commit 7a2651cbf5.

Reason for revert: https://ci.chromium.org/p/v8/builders/ci/V8%20Android%20Arm64%20-%20N5X/4126

Original change's description:
> [arm64] Cleanup TODO around handling of x18
> 
> Use `padreg` instead of x18 to maintain alignment in the CPURegList.
> 
> Also clean up some comments and tidy up RequiredStackSizeForCallerSaved
> and PushCallerSaved.
> 
> Change-Id: I80a780e5649e69a1746c43f37c2d1d875120c7a0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581609
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
> Cr-Commit-Position: refs/heads/master@{#60987}

TBR=jgruber@chromium.org,martyn.capewell@arm.com,joey.gouly@arm.com

Change-Id: Id95ac26142717f6503d284d20ca03b9de33a9122
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582403
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60999}
2019-04-25 06:49:33 +00:00
v8-ci-autoroll-builder
6f7b8f6270 Update V8 DEPS.
Rolling v8/base/trace_event/common: ebb658a..63246bb

Rolling v8/build: 5160e91..8ab7b3e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/429d9b4..ab7b8fe

Rolling v8/third_party/depot_tools: 0d82718..bdc80cb

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Id0b0c5d63e8330487e01e1f4e479f125516bc560
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582836
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@{#60998}
2019-04-25 06:23:11 +00:00
Kevin Gibbons
0c879d1cd0 [parser] forbid for-of loop LHS expressions starting with 'let'
Bug: v8:9160
Change-Id: If3f624c1ccf1ed397daa3e30b3a7ec2a73b7c9b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1578279
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Kevin Gibbons <bakkot@gmail.com>
Cr-Commit-Position: refs/heads/master@{#60997}
2019-04-25 03:15:41 +00:00
Sathya Gunasekaran
68bd67b034 [test262] Roll
Make sure to adapt the formal parameters for the Promise.allSettled
method.

Bug: v8:7834
Change-Id: I255fc695f5ac0d62ed18f5aad78665feb38c241a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1580239
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60996}
2019-04-24 22:59:29 +00:00
Z Duong Nguyen-Huu
596bea7249 Port proxy trap GetProperty to Torque
Also, fix CSA generator for call runtime with return type of object.

Spec: https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver
Bug: v8:6664
Change-Id: I61ce1fa72a498520dd811f034e182f060f115330
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1573042
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60995}
2019-04-24 22:48:24 +00:00
Sathya Gunasekaran
ad1cebe8f4 Revert "Remove always-true --harmony-object-from-entries runtime flag"
This reverts commit 98bbe37e84.

Reason for revert: breaks gc_stress bot
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/22113

Original change's description:
> Remove always-true --harmony-object-from-entries runtime flag
>
> It shipped in Chrome 73.
>
> Bug: v8:8021
> Change-Id: I82875829ff081ce055a0184170b15c65efca1c38
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581647
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Auto-Submit: Mathias Bynens <mathias@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60992}

TBR=gsathya@chromium.org,mathias@chromium.org

Change-Id: I812d62a7e8b70a8646e606da5f0f8812fac330c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8021
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582882
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60994}
2019-04-24 22:47:21 +00:00