Commit Graph

45880 Commits

Author SHA1 Message Date
Stephan Herhut
7ecb6a38b9 Implement code creation events for wasm code on native heap
Adds support for generating logging/profiling event when wasm code gets compiled
on the native heap. As code objects on the native heap are not ordinary heap
objects, the existing abstractions for reporting cannot be used. Instead, add
specialized versions for WasmCode objects.

Change-Id: I808618d70142073b3c1b06edef6931f59bed8cf5
Reviewed-on: https://chromium-review.googlesource.com/913308
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51388}
2018-02-20 08:30:31 +00:00
Benedikt Meurer
be6d129207 [turbofan] Optimize promise resolution.
This CL introduces new operators JSFulfillPromise and JSPromiseResolve,
corresponding to the specification operations with the same name, and
uses that to lower calls to Promise.resolve() builtin to JSPromiseResolve.

We also optimize JSPromiseResolve and JSResolvePromise further based on
information found about the value/resolution in the graph. This applies
to both Promise.resolve() builtin calls and implicit resolve operations
in async functions and async generators.

On a very simple microbenchmark like

  console.time('resolve');
  for (let i = 0; i < 1e8; ++i) Promise.resolve({i});
  console.timeEnd('resolve');

this CL reduces the execution time from around 3049ms to around 947ms,
which is a pretty significant 3x improvement. On the wikipedia benchmark
we observe an improvement around 2% with this CL.

Bug: v8:7253
Change-Id: Ic69086cdc1b724f35dbe83305795539c562ab817
Reviewed-on: https://chromium-review.googlesource.com/913488
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51387}
2018-02-20 08:10:01 +00:00
Deepti Gandluri
1c71991ab6 Delete unused macro, add missing undefs
Change-Id: Icfacb59e7c90ee696fd7242f4441cfb2965f490b
Reviewed-on: https://chromium-review.googlesource.com/924626
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51386}
2018-02-20 08:02:51 +00:00
Clemens Hammacher
dcd31ef223 [Liftoff] Refactor binops
Remove code duplication by having one method for generating the code
for binary operations, templatized by the actual instruction(s) to emit
for the operation.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: I6303475682416727e6a6c9c4ec33ca1cde112092
Reviewed-on: https://chromium-review.googlesource.com/924862
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51385}
2018-02-20 07:59:11 +00:00
Sigurd Schneider
e1ca671e45 [debug] Ensure breaking on inlined builtins works
This ensures that breaking on inlined builtins works, even when
compiling concurrently. This CL also introduces the member
Isolate::AbortConcurrentOptimization.

R=sigurds@chromium.org

Bug: v8:178
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ie6cbb48ebde18036888af2dd715862e7a14ddf9d
Reviewed-on: https://chromium-review.googlesource.com/912468
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51384}
2018-02-20 07:52:51 +00:00
Mostyn Bramley-Moore
b3bf446ed2 [jumbo] fix kGlobalHandleLabel redefinition
Followup after https://chromium-review.googlesource.com/c/v8/v8/+/919063

Bug: chromium:811842
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I8e8a4a6d9192d39502514c5a19539965b74b1681
Reviewed-on: https://chromium-review.googlesource.com/925603
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Cr-Commit-Position: refs/heads/master@{#51383}
2018-02-20 07:33:41 +00:00
Benedikt Meurer
d97bb31738 [async-await] Turn await closures into intrinsics.
There's no need to have the AsyncFunctionAwait/AsyncGeneratorAwait
operations as separate closures that are called via JavaScript calling
convention, but instead we can just have them as intrinsics (with the
goal to eventually turn them into IC stubs).

Drive-by-fix: Tail call to the ResumeGenerator builtin when resuming
an async function. The earlier restrictions no only apply with the new
machinery.

Bug: v8:7253
Change-Id: I0c4d04dae15b4211158fc07151adafda69d4faec
Reviewed-on: https://chromium-review.googlesource.com/924703
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51382}
2018-02-20 06:39:01 +00:00
v8-autoroll
99fcd7bb1f Update V8 DEPS.
Rolling v8/build: e2c6aae..10345cd

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/4aa92ef..8273e47

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

Change-Id: Iabdb565357af2ab1a156b013068230a58377b69e
Reviewed-on: https://chromium-review.googlesource.com/925805
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51381}
2018-02-20 04:59:00 +00:00
Clemens Hammacher
9ba71e656d [test] Skip fewer tests on endurance fuzzer
The "FreezeWasmLazyCompilation" runtime function can only be invoked if
--wasm-lazy-compilation is passed. Hence the "lazy-compilation.js" test
must be skipped. The other tests are not affected by this, thus un-skip
them.

R=machenbach@chromium.org

Bug: v8:7400
Change-Id: Id521938ae651b4a67510e42aa69e17b5e0b14a0a
Reviewed-on: https://chromium-review.googlesource.com/923967
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51380}
2018-02-19 17:53:39 +00:00
Michael Starzinger
f8610a719f [assembler] Make {PredictableCodeSizeScope} more robust.
R=clemensh@chromium.org

Change-Id: Ia7c18afb10b4198b690b3bc788b8969595d6b0de
Reviewed-on: https://chromium-review.googlesource.com/925303
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51379}
2018-02-19 17:42:09 +00:00
Camillo Bruni
539d6ffe03 [tests] Mark regression test as slow
Change-Id: Idbee9b7b8077a9fd2ffa4a2a010ae7d44b98e31e
Reviewed-on: https://chromium-review.googlesource.com/924198
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51378}
2018-02-19 17:32:29 +00:00
Peter Marshall
81a3742a88 [typedarray] Port TypedArray.from to CSA.
Factor out IterableToList into a helper stub to save space. There are
two callers now, TypedArrayFrom and ConstructByIterable, and it is
~2.5kb so we save space by doing this.

Increase test coverage to cover more of the branching in CSA.

This is doesn't follow the control flow in the spec exactly - see the
big code comment for an explanation.

Change-Id: Ief39e93c4202cb7bf0e28a39dc6aa81b8b9c59d2
Reviewed-on: https://chromium-review.googlesource.com/908755
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51377}
2018-02-19 16:49:39 +00:00
sreten.kovacevic
19e65114a1 [Liftoff][mips] Implement i32 ops
Implement i32 binops, unops and shiftops on MIPS architecture.

Bug: v8:6600
Change-Id: Ibd17f840e6754c9eac2fb0bc61c3461e42734703
Reviewed-on: https://chromium-review.googlesource.com/919161
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51376}
2018-02-19 16:37:29 +00:00
Clemens Hammacher
6ac2579f23 [Liftoff] Fix result type of f64 binops
The result of an f64 binop was marked as f32 on Liftoffs value stack.
This lead to errors and is fixed in this CL.
I plan to clean up all binop implementions in a follow-up CL.

R=titzer@chromium.org

Bug: chromium:812005, v8:6600
Change-Id: I5bcd5c2e7d2b6170ef60f5e83cf2876b3475c38a
Reviewed-on: https://chromium-review.googlesource.com/924025
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51375}
2018-02-19 16:12:30 +00:00
Tobias Tebbi
2579951648 [turbofan] Masking/poisoning in codegen (optimized code, arm)
This introduces masking of loads with speculation bit during code generation.
At the moment, this is done only under the
--branch-load-poisoning flag, and this CL enlarges the set of supported
platforms from {x64} to {x64, arm}.

Overview of changes:
- new register configuration configuration with one register reserved for
  the speculation poison/mask (kSpeculationPoisonRegister).
- in codegen, we introduce an update to the poison register at the starts
  of all successors of branches (and deopts) that are marked as safety
  branches (deopts).
- in memory optimizer, we lower all field and element loads to PoisonedLoads.
- poisoned loads are then masked in codegen with the poison register.
  * only integer loads are masked at the moment.

Bug: chromium:798964
Change-Id: I37f5531fd18a96038ea8b059641e3dfc852c2d34
Reviewed-on: https://chromium-review.googlesource.com/913354
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51374}
2018-02-19 15:25:23 +00:00
Caitlin Potter
e56eac022f [esnext] fix tagged template caching strategy for eval caching
Previously, eval caching was only disabled if the root eval body code
contained a tagged template. Per discussion on
https://github.com/tc39/ecma262/pull/890, this is incorrect.

This change tracks if eval caching is allowed during parsing, and
uses this information to decide to insert
new entries into the cache, or not.

This change also removes the TemplateObject feedback kind, as it's no
longer needed (behaves the same as Literal feedback).

BUG=v8:3230, v8:2891
R=littledan@chromium.org, yangguo@chromium.org, bmeurer@chromium.org,
rmcilroy@chromium.org

Change-Id: Ib75abe9159baf4d8ad10f8de99d2152714bd0094
Reviewed-on: https://chromium-review.googlesource.com/916945
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51373}
2018-02-19 15:15:01 +00:00
Gabriel Charette
431c473b74 Reland: Add a trace event when pausing/preempting concurrent marking.
Reland reason : not the culprit.

This will let us identify in traces whether unwinding after receiving
the preemption event is slower than desired and should be optimized.

Adding it to pausing while working on removing it in
https://chromium-review.googlesource.com/c/v8/v8/+/922103
will allow gathering traces that highlight the issue.

R=ulan@chromium.org

Bug: chromium:812178
Change-Id: I0dc0f6754980157674968ba4a868f12c779e69bc
Reviewed-on: https://chromium-review.googlesource.com/923989
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51372}
2018-02-19 15:04:51 +00:00
Gabriel Charette
ac17ba0e56 Reland "Introduce ConcurrentMarking::StopRequest API."
This is a reland of f4b4109936.

Not expected to be the culprit of the 4 CL revert.

Original change's description:
> Introduce ConcurrentMarking::StopRequest API.
>
> This was extracted from https://chromium-review.googlesource.com/c/v8/v8/+/924073/10
> after it became clear that using COMPLETE_TASKS/PREEMPT_TASKS where
> it should make sense to doesn't work in practice for now.
>
> Experimental CLs which led to the above conclusion:
>  - https://chromium-review.googlesource.com/c/v8/v8/+/924865
>    (COMPLETE or CANCEL -- still broken)
>  - https://chromium-review.googlesource.com/c/v8/v8/+/924866
>    (CANCEL only, as before, works)
>  - https://chromium-review.googlesource.com/c/v8/v8/+/924028
>    (CANCEL and PREEMPT -- broken as well)
>
> Introducing this unittested API allows to reduce the size
> of the CLs causing hard-to-diagnose bots-only failures
> and fix them individually follow-ups @
>
>  1) https://chromium-review.googlesource.com/c/v8/v8/+/924029
>  2) https://chromium-review.googlesource.com/c/v8/v8/+/924031
>  3) https://chromium-review.googlesource.com/c/v8/v8/+/924030
>
> Bug: chromium:812178
> Change-Id: Icdac456e9f7874b0c4b321ccdb8898297dad7d73
> Reviewed-on: https://chromium-review.googlesource.com/924867
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51353}

Bug: chromium:812178
Change-Id: Iaa32f9cc6b2fa7004c7fae1f79aa4b00f5f8f34c
Reviewed-on: https://chromium-review.googlesource.com/924006
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51371}
2018-02-19 14:46:44 +00:00
Clemens Hammacher
0b85c65e4d [assembler] Fix and document emitted debug code
There is a debug check to check that an embedded code object is patched
correctly. This check only makes sense if the code object was indeed
pushed to the stack, otherwise we are checking the type marker.
This CL fixes this check and adds a line of documentation.

R=mstarzinger@chromium.org

Change-Id: I5bc1454232cdbf2e9fef6eb41f7c7a20f31a5250
Reviewed-on: https://chromium-review.googlesource.com/924154
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51370}
2018-02-19 14:45:38 +00:00
Michael Starzinger
c5372a50a1 [simulator] Fix missing lock guard for I-cache flush.
R=clemensh@chromium.org
BUG=v8:7456

Change-Id: I5b7c151d375267a6a8a24c611b8a13fe38619656
Reviewed-on: https://chromium-review.googlesource.com/924036
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51369}
2018-02-19 14:44:29 +00:00
Clemens Hammacher
52c75d94f4 [Liftoff] Add support for br_table
This implements the br_table instruction in LiftoffCompiler by emitting
a binary search tree.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: I89c11501dd3a41556d2fab68af1afbe8c4855d36
Reviewed-on: https://chromium-review.googlesource.com/921641
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51368}
2018-02-19 14:43:27 +00:00
Stephan Herhut
3b22899590 Set the VMA address in linux perf records
Set the VMA address for jitted code to the address of the code. This
should be the correct value, as the code got loaded to that address at
runtime.

Change-Id: I6ce9181d940dd4568d93a92e98d206f3c6546ebc
Reviewed-on: https://chromium-review.googlesource.com/915923
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51367}
2018-02-19 14:42:24 +00:00
sreten.kovacevic
d4f73e7619 [mips] Add Ctz and Popcnt as macro assembler instructions
Since these instructions will be used in liftoff as well as they
are used in code generator, they are transfered to macro assembler.

Change-Id: I48e60ccc7586252374bc66b7b72bbe23c2d0c0a6
Reviewed-on: https://chromium-review.googlesource.com/924194
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51366}
2018-02-19 14:41:09 +00:00
Clemens Hammacher
b8a727e14c Revert "Introduce ConcurrentMarking::StopRequest API."
This reverts commit f4b4109936.

Reason for revert: Several GC failures, e.g. https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/23236, https://build.chromium.org/p/client.v8/builders/V8%20Mac/builds/18390 

Original change's description:
> Introduce ConcurrentMarking::StopRequest API.
> 
> This was extracted from https://chromium-review.googlesource.com/c/v8/v8/+/924073/10
> after it became clear that using COMPLETE_TASKS/PREEMPT_TASKS where
> it should make sense to doesn't work in practice for now.
> 
> Experimental CLs which led to the above conclusion:
>  - https://chromium-review.googlesource.com/c/v8/v8/+/924865
>    (COMPLETE or CANCEL -- still broken)
>  - https://chromium-review.googlesource.com/c/v8/v8/+/924866
>    (CANCEL only, as before, works)
>  - https://chromium-review.googlesource.com/c/v8/v8/+/924028
>    (CANCEL and PREEMPT -- broken as well)
> 
> Introducing this unittested API allows to reduce the size
> of the CLs causing hard-to-diagnose bots-only failures
> and fix them individually follow-ups @
> 
>  1) https://chromium-review.googlesource.com/c/v8/v8/+/924029
>  2) https://chromium-review.googlesource.com/c/v8/v8/+/924031
>  3) https://chromium-review.googlesource.com/c/v8/v8/+/924030
> 
> Bug: chromium:812178
> Change-Id: Icdac456e9f7874b0c4b321ccdb8898297dad7d73
> Reviewed-on: https://chromium-review.googlesource.com/924867
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51353}

TBR=gab@chromium.org,ulan@chromium.org,mlippautz@chromium.org

Change-Id: Ia001cc81c6a7bc030b54d3aa9b9bcecc833300e6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:812178
Reviewed-on: https://chromium-review.googlesource.com/925302
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51365}
2018-02-19 13:59:18 +00:00
Clemens Hammacher
1986ee4867 Revert "Add a trace event when pausing/preempting concurrent marking."
This reverts commit 4b49f84434.

Reason for revert: Several GC failures, e.g. https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/23236, https://build.chromium.org/p/client.v8/builders/V8%20Mac/builds/18390 

Original change's description:
> Add a trace event when pausing/preempting concurrent marking.
> 
> This will let us identify in traces whether unwinding after receiving
> the preemption event is slower than desired and should be optimized.
> 
> Adding it to pausing while working on removing it in
> https://chromium-review.googlesource.com/c/v8/v8/+/922103
> will allow gathering traces that highlight the issue.
> 
> R=​mlippautz@chromium.org
> 
> Bug: chromium:812178
> Change-Id: I0555c6825e0792769c9ae2d748d7cc35df4f6fed
> Reviewed-on: https://chromium-review.googlesource.com/924122
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51354}

TBR=gab@chromium.org,mlippautz@chromium.org

Change-Id: I37a82e488de51d5ae4d7ed795b82ea9649c4a5f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:812178
Reviewed-on: https://chromium-review.googlesource.com/924426
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51364}
2018-02-19 13:58:16 +00:00
Clemens Hammacher
027b012d67 Revert "Preempt ConcurrentMarking tasks instead of merely pausing in PauseScope."
This reverts commit e9750cb806.

Reason for revert: Several GC failures, e.g. https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/23236, https://build.chromium.org/p/client.v8/builders/V8%20Mac/builds/18390 

Original change's description:
> Preempt ConcurrentMarking tasks instead of merely pausing in PauseScope.
> 
> Follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/924867
> 
> This is the core goal of the initial CL @
> https://chromium-review.googlesource.com/c/v8/v8/+/922103
> which was since split into multiple to diagnose a bots-only failure.
> 
> Bug: chromium:812178
> Change-Id: I4c4e0b517737e020862917bd89fa6ce38244e597
> Reviewed-on: https://chromium-review.googlesource.com/924031
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51356}

TBR=gab@chromium.org,ulan@chromium.org,mlippautz@chromium.org

Change-Id: Ic095e32708e58acbe5955bf29e65af34c59d321e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:812178
Reviewed-on: https://chromium-review.googlesource.com/925301
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51363}
2018-02-19 13:57:12 +00:00
Clemens Hammacher
773c70b65c Revert "Preempt ConcurrentMarking tasks ASAP when cancelling marking."
This reverts commit 8b53b9d908.

Reason for revert: Several GC failures, e.g. https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/23236, https://build.chromium.org/p/client.v8/builders/V8%20Mac/builds/18390 

Original change's description:
> Preempt ConcurrentMarking tasks ASAP when cancelling marking.
> 
> Follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/924867
> 
> Bug: chromium:812178
> Change-Id: I2abe28c6e953df42cffdcbd7ea35df9d29849905
> Reviewed-on: https://chromium-review.googlesource.com/924030
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51357}

TBR=gab@chromium.org,ulan@chromium.org,mlippautz@chromium.org

Change-Id: Ic4e226fdd02d8259244cef46e9923c95e6606cc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:812178
Reviewed-on: https://chromium-review.googlesource.com/924425
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51362}
2018-02-19 13:56:07 +00:00
Benedikt Meurer
feb545ceba [async-generators] Also avoid throwaway promise here.
This extends the previously introduced logic for implementing await
without having to allocate the throwaway promise and the additional
closures and context, to also cover await and yield inside of async
generators.

Bug: v8:7253
Change-Id: I011583a7714bbd148c54e5f204e2076630008db0
Reviewed-on: https://chromium-review.googlesource.com/924003
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51361}
2018-02-19 12:49:32 +00:00
Ulan Degenbaev
4a90e48689 [heap-profiler] Annotate global handles retained by console and debugger.
Bug: chromium:811842
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I72163abf0b20b123fb541fe0a1b168e036ef044e
Reviewed-on: https://chromium-review.googlesource.com/919063
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51360}
2018-02-19 12:21:52 +00:00
Peter Marshall
e77e4e2fc2 [cleanup] Type-ify NumberToString in CSA
Change-Id: Id616646bbeebe91e3e575d40799f01611a57643f
Reviewed-on: https://chromium-review.googlesource.com/924281
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51359}
2018-02-19 12:05:02 +00:00
Ulan Degenbaev
466d157cb7 [api] Add API for annotating retainer of a strong global handle.
This adds PersistentBase::AnnotateStrongRetainer(const char*) function.

The annotation is used by the heap snapshot generator to show the edges
from the (Global handles) root to the global handles.

Bug: chromium:811842
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I1a9e3e53a53aeaf2b590709fab8dd4ecf7e8f252
Reviewed-on: https://chromium-review.googlesource.com/916788
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51358}
2018-02-19 11:42:03 +00:00
Gabriel Charette
8b53b9d908 Preempt ConcurrentMarking tasks ASAP when cancelling marking.
Follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/924867

Bug: chromium:812178
Change-Id: I2abe28c6e953df42cffdcbd7ea35df9d29849905
Reviewed-on: https://chromium-review.googlesource.com/924030
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51357}
2018-02-19 10:59:42 +00:00
Gabriel Charette
e9750cb806 Preempt ConcurrentMarking tasks instead of merely pausing in PauseScope.
Follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/924867

This is the core goal of the initial CL @
https://chromium-review.googlesource.com/c/v8/v8/+/922103
which was since split into multiple to diagnose a bots-only failure.

Bug: chromium:812178
Change-Id: I4c4e0b517737e020862917bd89fa6ce38244e597
Reviewed-on: https://chromium-review.googlesource.com/924031
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51356}
2018-02-19 10:54:34 +00:00
Predrag Rudic
a8f68c205f MIPS[64]: Skip cctests until WasmF64 support is implemented in Liftoff
Change-Id: I101cd4eea87f17a1454c3e2b39c421e304509e61
Reviewed-on: https://chromium-review.googlesource.com/919085
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51355}
2018-02-19 10:53:28 +00:00
Gabriel Charette
4b49f84434 Add a trace event when pausing/preempting concurrent marking.
This will let us identify in traces whether unwinding after receiving
the preemption event is slower than desired and should be optimized.

Adding it to pausing while working on removing it in
https://chromium-review.googlesource.com/c/v8/v8/+/922103
will allow gathering traces that highlight the issue.

R=mlippautz@chromium.org

Bug: chromium:812178
Change-Id: I0555c6825e0792769c9ae2d748d7cc35df4f6fed
Reviewed-on: https://chromium-review.googlesource.com/924122
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51354}
2018-02-19 10:48:19 +00:00
Gabriel Charette
f4b4109936 Introduce ConcurrentMarking::StopRequest API.
This was extracted from https://chromium-review.googlesource.com/c/v8/v8/+/924073/10
after it became clear that using COMPLETE_TASKS/PREEMPT_TASKS where
it should make sense to doesn't work in practice for now.

Experimental CLs which led to the above conclusion:
 - https://chromium-review.googlesource.com/c/v8/v8/+/924865
   (COMPLETE or CANCEL -- still broken)
 - https://chromium-review.googlesource.com/c/v8/v8/+/924866
   (CANCEL only, as before, works)
 - https://chromium-review.googlesource.com/c/v8/v8/+/924028
   (CANCEL and PREEMPT -- broken as well)

Introducing this unittested API allows to reduce the size
of the CLs causing hard-to-diagnose bots-only failures
and fix them individually follow-ups @

 1) https://chromium-review.googlesource.com/c/v8/v8/+/924029
 2) https://chromium-review.googlesource.com/c/v8/v8/+/924031
 3) https://chromium-review.googlesource.com/c/v8/v8/+/924030

Bug: chromium:812178
Change-Id: Icdac456e9f7874b0c4b321ccdb8898297dad7d73
Reviewed-on: https://chromium-review.googlesource.com/924867
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51353}
2018-02-19 10:39:08 +00:00
Jakob Kummerow
bd0b32f545 Reland "[bigint] Add BigInt64Array, BigUint64Array"
This is a reland of dda0419ecd.

Originally reviewed-on: https://chromium-review.googlesource.com/914513
and landed as refs/heads/master@{#51342}.

Bug: v8:6791
Change-Id: I3b3a069da7a0e64c38a81b3110dc5ece4887cb19
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/924665
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51352}
2018-02-19 10:23:18 +00:00
Yang Guo
004d90615a Remove tools/release/update_node.py.
Use tools/node/update_node.py instead.

TBR=machenbach@chromium.org

Change-Id: Ib6f7b93e92b27e967627517a0afe2fedd533f6c4
Reviewed-on: https://chromium-review.googlesource.com/924153
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51351}
2018-02-19 10:09:07 +00:00
Ulan Degenbaev
7e6d62852d [heap-profiler] Simplify snapshotting of the roots.
This replaces three passes over the roots with a single pass.
This also removes root synchronization logic.

The GC subroot index is computed from the |root| parameter of the visit
method. The new |description| parameter is used as an edge name.

Bug: chromium:811842
Change-Id: I03a9215d56b54b3eb5f7bc8b32d5b22ad091c68b
Reviewed-on: https://chromium-review.googlesource.com/916781
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51350}
2018-02-19 10:03:38 +00:00
Gabriel Charette
ba37a5f64a Add DCHECKs to confirm there are no pending tasks when calling ConcurrentMarking::ScheduleTasks()
This was extracted from https://chromium-review.googlesource.com/c/v8/v8/+/924073/7
in an attempt to isolate hard-to-diagnose bots-only failures there.

Bug: chromium:812178
Change-Id: I980b25ec7d775b74ade75e9166806740b93eea8e
Reviewed-on: https://chromium-review.googlesource.com/924026
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51349}
2018-02-19 08:13:45 +00:00
Gabriel Charette
330fa940c2 Extract the trivial cleanup bits from https://chromium-review.googlesource.com/c/v8/v8/+/924073/10
This is an attempt to isolate what's causing the hard-to-diagnose bots only
failures with that CL.

Bug: chromium:812178
Change-Id: I50ffe8953bebbbc6b5a5e2f689718662a537acb4
Reviewed-on: https://chromium-review.googlesource.com/924864
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51348}
2018-02-19 08:09:50 +00:00
Erik Luo
0cf89dd1be [debug] move side-effect tests into subfolder
Bug: chromium:810176
Change-Id: I089a1678dfbe0c3bb664e54818a6853f66d364b2
Reviewed-on: https://chromium-review.googlesource.com/923387
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51347}
2018-02-19 08:08:45 +00:00
Marja Hölttä
1124f5abaf [heap] Remove unnecessary AccessMode.
Change-Id: I4f1d3bd609c48a8deed04e3e59ef326c0e4735c3
Reviewed-on: https://chromium-review.googlesource.com/923985
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51346}
2018-02-19 08:02:35 +00:00
Sergiy Byelozyorov
de7a317428 Whitespace CL
TBR=sergiyb@chromium.org

No-Try: true
Bug: chromium:616879
Change-Id: I5023040d3ce7753d39345033f91848e4f0ed36d9
Reviewed-on: https://chromium-review.googlesource.com/921101
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51345}
2018-02-17 07:44:59 +00:00
Michael Achenbach
cb7a15fede Revert "[bigint] Add BigInt64Array, BigUint64Array"
This reverts commit dda0419ecd.

Reason for revert: msvc unhappy:
https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/1434

Original change's description:
> [bigint] Add BigInt64Array, BigUint64Array
> 
> Bug: v8:6791
> Tbr: hpayer@chromium.org
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
> Change-Id: I637e9084d2fe4869ad0be2fb996149ab9940f346
> Reviewed-on: https://chromium-review.googlesource.com/914513
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51342}

TBR=jkummerow@chromium.org,neis@chromium.org,hpayer@chromium.org

Change-Id: I49237fa323f0d3ea70e744d92d5cbdd4d5c4b39f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6791
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/924663
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51344}
2018-02-17 06:01:31 +00:00
v8-autoroll
6574c66d72 Update V8 DEPS.
Rolling v8/build: c5c828a..e2c6aae

Rolling v8/buildtools: a09e064..2888931

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e7298f3..4aa92ef

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

Change-Id: Id6e6a5be6a6c2480a83489b2c5f82d8f7139c4b3
Reviewed-on: https://chromium-review.googlesource.com/924357
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51343}
2018-02-17 04:53:59 +00:00
Jakob Kummerow
dda0419ecd [bigint] Add BigInt64Array, BigUint64Array
Bug: v8:6791
Tbr: hpayer@chromium.org
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I637e9084d2fe4869ad0be2fb996149ab9940f346
Reviewed-on: https://chromium-review.googlesource.com/914513
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51342}
2018-02-17 04:52:29 +00:00
Michael Achenbach
77290e0d7f [build] Prepare removal of gyp-defines from landmine
Depends on: https://crrev.com/c/924114

TBR=yangguo@chromium.org

Bug: chromium:756691
Change-Id: Ibbc3bd35e8727296c1539edc961e3184830575ff
Reviewed-on: https://chromium-review.googlesource.com/924609
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51341}
2018-02-16 23:28:14 +00:00
Bill Budge
95e39b0623 [API] Don't use VM methods of v8::ArrayBuffer::Allocator.
- Replaces calls to Allocator Reserve, Free, and SetPermissions
  with equivalent page allocator calls (allocation.h).
- Un-implements these methods to catch usage, in preparation for
  removing these.

Bug: chromium:799573
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Id233b7a9cfc8e332c64e514f6359e8b670c2d75e
Reviewed-on: https://chromium-review.googlesource.com/911883
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Eric Holk <eholk@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51340}
2018-02-16 22:51:17 +00:00
Mathias Bynens
fd9251dbec Ship JSON ⊂ ECMAScript
Intent to ship:
https://groups.google.com/d/msg/v8-users/YZnlGa8ZMoc/_w7H3x_BAgAJ

Bug: v8:7418
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I9e80dd98fa7b04fee3be591282e455f5576eeed2
Reviewed-on: https://chromium-review.googlesource.com/923728
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51339}
2018-02-16 22:21:45 +00:00