Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Issue 2705993002: [wasm] Add JSToWasmWrapperCache to reuse generated wrapper code (Closed)

Created:
3 years, 10 months ago by Clemens Hammacher
Modified:
3 years, 9 months ago
Reviewers:
titzer
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Add JSToWasmWrapperCache to reuse generated wrapper code The generated code for JSToWasm wrappers only depends on the signature of the exported function. Hence, we can reuse the generated code and just patch the reference to the called wasm code. For the unity-wasm benchmark, we reach a hit rate of 98.07% for this cache, and only 395 instead of 20471 wrappers are compiled. This brings down instantiation time from 2.9s to 1.6s on a MBP. R=titzer@chromium.org Review-Url: https://codereview.chromium.org/2705993002 Cr-Commit-Position: refs/heads/master@{#43322} Committed: https://chromium.googlesource.com/v8/v8/+/7a91e3c69c7fe183f1183ddc2359ade2d1460944

Patch Set 1 #

Total comments: 5

Patch Set 2 : Address comments #

Patch Set 3 : Rebase #

Patch Set 4 : Avoid unused variable #

Patch Set 5 : Fix comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -9 lines) Patch
M src/signature.h View 1 chunk +1 line, -1 line 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 chunks +52 lines, -8 lines 0 comments Download

Messages

Total messages: 31 (23 generated)
Clemens Hammacher
3 years, 10 months ago (2017-02-20 09:50:38 UTC) #5
titzer
Awesome improvement! Comments below. https://codereview.chromium.org/2705993002/diff/1/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2705993002/diff/1/src/compiler/wasm-compiler.cc#newcode3728 src/compiler/wasm-compiler.cc:3728: struct HashWasmSig { You can ...
3 years, 10 months ago (2017-02-20 10:14:11 UTC) #6
Clemens Hammacher
https://codereview.chromium.org/2705993002/diff/1/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2705993002/diff/1/src/compiler/wasm-compiler.cc#newcode3728 src/compiler/wasm-compiler.cc:3728: struct HashWasmSig { On 2017/02/20 at 10:14:11, titzer wrote: ...
3 years, 10 months ago (2017-02-20 12:27:25 UTC) #21
titzer
Nice! LGTM
3 years, 10 months ago (2017-02-20 13:15:01 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2705993002/70001
3 years, 10 months ago (2017-02-20 13:18:24 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:70001) as https://chromium.googlesource.com/v8/v8/+/7a91e3c69c7fe183f1183ddc2359ade2d1460944
3 years, 10 months ago (2017-02-20 13:20:08 UTC) #29
ccyongwang
could you give a link to "unity-wasm benchmark"?
3 years, 9 months ago (2017-03-02 02:53:17 UTC) #30
Clemens Hammacher
3 years, 9 months ago (2017-03-02 09:57:44 UTC) #31
Message was sent while issue was closed.
On 2017/03/02 at 02:53:17, ccyongwang wrote:
> could you give a link to "unity-wasm benchmark"?

You find the benchmark files here:
http://files.unity3d.com/alexsuvorov/webgl/headless-benchmark/

Powered by Google App Engine
This is Rietveld 408576698