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

Issue 2404253002: [wasm] Provide better stack traces for asm.js code (Closed)

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

Description

[wasm] Provide better stack traces for asm.js code For the asm.js to WASM pipeline, the current stack traces only show low-level WASM information. This CL maps this back to asm.js source positions. It does so by attaching the asm.js source Script to the compiled WASM module, and emitting a delta-encoded table which maps from WASM byte offsets to positions within that Script. As asm.js code does not throw exceptions, we only store a mapping for call instructions. The new AsmJsWasmStackFrame implementation inherits from WasmStackFrame, but contains the logic to provide the source script and the position inside of it. What is still missing is the JSFunction object returned by CallSite.getFunction(). We currently return null. R=jgruber@chromium.org, titzer@chromium.org BUG=v8:4203 Committed: https://crrev.com/5d9fa102a792a9882be0ff463eaee7d89d259c4e Cr-Commit-Position: refs/heads/master@{#40205}

Patch Set 1 #

Patch Set 2 : Add missing override #

Patch Set 3 : Fix expected path for windows #

Patch Set 4 : Add explicit casts #

Patch Set 5 : Fix signed/unsigned comparison #

Patch Set 6 : Rebase & fix paths for windows #

Total comments: 4

Patch Set 7 : Pass encoded bytes directly instead of embedding them in the module #

Total comments: 14

Patch Set 8 : Clean up test case #

Patch Set 9 : Address jgruber's comments #

Patch Set 10 : Fix build error on bots #

Total comments: 6

Patch Set 11 : Address titzer's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+583 lines, -91 lines) Patch
M src/api.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -3 lines 0 comments Download
M src/asmjs/asm-js.cc View 1 2 3 4 5 6 1 chunk +5 lines, -2 lines 0 comments Download
M src/asmjs/asm-wasm-builder.h View 1 2 3 4 5 6 1 chunk +6 lines, -1 line 0 comments Download
M src/asmjs/asm-wasm-builder.cc View 1 2 3 4 5 6 3 chunks +10 lines, -4 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -3 lines 0 comments Download
M src/messages.h View 1 3 chunks +23 lines, -2 lines 0 comments Download
M src/messages.cc View 1 2 3 4 5 6 7 8 9 6 chunks +96 lines, -17 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M src/wasm/module-decoder.h View 1 2 3 4 5 2 chunks +11 lines, -0 lines 0 comments Download
M src/wasm/module-decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +74 lines, -16 lines 0 comments Download
M src/wasm/wasm-debug.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/wasm/wasm-debug.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +78 lines, -0 lines 0 comments Download
M src/wasm/wasm-js.cc View 1 2 3 4 5 6 2 chunks +6 lines, -6 lines 0 comments Download
M src/wasm/wasm-module.h View 1 2 3 4 5 6 3 chunks +18 lines, -1 line 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 6 10 chunks +61 lines, -26 lines 0 comments Download
M src/wasm/wasm-module-builder.h View 1 2 3 4 5 6 4 chunks +12 lines, -4 lines 0 comments Download
M src/wasm/wasm-module-builder.cc View 1 2 3 4 5 6 4 chunks +37 lines, -1 line 0 comments Download
M test/common/wasm/wasm-module-runner.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/mjsunit.js View 2 chunks +12 lines, -0 lines 0 comments Download
A test/mjsunit/wasm/asm-wasm-stack.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +98 lines, -0 lines 0 comments Download
M test/unittests/wasm/module-decoder-unittest.cc View 2 chunks +10 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 57 (45 generated)
Clemens Hammacher
4 years, 2 months ago (2016-10-11 13:23:33 UTC) #23
titzer
https://codereview.chromium.org/2404253002/diff/100001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2404253002/diff/100001/src/isolate.cc#newcode524 src/isolate.cc:524: if (wasm::WasmIsAsm(*wasm_object, this)) { WasmIsAsmJs? https://codereview.chromium.org/2404253002/diff/100001/src/wasm/wasm-module.h File src/wasm/wasm-module.h (right): ...
4 years, 2 months ago (2016-10-11 14:51:26 UTC) #24
Clemens Hammacher
https://codereview.chromium.org/2404253002/diff/100001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2404253002/diff/100001/src/isolate.cc#newcode524 src/isolate.cc:524: if (wasm::WasmIsAsm(*wasm_object, this)) { On 2016/10/11 14:51:25, titzer wrote: ...
4 years, 2 months ago (2016-10-11 17:04:22 UTC) #27
jgruber
Looking good. Some comments: https://codereview.chromium.org/2404253002/diff/120001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2404253002/diff/120001/src/isolate.cc#newcode525 src/isolate.cc:525: flags |= FrameArray::kIsAsmWasmFrame; Would it ...
4 years, 2 months ago (2016-10-11 19:07:41 UTC) #32
Clemens Hammacher
https://codereview.chromium.org/2404253002/diff/120001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2404253002/diff/120001/src/isolate.cc#newcode525 src/isolate.cc:525: flags |= FrameArray::kIsAsmWasmFrame; On 2016/10/11 19:07:40, jgruber wrote: > ...
4 years, 2 months ago (2016-10-12 07:37:19 UTC) #37
titzer
lgtm modulo JS test https://codereview.chromium.org/2404253002/diff/180001/src/wasm/module-decoder.cc File src/wasm/module-decoder.cc (right): https://codereview.chromium.org/2404253002/diff/180001/src/wasm/module-decoder.cc#newcode131 src/wasm/module-decoder.cc:131: // Check for the known ...
4 years, 2 months ago (2016-10-12 08:03:06 UTC) #42
Clemens Hammacher
https://codereview.chromium.org/2404253002/diff/180001/src/wasm/module-decoder.cc File src/wasm/module-decoder.cc (right): https://codereview.chromium.org/2404253002/diff/180001/src/wasm/module-decoder.cc#newcode131 src/wasm/module-decoder.cc:131: // Check for the known "name" or "asm_offsets" section. ...
4 years, 2 months ago (2016-10-12 08:17:46 UTC) #45
titzer
On 2016/10/12 08:17:46, Clemens Hammacher wrote: > https://codereview.chromium.org/2404253002/diff/180001/src/wasm/module-decoder.cc > File src/wasm/module-decoder.cc (right): > > https://codereview.chromium.org/2404253002/diff/180001/src/wasm/module-decoder.cc#newcode131 ...
4 years, 2 months ago (2016-10-12 08:19:31 UTC) #46
commit-bot: I haz the power
This CL has an open dependency (Issue 2410913002 Patch 1). Please resolve the dependency and ...
4 years, 2 months ago (2016-10-12 09:04:36 UTC) #52
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/2404253002/200001
4 years, 2 months ago (2016-10-12 09:14:57 UTC) #54
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 2 months ago (2016-10-12 09:17:19 UTC) #55
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 09:17:32 UTC) #57
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/5d9fa102a792a9882be0ff463eaee7d89d259c4e
Cr-Commit-Position: refs/heads/master@{#40205}

Powered by Google App Engine
This is Rietveld 408576698