New issue
Advanced search Search tips
Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 5
Cc:
Components:
HW: ----
NextAction: ----
OS: ----
Priority: 2
Type: FeatureRequest

Blocked on:
issue 8018
issue 8689



Sign in to add a comment
link

Issue 7921: [wasm] Remove finisher task (add code from background threads)

Reported by clemensh@chromium.org, Jul 5 2018 Project Member

Issue description

Now that the wasm code is independent of the isolate and lives off-heap, we don't really need the finisher task any more. We just completely remove it, and execute all compilation (including adding the code to the NativeModule) in the background tasks.
 

Comment 1 by bugdroid1@chromium.org, Jul 5 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/70cc29ca0c1612321bfed16e92d377ab7a5912fa

commit 70cc29ca0c1612321bfed16e92d377ab7a5912fa
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Thu Jul 05 15:13:03 2018

[Liftoff] Add generated code from the background thread

This avoids the need for the finisher task (running on the foreground
thread) for Liftoff code.
This CL just makes the simple change to call {AddCode} from the
background thread. More cleanup will follow in separate CLs.

R=mstarzinger@chromium.org

Bug: v8:6600,  v8:7921 
Change-Id: I99ef29377efee5be36ba203aa7ed71e2471d86f3
Reviewed-on: https://chromium-review.googlesource.com/1126930
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54266}
[modify] https://crrev.com/70cc29ca0c1612321bfed16e92d377ab7a5912fa/src/wasm/baseline/liftoff-assembler.h
[modify] https://crrev.com/70cc29ca0c1612321bfed16e92d377ab7a5912fa/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/70cc29ca0c1612321bfed16e92d377ab7a5912fa/src/wasm/baseline/liftoff-compiler.h
[modify] https://crrev.com/70cc29ca0c1612321bfed16e92d377ab7a5912fa/src/wasm/function-compiler.cc
[modify] https://crrev.com/70cc29ca0c1612321bfed16e92d377ab7a5912fa/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/70cc29ca0c1612321bfed16e92d377ab7a5912fa/src/wasm/wasm-code-manager.h

Comment 2 by bugdroid1@chromium.org, Jul 9 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/2683675ce638ee15cbef7db2abe1a437f90d7792

commit 2683675ce638ee15cbef7db2abe1a437f90d7792
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Mon Jul 09 08:22:49 2018

[wasm] Reduce size of critical section

This reduces the critical section in {NativeModule::AddOwnedCode} to
not include the memcpy.
It also contains small drive-by fixes.

R=mstarzinger@chromium.org

Bug:  v8:7921 
Change-Id: Idbed5d1ab5627fe2ab3f60887ec2b31c5525e36c
Reviewed-on: https://chromium-review.googlesource.com/1127025
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54312}
[modify] https://crrev.com/2683675ce638ee15cbef7db2abe1a437f90d7792/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/2683675ce638ee15cbef7db2abe1a437f90d7792/src/wasm/wasm-code-manager.h

Comment 3 by bugdroid1@chromium.org, Jul 9 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/231b3e15fc8d56a904c70e31cb24089cc5014f3b

commit 231b3e15fc8d56a904c70e31cb24089cc5014f3b
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Mon Jul 09 13:36:09 2018

[wasm] Move code generation fully to background task.

This moves the entire code generation phase (including code emission
into the native module) into the background task. The code manager is
fully thread safe by now and there are no Isolate-bound steps anymore.

R=clemensh@chromium.org
BUG= v8:7921 

Change-Id: Ie3e8565e126bfdb58bf472291a1f9fbebe7b5431
Reviewed-on: https://chromium-review.googlesource.com/1128743
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54324}
[modify] https://crrev.com/231b3e15fc8d56a904c70e31cb24089cc5014f3b/src/compiler/pipeline.cc
[modify] https://crrev.com/231b3e15fc8d56a904c70e31cb24089cc5014f3b/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/231b3e15fc8d56a904c70e31cb24089cc5014f3b/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/231b3e15fc8d56a904c70e31cb24089cc5014f3b/src/wasm/wasm-code-manager.h

Comment 4 by bugdroid1@chromium.org, Jul 9 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/44ca9863fc4f4d34763c5c87c7db8e3b1fd55519

commit 44ca9863fc4f4d34763c5c87c7db8e3b1fd55519
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Mon Jul 09 14:00:43 2018

Revert "[wasm] Move code generation fully to background task."

This reverts commit 231b3e15fc8d56a904c70e31cb24089cc5014f3b.

Reason for revert: Flakes in inspector/debugger/wasm-stack

Original change's description:
> [wasm] Move code generation fully to background task.
> 
> This moves the entire code generation phase (including code emission
> into the native module) into the background task. The code manager is
> fully thread safe by now and there are no Isolate-bound steps anymore.
> 
> R=​clemensh@chromium.org
> BUG= v8:7921 
> 
> Change-Id: Ie3e8565e126bfdb58bf472291a1f9fbebe7b5431
> Reviewed-on: https://chromium-review.googlesource.com/1128743
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54324}

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

Change-Id: Ice5d80425cebd3921d9683d06f70d5173f663e42
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  v8:7921 
Reviewed-on: https://chromium-review.googlesource.com/1129059
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54326}
[modify] https://crrev.com/44ca9863fc4f4d34763c5c87c7db8e3b1fd55519/src/compiler/pipeline.cc
[modify] https://crrev.com/44ca9863fc4f4d34763c5c87c7db8e3b1fd55519/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/44ca9863fc4f4d34763c5c87c7db8e3b1fd55519/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/44ca9863fc4f4d34763c5c87c7db8e3b1fd55519/src/wasm/wasm-code-manager.h

Comment 5 by bugdroid1@chromium.org, Jul 10 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/8442795a32b863780fac75d40f95814e01658ecd

commit 8442795a32b863780fac75d40f95814e01658ecd
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Tue Jul 10 13:51:41 2018

[wasm] Fix destructor ordering for {NativeModule}.

R=clemensh@chromium.org
BUG= v8:7921 

Change-Id: I82a1c5cff7fd00603a509221b448b11d82edee7e
Reviewed-on: https://chromium-review.googlesource.com/1131176
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54356}
[modify] https://crrev.com/8442795a32b863780fac75d40f95814e01658ecd/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/8442795a32b863780fac75d40f95814e01658ecd/src/wasm/wasm-code-manager.h

Comment 6 by bugdroid1@chromium.org, Jul 13 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/9c6fab0711920c97728ce66da3942e38264e9c31

commit 9c6fab0711920c97728ce66da3942e38264e9c31
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Fri Jul 13 07:53:49 2018

[wasm] Move code generation fully to background task.

This moves the entire code generation phase (including code emission
into the native module) into the background task. The code manager is
fully thread safe by now and there are no Isolate-bound steps anymore.

The only step remaining on the foreground task is publishing the fully
finished code to other threads via {NativeModule::PublishCode}.

R=clemensh@chromium.org
BUG= v8:7921 

Change-Id: Ia64c6ce945aabd071b26e61ef8d397fb7727a038
Reviewed-on: https://chromium-review.googlesource.com/1135004
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54425}
[modify] https://crrev.com/9c6fab0711920c97728ce66da3942e38264e9c31/src/compiler/pipeline.cc
[modify] https://crrev.com/9c6fab0711920c97728ce66da3942e38264e9c31/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/9c6fab0711920c97728ce66da3942e38264e9c31/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/9c6fab0711920c97728ce66da3942e38264e9c31/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/9c6fab0711920c97728ce66da3942e38264e9c31/src/wasm/wasm-code-manager.h
[modify] https://crrev.com/9c6fab0711920c97728ce66da3942e38264e9c31/test/cctest/wasm/test-run-wasm.cc

Comment 7 by bugdroid1@chromium.org, Jul 13 2018

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 13 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/f33ab49127c328dae7c358746a2d1348eb8af130

commit f33ab49127c328dae7c358746a2d1348eb8af130
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Fri Jul 13 11:46:04 2018

[wasm] Remove support for compilation task throttling.

This removes support to track the memory footprint of fully executed but
not yet finalized compilation units. It was used to throttle creation of
new tasks when the latent memory pressure of this unfinished jobs rose
above a certain threshold. Now that units no longer incur a significant
latent memory pressure, this is no longer needed.

R=clemensh@chromium.org
BUG= v8:7921 

Change-Id: I3f4a563ebcb85b7aeac50f469a8a495eecf8aa3d
Reviewed-on: https://chromium-review.googlesource.com/1136291
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54435}
[modify] https://crrev.com/f33ab49127c328dae7c358746a2d1348eb8af130/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/f33ab49127c328dae7c358746a2d1348eb8af130/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/f33ab49127c328dae7c358746a2d1348eb8af130/src/wasm/function-compiler.h
[modify] https://crrev.com/f33ab49127c328dae7c358746a2d1348eb8af130/src/wasm/module-compiler.cc

Comment 9 by mstarzinger@chromium.org, Aug 8

Blockedon: 8018

Comment 10 by bugdroid1@chromium.org, Aug 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/f991465b4216887abbfc037657c6b779729366ef

commit f991465b4216887abbfc037657c6b779729366ef
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Wed Aug 08 15:28:27 2018

[wasm] Publish new code from the background threads.

R=clemensh@chromium.org
BUG= v8:7921 

Change-Id: Ib86cb5f742907b6e54365827facfc765867ca22e
Reviewed-on: https://chromium-review.googlesource.com/1156384
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54985}
[modify] https://crrev.com/f991465b4216887abbfc037657c6b779729366ef/src/compiler/wasm-compiler.cc

Comment 11 by bugdroid1@chromium.org, Aug 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/44a49a4d01fb2302fddae3a85170d4de1524bf4d

commit 44a49a4d01fb2302fddae3a85170d4de1524bf4d
Author: Sigurd Schneider <sigurds@chromium.org>
Date: Wed Aug 08 15:44:57 2018

Revert "[wasm] Publish new code from the background threads."

This reverts commit f991465b4216887abbfc037657c6b779729366ef.

Reason for revert: test failure
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20internal%20snapshot/16696

Original change's description:
> [wasm] Publish new code from the background threads.
> 
> R=​clemensh@chromium.org
> BUG= v8:7921 
> 
> Change-Id: Ib86cb5f742907b6e54365827facfc765867ca22e
> Reviewed-on: https://chromium-review.googlesource.com/1156384
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54985}

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

Change-Id: Id7b0f8ec208a0117f386e6e809ebe61125cf1119
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  v8:7921 
Reviewed-on: https://chromium-review.googlesource.com/1167522
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54986}
[modify] https://crrev.com/44a49a4d01fb2302fddae3a85170d4de1524bf4d/src/compiler/wasm-compiler.cc

Comment 12 by bugdroid1@chromium.org, Aug 10

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/38584fd47e8703e9a927b0515a29260de5f1db85

commit 38584fd47e8703e9a927b0515a29260de5f1db85
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Fri Aug 10 11:37:11 2018

Reland "[wasm] Publish new code from the background threads."

This is a reland of f991465b4216887abbfc037657c6b779729366ef

Original change's description:
> [wasm] Publish new code from the background threads.
> 
> R=clemensh@chromium.org
> BUG= v8:7921 
> 
> Change-Id: Ib86cb5f742907b6e54365827facfc765867ca22e
> Reviewed-on: https://chromium-review.googlesource.com/1156384
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54985}

Bug:  v8:7921 
Change-Id: I08c5eb689fe4f8ef2f7b576f0145eb0ae617fd9d
Reviewed-on: https://chromium-review.googlesource.com/1170603
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55042}
[modify] https://crrev.com/38584fd47e8703e9a927b0515a29260de5f1db85/src/compiler/wasm-compiler.cc

Comment 13 by bugdroid1@chromium.org, Aug 10

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/e3aab0fbc71caf11f8bdeab9c744fb5fe9a2a253

commit e3aab0fbc71caf11f8bdeab9c744fb5fe9a2a253
Author: Sigurd Schneider <sigurds@chromium.org>
Date: Fri Aug 10 12:03:38 2018

Revert "Reland "[wasm] Publish new code from the background threads.""

This reverts commit 38584fd47e8703e9a927b0515a29260de5f1db85.

Reason for revert: failures on Mac64

https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Mac64/23574

Original change's description:
> Reland "[wasm] Publish new code from the background threads."
> 
> This is a reland of f991465b4216887abbfc037657c6b779729366ef
> 
> Original change's description:
> > [wasm] Publish new code from the background threads.
> > 
> > R=clemensh@chromium.org
> > BUG= v8:7921 
> > 
> > Change-Id: Ib86cb5f742907b6e54365827facfc765867ca22e
> > Reviewed-on: https://chromium-review.googlesource.com/1156384
> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> > Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54985}
> 
> Bug:  v8:7921 
> Change-Id: I08c5eb689fe4f8ef2f7b576f0145eb0ae617fd9d
> Reviewed-on: https://chromium-review.googlesource.com/1170603
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55042}

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

Change-Id: Ia7526f97fc7bd9d8c0627c958647fe6137eb98ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  v8:7921 
Reviewed-on: https://chromium-review.googlesource.com/1170802
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55044}
[modify] https://crrev.com/e3aab0fbc71caf11f8bdeab9c744fb5fe9a2a253/src/compiler/wasm-compiler.cc

Comment 14 by bugdroid1@chromium.org, Aug 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4

commit 2b897275392a9f6b5f0a7f00b846d347a1d7c7c4
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Fri Aug 17 13:21:59 2018

[wasm] Preserve interpreter entry even on tier-up.

This makes sure that a tier-up from Ignition to TurboFan (or any other
code publishing) preserves redirections to the Interpreter. Currently an
interpreted function never switches back to compiled.

R=titzer@chromium.org
TEST=mjsunit/wasm/interpreter-mixed
BUG= v8:7921 , v8:8018 

Change-Id: Ifca479953509708c998c11cc00b481c232678e00
Reviewed-on: https://chromium-review.googlesource.com/1179661
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55195}
[modify] https://crrev.com/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4/src/runtime/runtime-test.cc
[modify] https://crrev.com/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4/src/runtime/runtime.h
[modify] https://crrev.com/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4/src/wasm/wasm-code-manager.h
[modify] https://crrev.com/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4/src/wasm/wasm-engine.cc
[modify] https://crrev.com/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4/src/wasm/wasm-engine.h
[modify] https://crrev.com/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4/src/wasm/wasm-interpreter.cc
[modify] https://crrev.com/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4/test/mjsunit/wasm/interpreter-mixed.js
[modify] https://crrev.com/2b897275392a9f6b5f0a7f00b846d347a1d7c7c4/test/mjsunit/wasm/interpreter.js

Comment 15 by bugdroid1@chromium.org, Aug 20

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/932246f1b69b0624ee409daa1318f1bc0f3ac7a8

commit 932246f1b69b0624ee409daa1318f1bc0f3ac7a8
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Mon Aug 20 08:30:15 2018

Reland "[wasm] Publish new code from the background threads."

This is a reland of f991465b4216887abbfc037657c6b779729366ef

Original change's description:
> [wasm] Publish new code from the background threads.
> 
> R=clemensh@chromium.org
> BUG= v8:7921 
> 
> Change-Id: Ib86cb5f742907b6e54365827facfc765867ca22e
> Reviewed-on: https://chromium-review.googlesource.com/1156384
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54985}

Bug:  v8:7921 
Change-Id: Ic99f59410b6f26593f4bd4b47209e9cce56481fc
Reviewed-on: https://chromium-review.googlesource.com/1179861
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55202}
[modify] https://crrev.com/932246f1b69b0624ee409daa1318f1bc0f3ac7a8/src/compiler/wasm-compiler.cc

Comment 16 by bugdroid1@chromium.org, Oct 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/e32daf0a3a98878856e0ff9103c9ff41005c4243

commit e32daf0a3a98878856e0ff9103c9ff41005c4243
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Fri Oct 19 14:56:14 2018

[wasm] Move error reporting out of FinishCompilation

And remove the TurboFan/Liftoff specific {FinishCompilation}
implementations completely. Compilation errors are now stored in the
{WasmCompilationUnit} directly as a {Result<WasmCode*>}. They are
retrieved via {WasmCompilationUnit::ReportError}, which moves the error
to the {ErrorThrower}.
This prepares more changes to completely remove the {FinishCompilation}
phase.

R=titzer@chromium.org

Bug:  v8:7921 
Change-Id: I4f9a6e919359aeab074880d0d38211500b76e4ec
Reviewed-on: https://chromium-review.googlesource.com/c/1290975
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56826}
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/src/compiler/wasm-compiler.h
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/src/wasm/baseline/liftoff-compiler.h
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/src/wasm/decoder.h
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/src/wasm/function-compiler.cc
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/src/wasm/function-compiler.h
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/src/wasm/module-compiler.cc
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/src/wasm/wasm-result.h
[modify] https://crrev.com/e32daf0a3a98878856e0ff9103c9ff41005c4243/test/cctest/wasm/wasm-run-utils.cc

Comment 17 by bugdroid1@chromium.org, Oct 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/749d1fdaffd96cab7989c6ccacca459453b2354d

commit 749d1fdaffd96cab7989c6ccacca459453b2354d
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Fri Oct 19 15:03:54 2018

[wasm] Remove WasmCompilationUnit::FinishCompilation

This method only recorded stats of the generated code object. Since
both counters that are updated are thread-safe anyway, we can just
update them from the background instead (during {ExecuteCompilation}).

R=mstarzinger@chromium.org

Bug:  v8:7921 
Change-Id: Ia6074be8339b100f328938136ecb10144fc79f12
Reviewed-on: https://chromium-review.googlesource.com/c/1291074
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56827}
[modify] https://crrev.com/749d1fdaffd96cab7989c6ccacca459453b2354d/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/749d1fdaffd96cab7989c6ccacca459453b2354d/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/749d1fdaffd96cab7989c6ccacca459453b2354d/src/wasm/function-compiler.cc
[modify] https://crrev.com/749d1fdaffd96cab7989c6ccacca459453b2354d/src/wasm/function-compiler.h
[modify] https://crrev.com/749d1fdaffd96cab7989c6ccacca459453b2354d/src/wasm/module-compiler.cc
[modify] https://crrev.com/749d1fdaffd96cab7989c6ccacca459453b2354d/test/cctest/wasm/wasm-run-utils.cc

Comment 18 by bugdroid1@chromium.org, Oct 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/bf3d7b9ae38505dbbbafb7813c70fb55bc773555

commit bf3d7b9ae38505dbbbafb7813c70fb55bc773555
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Mon Oct 29 14:19:45 2018

[wasm] Store compile errors in CompilationState

We are currently storing compilation errors in the individual
compilation units and pass it to the ErrorThrower during finishing.
This CL changes that to store errors on the CompilationState directly.
From there, it is propagated to the ErrorThrower in the compilation
state callback.
This removes more work from the finisher task and slims down the
WasmCompilationUnits.

R=mstarzinger@chromium.org

Bug: v8:8343,  v8:7921 
Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9
Reviewed-on: https://chromium-review.googlesource.com/c/1303720
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57091}
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/src/compiler/wasm-compiler.h
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/src/wasm/compilation-environment.h
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/src/wasm/function-compiler.cc
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/src/wasm/function-compiler.h
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/src/wasm/module-compiler.cc
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/src/wasm/wasm-engine.cc
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/src/wasm/wasm-engine.h
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/src/wasm/wasm-result.h
[modify] https://crrev.com/bf3d7b9ae38505dbbbafb7813c70fb55bc773555/test/cctest/wasm/test-wasm-shared-engine.cc

Comment 19 by bugdroid1@chromium.org, Oct 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/dd5c36316da362a55e5d1d3b99c4d323ce42e588

commit dd5c36316da362a55e5d1d3b99c4d323ce42e588
Author: Maya Lekova <mslekova@chromium.org>
Date: Mon Oct 29 15:16:52 2018

Revert "[wasm] Store compile errors in CompilationState"

This reverts commit bf3d7b9ae38505dbbbafb7813c70fb55bc773555.

Reason for revert: Breaks TSAN build, see
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20TSAN/23248

Original change's description:
> [wasm] Store compile errors in CompilationState
> 
> We are currently storing compilation errors in the individual
> compilation units and pass it to the ErrorThrower during finishing.
> This CL changes that to store errors on the CompilationState directly.
> From there, it is propagated to the ErrorThrower in the compilation
> state callback.
> This removes more work from the finisher task and slims down the
> WasmCompilationUnits.
> 
> R=​mstarzinger@chromium.org
> 
> Bug: v8:8343,  v8:7921 
> Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9
> Reviewed-on: https://chromium-review.googlesource.com/c/1303720
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57091}

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

Change-Id: Id32c7337494a4749485adbcfcaae7b2331afea66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8343,  v8:7921 
Reviewed-on: https://chromium-review.googlesource.com/c/1304544
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57094}
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/src/compiler/wasm-compiler.h
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/src/wasm/compilation-environment.h
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/src/wasm/function-compiler.cc
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/src/wasm/function-compiler.h
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/src/wasm/module-compiler.cc
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/src/wasm/wasm-engine.cc
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/src/wasm/wasm-engine.h
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/src/wasm/wasm-result.h
[modify] https://crrev.com/dd5c36316da362a55e5d1d3b99c4d323ce42e588/test/cctest/wasm/test-wasm-shared-engine.cc

Comment 20 by bugdroid1@chromium.org, Oct 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/1ff8045530526e5e30f0beefacb437b931279706

commit 1ff8045530526e5e30f0beefacb437b931279706
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Oct 30 13:35:00 2018

Reland "[wasm] Store compile errors in CompilationState"

This is a reland of bf3d7b9ae38505dbbbafb7813c70fb55bc773555

Original change's description:
> [wasm] Store compile errors in CompilationState
> 
> We are currently storing compilation errors in the individual
> compilation units and pass it to the ErrorThrower during finishing.
> This CL changes that to store errors on the CompilationState directly.
> From there, it is propagated to the ErrorThrower in the compilation
> state callback.
> This removes more work from the finisher task and slims down the
> WasmCompilationUnits.
> 
> R=mstarzinger@chromium.org
> 
> Bug: v8:8343,  v8:7921 
> Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9
> Reviewed-on: https://chromium-review.googlesource.com/c/1303720
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57091}

Bug: v8:8343,  v8:7921 
Change-Id: Iaa5c89d224cb2bcfca2d12eba305413a9ad95618
Reviewed-on: https://chromium-review.googlesource.com/c/1304547
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57126}
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/src/compiler/wasm-compiler.h
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/src/wasm/compilation-environment.h
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/src/wasm/function-compiler.cc
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/src/wasm/function-compiler.h
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/src/wasm/module-compiler.cc
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/src/wasm/wasm-engine.cc
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/src/wasm/wasm-engine.h
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/src/wasm/wasm-result.h
[modify] https://crrev.com/1ff8045530526e5e30f0beefacb437b931279706/test/cctest/wasm/test-wasm-shared-engine.cc

Comment 21 by bugdroid1@chromium.org, Oct 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/fd5647374201c5fd8aaffe23fe7dec4dd4d4b33b

commit fd5647374201c5fd8aaffe23fe7dec4dd4d4b33b
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Oct 30 15:16:00 2018

[wasm] Abort compilation from background tasks

This removes another liability of the finisher: to abort compilation
and publish errors once an error state has been set by a background
compile unit.
This CL makes background threads set the error state directly and
schedule a foreground task to actually publish the error (e.g. via the
promise).

R=mstarzinger@chromium.org

Bug:  v8:7921 
Change-Id: I7a6a7ca4f235c2ad374b6ffc434eb6ac7d5f54ae
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1307425
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57135}
[modify] https://crrev.com/fd5647374201c5fd8aaffe23fe7dec4dd4d4b33b/src/wasm/module-compiler.cc

Comment 22 by bugdroid1@chromium.org, Oct 31

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/1c2394dd457fbab505dae75285c8ae269c5078f4

commit 1c2394dd457fbab505dae75285c8ae269c5078f4
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Oct 31 11:04:19 2018

[wasm] Log code objects in a separate task

Move code logging out of the finisher task. Schedule a separate task
for logging, but only if logging is actually enabled.

R=mstarzinger@chromium.org

Bug:  v8:7921 
Change-Id: Ib2c7db22c87e60e204096df3e8ef5b354802984f
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1308113
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57165}
[modify] https://crrev.com/1c2394dd457fbab505dae75285c8ae269c5078f4/src/wasm/module-compiler.cc

Comment 23 by bugdroid1@chromium.org, Nov 6

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/ec8836fb4de842563b9cbc608896162a155e4c0e

commit ec8836fb4de842563b9cbc608896162a155e4c0e
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Nov 06 14:56:10 2018

[wasm] Fix test platform to process foreground tasks in order

Any sane platform would process foreground tasks in a FIFO order. Hence
our mock platform in the tests should do the same.

R=ahaas@chromium.org

Bug:  v8:7921 
Change-Id: Iafe1d9f2eb2a0c168f7e994f05b054756ef9e4af
Reviewed-on: https://chromium-review.googlesource.com/c/1319754
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57283}
[modify] https://crrev.com/ec8836fb4de842563b9cbc608896162a155e4c0e/test/cctest/wasm/test-streaming-compilation.cc

Comment 24 by bugdroid1@chromium.org, Nov 6

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/1e1ca02865e142cb022cd24592a7d6518c475cd5

commit 1e1ca02865e142cb022cd24592a7d6518c475cd5
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Nov 06 15:09:52 2018

[wasm] Slightly improve async tests

These tests are also used for streaming. This CL changes the test to
actually output the exception that unexpectedly happened.

R=ahaas@chromium.org

Bug:  v8:7921 
Change-Id: Ia9c91a7d3d9452f9c0180329a5434f049b56c3c8
Reviewed-on: https://chromium-review.googlesource.com/c/1319755
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57284}
[modify] https://crrev.com/1e1ca02865e142cb022cd24592a7d6518c475cd5/test/mjsunit/wasm/async-compile.js

Comment 25 by bugdroid1@chromium.org, Nov 6

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/c45a3275deb9cef89d5225296d315d24bf00b949

commit c45a3275deb9cef89d5225296d315d24bf00b949
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Nov 06 16:56:42 2018

[wasm] Don't store AsyncCompileJob in CompileStep

The CompileStep is only invoked via the {AsyncCompileJob} that owns it,
so we can just pass a pointer to the AsyncCompileJob instead of storing
it in the step itself.

R=ahaas@chromium.org

Bug: v8:8238,  v8:7921 
Change-Id: I92eda222ace2d5fef5af7663175c62fa7601810c
Reviewed-on: https://chromium-review.googlesource.com/c/1319759
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57291}
[modify] https://crrev.com/c45a3275deb9cef89d5225296d315d24bf00b949/src/wasm/module-compiler.cc

Comment 26 by bugdroid1@chromium.org, Nov 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f

commit 014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Nov 07 13:56:53 2018

[wasm] Decouple wire bytes from compilation units

Compilation units currently contain pointers into allocated space that
contains the code of the respective function. This requires us to keep
the StreamingDecoder alive as long as compilation is still running
(including tiering).
This CL refactors this by having an additional redirection
(WireBytesStorage) which can point to either the StreamingDecoder or
the NativeModule. We only keep the code section buffer alive as long as
the StreamingWireBytesStorage is still in use.

I will further refactor memory ownership in a follow-up CL to not make
the AsyncCompileJob keep the StreamingDecoder alive.

R=ahaas@chromium.org

Bug: v8:8343, v8:7921 , v8:8050 
Change-Id: I780582c3217abf64000454f2c9c108b9ac9fbff1
Reviewed-on: https://chromium-review.googlesource.com/c/1319588
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57317}
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/compiler/wasm-compiler.h
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/baseline/liftoff-compiler.h
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/compilation-environment.h
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/function-compiler.cc
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/function-compiler.h
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/graph-builder-interface.cc
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/graph-builder-interface.h
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/module-compiler.cc
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/streaming-decoder.cc
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/streaming-decoder.h
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/wasm-code-manager.h
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/src/wasm/wasm-objects.cc
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/test/cctest/wasm/wasm-run-utils.cc
[modify] https://crrev.com/014d9e4f327cb71dc6d0e6e2f2d8f7cf9cfc0e2f/test/unittests/wasm/streaming-decoder-unittest.cc

Comment 27 by bugdroid1@chromium.org, Nov 12

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/3b64603da55def27402ac90392c82ff6536818be

commit 3b64603da55def27402ac90392c82ff6536818be
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Mon Nov 12 14:47:06 2018

[wasm] Reset StreamingProcessor on error

After the first decoder error, the streaming processor should not be
called again. To enforce this, reset the {processor_} field. This also
makes the {ok_} field redundant.
Note that this refactoring is also necessary for a future CL which
makes the {StreamingProcessor} keep the {AsyncCompileJob} alive. By
resetting the processor, we also remove that link.

R=ahaas@chromium.org

Bug:  v8:7921 
Change-Id: I42f5ed26a8f26c3dc8db5676557a0d82021e132e
Reviewed-on: https://chromium-review.googlesource.com/c/1329179
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57435}
[modify] https://crrev.com/3b64603da55def27402ac90392c82ff6536818be/src/vector.h
[modify] https://crrev.com/3b64603da55def27402ac90392c82ff6536818be/src/wasm/streaming-decoder.cc
[modify] https://crrev.com/3b64603da55def27402ac90392c82ff6536818be/src/wasm/streaming-decoder.h
[modify] https://crrev.com/3b64603da55def27402ac90392c82ff6536818be/test/unittests/wasm/streaming-decoder-unittest.cc

Comment 28 by bugdroid1@chromium.org, Nov 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/aab18a4c3eb3eecbaa121f165550638eb074b177

commit aab18a4c3eb3eecbaa121f165550638eb074b177
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Nov 13 12:29:53 2018

[wasm] Extract CompilationStateCallback to own class

Just moving code around a bit.

R=ahaas@chromium.org

Bug:  v8:7921 
Change-Id: I6a9f9dab41360e9a0d8249fe77260788151cd88b
Reviewed-on: https://chromium-review.googlesource.com/c/1333411
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57466}
[modify] https://crrev.com/aab18a4c3eb3eecbaa121f165550638eb074b177/src/wasm/module-compiler.cc
[modify] https://crrev.com/aab18a4c3eb3eecbaa121f165550638eb074b177/src/wasm/module-compiler.h

Comment 29 by bugdroid1@chromium.org, Nov 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/3858368d187b7c72a79be330702e6facdf2bc1ea

commit 3858368d187b7c72a79be330702e6facdf2bc1ea
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Nov 14 12:59:34 2018

[wasm] Check event order to async compilation callbacks

The callbacks must follow a specific order. This CL adds checks for
that. This helped debugging an issue in a follow-up CL.

R=ahaas@chromium.org

Bug:  v8:7921 
Change-Id: I78e1caf9923e95401652d2a3952dcf29c2967062
Reviewed-on: https://chromium-review.googlesource.com/c/1325965
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57501}
[modify] https://crrev.com/3858368d187b7c72a79be330702e6facdf2bc1ea/src/wasm/module-compiler.cc

Comment 30 by bugdroid1@chromium.org, Nov 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/f1f5c1101d46e234888a9f5f7db6b3c7df9cc40d

commit f1f5c1101d46e234888a9f5f7db6b3c7df9cc40d
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Mon Nov 19 16:19:10 2018

[wasm] Refactor counters for unfinished compilation units

So far, we always finished the baseline units before finishing any
tiering unit. This will be refactored to finish all units from the
background threads, so the finishing can happen in any order.
Thus refactor the counters to count both separately, and trigger the
right events.

R=ahaas@chromium.org

Bug:  v8:7921 
Change-Id: Ia2d8ab3f70f9bc3406eff428da5d22580558887b
Reviewed-on: https://chromium-review.googlesource.com/c/1333669
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57608}
[modify] https://crrev.com/f1f5c1101d46e234888a9f5f7db6b3c7df9cc40d/src/wasm/function-compiler.cc
[modify] https://crrev.com/f1f5c1101d46e234888a9f5f7db6b3c7df9cc40d/src/wasm/module-compiler.cc

Comment 31 by bugdroid1@chromium.org, Nov 20

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/2bcbad5769f780f283dc6f67278482a81700164c

commit 2bcbad5769f780f283dc6f67278482a81700164c
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Nov 20 12:03:35 2018

[wasm] Remove baseline_compilation_finished_ flag

Just compute it from the number of outstanding units.

R=ahaas@chromium.org

Bug:  v8:7921 
Change-Id: I30db10accc032bc50e1bbeab599325e1e971972b
Reviewed-on: https://chromium-review.googlesource.com/c/1341953
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57640}
[modify] https://crrev.com/2bcbad5769f780f283dc6f67278482a81700164c/src/wasm/module-compiler.cc

Comment 32 by bugdroid1@chromium.org, Dec 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/bffc2ab619fbf439832f3ca7e4b74adf7148bfa3

commit bffc2ab619fbf439832f3ca7e4b74adf7148bfa3
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Dec 11 17:01:16 2018

[wasm] Move top-tier-finished callback to CompilationState

The AsyncCompileJob should be decoupled from tiering, hence the
top-tier-finished callback should not be delivered via the
AsyncCompileJob. Instead, store it directly on the CompilationState.

R=ahaas@chromium.org

Bug:  v8:8050 ,  v8:7921 ,  chromium:912031 
Change-Id: Iebd64655667a8078c34caea4edeb6cf5f40833fd
Reviewed-on: https://chromium-review.googlesource.com/c/1371604
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58165}
[modify] https://crrev.com/bffc2ab619fbf439832f3ca7e4b74adf7148bfa3/src/wasm/compilation-environment.h
[modify] https://crrev.com/bffc2ab619fbf439832f3ca7e4b74adf7148bfa3/src/wasm/module-compiler.cc
[modify] https://crrev.com/bffc2ab619fbf439832f3ca7e4b74adf7148bfa3/src/wasm/streaming-decoder.cc
[modify] https://crrev.com/bffc2ab619fbf439832f3ca7e4b74adf7148bfa3/src/wasm/streaming-decoder.h
[modify] https://crrev.com/bffc2ab619fbf439832f3ca7e4b74adf7148bfa3/src/wasm/wasm-js.cc

Comment 33 by bugdroid1@chromium.org, Dec 12

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/972c290248047f88eb4fd9d0957cb7db12e42972

commit 972c290248047f88eb4fd9d0957cb7db12e42972
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Dec 12 17:00:55 2018

[wasm] Remove WasmCompilationUnit::failed

Compilation failures are already stored in the {CompilationState}. We
never use the information which individual compilation unit failed.
Hence remove that getter, and only check for failure of the overall
compilation.

R=ahaas@chromium.org

Bug:  v8:7921 , v8:8343
Change-Id: Ibf90be233c9ff576ec8a3413ba5abefe2fdb645e
Reviewed-on: https://chromium-review.googlesource.com/c/1373783
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58195}
[modify] https://crrev.com/972c290248047f88eb4fd9d0957cb7db12e42972/src/runtime/runtime-test.cc
[modify] https://crrev.com/972c290248047f88eb4fd9d0957cb7db12e42972/src/wasm/compilation-environment.h
[modify] https://crrev.com/972c290248047f88eb4fd9d0957cb7db12e42972/src/wasm/function-compiler.cc
[modify] https://crrev.com/972c290248047f88eb4fd9d0957cb7db12e42972/src/wasm/function-compiler.h
[modify] https://crrev.com/972c290248047f88eb4fd9d0957cb7db12e42972/src/wasm/module-compiler.cc
[modify] https://crrev.com/972c290248047f88eb4fd9d0957cb7db12e42972/src/wasm/wasm-engine.cc
[modify] https://crrev.com/972c290248047f88eb4fd9d0957cb7db12e42972/src/wasm/wasm-engine.h
[modify] https://crrev.com/972c290248047f88eb4fd9d0957cb7db12e42972/test/cctest/wasm/wasm-run-utils.cc

Comment 34 by bugdroid1@chromium.org, Dec 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/21440dd3d456ad09511508bbd4d4ec2aac8d85ec

commit 21440dd3d456ad09511508bbd4d4ec2aac8d85ec
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Fri Dec 14 14:55:35 2018

Fix data race on CompilationState callbacks

The vector of callbacks can only be accessed from main threads.
Otherwise we get flaky data races. Those showed up after removing the
finisher task (https://crrev.com/c/1335553/2).

R=mstarzinger@chromium.org

Bug:  v8:7921 
Change-Id: I0429ae87427601952723f6e3ad1e02eb0e59a6e1
Reviewed-on: https://chromium-review.googlesource.com/c/1378174
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58244}
[modify] https://crrev.com/21440dd3d456ad09511508bbd4d4ec2aac8d85ec/src/wasm/module-compiler.cc

Comment 35 by bugdroid1@chromium.org, Jan 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/f5e1353f060df1e1f07d4a5a87ba61cea385dce2

commit f5e1353f060df1e1f07d4a5a87ba61cea385dce2
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Fri Jan 04 12:25:31 2019

[wasm] Finish compilation units from background

"Finishing" currently only means decrementing a counter and notifying
users via the callback if baseline compilation or tier-up finished.
We can totally do this from background, if we spawn foreground tasks to
actually call the callback.

R=ahaas@chromium.org

Bug:  v8:7921 , v8:8423
Change-Id: I815964d07a4d9111248097c41ebbd650842304c3
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1375662
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58547}
[modify] https://crrev.com/f5e1353f060df1e1f07d4a5a87ba61cea385dce2/src/utils.h
[modify] https://crrev.com/f5e1353f060df1e1f07d4a5a87ba61cea385dce2/src/wasm/module-compiler.cc

Comment 36 by bugdroid1@chromium.org, Jan 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/ac2fb66b65053d1cac5d1bb430261979f4017f60

commit ac2fb66b65053d1cac5d1bb430261979f4017f60
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Jan 08 13:24:57 2019

[wasm] Remove finisher task

This removes the finisher task and instead finishes compilation units
from the background.
It also changes ownership of the AsyncCompileJob to be shared among all
tasks that still operate on it. The AsyncCompileJob dies when the last
reference dies.

R=ahaas@chromium.org
CC=​​mstarzinger@chromium.org

Bug:  v8:7921 , v8:8423
Change-Id: Id09378327dfc146459ef41bc97176a8716756ae4
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1335553
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58630}
[modify] https://crrev.com/ac2fb66b65053d1cac5d1bb430261979f4017f60/src/api.cc
[modify] https://crrev.com/ac2fb66b65053d1cac5d1bb430261979f4017f60/src/isolate.cc
[modify] https://crrev.com/ac2fb66b65053d1cac5d1bb430261979f4017f60/src/wasm/compilation-environment.h
[modify] https://crrev.com/ac2fb66b65053d1cac5d1bb430261979f4017f60/src/wasm/module-compiler.cc
[modify] https://crrev.com/ac2fb66b65053d1cac5d1bb430261979f4017f60/src/wasm/module-compiler.h
[modify] https://crrev.com/ac2fb66b65053d1cac5d1bb430261979f4017f60/src/wasm/streaming-decoder.cc
[modify] https://crrev.com/ac2fb66b65053d1cac5d1bb430261979f4017f60/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/ac2fb66b65053d1cac5d1bb430261979f4017f60/src/wasm/wasm-engine.cc
[modify] https://crrev.com/ac2fb66b65053d1cac5d1bb430261979f4017f60/src/wasm/wasm-engine.h

Comment 37 by bugdroid1@chromium.org, Jan 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/58ca5638603815906d09c87ef12d91749bfc29ea

commit 58ca5638603815906d09c87ef12d91749bfc29ea
Author: Michael Achenbach <machenbach@chromium.org>
Date: Tue Jan 08 13:58:12 2019

Revert "[wasm] Remove finisher task"

This reverts commit ac2fb66b65053d1cac5d1bb430261979f4017f60.

Reason for revert: Flakily crashes on several bots:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win32/18524
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20msvc/6824
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20internal%20snapshot/19766

Original change's description:
> [wasm] Remove finisher task
> 
> This removes the finisher task and instead finishes compilation units
> from the background.
> It also changes ownership of the AsyncCompileJob to be shared among all
> tasks that still operate on it. The AsyncCompileJob dies when the last
> reference dies.
> 
> R=​ahaas@chromium.org
> CC=​​​mstarzinger@chromium.org
> 
> Bug:  v8:7921 , v8:8423
> Change-Id: Id09378327dfc146459ef41bc97176a8716756ae4
> Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/1335553
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58630}

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

Change-Id: I6b332b66adaec8f713fb31f4c8517cae7ebb4645
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  v8:7921 , v8:8423
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1400420
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58634}
[modify] https://crrev.com/58ca5638603815906d09c87ef12d91749bfc29ea/src/api.cc
[modify] https://crrev.com/58ca5638603815906d09c87ef12d91749bfc29ea/src/isolate.cc
[modify] https://crrev.com/58ca5638603815906d09c87ef12d91749bfc29ea/src/wasm/compilation-environment.h
[modify] https://crrev.com/58ca5638603815906d09c87ef12d91749bfc29ea/src/wasm/module-compiler.cc
[modify] https://crrev.com/58ca5638603815906d09c87ef12d91749bfc29ea/src/wasm/module-compiler.h
[modify] https://crrev.com/58ca5638603815906d09c87ef12d91749bfc29ea/src/wasm/streaming-decoder.cc
[modify] https://crrev.com/58ca5638603815906d09c87ef12d91749bfc29ea/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/58ca5638603815906d09c87ef12d91749bfc29ea/src/wasm/wasm-engine.cc
[modify] https://crrev.com/58ca5638603815906d09c87ef12d91749bfc29ea/src/wasm/wasm-engine.h

Comment 38 by bugdroid1@chromium.org, Jan 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/c26b4977d6d4b91d8cd88402d3f98ce4597e2e70

commit c26b4977d6d4b91d8cd88402d3f98ce4597e2e70
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 09 11:01:15 2019

[wasm] Create runtime objects later

For compilation we only need the NativeModule. Thus only create this
before compilation, create other runtime objects later.
This is a first step towards removing the deferred handles and
clustering all foreground work in one chunk after compilation.

R=ahaas@chromium.org

Bug:  v8:7921 , v8:8423
Change-Id: If62387d68ddf0f5e067adbaef5fbeca7178958a4
Reviewed-on: https://chromium-review.googlesource.com/c/1402544
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58656}
[modify] https://crrev.com/c26b4977d6d4b91d8cd88402d3f98ce4597e2e70/src/wasm/module-compiler.cc
[modify] https://crrev.com/c26b4977d6d4b91d8cd88402d3f98ce4597e2e70/src/wasm/module-compiler.h

Comment 39 by bugdroid1@chromium.org, Jan 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/556ef4c387a31bed3fa3b530767592e8e8ab3109

commit 556ef4c387a31bed3fa3b530767592e8e8ab3109
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 09 12:12:50 2019

[wasm] Inline CompileFailed step

The {CompileFailed} just calls {AsyncCompileFailed}, which also does
not do much. Thus just inline directly call a function instead of
spawning a foreground task. This saves one instance of DeferredHandles.

R=ahaas@chromium.org

Bug:  v8:7921 , v8:8423
Change-Id: Ia8fb72a3ce2efd1f9a069c1a3b0b670b15fd8bce
Reviewed-on: https://chromium-review.googlesource.com/c/1402714
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58662}
[modify] https://crrev.com/556ef4c387a31bed3fa3b530767592e8e8ab3109/src/wasm/module-compiler.cc
[modify] https://crrev.com/556ef4c387a31bed3fa3b530767592e8e8ab3109/src/wasm/module-compiler.h

Comment 40 by bugdroid1@chromium.org, Jan 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/3c99ee28d3ebe455363fb14423ee6b556a7ba211

commit 3c99ee28d3ebe455363fb14423ee6b556a7ba211
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 09 12:37:38 2019

Revert "[wasm] Inline CompileFailed step"

This reverts commit 556ef4c387a31bed3fa3b530767592e8e8ab3109.

Reason for revert: Seems to cause hangs in tests.

Original change's description:
> [wasm] Inline CompileFailed step
> 
> The {CompileFailed} just calls {AsyncCompileFailed}, which also does
> not do much. Thus just inline directly call a function instead of
> spawning a foreground task. This saves one instance of DeferredHandles.
> 
> R=​ahaas@chromium.org
> 
> Bug:  v8:7921 , v8:8423
> Change-Id: Ia8fb72a3ce2efd1f9a069c1a3b0b670b15fd8bce
> Reviewed-on: https://chromium-review.googlesource.com/c/1402714
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58662}

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

Change-Id: I3430fb304b8df72b93330d104c09b0a144bbd069
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  v8:7921 , v8:8423
Reviewed-on: https://chromium-review.googlesource.com/c/1402786
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58663}
[modify] https://crrev.com/3c99ee28d3ebe455363fb14423ee6b556a7ba211/src/wasm/module-compiler.cc
[modify] https://crrev.com/3c99ee28d3ebe455363fb14423ee6b556a7ba211/src/wasm/module-compiler.h

Comment 41 by bugdroid1@chromium.org, Jan 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/01f824c1767842aa3ccd9166a3ab2feb05266bc4

commit 01f824c1767842aa3ccd9166a3ab2feb05266bc4
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 09 16:17:29 2019

[wasm] Merge foreground work after compilation

Instead of spawning several foreground tasks, execute the work in a
single chunk.
This will allow us in a follow-up step to remove the deferred handle
scope and pass the handles directly.

R=ahaas@chromium.org

Bug:  v8:7921 , v8:8423
Change-Id: I4dae6241e2a33e89e304a04cb67c2229c34f7b99
Reviewed-on: https://chromium-review.googlesource.com/c/1402545
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58677}
[modify] https://crrev.com/01f824c1767842aa3ccd9166a3ab2feb05266bc4/src/wasm/module-compiler.cc
[modify] https://crrev.com/01f824c1767842aa3ccd9166a3ab2feb05266bc4/src/wasm/module-compiler.h

Comment 42 by bugdroid1@chromium.org, Jan 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/bd502b2bdd5fbc6b8412a8346f2a08f98d882c75

commit bd502b2bdd5fbc6b8412a8346f2a08f98d882c75
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Mon Jan 14 12:28:38 2019

[wasm] Do not store the NativeModule in compilation units

Instead, pass it as a parameter to the compilation.
This makes compilation units slimmer with the end goal of them being
just the function index and execution tier.
It also makes ownership handling of the NativeModule easier.

R=titzer@chromium.org

Bug: v8:8343,  v8:7921 
Change-Id: I0522c894569c71d8b7245f5ed5612ab2a249e1ad
Reviewed-on: https://chromium-review.googlesource.com/c/1406668
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58776}
[modify] https://crrev.com/bd502b2bdd5fbc6b8412a8346f2a08f98d882c75/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/bd502b2bdd5fbc6b8412a8346f2a08f98d882c75/src/compiler/wasm-compiler.h
[modify] https://crrev.com/bd502b2bdd5fbc6b8412a8346f2a08f98d882c75/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/bd502b2bdd5fbc6b8412a8346f2a08f98d882c75/src/wasm/baseline/liftoff-compiler.h
[modify] https://crrev.com/bd502b2bdd5fbc6b8412a8346f2a08f98d882c75/src/wasm/function-compiler.cc
[modify] https://crrev.com/bd502b2bdd5fbc6b8412a8346f2a08f98d882c75/src/wasm/function-compiler.h
[modify] https://crrev.com/bd502b2bdd5fbc6b8412a8346f2a08f98d882c75/src/wasm/module-compiler.cc
[modify] https://crrev.com/bd502b2bdd5fbc6b8412a8346f2a08f98d882c75/test/cctest/wasm/wasm-run-utils.cc

Comment 43 by clemensh@chromium.org, Jan 14

Blockedon: 8689

Comment 44 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/92d9b09c0e68382d1427ad25c70db016bb9e5b80

commit 92d9b09c0e68382d1427ad25c70db016bb9e5b80
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 23 08:33:59 2019

[wasm] Decouple background compile jobs from NativeModule

Background compile jobs should not keep the NativeModule alive, for two
reasons:
1) We sometimes have to wait for background compilation to finish (from
   a foreground task!). This introduces unnecessary latency.
2) Giving the background compile tasks shared ownership of the
   NativeModule causes the NativeModule (and the CompilationState) to
   be freed from background tasks, which is error-prone (see
   https://crrev.com/c/1400420).

Instead, this CL introduces a BackgroundCompileToken which is held
alive by the NativeModule and all background compile jobs. The initial
and the final phase of compilation (getting and submitting work)
synchronize on this token to check and ensure that the NativeModule is
and stays alive. During compilation itself, the mutex is released, such
that the NativeModule can die.
The destructor of the NativeModule cancels the BackgroundCompileToken.
Immediately afterwards, the NativeModule and the CompilationState can
die.

This change allows to remove two hacks introduced previously: The atomic
{aborted_} flag and the {FreeCallbacksTask}.

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

Bug:  v8:8689 ,  v8:7921 
Change-Id: I42e06eab3c944b0988286f2ce18e3c294535dfb6
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1421364
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59020}
[modify] https://crrev.com/92d9b09c0e68382d1427ad25c70db016bb9e5b80/src/v8.cc
[modify] https://crrev.com/92d9b09c0e68382d1427ad25c70db016bb9e5b80/src/wasm/compilation-environment.h
[modify] https://crrev.com/92d9b09c0e68382d1427ad25c70db016bb9e5b80/src/wasm/module-compiler.cc
[modify] https://crrev.com/92d9b09c0e68382d1427ad25c70db016bb9e5b80/src/wasm/wasm-code-manager.h
[modify] https://crrev.com/92d9b09c0e68382d1427ad25c70db016bb9e5b80/src/wasm/wasm-engine.cc
[modify] https://crrev.com/92d9b09c0e68382d1427ad25c70db016bb9e5b80/src/wasm/wasm-engine.h

Comment 45 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead

commit ea513ab81363b2150bfa9906d8bb6ea82f7e1ead
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 23 09:26:35 2019

Revert "[wasm] Decouple background compile jobs from NativeModule"

This reverts commit 92d9b09c0e68382d1427ad25c70db016bb9e5b80.

Reason for revert: Crashes on several bots, e.g. https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20UBSan/4237

Original change's description:
> [wasm] Decouple background compile jobs from NativeModule
> 
> Background compile jobs should not keep the NativeModule alive, for two
> reasons:
> 1) We sometimes have to wait for background compilation to finish (from
>    a foreground task!). This introduces unnecessary latency.
> 2) Giving the background compile tasks shared ownership of the
>    NativeModule causes the NativeModule (and the CompilationState) to
>    be freed from background tasks, which is error-prone (see
>    https://crrev.com/c/1400420).
> 
> Instead, this CL introduces a BackgroundCompileToken which is held
> alive by the NativeModule and all background compile jobs. The initial
> and the final phase of compilation (getting and submitting work)
> synchronize on this token to check and ensure that the NativeModule is
> and stays alive. During compilation itself, the mutex is released, such
> that the NativeModule can die.
> The destructor of the NativeModule cancels the BackgroundCompileToken.
> Immediately afterwards, the NativeModule and the CompilationState can
> die.
> 
> This change allows to remove two hacks introduced previously: The atomic
> {aborted_} flag and the {FreeCallbacksTask}.
> 
> R=​mstarzinger@chromium.org
> CC=​titzer@chromium.org
> 
> Bug:  v8:8689 ,  v8:7921 
> Change-Id: I42e06eab3c944b0988286f2ce18e3c294535dfb6
> Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/1421364
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59020}

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

Change-Id: I724f460f5aa654a9e75d3ce73d351214e69e2d96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  v8:8689 ,  v8:7921 
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1429861
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59022}
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/v8.cc
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/compilation-environment.h
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/module-compiler.cc
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/wasm-code-manager.h
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/wasm-engine.cc
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/wasm-engine.h

Comment 46 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead

commit ea513ab81363b2150bfa9906d8bb6ea82f7e1ead
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 23 09:26:35 2019

Revert "[wasm] Decouple background compile jobs from NativeModule"

This reverts commit 92d9b09c0e68382d1427ad25c70db016bb9e5b80.

Reason for revert: Crashes on several bots, e.g. https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20UBSan/4237

Original change's description:
> [wasm] Decouple background compile jobs from NativeModule
> 
> Background compile jobs should not keep the NativeModule alive, for two
> reasons:
> 1) We sometimes have to wait for background compilation to finish (from
>    a foreground task!). This introduces unnecessary latency.
> 2) Giving the background compile tasks shared ownership of the
>    NativeModule causes the NativeModule (and the CompilationState) to
>    be freed from background tasks, which is error-prone (see
>    https://crrev.com/c/1400420).
> 
> Instead, this CL introduces a BackgroundCompileToken which is held
> alive by the NativeModule and all background compile jobs. The initial
> and the final phase of compilation (getting and submitting work)
> synchronize on this token to check and ensure that the NativeModule is
> and stays alive. During compilation itself, the mutex is released, such
> that the NativeModule can die.
> The destructor of the NativeModule cancels the BackgroundCompileToken.
> Immediately afterwards, the NativeModule and the CompilationState can
> die.
> 
> This change allows to remove two hacks introduced previously: The atomic
> {aborted_} flag and the {FreeCallbacksTask}.
> 
> R=​mstarzinger@chromium.org
> CC=​titzer@chromium.org
> 
> Bug:  v8:8689 ,  v8:7921 
> Change-Id: I42e06eab3c944b0988286f2ce18e3c294535dfb6
> Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/1421364
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59020}

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

Change-Id: I724f460f5aa654a9e75d3ce73d351214e69e2d96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  v8:8689 ,  v8:7921 
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1429861
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59022}
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/v8.cc
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/compilation-environment.h
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/module-compiler.cc
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/wasm-code-manager.h
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/wasm-engine.cc
[modify] https://crrev.com/ea513ab81363b2150bfa9906d8bb6ea82f7e1ead/src/wasm/wasm-engine.h

Comment 47 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/b60eb45c82bb314df6340ae295d2578e647b72ae

commit b60eb45c82bb314df6340ae295d2578e647b72ae
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 23 14:34:49 2019

[cctest] Reenable V8 disposal

This was disabled in 2014 (https://crrev.com/267383002), together with
a comment about a broken serializer. The conditional v8 initialization
was since then moved back to be unconditional, but the TearDown was
never restored.
Now we need it for wasm, since during tear down the wasm engine
synchronizes on all background compile jobs. Omitting this leads to
uses of the disposed platform (see https://crrev.com/c/1429861).

R=mstarzinger@chromium.org

Bug:  v8:8689 ,  v8:7921 ,  v8:8725 
Change-Id: Ia24f746094f38fc6ce349532587b622384379125
Reviewed-on: https://chromium-review.googlesource.com/c/1430059
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59032}
[modify] https://crrev.com/b60eb45c82bb314df6340ae295d2578e647b72ae/src/api.cc
[modify] https://crrev.com/b60eb45c82bb314df6340ae295d2578e647b72ae/test/cctest/cctest.cc

Comment 48 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/b60eb45c82bb314df6340ae295d2578e647b72ae

commit b60eb45c82bb314df6340ae295d2578e647b72ae
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 23 14:34:49 2019

[cctest] Reenable V8 disposal

This was disabled in 2014 (https://crrev.com/267383002), together with
a comment about a broken serializer. The conditional v8 initialization
was since then moved back to be unconditional, but the TearDown was
never restored.
Now we need it for wasm, since during tear down the wasm engine
synchronizes on all background compile jobs. Omitting this leads to
uses of the disposed platform (see https://crrev.com/c/1429861).

R=mstarzinger@chromium.org

Bug:  v8:8689 ,  v8:7921 ,  v8:8725 
Change-Id: Ia24f746094f38fc6ce349532587b622384379125
Reviewed-on: https://chromium-review.googlesource.com/c/1430059
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59032}
[modify] https://crrev.com/b60eb45c82bb314df6340ae295d2578e647b72ae/src/api.cc
[modify] https://crrev.com/b60eb45c82bb314df6340ae295d2578e647b72ae/test/cctest/cctest.cc

Comment 49 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/b60eb45c82bb314df6340ae295d2578e647b72ae

commit b60eb45c82bb314df6340ae295d2578e647b72ae
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 23 14:34:49 2019

[cctest] Reenable V8 disposal

This was disabled in 2014 (https://crrev.com/267383002), together with
a comment about a broken serializer. The conditional v8 initialization
was since then moved back to be unconditional, but the TearDown was
never restored.
Now we need it for wasm, since during tear down the wasm engine
synchronizes on all background compile jobs. Omitting this leads to
uses of the disposed platform (see https://crrev.com/c/1429861).

R=mstarzinger@chromium.org

Bug:  v8:8689 ,  v8:7921 ,  v8:8725 
Change-Id: Ia24f746094f38fc6ce349532587b622384379125
Reviewed-on: https://chromium-review.googlesource.com/c/1430059
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59032}
[modify] https://crrev.com/b60eb45c82bb314df6340ae295d2578e647b72ae/src/api.cc
[modify] https://crrev.com/b60eb45c82bb314df6340ae295d2578e647b72ae/test/cctest/cctest.cc

Comment 50 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/eab3508ac58b4cdfe30641802bec27009fb8924e

commit eab3508ac58b4cdfe30641802bec27009fb8924e
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 23 15:05:02 2019

Reland "[wasm] Decouple background compile jobs from NativeModule"

This is a reland of 92d9b09c0e68382d1427ad25c70db016bb9e5b80.
Patch unchanged, errors fixed by https://crrev.com/c/1430059.

Original change's description:
> [wasm] Decouple background compile jobs from NativeModule
>
> Background compile jobs should not keep the NativeModule alive, for two
> reasons:
> 1) We sometimes have to wait for background compilation to finish (from
>    a foreground task!). This introduces unnecessary latency.
> 2) Giving the background compile tasks shared ownership of the
>    NativeModule causes the NativeModule (and the CompilationState) to
>    be freed from background tasks, which is error-prone (see
>    https://crrev.com/c/1400420).
>
> Instead, this CL introduces a BackgroundCompileToken which is held
> alive by the NativeModule and all background compile jobs. The initial
> and the final phase of compilation (getting and submitting work)
> synchronize on this token to check and ensure that the NativeModule is
> and stays alive. During compilation itself, the mutex is released, such
> that the NativeModule can die.
> The destructor of the NativeModule cancels the BackgroundCompileToken.
> Immediately afterwards, the NativeModule and the CompilationState can
> die.
>
> This change allows to remove two hacks introduced previously: The atomic
> {aborted_} flag and the {FreeCallbacksTask}.
>
> R=mstarzinger@chromium.org
> CC=titzer@chromium.org
>
> Bug:  v8:8689 ,  v8:7921 
> Change-Id: I42e06eab3c944b0988286f2ce18e3c294535dfb6
> Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/1421364
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59020}

TBR=mstarzinger@chromium.org

Bug:  v8:8689 ,  v8:7921 
Change-Id: Iead972ef77c8503da7246cab48e7693b176d8f02
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1429862
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59035}
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/v8.cc
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/compilation-environment.h
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/module-compiler.cc
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/wasm-code-manager.h
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/wasm-engine.cc
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/wasm-engine.h

Comment 51 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/b60eb45c82bb314df6340ae295d2578e647b72ae

commit b60eb45c82bb314df6340ae295d2578e647b72ae
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 23 14:34:49 2019

[cctest] Reenable V8 disposal

This was disabled in 2014 (https://crrev.com/267383002), together with
a comment about a broken serializer. The conditional v8 initialization
was since then moved back to be unconditional, but the TearDown was
never restored.
Now we need it for wasm, since during tear down the wasm engine
synchronizes on all background compile jobs. Omitting this leads to
uses of the disposed platform (see https://crrev.com/c/1429861).

R=mstarzinger@chromium.org

Bug:  v8:8689 ,  v8:7921 ,  v8:8725 
Change-Id: Ia24f746094f38fc6ce349532587b622384379125
Reviewed-on: https://chromium-review.googlesource.com/c/1430059
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59032}
[modify] https://crrev.com/b60eb45c82bb314df6340ae295d2578e647b72ae/src/api.cc
[modify] https://crrev.com/b60eb45c82bb314df6340ae295d2578e647b72ae/test/cctest/cctest.cc

Comment 52 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/eab3508ac58b4cdfe30641802bec27009fb8924e

commit eab3508ac58b4cdfe30641802bec27009fb8924e
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Jan 23 15:05:02 2019

Reland "[wasm] Decouple background compile jobs from NativeModule"

This is a reland of 92d9b09c0e68382d1427ad25c70db016bb9e5b80.
Patch unchanged, errors fixed by https://crrev.com/c/1430059.

Original change's description:
> [wasm] Decouple background compile jobs from NativeModule
>
> Background compile jobs should not keep the NativeModule alive, for two
> reasons:
> 1) We sometimes have to wait for background compilation to finish (from
>    a foreground task!). This introduces unnecessary latency.
> 2) Giving the background compile tasks shared ownership of the
>    NativeModule causes the NativeModule (and the CompilationState) to
>    be freed from background tasks, which is error-prone (see
>    https://crrev.com/c/1400420).
>
> Instead, this CL introduces a BackgroundCompileToken which is held
> alive by the NativeModule and all background compile jobs. The initial
> and the final phase of compilation (getting and submitting work)
> synchronize on this token to check and ensure that the NativeModule is
> and stays alive. During compilation itself, the mutex is released, such
> that the NativeModule can die.
> The destructor of the NativeModule cancels the BackgroundCompileToken.
> Immediately afterwards, the NativeModule and the CompilationState can
> die.
>
> This change allows to remove two hacks introduced previously: The atomic
> {aborted_} flag and the {FreeCallbacksTask}.
>
> R=mstarzinger@chromium.org
> CC=titzer@chromium.org
>
> Bug:  v8:8689 ,  v8:7921 
> Change-Id: I42e06eab3c944b0988286f2ce18e3c294535dfb6
> Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/1421364
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59020}

TBR=mstarzinger@chromium.org

Bug:  v8:8689 ,  v8:7921 
Change-Id: Iead972ef77c8503da7246cab48e7693b176d8f02
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1429862
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59035}
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/v8.cc
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/compilation-environment.h
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/module-compiler.cc
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/wasm-code-manager.h
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/wasm-engine.cc
[modify] https://crrev.com/eab3508ac58b4cdfe30641802bec27009fb8924e/src/wasm/wasm-engine.h

Comment 53 by bugdroid, Feb 1

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/84f17076b10fafb56a5fea2d92f838398d450be4

commit 84f17076b10fafb56a5fea2d92f838398d450be4
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Fri Feb 01 16:48:40 2019

Reland "[wasm] Remove finisher task"

This is a reland of ac2fb66b65053d1cac5d1bb430261979f4017f60.
Crashes were fixed in https://crrev.com/c/1429862.

Original change's description:
> [wasm] Remove finisher task
>
> This removes the finisher task and instead finishes compilation units
> from the background.
> It also changes ownership of the AsyncCompileJob to be shared among all
> tasks that still operate on it. The AsyncCompileJob dies when the last
> reference dies.
>
> R=ahaas@chromium.org
> CC=​​mstarzinger@chromium.org
>
> Bug:  v8:7921 , v8:8423
> Change-Id: Id09378327dfc146459ef41bc97176a8716756ae4
> Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/1335553
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58630}

Bug:  v8:7921 , v8:8423
Change-Id: I3dcee4e8e56d2a524d302af91b5cb4a7a9ceb8ce
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1400781
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59302}
[modify] https://crrev.com/84f17076b10fafb56a5fea2d92f838398d450be4/src/wasm/compilation-environment.h
[modify] https://crrev.com/84f17076b10fafb56a5fea2d92f838398d450be4/src/wasm/module-compiler.cc
[modify] https://crrev.com/84f17076b10fafb56a5fea2d92f838398d450be4/src/wasm/module-compiler.h
[modify] https://crrev.com/84f17076b10fafb56a5fea2d92f838398d450be4/src/wasm/wasm-code-manager.cc
[modify] https://crrev.com/84f17076b10fafb56a5fea2d92f838398d450be4/src/wasm/wasm-engine.cc
[modify] https://crrev.com/84f17076b10fafb56a5fea2d92f838398d450be4/src/wasm/wasm-engine.h

Comment 54 by bugdroid, Feb 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/8a91484619f4aeec72fec049f817ea86342b80f4

commit 8a91484619f4aeec72fec049f817ea86342b80f4
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Mon Feb 04 11:32:59 2019

[wasm] Turn deferred handles into global handles

Each instance of {DeferredHandles} only stores a single handle anyway,
so turning them into global handles saves memory.

R=ahaas@chromium.org

Bug:  v8:7921 , v8:8423
Change-Id: I75e0cc6ecb6d0337f1695e6bfd4b5fdcb8a2039c
Reviewed-on: https://chromium-review.googlesource.com/c/1402715
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59331}
[modify] https://crrev.com/8a91484619f4aeec72fec049f817ea86342b80f4/src/wasm/module-compiler.cc
[modify] https://crrev.com/8a91484619f4aeec72fec049f817ea86342b80f4/src/wasm/module-compiler.h

Comment 55 by bugdroid, Feb 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/e85876067798a6b58f2c012598a500d601bfd082

commit e85876067798a6b58f2c012598a500d601bfd082
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Mon Feb 04 14:28:30 2019

Revert "[wasm] Turn deferred handles into global handles"

This reverts commit 8a91484619f4aeec72fec049f817ea86342b80f4.

Reason for revert: Seems to cause layout test failures: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%2520Mac/16246

Original change's description:
> [wasm] Turn deferred handles into global handles
> 
> Each instance of {DeferredHandles} only stores a single handle anyway,
> so turning them into global handles saves memory.
> 
> R=​ahaas@chromium.org
> 
> Bug:  v8:7921 , v8:8423
> Change-Id: I75e0cc6ecb6d0337f1695e6bfd4b5fdcb8a2039c
> Reviewed-on: https://chromium-review.googlesource.com/c/1402715
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59331}

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

Change-Id: I8996fd22702b5dd0485e59b54989788596293a1f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  v8:7921 , v8:8423
Reviewed-on: https://chromium-review.googlesource.com/c/1451888
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59342}
[modify] https://crrev.com/e85876067798a6b58f2c012598a500d601bfd082/src/wasm/module-compiler.cc
[modify] https://crrev.com/e85876067798a6b58f2c012598a500d601bfd082/src/wasm/module-compiler.h

Comment 56 by bugdroid, Feb 5

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/61a758c11fb94fddf8117c85a69325447ca17bb6

commit 61a758c11fb94fddf8117c85a69325447ca17bb6
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Tue Feb 05 12:31:21 2019

Reland "[wasm] Turn deferred handles into global handles"

This is a reland of 8a91484619f4aeec72fec049f817ea86342b80f4.
No modifications, this CL was not the culprit.

Original change's description:
> [wasm] Turn deferred handles into global handles
>
> Each instance of {DeferredHandles} only stores a single handle anyway,
> so turning them into global handles saves memory.
>
> R=ahaas@chromium.org
>
> Bug:  v8:7921 , v8:8423
> Change-Id: I75e0cc6ecb6d0337f1695e6bfd4b5fdcb8a2039c
> Reviewed-on: https://chromium-review.googlesource.com/c/1402715
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59331}

Bug:  v8:7921 , v8:8423
Tbr: ahaas@chromium.org
Change-Id: I9111eb6405c2624779b9eaa65353ab5f438e9daf
Reviewed-on: https://chromium-review.googlesource.com/c/1451930
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59363}
[modify] https://crrev.com/61a758c11fb94fddf8117c85a69325447ca17bb6/src/wasm/module-compiler.cc
[modify] https://crrev.com/61a758c11fb94fddf8117c85a69325447ca17bb6/src/wasm/module-compiler.h

Comment 57 by clemensh@chromium.org, Feb 5

Status: Fixed (was: Started)
This is done :D
No more finisher task, compilation happens fully in background now.

Sign in to add a comment