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

Issue 2142273003: [interpreter] Inline Star on dispatch for some bytecodes (Closed)

Created:
4 years, 5 months ago by klaasb
Modified:
4 years, 5 months ago
Reviewers:
oth, rmcilroy
CC:
v8-reviews_googlegroups.com, oth, rmcilroy
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[interpreter] Inline Star on dispatch for some bytecodes For some bytecodes it is beneficial to always look for a Star bytecode when dispatching to the next and inline perform it without dispatching to the Star handler. BUG=v8:4280 LOG=N Committed: https://crrev.com/5f603e838a731ed5e3585d94c5b0889ab749f24b Cr-Commit-Position: refs/heads/master@{#37904}

Patch Set 1 #

Patch Set 2 : refactor and enable Star lookahead for more #

Patch Set 3 : cleanup #

Patch Set 4 : also enable on common Star dispatcher bytecodes from websites and Speedometer #

Patch Set 5 : refactor and only enable for a conservative set of Bytecodes #

Patch Set 6 : ran git cl format #

Total comments: 6

Patch Set 7 : fixed nitpicks #

Total comments: 25

Patch Set 8 : fixed test case, refactored a bit more #

Patch Set 9 : lookahead on more bytecodes, they dispatch to Star nearly always #

Patch Set 10 : FIXED: lookahead on more bytecodes (dispatch to Star nearly always) #

Total comments: 2

Patch Set 11 : remove 100% dispatching bytecodes again #

Total comments: 24

Patch Set 12 : refactor Advance, other comments #

Patch Set 13 : move kInterpreterTraceBytecodeExit to the right place #

Total comments: 14

Patch Set 14 : remove unnecessary Binds, worked in last comments #

Total comments: 6

Patch Set 15 : skip InterpreterAssemblerTest.Jump for IsStarLookahead() bytecodes, comments #

Patch Set 16 : remove and inline DispatchTo to the single call site #

Total comments: 4

Patch Set 17 : restrict InterpreterAssemblerTest.Jump to jumps #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -24 lines) Patch
M src/interpreter/bytecodes.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/interpreter/bytecodes.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +27 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M src/interpreter/interpreter-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +22 lines, -4 lines 0 comments Download
M src/interpreter/interpreter-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +77 lines, -20 lines 0 comments Download
M test/unittests/interpreter/interpreter-assembler-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +28 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (23 generated)
klaasb
Patchset 5 has --predictable benchmark runs. On Patchset 6 (just formatting) there's an ongoing run ...
4 years, 5 months ago (2016-07-15 15:05:57 UTC) #13
oth
A few trivial nits, but looks good here. https://codereview.chromium.org/2142273003/diff/100001/src/interpreter/bytecodes.h File src/interpreter/bytecodes.h (right): https://codereview.chromium.org/2142273003/diff/100001/src/interpreter/bytecodes.h#newcode625 src/interpreter/bytecodes.h:625: // ...
4 years, 5 months ago (2016-07-15 15:30:51 UTC) #16
klaasb
The changes to the InterpreterAssembler break the unit test for it. When inlining the Star ...
4 years, 5 months ago (2016-07-15 18:01:25 UTC) #17
oth
Thanks for addressing comments. One more that's more of a question than requiring work. https://codereview.chromium.org/2142273003/diff/120001/src/interpreter/bytecodes.cc ...
4 years, 5 months ago (2016-07-18 08:05:41 UTC) #18
klaasb
https://codereview.chromium.org/2142273003/diff/120001/src/interpreter/bytecodes.cc File src/interpreter/bytecodes.cc (right): https://codereview.chromium.org/2142273003/diff/120001/src/interpreter/bytecodes.cc#newcode575 src/interpreter/bytecodes.cc:575: case Bytecode::kLdaZero: On 2016/07/18 08:05:40, oth wrote: > Is ...
4 years, 5 months ago (2016-07-18 09:48:55 UTC) #19
rmcilroy
Overall looks good, a couple of comments. https://codereview.chromium.org/2142273003/diff/120001/src/interpreter/bytecodes.cc File src/interpreter/bytecodes.cc (right): https://codereview.chromium.org/2142273003/diff/120001/src/interpreter/bytecodes.cc#newcode579 src/interpreter/bytecodes.cc:579: case Bytecode::kMov: ...
4 years, 5 months ago (2016-07-18 11:07:52 UTC) #20
klaasb
https://codereview.chromium.org/2142273003/diff/120001/src/interpreter/bytecodes.cc File src/interpreter/bytecodes.cc (right): https://codereview.chromium.org/2142273003/diff/120001/src/interpreter/bytecodes.cc#newcode579 src/interpreter/bytecodes.cc:579: case Bytecode::kMov: On 2016/07/18 11:07:51, rmcilroy wrote: > kMov ...
4 years, 5 months ago (2016-07-18 15:15:29 UTC) #21
klaasb
https://codereview.chromium.org/2142273003/diff/180001/src/interpreter/bytecodes.cc File src/interpreter/bytecodes.cc (right): https://codereview.chromium.org/2142273003/diff/180001/src/interpreter/bytecodes.cc#newcode596 src/interpreter/bytecodes.cc:596: case Bytecode::kForInPrepare: This one doesn't write the accumulator, but ...
4 years, 5 months ago (2016-07-18 19:45:46 UTC) #26
rmcilroy
Looks good. A couple more comments, but once Advance and TraceBytecode is sorted, looks good ...
4 years, 5 months ago (2016-07-19 10:03:56 UTC) #27
klaasb
https://codereview.chromium.org/2142273003/diff/200001/src/interpreter/interpreter-assembler.cc File src/interpreter/interpreter-assembler.cc (left): https://codereview.chromium.org/2142273003/diff/200001/src/interpreter/interpreter-assembler.cc#oldcode550 src/interpreter/interpreter-assembler.cc:550: } On 2016/07/19 10:03:56, rmcilroy wrote: > This should ...
4 years, 5 months ago (2016-07-19 14:24:13 UTC) #28
rmcilroy
https://codereview.chromium.org/2142273003/diff/200001/src/interpreter/interpreter-assembler.cc File src/interpreter/interpreter-assembler.cc (right): https://codereview.chromium.org/2142273003/diff/200001/src/interpreter/interpreter-assembler.cc#newcode565 src/interpreter/interpreter-assembler.cc:565: TraceBytecode(Runtime::kInterpreterTraceBytecodeExit); On 2016/07/19 14:24:13, klaasb wrote: > On 2016/07/19 ...
4 years, 5 months ago (2016-07-19 15:26:04 UTC) #29
klaasb
https://codereview.chromium.org/2142273003/diff/200001/src/interpreter/interpreter-assembler.cc File src/interpreter/interpreter-assembler.cc (right): https://codereview.chromium.org/2142273003/diff/200001/src/interpreter/interpreter-assembler.cc#newcode565 src/interpreter/interpreter-assembler.cc:565: TraceBytecode(Runtime::kInterpreterTraceBytecodeExit); On 2016/07/19 15:26:04, rmcilroy wrote: > On 2016/07/19 ...
4 years, 5 months ago (2016-07-19 15:39:00 UTC) #30
rmcilroy
Couple of last comments. https://codereview.chromium.org/2142273003/diff/240001/src/interpreter/interpreter-assembler.cc File src/interpreter/interpreter-assembler.cc (right): https://codereview.chromium.org/2142273003/diff/240001/src/interpreter/interpreter-assembler.cc#newcode533 src/interpreter/interpreter-assembler.cc:533: bytecode_offset_.Bind(previous_offset); I don't think we ...
4 years, 5 months ago (2016-07-19 20:18:27 UTC) #31
klaasb
https://codereview.chromium.org/2142273003/diff/240001/src/interpreter/interpreter-assembler.cc File src/interpreter/interpreter-assembler.cc (right): https://codereview.chromium.org/2142273003/diff/240001/src/interpreter/interpreter-assembler.cc#newcode533 src/interpreter/interpreter-assembler.cc:533: bytecode_offset_.Bind(previous_offset); On 2016/07/19 20:18:27, rmcilroy wrote: > I don't ...
4 years, 5 months ago (2016-07-20 09:26:25 UTC) #32
rmcilroy
LGTM once final comments are addressed, thanks. https://codereview.chromium.org/2142273003/diff/260001/src/interpreter/interpreter-assembler.h File src/interpreter/interpreter-assembler.h (right): https://codereview.chromium.org/2142273003/diff/260001/src/interpreter/interpreter-assembler.h#newcode234 src/interpreter/interpreter-assembler.h:234: // to, ...
4 years, 5 months ago (2016-07-20 10:34:12 UTC) #34
klaasb
PTAL, see comments https://codereview.chromium.org/2142273003/diff/260001/src/interpreter/interpreter-assembler.h File src/interpreter/interpreter-assembler.h (right): https://codereview.chromium.org/2142273003/diff/260001/src/interpreter/interpreter-assembler.h#newcode234 src/interpreter/interpreter-assembler.h:234: // to, to |target_bytecode| and its ...
4 years, 5 months ago (2016-07-20 11:22:56 UTC) #35
rmcilroy
Still LGTM. https://codereview.chromium.org/2142273003/diff/300001/src/interpreter/interpreter-assembler.cc File src/interpreter/interpreter-assembler.cc (right): https://codereview.chromium.org/2142273003/diff/300001/src/interpreter/interpreter-assembler.cc#newcode535 src/interpreter/interpreter-assembler.cc:535: return DispatchToBytecode(target_bytecode, new_bytecode_offset); On 2016/07/20 11:22:55, klaasb ...
4 years, 5 months ago (2016-07-20 11:36:25 UTC) #36
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/2142273003/320001
4 years, 5 months ago (2016-07-20 11:40:27 UTC) #39
commit-bot: I haz the power
Committed patchset #17 (id:320001)
4 years, 5 months ago (2016-07-20 12:51:22 UTC) #41
commit-bot: I haz the power
4 years, 5 months ago (2016-07-20 12:52:31 UTC) #43
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/5f603e838a731ed5e3585d94c5b0889ab749f24b
Cr-Commit-Position: refs/heads/master@{#37904}

Powered by Google App Engine
This is Rietveld 408576698