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

Issue 1665853002: [Interpreter] Add explicit StackCheck bytecodes on function entry and back branches. (Closed)

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

Description

[Interpreter] Add explicit StackCheck bytecodes on function entry and back branches. Moves the stack check from the function entry trampoline to instead be after function activation using an explicit StackCheck bytecode. Also add stack checks on back edges of loops. BUG=v8:4280, v8:4678 LOG=N Committed: https://crrev.com/1ce720f2a481cf07159eb97d3c48a707fddaf08c Cr-Commit-Position: refs/heads/master@{#33730}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix tests and port #

Patch Set 3 : Fix unittests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1254 lines, -700 lines) Patch
M src/arm/builtins-arm.cc View 1 1 chunk +0 lines, -12 lines 0 comments Download
M src/arm64/builtins-arm64.cc View 1 1 chunk +0 lines, -11 lines 0 comments Download
M src/compiler/bytecode-graph-builder.h View 1 2 chunks +1 line, -5 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 5 chunks +8 lines, -27 lines 0 comments Download
M src/compiler/interpreter-assembler.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/compiler/interpreter-assembler.cc View 1 2 chunks +19 lines, -0 lines 0 comments Download
M src/compiler/pipeline.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 4 chunks +23 lines, -0 lines 0 comments Download
M src/compiler/raw-machine-assembler.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 1 chunk +0 lines, -13 lines 0 comments Download
M src/interpreter/bytecode-array-builder.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 8 chunks +16 lines, -13 lines 0 comments Download
M src/interpreter/bytecodes.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 chunks +8 lines, -1 line 0 comments Download
M src/mips/builtins-mips.cc View 1 1 chunk +0 lines, -11 lines 0 comments Download
M src/mips64/builtins-mips64.cc View 1 1 chunk +0 lines, -11 lines 0 comments Download
M src/ppc/builtins-ppc.cc View 1 1 chunk +0 lines, -12 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 1 chunk +0 lines, -11 lines 0 comments Download
M src/x87/builtins-x87.cc View 1 1 chunk +0 lines, -13 lines 0 comments Download
M test/cctest/cctest.status View 1 1 chunk +0 lines, -15 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 399 chunks +1141 lines, -544 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 1 chunk +3 lines, -0 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 27 (10 generated)
rmcilroy
This is still WIP (need to fix a load of tests yet and port to ...
4 years, 10 months ago (2016-02-03 15:45:22 UTC) #2
Michael Starzinger
Yes, approach looks good! https://codereview.chromium.org/1665853002/diff/1/src/compiler/bytecode-graph-builder.cc File src/compiler/bytecode-graph-builder.cc (right): https://codereview.chromium.org/1665853002/diff/1/src/compiler/bytecode-graph-builder.cc#newcode564 src/compiler/bytecode-graph-builder.cc:564: void BytecodeGraphBuilder::CreateGraphBody() { I think ...
4 years, 10 months ago (2016-02-03 16:13:18 UTC) #3
oth
lgtm, modulo Michi's comments and the mechanical test updates.
4 years, 10 months ago (2016-02-03 16:35:14 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1665853002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1665853002/40001
4 years, 10 months ago (2016-02-04 11:55:05 UTC) #8
rmcilroy
Comments addressed and tests fixed, PTAL, thanks. https://codereview.chromium.org/1665853002/diff/1/src/compiler/bytecode-graph-builder.cc File src/compiler/bytecode-graph-builder.cc (right): https://codereview.chromium.org/1665853002/diff/1/src/compiler/bytecode-graph-builder.cc#newcode564 src/compiler/bytecode-graph-builder.cc:564: void BytecodeGraphBuilder::CreateGraphBody() ...
4 years, 10 months ago (2016-02-04 11:55:15 UTC) #9
rmcilroy
+ssanfilippo FYI
4 years, 10 months ago (2016-02-04 11:56:45 UTC) #10
Michael Starzinger
LGTM. Nice! Didn't look at test-bytecode-generator.cc all too much.
4 years, 10 months ago (2016-02-04 12:07:36 UTC) #11
rmcilroy
On 2016/02/04 12:07:36, Michael Starzinger wrote: > Didn't look at test-bytecode-generator.cc all too much. I ...
4 years, 10 months ago (2016-02-04 12:09:13 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/builds/11765)
4 years, 10 months ago (2016-02-04 12:10:02 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1665853002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1665853002/60001
4 years, 10 months ago (2016-02-04 12:13:31 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 10 months ago (2016-02-04 12:33:18 UTC) #19
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/1ce720f2a481cf07159eb97d3c48a707fddaf08c Cr-Commit-Position: refs/heads/master@{#33730}
4 years, 10 months ago (2016-02-04 12:33:57 UTC) #21
Michael Achenbach
CC mtrofin for the greedy allocator failures.
4 years, 10 months ago (2016-02-04 13:12:44 UTC) #23
Mircea Trofin
On 2016/02/04 13:12:44, Michael Achenbach wrote: > CC mtrofin for the greedy allocator failures. It ...
4 years, 10 months ago (2016-02-04 18:39:07 UTC) #24
rmcilroy
On 2016/02/04 18:39:07, Mircea Trofin wrote: > On 2016/02/04 13:12:44, Michael Achenbach wrote: > > ...
4 years, 10 months ago (2016-02-05 12:28:43 UTC) #25
Mircea Trofin
On 2016/02/05 12:28:43, rmcilroy wrote: > On 2016/02/04 18:39:07, Mircea Trofin wrote: > > On ...
4 years, 10 months ago (2016-02-05 16:13:29 UTC) #26
rmcilroy
4 years, 10 months ago (2016-02-05 16:42:04 UTC) #27
Message was sent while issue was closed.
On 2016/02/05 16:13:29, Mircea Trofin wrote:
> On 2016/02/05 12:28:43, rmcilroy wrote:
> > On 2016/02/04 18:39:07, Mircea Trofin wrote:
> > > On 2016/02/04 13:12:44, Michael Achenbach wrote:
> > > > CC mtrofin for the greedy allocator failures.
> > > 
> > > It appears this CL invalidates split-edge form, and that greedy simply
> > > highlighted that by happening to split in such a way that
ResolveControlFlow
> > > uncovered the issue.
> > > 
> > > I created a CL, 1668953002, which passes before this change, and fails
after
> > > (the full build actually fails, as part of a post-binaries build script
run)
> > 
> > Apologies for breaking greedy allocator with this, thanks for uncovering the
> > issue. I have a fix in https://codereview.chromium.org/1671653002/.
> 
> To be clear, you didn't break the greedy allocator. The split-edge form
> assumption 
> is throughout the register allocation pipeline (linear scan or greedy). It
just
> so happened 
> that, for the tests we have, greedy stumbled upon it and not linear scan.

Yes I understood that - I meant I broke the greedy bot.

Powered by Google App Engine
This is Rietveld 408576698