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

Issue 2696143006: [wasm] Refactor code specialization / patching (Closed)

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

Description

[wasm] Refactor code specialization / patching All patching logic is now bundled in one compilation unit. The CodeSpecialization object is set up by all relocation and patching that should be applied, and then be run on individual code objects or the whole instance in one go. We hence only need to iterate all relocation tables exactly once at instantiation. Also, we do not patch contexts any more since we do not embed them in generated code any more. R=titzer@chromium.org BUG=v8:5991 Review-Url: https://codereview.chromium.org/2696143006 Cr-Commit-Position: refs/heads/master@{#43324} Committed: https://chromium.googlesource.com/v8/v8/+/a690aa299414bb3ca2f76e97b02a875e0f721892

Patch Set 1 #

Patch Set 2 : Fix & rebase #

Patch Set 3 : Rebase #

Patch Set 4 : Minor fix #

Patch Set 5 : Rebase #

Patch Set 6 : Remove unused variables and add documentation #

Total comments: 2

Patch Set 7 : Use IdentityMap #

Total comments: 2

Patch Set 8 : Use heap allocation instead of std::optional replacement #

Patch Set 9 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+442 lines, -291 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M src/v8.gyp View 1 1 chunk +2 lines, -0 lines 0 comments Download
A src/wasm/wasm-code-specialization.h View 1 2 3 4 5 6 1 chunk +70 lines, -0 lines 0 comments Download
A src/wasm/wasm-code-specialization.cc View 1 2 3 4 5 6 7 1 chunk +257 lines, -0 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 6 7 8 16 chunks +111 lines, -291 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 53 (38 generated)
Clemens Hammacher
Rebase
3 years, 10 months ago (2017-02-16 11:42:05 UTC) #9
Clemens Hammacher
Rebase
3 years, 10 months ago (2017-02-16 20:55:12 UTC) #16
Clemens Hammacher
Remove unused variables and add documentation
3 years, 10 months ago (2017-02-17 10:19:44 UTC) #21
Clemens Hammacher
Much green such refactoring very performance. wow! (PTAL)
3 years, 10 months ago (2017-02-17 10:54:49 UTC) #26
titzer
https://codereview.chromium.org/2696143006/diff/100001/src/wasm/wasm-code-specialization.h File src/wasm/wasm-code-specialization.h (right): https://codereview.chromium.org/2696143006/diff/100001/src/wasm/wasm-code-specialization.h#newcode62 src/wasm/wasm-code-specialization.h:62: std::unordered_map<Object*, Object*> objects_to_relocate; I think we can replace this ...
3 years, 10 months ago (2017-02-17 13:38:16 UTC) #27
Clemens Hammacher
https://codereview.chromium.org/2696143006/diff/100001/src/wasm/wasm-code-specialization.h File src/wasm/wasm-code-specialization.h (right): https://codereview.chromium.org/2696143006/diff/100001/src/wasm/wasm-code-specialization.h#newcode62 src/wasm/wasm-code-specialization.h:62: std::unordered_map<Object*, Object*> objects_to_relocate; On 2017/02/17 at 13:38:16, titzer wrote: ...
3 years, 10 months ago (2017-02-20 11:05:57 UTC) #28
titzer
On 2017/02/20 11:05:57, Clemens Hammacher wrote: > https://codereview.chromium.org/2696143006/diff/100001/src/wasm/wasm-code-specialization.h > File src/wasm/wasm-code-specialization.h (right): > > https://codereview.chromium.org/2696143006/diff/100001/src/wasm/wasm-code-specialization.h#newcode62 ...
3 years, 10 months ago (2017-02-20 11:30:47 UTC) #29
Clemens Hammacher
Use IdentityMap
3 years, 10 months ago (2017-02-20 13:15:10 UTC) #30
Clemens Hammacher
On 2017/02/20 at 11:30:47, titzer wrote: > On 2017/02/20 11:05:57, Clemens Hammacher wrote: > > ...
3 years, 10 months ago (2017-02-20 13:17:59 UTC) #33
titzer
Almost there. Can't in good conscience sign off on crazy union tricks :-) https://codereview.chromium.org/2696143006/diff/120001/src/wasm/wasm-code-specialization.cc File ...
3 years, 10 months ago (2017-02-20 15:12:02 UTC) #36
Clemens Hammacher
Use heap allocation instead of std::optional replacement
3 years, 10 months ago (2017-02-20 15:20:55 UTC) #38
Clemens Hammacher
https://codereview.chromium.org/2696143006/diff/120001/src/wasm/wasm-code-specialization.cc File src/wasm/wasm-code-specialization.cc (right): https://codereview.chromium.org/2696143006/diff/120001/src/wasm/wasm-code-specialization.cc#newcode170 src/wasm/wasm-code-specialization.cc:170: SourcePositionTableIterator source_pos_it; On 2017/02/20 at 15:12:01, titzer wrote: > ...
3 years, 10 months ago (2017-02-20 15:32:57 UTC) #45
titzer
lgtm
3 years, 10 months ago (2017-02-20 15:49:39 UTC) #48
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/2696143006/160001
3 years, 10 months ago (2017-02-20 15:50:41 UTC) #50
commit-bot: I haz the power
3 years, 10 months ago (2017-02-20 15:52:22 UTC) #53
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/v8/v8/+/a690aa299414bb3ca2f76e97b02a875e0f7...

Powered by Google App Engine
This is Rietveld 408576698