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

Issue 2620753003: [TypeFeedbackVector] Root literal arrays in function literals slots (Closed)

Created:
3 years, 11 months ago by mvstanton
Modified:
3 years, 11 months ago
CC:
v8-reviews_googlegroups.com, v8-x87-ports_googlegroups.com, v8-ppc-ports_googlegroups.com, Yang, v8-mips-ports_googlegroups.com, Hannes Payer (out of office), ulan
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[TypeFeedbackVector] Root literal arrays in function literals slots Literal arrays and feedback vectors for a function can be garbage collected if we don't have a rooted closure for the function, which happens often. It's expensive to come back from this (recreating boilerplates and gathering feedback again), and the cost is disproportionate if the function was inlined into optimized code. To guard against losing these arrays when we need them, we'll now create literal arrays when creating the feedback vector for the outer closure, and root them strongly in that vector. BUG=v8:5456 Review-Url: https://codereview.chromium.org/2620753003 Cr-Original-Commit-Position: refs/heads/master@{#42258} Committed: https://chromium.googlesource.com/v8/v8/+/31887804107bf5c103d915f5c601cfaaf1cd7cb6 Review-Url: https://codereview.chromium.org/2620753003 Cr-Commit-Position: refs/heads/master@{#42264} Committed: https://chromium.googlesource.com/v8/v8/+/b8294aaa978e972978b8d82cedf63befad5d7af1

Patch Set 1 #

Patch Set 2 : Updated test and compilelazy builtin. #

Patch Set 3 : Compile fix. #

Total comments: 2

Patch Set 4 : Comments, TODOs. #

Total comments: 8

Patch Set 5 : Code comments. #

Total comments: 8

Patch Set 6 : Moar comments. #

Total comments: 2

Patch Set 7 : REBASE. #

Patch Set 8 : GCSTRESS bugfix. #

Patch Set 9 : GCSTRESS fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -525 lines) Patch
M src/builtins/arm/builtins-arm.cc View 1 2 5 chunks +11 lines, -19 lines 0 comments Download
M src/builtins/arm64/builtins-arm64.cc View 1 2 5 chunks +8 lines, -14 lines 0 comments Download
M src/builtins/builtins-constructor.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/builtins/ia32/builtins-ia32.cc View 1 5 chunks +8 lines, -17 lines 0 comments Download
M src/builtins/mips/builtins-mips.cc View 1 2 4 chunks +11 lines, -19 lines 0 comments Download
M src/builtins/mips64/builtins-mips64.cc View 1 2 4 chunks +11 lines, -19 lines 0 comments Download
M src/builtins/x64/builtins-x64.cc View 1 4 chunks +8 lines, -14 lines 0 comments Download
M src/compiler.cc View 1 2 3 4 5 6 4 chunks +12 lines, -19 lines 0 comments Download
M src/compiler/js-create-lowering.cc View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
M src/compiler/js-graph.h View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
M src/compiler/js-graph.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M src/compiler/js-native-context-specialization.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -1 line 0 comments Download
M src/contexts.h View 1 chunk +2 lines, -3 lines 0 comments Download
M src/contexts.cc View 6 chunks +8 lines, -27 lines 0 comments Download
M src/debug/liveedit.cc View 5 chunks +75 lines, -31 lines 0 comments Download
M src/heap/object-stats.cc View 1 chunk +0 lines, -20 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 chunks +6 lines, -21 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 8 chunks +52 lines, -67 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 2 chunks +13 lines, -2 lines 0 comments Download
M src/runtime/runtime-interpreter.cc View 1 chunk +6 lines, -1 line 0 comments Download
M src/runtime/runtime-scopes.cc View 2 chunks +13 lines, -3 lines 0 comments Download
M src/type-feedback-vector.cc View 1 2 3 2 chunks +6 lines, -8 lines 0 comments Download
M test/cctest/heap/test-heap.cc View 3 chunks +3 lines, -208 lines 0 comments Download
M test/cctest/test-feedback-vector.cc View 1 chunk +3 lines, -1 line 0 comments Download
A test/mjsunit/strong-rooted-literals.js View 1 1 chunk +56 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (42 generated)
mvstanton
Hi Benedikt, here is the rest of the literals CL, now with a fix applied ...
3 years, 11 months ago (2017-01-10 20:17:05 UTC) #7
Benedikt Meurer
LGTM from my side. Should get signoff from mstarzinger@ for compiler.cc related changes and yangguo@ ...
3 years, 11 months ago (2017-01-11 05:11:21 UTC) #15
mvstanton
Thank you. Yang, Michael - this CL is a reland of the 2nd half of ...
3 years, 11 months ago (2017-01-11 06:47:44 UTC) #18
Michael Starzinger
Looking good, just minor things. https://codereview.chromium.org/2620753003/diff/60001/src/objects-printer.cc File src/objects-printer.cc (left): https://codereview.chromium.org/2620753003/diff/60001/src/objects-printer.cc#oldcode811 src/objects-printer.cc:811: break; Looks like accidental ...
3 years, 11 months ago (2017-01-11 12:07:27 UTC) #22
mvstanton
Thanks, Michael, comments addressed! --Michael https://codereview.chromium.org/2620753003/diff/60001/src/objects-printer.cc File src/objects-printer.cc (left): https://codereview.chromium.org/2620753003/diff/60001/src/objects-printer.cc#oldcode811 src/objects-printer.cc:811: break; On 2017/01/11 12:07:27, ...
3 years, 11 months ago (2017-01-11 13:14:52 UTC) #23
Michael Starzinger
LGTM from my end. Just nits left. Cool stuff! https://codereview.chromium.org/2620753003/diff/80001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2620753003/diff/80001/src/objects.cc#newcode12547 src/objects.cc:12547: ...
3 years, 11 months ago (2017-01-11 13:22:44 UTC) #26
mvstanton
Thanks! https://codereview.chromium.org/2620753003/diff/80001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2620753003/diff/80001/src/objects.cc#newcode12547 src/objects.cc:12547: DCHECK(code.is_null() || code->kind() == Code::OPTIMIZED_FUNCTION); On 2017/01/11 13:22:44, ...
3 years, 11 months ago (2017-01-11 14:52:06 UTC) #33
Yang
LGTM with a comment. https://codereview.chromium.org/2620753003/diff/100001/src/debug/liveedit.cc File src/debug/liveedit.cc (right): https://codereview.chromium.org/2620753003/diff/100001/src/debug/liveedit.cc#newcode892 src/debug/liveedit.cc:892: if (!fun->shared()->is_compiled()) return; Can we ...
3 years, 11 months ago (2017-01-12 08:17:56 UTC) #38
mvstanton
thanks Yang! --Michael https://codereview.chromium.org/2620753003/diff/100001/src/debug/liveedit.cc File src/debug/liveedit.cc (right): https://codereview.chromium.org/2620753003/diff/100001/src/debug/liveedit.cc#newcode892 src/debug/liveedit.cc:892: if (!fun->shared()->is_compiled()) return; On 2017/01/12 08:17:56, ...
3 years, 11 months ago (2017-01-12 08:44:54 UTC) #39
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/2620753003/100001
3 years, 11 months ago (2017-01-12 08:45:12 UTC) #42
commit-bot: I haz the power
Failed to apply patch for src/compiler.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 11 months ago (2017-01-12 08:47:32 UTC) #44
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/2620753003/120001
3 years, 11 months ago (2017-01-12 08:57:51 UTC) #47
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/v8/v8/+/31887804107bf5c103d915f5c601cfaaf1cd7cb6
3 years, 11 months ago (2017-01-12 09:28:57 UTC) #50
Michael Achenbach
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2626863004/ by machenbach@chromium.org. ...
3 years, 11 months ago (2017-01-12 10:10:34 UTC) #51
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/2620753003/160001
3 years, 11 months ago (2017-01-12 10:53:10 UTC) #55
commit-bot: I haz the power
3 years, 11 months ago (2017-01-12 11:29:19 UTC) #58
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/v8/v8/+/b8294aaa978e972978b8d82cedf63befad5...

Powered by Google App Engine
This is Rietveld 408576698