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

Issue 11663005: Adapt Danno's Track Allocation Info idea to fast literals. When allocating a literal array, (Closed)

Created:
8 years ago by mvstanton
Modified:
7 years, 11 months ago
Reviewers:
danno
CC:
v8-dev
Visibility:
Public.

Description

Adapt Danno's Track Allocation Info idea to fast literals. When allocating a literal array, we store an AllocationSiteInfo object right after the JSArray, with a pointer to the boilerplate object. Later, if the array transitions we check for the continued existence of the temporary AllocationSiteInfo object (has no roots). If found, we'll use it to transition the boilerplate array as well. Danno's original changeset: https://codereview.chromium.org/10615002/ Committed: https://code.google.com/p/v8/source/detail?r=13330

Patch Set 1 #

Patch Set 2 : Always use in ICs, and moved feature behind a flag #

Total comments: 26

Patch Set 3 : Response to code comments #

Patch Set 4 : Ported to other platforms #

Total comments: 40

Patch Set 5 : Respond to comments #

Total comments: 10

Patch Set 6 : A few more review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+383 lines, -32 lines) Patch
M include/v8.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 3 4 8 chunks +34 lines, -5 lines 0 comments Download
M src/arm/codegen-arm.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
M src/code-stubs.h View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 6 chunks +34 lines, -5 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 1 chunk +24 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 chunks +31 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 4 chunks +54 lines, -0 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects-printer.cc View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 8 chunks +33 lines, -5 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
M test/mjsunit/array-natives-elements.js View 1 2 3 4 1 chunk +21 lines, -11 lines 0 comments Download
M test/mjsunit/elements-kind.js View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
danno
Here you go... https://codereview.chromium.org/11663005/diff/2001/src/code-stubs.h File src/code-stubs.h (right): https://codereview.chromium.org/11663005/diff/2001/src/code-stubs.h#newcode390 src/code-stubs.h:390: CLONE_ANY_ELEMENTS_WITH_ALLOCATION_INFO Add LAST_CLONE_MODE = CLONE_ANY_ELEMENTS_WITH_ALLOCATION_INFO https://codereview.chromium.org/11663005/diff/2001/src/code-stubs.h#newcode408 ...
7 years, 12 months ago (2012-12-26 10:32:01 UTC) #1
mvstanton
Hi Danno, I think this is ready for a look. Got the other platforms, addressed ...
7 years, 11 months ago (2013-01-03 14:40:43 UTC) #2
danno
Getting pretty close... mostly minor stuff. https://codereview.chromium.org/11663005/diff/9016/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/11663005/diff/9016/src/arm/code-stubs-arm.cc#newcode382 src/arm/code-stubs-arm.cc:382: FieldMemOperand(r0, allocation_info_start)); nit: ...
7 years, 11 months ago (2013-01-04 08:50:55 UTC) #3
mvstanton
Thanks for the good ideas, I've updated the changeset! https://codereview.chromium.org/11663005/diff/9016/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/11663005/diff/9016/src/arm/code-stubs-arm.cc#newcode382 src/arm/code-stubs-arm.cc:382: ...
7 years, 11 months ago (2013-01-04 12:07:52 UTC) #4
danno
LGTM with comments addressed and a last final check that perf doesn't regress. https://codereview.chromium.org/11663005/diff/16004/src/arm/code-stubs-arm.cc File ...
7 years, 11 months ago (2013-01-07 08:03:48 UTC) #5
mvstanton
7 years, 11 months ago (2013-01-07 09:28:41 UTC) #6
Thanks Danno, last changes, and performance job kicked off, let's review that
briefly in a couple hours.

https://codereview.chromium.org/11663005/diff/16004/src/arm/code-stubs-arm.cc
File src/arm/code-stubs-arm.cc (right):

https://codereview.chromium.org/11663005/diff/16004/src/arm/code-stubs-arm.cc...
src/arm/code-stubs-arm.cc:347: AllocationSiteInfoMode allocation_site_info_mode,
On 2013/01/07 08:03:48, danno wrote:
> Do we really need a new enum type for this (yet?). It seems that you can
discern
> whether an AllocationSiteInfo is necessary directly from mode, and since we
> don't yet have allocation routines that would only need AllocationSiteInfoMode
> without some other context, maybe it makes sense to postpone adding the enum
> until that time?

As we discussed, I'll keep it because this helper method is a bit quirky,
asserting that the mode flag is just a specific subset of the possible values.
That has the effect of splitting off the allocation site info decision into
another flag. I'd also like to keep the decision about doing or not doing
certain pretransitions (such as the problematic DOUBLE->FAST) upstream...it is
handled at a higher level.

https://codereview.chromium.org/11663005/diff/16004/src/ia32/macro-assembler-...
File src/ia32/macro-assembler-ia32.cc (right):

https://codereview.chromium.org/11663005/diff/16004/src/ia32/macro-assembler-...
src/ia32/macro-assembler-ia32.cc:3073: allocation_site_info_map())));
On 2013/01/07 08:03:48, danno wrote:
> nit: indentation (4 spaces)

Done.

https://codereview.chromium.org/11663005/diff/16004/src/objects-printer.cc
File src/objects-printer.cc (right):

https://codereview.chromium.org/11663005/diff/16004/src/objects-printer.cc#ne...
src/objects-printer.cc:1009: PrintF(out, "Array literal boilerplate ");
On 2013/01/07 08:03:48, danno wrote:
> nit: remove boilerplate, since we will change this to support non-boilerplate
> transitions and don't want to forget to change this.

Done.

https://codereview.chromium.org/11663005/diff/16004/src/objects.cc
File src/objects.cc (right):

https://codereview.chromium.org/11663005/diff/16004/src/objects.cc#newcode7916
src/objects.cc:7916: Map** possible_allocation_map =
reinterpret_cast<Map**>(ptr_end);
On 2013/01/07 08:03:48, danno wrote:
> nit: perhaps possible_allocation_info_map?

I went ahead and dogmatically named it possible_allocation_site_info_map :).

https://codereview.chromium.org/11663005/diff/16004/src/objects.cc#newcode10835
src/objects.cc:10835: if (ret->IsFailure()) return ret;
On 2013/01/07 08:03:48, danno wrote:
> nit: statement above is unnecessary, since you will fall through to return
> anyway.

Done.

Powered by Google App Engine
This is Rietveld 408576698