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

Issue 2691993004: [wasm] Introduce WasmStackGuard builtin (Closed)

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

Description

[wasm] Introduce WasmStackGuard builtin Instead of placing a runtime call to StackGuard in the compiled wasm code, we just call the builtin, which is cheaper. By passing Smi::kZero as context, we save even more code space and avoid embedding the context in the code. The WasmStackGuard builtin then calls the new WasmStackGuard runtime function, which gets the context from the instance attached to the calling wasm code, and then does the usual StackGuard logic. For the unity benchmark in asm-wasm mode, generated code size reduces from 63.0 to 61.6 MB (-2.1%). R=titzer@chromium.org, ahaas@chromium.org, mstarzinger@chromium.org Review-Url: https://codereview.chromium.org/2691993004 Cr-Commit-Position: refs/heads/master@{#43277} Committed: https://chromium.googlesource.com/v8/v8/+/b6bfe7b91169fdb6da7b40b4d1361e9e0d5690bc

Patch Set 1 #

Total comments: 7

Patch Set 2 : Add builtins-wasm.cc ;) #

Total comments: 6

Patch Set 3 : Address comments #

Patch Set 4 : Remove unneeded include #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -53 lines) Patch
M BUILD.gn View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
M src/builtins/builtins.h View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
A src/builtins/builtins-wasm.cc View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 1 2 3 4 2 chunks +38 lines, -34 lines 0 comments Download
M src/interface-descriptors.h View 2 chunks +8 lines, -1 line 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime/runtime-wasm.cc View 1 2 3 7 chunks +30 lines, -15 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 37 (26 generated)
Clemens Hammacher
3 years, 10 months ago (2017-02-14 14:07:58 UTC) #1
Clemens Hammacher
https://codereview.chromium.org/2691993004/diff/1/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2691993004/diff/1/BUILD.gn#newcode2569 BUILD.gn:2569: ":d8(//build/toolchain/linux:clang_x86)", FYI: This change is forced by clang-format.
3 years, 10 months ago (2017-02-14 14:08:35 UTC) #4
Michael Starzinger
LGTM. https://codereview.chromium.org/2691993004/diff/1/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2691993004/diff/1/BUILD.gn#newcode2569 BUILD.gn:2569: ":d8(//build/toolchain/linux:clang_x86)", On 2017/02/14 14:08:35, Clemens Hammacher wrote: > ...
3 years, 10 months ago (2017-02-14 14:43:23 UTC) #9
ahaas
lgtm with nits https://codereview.chromium.org/2691993004/diff/1/src/runtime/runtime-wasm.cc File src/runtime/runtime-wasm.cc (right): https://codereview.chromium.org/2691993004/diff/1/src/runtime/runtime-wasm.cc#newcode67 src/runtime/runtime-wasm.cc:67: ->compiled_module() Could you use GetWasmInstanceOnStackTop(isolate) here ...
3 years, 10 months ago (2017-02-14 14:45:39 UTC) #10
Clemens Hammacher
https://codereview.chromium.org/2691993004/diff/1/src/runtime/runtime-wasm.cc File src/runtime/runtime-wasm.cc (right): https://codereview.chromium.org/2691993004/diff/1/src/runtime/runtime-wasm.cc#newcode184 src/runtime/runtime-wasm.cc:184: isolate->set_context(*instance->compiled_module()->native_context()); On 2017/02/14 at 14:45:38, ahaas wrote: > nit: ...
3 years, 10 months ago (2017-02-14 17:23:15 UTC) #15
Clemens Hammacher
I opened a bug for the GCMole crash: https://bugs.chromium.org/p/v8/issues/detail?id=5970
3 years, 10 months ago (2017-02-14 18:14:13 UTC) #20
Clemens Hammacher
Rebase
3 years, 10 months ago (2017-02-16 11:41:51 UTC) #21
titzer
On 2017/02/16 11:41:51, Clemens Hammacher wrote: > Rebase lgtm
3 years, 10 months ago (2017-02-16 11:52:57 UTC) #24
Clemens Hammacher
Aha! gcmole is not crashing any more :) Will land this tomorrow.
3 years, 10 months ago (2017-02-16 19:04:49 UTC) #27
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/2691993004/100001
3 years, 10 months ago (2017-02-17 11:36:13 UTC) #34
commit-bot: I haz the power
3 years, 10 months ago (2017-02-17 11:37:57 UTC) #37
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/v8/v8/+/b6bfe7b91169fdb6da7b40b4d1361e9e0d5...

Powered by Google App Engine
This is Rietveld 408576698