Commit Graph

53449 Commits

Author SHA1 Message Date
Peter Marshall
7da7c0bdb7 [logger] Start cleaning up Logger class
- Use unique ptrs for owned objects
- Remove friendship with CpuProfiler and replace with public API
- Remove unused method LogFailure()
- Remove StopProfiler() which was only used by LogFailure() (removed)
  and one test, which can use StopProfilerThread() instead
- Remove 'paused' state which was only used by the above
- Remove 'engage' state. There is no reason we need this as along as
  users keep track of Engage/Disengage calls

Drive-by cleanup:
- Remove import of log.h from profile-generator.h
- Remove unnecessary includes of log.h

Change-Id: Ifc4ca156bef038c40953f8361ffea17788e3a59b
Reviewed-on: https://chromium-review.googlesource.com/c/1424338
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58957}
2019-01-21 11:53:32 +00:00
Clemens Hammacher
f77299e1f5 [Liftoff] Fix DCHECK error
Fix fixes a minor DCHECK error, which fired because usually only
LiftoffRegisters of the same type should be compared against each
other. In the RegisterReuseMap we store both register pairs and single
registers, hence check for pair vs non-pair comparisons explicitly.

R=ahaas@chromium.org

Bug: v8:6600, chromium:922670
Change-Id: I18beb61b6b1906cc42bcf6e7dfdd5eb803e874d7
Reviewed-on: https://chromium-review.googlesource.com/c/1421921
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58956}
2019-01-21 11:52:17 +00:00
Peter Marshall
1f1bd71dd0 [cpu-profiler] Remove registration and sampling depth from Sampler
Simplify the internal state of Sampler a bit. There are basically two
users of Sampler - the CpuSampler used by the CpuProfiler and the
Ticker used by log.cc. Ticker calls Start/Stop to manage the Sampler
lifetime, but CpuProfiler does not. This leads to much confusion and
overlap of functionality.

Fix that here by removing the distinction between active, registered
and isProfiling states. These are now all the same thing and are
represented by IsActive(). The state is set to active when Start is
called, and set inactive when Stop is called. Both users of Sampler
now call Start and Stop at appropriate times.

The concept of profiling depth was not used - each Sampler would
only ever have a sampling depth of 1. We still need to call
SignalHandler::IncreaseSamplerCount(), so we do that in Start
and the corresponding DecreaseSamplerCount() in Stop.

Change-Id: I16a9435d26169a7dd00b1c7876e66af45f12e4b0
Reviewed-on: https://chromium-review.googlesource.com/c/1424337
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58955}
2019-01-21 11:45:12 +00:00
Toon Verwaest
c45850cd1e [parser] Declare variables through ExpressionScope
Use variable tracking from ExpressionScopes rather than the PatternRewriter and
PreParserExpression::variables_ to declare variables.

We only figure out that variables are non-simple parameters once we see the
first non-simple parameter. This still uses the pattern rewriter to make
variables non-simple (kLet instead of kVar).

Change-Id: I4a4ee4852d667c26806bb24896722cfea3e093f2
Reviewed-on: https://chromium-review.googlesource.com/c/1417630
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58954}
2019-01-21 11:37:32 +00:00
Camillo Bruni
c45a2eff0b [heap] Allow PreparseData in large object space
Since the PreparseData now directly contains the byte data inline it can
grow very large as well.

Bug: chromium:923264
Change-Id: I456d5bcbfb40587b283584f726d9e084061fd30f
Reviewed-on: https://chromium-review.googlesource.com/c/1421321
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58953}
2019-01-21 11:18:02 +00:00
Simon Zünd
bf17cd2150 [array] Add stack overflow check for Array#flat
This CL adds a stack check to the TFS builtin "FlattenIntoArray" as it
is called recursively and can cause a SEGV with a large enough
"depth" argument.

R=jgruber@chromium.org

Bug: v8:8708
Change-Id: I833506531bcff1c4703b9a21678028cf0e63638d
Reviewed-on: https://chromium-review.googlesource.com/c/1424858
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58952}
2019-01-21 10:39:45 +00:00
Tamer Tas
a8784a400b [testrunner] remove infra_staging tests for stable behavior
With and without infra_staging flag testrunner behaves the same for old
features. This CL removes duplicate tests testing the same behavior.

R=machenbach@chromium.org
CC=yangguo@chromium.org,sergiyb@chromium.org

No-Try: true
Bug: v8:8174
Change-Id: Icf7bea15b2343b90697016d050fa0d918a99997d
Reviewed-on: https://chromium-review.googlesource.com/c/1424859
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58951}
2019-01-21 10:38:40 +00:00
Peter Marshall
ba56557793 [cpu-profiler] Cleanup and use std atomics in Sampler
There's no reason to use our self-baked atomics anymore. Also

- Changes two boolean values to use a boolean instead of an int
- Uses a unique ptr for data_
- Removes has_processing_thread_ which is not used
- Moves most initialization inline into the class
- Removes SetUp/TearDown which weren't needed

Change-Id: I8f50133636961502d56351abd2fb17196603a01a
Reviewed-on: https://chromium-review.googlesource.com/c/1422918
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58950}
2019-01-21 10:35:11 +00:00
Toon Verwaest
b4e7d11178 [parser] Reparsing arrow function head upon failure can overflow the stack
Bug: chromium:923723
Change-Id: Ic397642c2e803b2ada95fa87ece31032eb104782
Reviewed-on: https://chromium-review.googlesource.com/c/1424857
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58949}
2019-01-21 10:12:10 +00:00
Stephan Herhut
6ab6181109 [regalloc] Unify the way registers are chosen
With this change, we use the same heuristics for picking free registers
and for picking a blocked register to spill. This is mostly cleanup to
make results less surprising.

Change-Id: I09d031c758ffbd02798d573bc9e68a474e916418
Reviewed-on: https://chromium-review.googlesource.com/c/1411607
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58948}
2019-01-21 09:55:46 +00:00
peterwmwong
945e2b8f7b [builtins] Port TypedArray ConstructByLength to Torque
This is part of an effort to improve the performance of TA#subarray.

Bug: v8:7161
Change-Id: Iae84d16a037386bebfeaa7e8fb0648da295653b4
Reviewed-on: https://chromium-review.googlesource.com/c/1419225
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58947}
2019-01-21 09:43:43 +00:00
Peter Marshall
5aa361ffca [cpu-profiler] Add tests for sampler.cc
Moved class definitions into header

Change-Id: I2d3e5ec6f8f5068284cdbaa6900797950fc7e01a
Reviewed-on: https://chromium-review.googlesource.com/c/1422739
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58946}
2019-01-21 09:32:46 +00:00
Peter Marshall
4dbdeea2fe [cpu-profiler] Use unordered_map instead of custom hashmap in sampler
There is no reason to use the custom map here anymore. This lets us
get rid of the custom hash and a lot of casts.

We can also store the SamplerList by value in the map rather than a
pointer, then we don't have to manage the lifetime explicitly.

Also move the SamplerList typedef inside of SamplerManager because it's
an internal detail. Remove the include for <map> because we aren't using
this anywhere anyway.

Change-Id: I787a1b6c3ffc331ec3f36e66d5e07bd115c4cbb4
Reviewed-on: https://chromium-review.googlesource.com/c/1419317
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58945}
2019-01-21 07:58:13 +00:00
Tamer Tas
a8b8a4408b [testrunner] remove the up-front test counter
Moving to a lazy test loading approach makes counting the total number of tests
non-trivial.

For CI runs, we output the total number of tests after the run.
For users, progress indicator signals the status of the run.

R=machenbach@chromium.org
CC=​yangguo@chromium.org,sergiyb@chromium.org

Bug: v8:8174
Change-Id: I0731964515aac60a3629acee6c7243433a2b4e04
Reviewed-on: https://chromium-review.googlesource.com/c/1420677
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58944}
2019-01-21 07:34:53 +00:00
v8-ci-autoroll-builder
044daa5488 Update V8 DEPS.
Rolling v8/build: 213e0a3..402bc6d

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

Change-Id: If20446c4127d59fd9e7c5055c9594f4fae164d27
Reviewed-on: https://chromium-review.googlesource.com/c/1424278
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58943}
2019-01-20 11:25:37 +00:00
Sergiy Belozorov
b5cc9c0ee2 [tools] Whitespace CL
TBR=sergiyb@chromium.org

No-Try: true
Bug: chromium:922125
Change-Id: I58e6e2f3525293df0a6513611e16cd21b65e3985
Reviewed-on: https://chromium-review.googlesource.com/c/1418191
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58942}
2019-01-19 21:16:12 +00:00
Sven Sauleau
0e9e8164c2 [wasm] fix js-api table/get-set
Fix WebAssembly's table/get-set js-api. The argument is a unsigned long,
this change refactors most of arithmetic and bounds checks type from
int64 to uint32_t, according to the spec.

Bug: v8:8319
Change-Id: I088f631c6805b0e5ba29089b08ea15e78fe5852d
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/1414914
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#58941}
2019-01-19 09:15:37 +00:00
v8-ci-autoroll-builder
6c15e47820 Update V8 DEPS.
Rolling v8/build: 43021de..213e0a3

Rolling v8/buildtools: 40194ab..2f02e1f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a0e5e33..fab27df

Rolling v8/third_party/depot_tools: deab113..f797143

Rolling v8/third_party/icu: d653014..07e7295

Rolling v8/tools/clang: 9f413ce..3a16568

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

Change-Id: Ia3a87da427e0efd4cc1fa4f43bd8672754f75d2f
Reviewed-on: https://chromium-review.googlesource.com/c/1423326
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@{#58940}
2019-01-19 03:51:26 +00:00
Frank Tang
2c9efe52f9 Update test262.
Rolling v8/test/test262/data: https://chromium.googlesource.com/external/github.com/tc39/test262/+log/af984c0..4f1155

Bug: v8:7834
Change-Id: I6eeff251b9a3a773b386d7963981dc72f48d6e44
Reviewed-on: https://chromium-review.googlesource.com/c/1423096
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58939}
2019-01-19 01:19:54 +00:00
Frank Tang
4682a3572f [Intl] Move GetOptions('localeMatcher') earlier
See https://github.com/tc39/proposal-intl-list-format/pull/36

Bug: v8:8614
Change-Id: Ifa9bebf27163420562c0d62867b9a240b5c4c502
Reviewed-on: https://chromium-review.googlesource.com/c/1386324
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58938}
2019-01-19 00:09:51 +00:00
Peter Marshall
5a81b2075b [cpu-profiler] Cleanup SamplerManager to use more std library functions
Use more idiomatic c++ and add slightly better comments.

Change-Id: Id6397a25851915eb10a0370d23dc41ca7fce3c2e
Reviewed-on: https://chromium-review.googlesource.com/c/1418194
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58937}
2019-01-18 21:00:12 +00:00
Sven Sauleau
fc27711780 [wasm] fix js-api table/grow
Fix WebAssembly's table/grow js-api. The argument is a unsigned long,
this change refactors most of arithmetic and bounds checks type from
int64 to uint32_t, according to the spec.

Bug: v8:8319
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: Ia29121c930d7fb930668e54a5a769dae25234f2c
Reviewed-on: https://chromium-review.googlesource.com/c/1351006
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58936}
2019-01-18 20:19:51 +00:00
Adam Klein
c6168d1eea Add myself as an owner for wasm-js
Though I'm not (yet) a much of a wasm code expert, I have made and
reviewed a number of changes to this file, and feel pretty comfortable
with it, so I figured it might be reasonable starting place.

Change-Id: I8d5d0b219def6adeba52e752467bb0405554ee01
Reviewed-on: https://chromium-review.googlesource.com/c/1418593
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58935}
2019-01-18 19:28:34 +00:00
Caitlin Potter
a62c96a014 [counters] remove "override mistake" use counters
v8::Isolate::kAttemptOverrideReadOnlyOnPrototypeSloppy and
v8::Isolate::kAttemptOverrideReadOnlyOnPrototypeStrict are no longer
incremented.

BUG=v8:8175
R=gsathya@chromium.org, littledan@chromium.org

Change-Id: Ia5f8f9226a54d88c15a3c3b4a5941d774eb1834a
Reviewed-on: https://chromium-review.googlesource.com/c/1417381
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#58934}
2019-01-18 19:27:29 +00:00
Caitlin Potter
242fd7ce42 [esnext] stage Hashbang interpreter line syntax
Turns on --harmony-hashbang when experimental JS features are enabled.

BUG=v8:8523
R=gsathya@chromium.org, adamk@chromium.org

Change-Id: I2b1e6c146d900cb8a998060b4b93127f907b6728
Reviewed-on: https://chromium-review.googlesource.com/c/1417382
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#58933}
2019-01-18 19:26:25 +00:00
Michael Achenbach
b7cc4f7a12 Revert "[wasm] Split compilation in three stages"
This reverts commit 4e1d7c87b9.

Reason for revert:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20arm%20-%20sim%20-%20debug/14986

Original change's description:
> [wasm] Split compilation in three stages
> 
> In order to refactor ownership between objects in wasm compilation, the
> compilation (executed by background tasks) is split in three stages:
> getting a compilation unit (while holding a mutex), executing the work
> (without any mutex and without keeping the NativeModule alive), and
> submitting the work (with a mutex again).
> 
> This CL prepares this design by splitting compilation from submission.
> Both steps are still executed right after each other. This will be
> changed in a follow-up CL.
> 
> R=​titzer@chromium.org
> CC=​mstarzinger@chromium.org
> 
> Bug: v8:8689
> Change-Id: I2f92aee8e2f2d45470d8c63314ed026341630902
> Reviewed-on: https://chromium-review.googlesource.com/c/1414920
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58929}

TBR=titzer@chromium.org,clemensh@chromium.org

Change-Id: Ic3d0287b354ef5f834b76bc2cdc096d2231f4477
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8689
Reviewed-on: https://chromium-review.googlesource.com/c/1422917
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58932}
2019-01-18 19:22:19 +00:00
Michael Lippautz
489d2a1888 [global-handles] Refactor to allow for different node type
- Introduce NodeSpace that holds allocation related logic.
- Provide std compatible iterator for node iteration.

This allows for creating a different internal node type.

The change is just a refactoring without functional changes.

Bug: chromium:923361
Change-Id: I424f821d96b3a82f64024aedff6c289d3eec11a2
Reviewed-on: https://chromium-review.googlesource.com/c/1418192
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58931}
2019-01-18 16:59:34 +00:00
tzik
9026d67171 Drop no longer used Isolate's default_microtask_queue_address()
As builtins no longer uses default_microtask_queue after
https://crrev.com/c/1369906, Isolate's default_microtask_queue_address()
is no longer needed.

Bug: v8:8124
Change-Id: I1f51e58ada1a62f71f19f6c15b2330dfed176839
Reviewed-on: https://chromium-review.googlesource.com/c/1420178
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58930}
2019-01-18 16:55:24 +00:00
Clemens Hammacher
4e1d7c87b9 [wasm] Split compilation in three stages
In order to refactor ownership between objects in wasm compilation, the
compilation (executed by background tasks) is split in three stages:
getting a compilation unit (while holding a mutex), executing the work
(without any mutex and without keeping the NativeModule alive), and
submitting the work (with a mutex again).

This CL prepares this design by splitting compilation from submission.
Both steps are still executed right after each other. This will be
changed in a follow-up CL.

R=titzer@chromium.org
CC=mstarzinger@chromium.org

Bug: v8:8689
Change-Id: I2f92aee8e2f2d45470d8c63314ed026341630902
Reviewed-on: https://chromium-review.googlesource.com/c/1414920
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58929}
2019-01-18 16:02:02 +00:00
Tamer Tas
8da315bdaa [testrunner] remove brittle tests
testrunner has tests asserting about the implementation details, assertions
about the behavior of the testrunner (already in-place) provides robust coverage
already.

This cl remove the brittle assertions.

R=machenbach@chromium.org
CC=yangguo@chromium.org,sergiyb@chromium.org

Bug: v8:8174
Change-Id: I6583c971b7cf7eb2eb7dfa2b6737d6aa67957feb
Reviewed-on: https://chromium-review.googlesource.com/c/1421359
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58928}
2019-01-18 15:47:02 +00:00
Predrag Rudic
27a71e94f9 MIPS32: Configure heap for snapshot with maximum reserved memory.
MIPS32 doesn't have constraint for maximum code range or maximum PC
relative code range, and allocation of kMaxPCRelativeCodeRangeInMB
memory results in OOM failure from allocator.

This patch also skips verifying transitive builtins for 64-bit MIPS
because it doesn't have implemented pc-relative calls and jumps yet.

Change-Id: I7cad154827c2a9fd274901895a5a54c5ce176b03
Reviewed-on: https://chromium-review.googlesource.com/c/1414853
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Predrag Rudic <prudic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#58927}
2019-01-18 15:42:32 +00:00
Camillo Bruni
61b217b1cb [parser] Use shared data buffer for PreparseData generation
By using a shared byte buffer on the preparser we can drastically
reduce the number of ZoneChunkLists.

Each PreparseDataBuilder now explicitly keeps track of all inner
builders/functions and writes out the data in consecutive order.

Change-Id: I0aada118d869b150108c1f633d9960474ad2f9a1
Reviewed-on: https://chromium-review.googlesource.com/c/1411600
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58926}
2019-01-18 15:02:26 +00:00
Clemens Hammacher
1a95d4de81 Revert "Reland "[GC] Ensure JSFunctions with flushed bytecode are flushed during GC.""
This reverts commit d5e63b03bf.

Reason for revert: Fails gc-stress: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Mac64%20GC%20Stress/5312

Original change's description:
> Reland "[GC] Ensure JSFunctions with flushed bytecode are flushed during GC."
> 
> This is a reland of f5729f1cda
> 
> TBR=ulan@chromium.org
> 
> Original change's description:
> > [GC] Ensure JSFunctions with flushed bytecode are flushed during GC.
> >
> > When bytecode is flushed from a SFI, the JSFunctions still retain their
> > FeedbackVector's and point to the interpreter entry trampoline. They are
> > reset if re-executed, however if not they could hold onto the feedback
> > vector indefinetly. This CL adds a pass the GC to detect JSFunctions that
> > need to be reset, and performs the reset at the end of GC.
> >
> > BUG=v8:8395
> >
> > Change-Id: I3de8655aff9ff80f912b4fd51dee43eb98cfd519
> > Reviewed-on: https://chromium-review.googlesource.com/c/1393292
> > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58775}
> 
> Bug: v8:8395
> Change-Id: I9bc84b62332575a080561c51f08b699b91e41e4a
> Reviewed-on: https://chromium-review.googlesource.com/c/1414859
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58924}

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

Change-Id: I5d3012d4c7277ae792b0488780ff426d51dd602f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8395
Reviewed-on: https://chromium-review.googlesource.com/c/1421838
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58925}
2019-01-18 15:01:23 +00:00
Ross McIlroy
d5e63b03bf Reland "[GC] Ensure JSFunctions with flushed bytecode are flushed during GC."
This is a reland of f5729f1cda

TBR=ulan@chromium.org

Original change's description:
> [GC] Ensure JSFunctions with flushed bytecode are flushed during GC.
>
> When bytecode is flushed from a SFI, the JSFunctions still retain their
> FeedbackVector's and point to the interpreter entry trampoline. They are
> reset if re-executed, however if not they could hold onto the feedback
> vector indefinetly. This CL adds a pass the GC to detect JSFunctions that
> need to be reset, and performs the reset at the end of GC.
>
> BUG=v8:8395
>
> Change-Id: I3de8655aff9ff80f912b4fd51dee43eb98cfd519
> Reviewed-on: https://chromium-review.googlesource.com/c/1393292
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58775}

Bug: v8:8395
Change-Id: I9bc84b62332575a080561c51f08b699b91e41e4a
Reviewed-on: https://chromium-review.googlesource.com/c/1414859
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58924}
2019-01-18 14:27:48 +00:00
Peter Marshall
41a1632e62 [cpu-profiler] Remove extra logging
We found the nexus 5x flake so this is no longer needed.

Leave the printing functions themselves as they will still be useful
for local debugging.

Bug: v8:8649
Change-Id: Ie0af2bc9b0fc7fb8ac00ec0039b6898553865189
Reviewed-on: https://chromium-review.googlesource.com/c/1420957
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58923}
2019-01-18 13:49:17 +00:00
Igor Sheludko
6d6825f295 [cleanup] Fix kPointerSize usages in the rest of runtime
Bug: v8:8477, v8:8562
Change-Id: Ieb677e0989f77ed207567d468faec0bf92752967
Reviewed-on: https://chromium-review.googlesource.com/c/1388529
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58922}
2019-01-18 13:22:02 +00:00
Ross McIlroy
aff24a258a [Compile] Add an is_iife bit to SharedFunctionInfo and propagate to lazy compile.
If a function is classed as an IIFE it will be have different bytecode generated
to reduce feedback vector overhead for run-once code. As a result, we need to retain
this information if we are going to lazily compile the bytecode later in order to
get the same result. This is necessary for lazy bytecode flushing and lazy source
positions, both of which need to recompile functions which were previously compiled.

BUG=v8:8395,v8:8510

Change-Id: Ib898868102610216315faa20c9da682f6c523390
Reviewed-on: https://chromium-review.googlesource.com/c/1417636
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58921}
2019-01-18 12:40:14 +00:00
Georg Neis
b07e02efa4 [tools] Make ic-processor print global loads/stores.
Change-Id: I807581b0c058c304769d4ba1b4f9bc8a9739536f
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1417633
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58920}
2019-01-18 12:35:43 +00:00
Ross McIlroy
2619f59c26 [SFI] Free up unused IsDeserializedBit from SFI::flags.
BUG=v8:8395,v8:8510

Change-Id: I1571877d709d6cc37966ace9014fa327e0820a80
Reviewed-on: https://chromium-review.googlesource.com/c/1417634
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58919}
2019-01-18 12:32:03 +00:00
Michael Achenbach
0013fff621 [test] Remove obsolete blink test skips
The tests were skipped due to problems with the previous test setup. Now the
setup is the same as in Chromium and those tests should pass.

NOTRY=true

Bug: chromium:828847
Change-Id: Ibfbb931031176add90a340ca79c71e89f05e3045
Reviewed-on: https://chromium-review.googlesource.com/c/1421318
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58918}
2019-01-18 12:30:23 +00:00
Andreas Haas
ea26454fb7 [wasm][streaming] Add test for the ModuleCompiledCallback
This test checks that the ModuleCompiledCallback is called eventually.

R=clemensh@chromium.org
CC=adamk@chromium.org

Bug: v8:8677
Change-Id: I360f88064f870dd4a12db019e3c9f72154abf13b
Reviewed-on: https://chromium-review.googlesource.com/c/1420759
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58917}
2019-01-18 12:04:00 +00:00
Clemens Hammacher
7fa9de1d14 [wasm] Reenable tier-up
The AsyncCompileJob should not cancel compilation if baseline
compilation already finished. At that point, we might still be tiering
up, and the module might even already be shared across isolates.

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

Bug: v8:8677, v8:8689
Change-Id: Ia2192a1985bf4a3b7125ce5a713c83bbcc1bf6b7
Reviewed-on: https://chromium-review.googlesource.com/c/1417931
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58916}
2019-01-18 10:15:38 +00:00
Michael Achenbach
d19e5134c4 [build][test] Add build and test configs for new ubsan builders
This renames the existing v8_linux64_ubsan_rel_ng{triggered} into
v8_linux64_ubsan_vptr_rel_ng{triggered} and keeps using the
ubsan_vptr build and test config for it.

This adds build configs for the new builders:
v8_linux64_ubsan_rel_ng
V8 Clusterfuzz Linux64 UBSan - release builder

This also adds test configs for
v8_linux64_ubsan_rel_ng_triggered

NOTRY=true

Bug: chromium:853202
Change-Id: I0f9b4fba459a2c02a26e777f60773697e4d4d557
Reviewed-on: https://chromium-review.googlesource.com/c/1417456
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58915}
2019-01-18 10:08:57 +00:00
Andreas Haas
acdd3c1025 [cleanup] Fix comment in cancelable-task.h
TBR=clemensh@chromium.org
No-Try: true
No-Presubmit: true
No-Treechecks: true

Bug: v8:8562
Change-Id: Ic44219287a1cc1047460b4ba7b95b8fb6e6e4b9a
Reviewed-on: https://chromium-review.googlesource.com/c/1420757
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58914}
2019-01-18 10:05:47 +00:00
Ulan Degenbaev
8b3fbe1d9f Reland "[heap] Remove bailout marking worklist."
This reverts commit 13e07389ff.

Original change's description:
> [heap] Remove bailout marking worklist.
>
> The concurrent marker can now process all objects.
> This patch also eagerly visits the objects that undergo layout
> changes. This is because previously such objects were pushed
> onto the bailout worklist, which is gone now.
> To preserve the incremental step accounting, the patch introduces
> a new GC tracer scope called MC_INCREMENTAL_LAYOUT_CHANGE.
>
> Bug: v8:8486
> Change-Id: Ic1c2f0d4e2ac0602fc945f3258af9624247bd65f
> Reviewed-on: https://chromium-review.googlesource.com/c/1386486
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58712}

Change-Id: I85c99837819f6971c248198bd51ad40eebdb4fac
Reviewed-on: https://chromium-review.googlesource.com/c/1417595
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58913}
2019-01-18 10:04:17 +00:00
Simon Zünd
e38faab1c7 [array] Remove CHECK_LE from RemoveArrayHolesGeneric
This CL removes a CHECK_LE that does not hold in all cases. After
moving all elements to the front, current_pos will point to the next
free spot. In the case where an object is 'packed', i.e. each index
has a non-undefined value, and the length is smaller then the max
index, current_pos will be greater than the length (limit in the code).

Sidenote: The block after taking the minimum (where the counted
undefineds get set) will not be affected. In the case where
num_undefined > 0, current_pos should be guaranteed to be smaller
than limit, as long there are no accessors with side-effects.

R=jgruber@chromium.org

Bug: chromium:923265
Change-Id: Id533cdc4db6c6c6f266cf7c6a8ab6ecbbeee7016
Reviewed-on: https://chromium-review.googlesource.com/c/1420679
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58912}
2019-01-18 10:01:37 +00:00
Maya Lekova
697885b9df Revert "Change SetProperty/SetSuperProperty to infer language mode when possible"
This reverts commit 0896599f6f.

Reason for revert: Speculative revert, seems to cause a layout test failure blocking the LKGR - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/29320

Original change's description:
> Change SetProperty/SetSuperProperty to infer language mode when possible
> 
> In most cases, the language mode can be inferred from the closure and
> the context. Computing the language mode instead of passing it around
> simplifies the ICs and will make it possible to go towards lazily
> allocating feedback vectors. Currently ICs obtain the language mode from
> the feedback vectors and with lazy feedback allocation we may not always
> have feedback vectors. Since computing language mode is a bit expensive
> we want to defer it as far as possible.
> 
> In Array builtins and other builtins like Reflect.Set we need to force a
> language mode when setting the properties. To support these cases the
> SetProperty methods allow the language mode to be overridden when needed.
> 
> This is a first cl in a series of cls, that will defer the language mode
> computation further and remove language mode where it is not needed.
> 
> BUG: v8:8580
> Change-Id: I9c2396e3bcfe77c3c9d6760c46d86954d54744b9
> Reviewed-on: https://chromium-review.googlesource.com/c/1409426
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58893}

TBR=mlippautz@chromium.org,mythria@chromium.org,jgruber@chromium.org,verwaest@chromium.org

Change-Id: I2e0f80a4577a8ca86c05a62205f9dfa488418a52
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1420758
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58911}
2019-01-18 09:43:50 +00:00
Matt Gardner
c7b4febca5 Escape source name with '--trace-turbo'
Bug: https://bugs.chromium.org/p/v8/issues/detail?id=8441

Change-Id: I3b5f8c8f4439d0169f0cc5a91922ca961522f134
Bug: v8:8441
Reviewed-on: https://chromium-review.googlesource.com/c/1419078
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58910}
2019-01-18 09:36:43 +00:00
Peter Marshall
4b90359c28 [cpu-profiler] Use compare_exchange_strong in DoSample
This changes the compare/exchange operation to the 'strong' one
which avoids potential spurious failures. These failures would be
hidden by the loop in AtomicGuard - except that we only ever call
compare_exchange_weak once when is_blocking is false. See the linked
bug for more info.

Bug: v8:8649
Change-Id: I94ebe04e86f4676d2b7404d833157f61d5df8a59
Reviewed-on: https://chromium-review.googlesource.com/c/1418190
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58909}
2019-01-18 09:32:53 +00:00
Clemens Hammacher
babdc422e5 [wasm] Remove redundant GetSharedWireBytesStorage
It does exactly the same as GetWireBytesStorage.
Also change the WasmCompilationUnit::ExecuteCompilation method to
receive a reference to the shared_ptr, since it does not take (shared)
ownership. This saves one ref count increment and decrement.

R=titzer@chromium.org

Bug: v8:8689
Change-Id: I03c3ec5f907c738c73e0dc16646d78ecac3f3717
Reviewed-on: https://chromium-review.googlesource.com/c/1417632
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58908}
2019-01-18 09:15:23 +00:00