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

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed)

Created:
7 years, 3 months ago by rmcilroy
Modified:
7 years, 1 month ago
CC:
v8-dev
Visibility:
Public.

Description

Enable preaging of code objects when --optimize-for-size. This change means that code which is never executed is garbage collected immediately, and code which is only executed once is collected more quickly (limiting heap growth), however, code which is re-executed is reset to the young age, thus being kept around for the same number of GC generations as currently. BUG=280984 R=danno@chromium.org, hpayer@chromium.org Committed: http://code.google.com/p/v8/source/detail?r=17343

Patch Set 1 : Add support for all architectures and fix a test. #

Patch Set 2 : Reupload due to weird codereview site error #

Total comments: 1

Patch Set 3 : Make pre-aging conditional on is_memory_constrained() #

Total comments: 2

Patch Set 4 : Change test-heap to set memory_constrained flag explicitly #

Patch Set 5 : Update to MaybeBoolFlag due to r16774 #

Patch Set 6 : Limit to pre-age patch. #

Total comments: 1

Patch Set 7 : Embed is_pre_aged in code object rather than prologue #

Patch Set 8 : Preage optimized code too, and set preage bit in MakeCodeEpilogue too. #

Patch Set 9 : Use stubs to track number of code executions. #

Patch Set 10 : <sigh> upload only the one commit... #

Total comments: 3

Patch Set 11 : Add x64 and ia32 #

Patch Set 12 : Add missing ia32 lithium codegen. #

Total comments: 6

Patch Set 13 : Address comments. #

Patch Set 14 : Rebase and add MIPS support #

Total comments: 2

Patch Set 15 : Refactor Prologue into macro-assembler #

Patch Set 16 : Fix a couple of typos #

Total comments: 1

Patch Set 17 : bool -> enum #

Unified diffs Side-by-side diffs Delta from patch set Stats (+496 lines, -112 lines) Patch
M src/arm/assembler-arm-inl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M src/arm/builtins-arm.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +33 lines, -0 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -10 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -15 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +27 lines, -0 lines 0 comments Download
M src/assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -0 lines 0 comments Download
M src/assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 lines, -0 lines 0 comments Download
M src/builtins.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -0 lines 0 comments Download
M src/codegen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -2 lines 0 comments Download
M src/compiler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -4 lines 0 comments Download
M src/compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M src/factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -2 lines 0 comments Download
M src/frames.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 lines, -0 lines 0 comments Download
M src/full-codegen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -2 lines 0 comments Download
M src/heap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 lines, -5 lines 0 comments Download
M src/heap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +11 lines, -2 lines 0 comments Download
M src/ia32/assembler-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M src/ia32/assembler-ia32-inl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +10 lines, -1 line 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +38 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -1 line 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -4 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -8 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +24 lines, -0 lines 0 comments Download
M src/mips/assembler-mips-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -0 lines 0 comments Download
M src/mips/builtins-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +43 lines, -0 lines 0 comments Download
M src/mips/full-codegen-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -6 lines 0 comments Download
M src/mips/lithium-codegen-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -15 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +34 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +12 lines, -2 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +36 lines, -8 lines 0 comments Download
M src/serialize.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M src/x64/assembler-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +4 lines, -1 line 0 comments Download
M src/x64/assembler-x64-inl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +10 lines, -1 line 0 comments Download
M src/x64/builtins-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +36 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -7 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -4 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -8 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +26 lines, -1 line 0 comments Download
M test/cctest/test-heap.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +69 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (8 generated)
rmcilroy
I'll add support for other architectures if you think this looks OK.
7 years, 3 months ago (2013-09-09 09:48:13 UTC) #1
Hannes Payer (out of office)
I am wondering about the performance impact of that change. What happens if you preage ...
7 years, 3 months ago (2013-09-09 15:17:53 UTC) #2
rmcilroy
Updated for all architectures. I'll report back with the performance impact if enabled for all ...
7 years, 3 months ago (2013-09-11 15:28:28 UTC) #3
Hannes Payer (out of office)
All right, the patch looks fine. But I don't think we should do it for ...
7 years, 3 months ago (2013-09-12 18:16:24 UTC) #4
Sven Panne
On 2013/09/12 18:16:24, Hannes Payer wrote: > All right, the patch looks fine. But I ...
7 years, 3 months ago (2013-09-13 06:24:25 UTC) #5
rmcilroy_google
On 2013/09/13 06:24:25, Sven Panne wrote: > On 2013/09/12 18:16:24, Hannes Payer wrote: > > ...
7 years, 3 months ago (2013-09-13 09:30:50 UTC) #6
Hannes Payer (out of office)
On 2013/09/13 09:30:50, rmcilroy_google wrote: > On 2013/09/13 06:24:25, Sven Panne wrote: > > On ...
7 years, 3 months ago (2013-09-13 09:56:40 UTC) #7
rmcilroy
On 2013/09/13 09:56:40, Hannes Payer wrote: > On 2013/09/13 09:30:50, rmcilroy_google wrote: > > On ...
7 years, 3 months ago (2013-09-13 10:17:22 UTC) #8
rmcilroy
On 2013/09/13 10:17:22, rmcilroy wrote: > On 2013/09/13 09:56:40, Hannes Payer wrote: > > On ...
7 years, 3 months ago (2013-09-16 08:21:57 UTC) #9
Sven Panne
On 2013/09/16 08:21:57, rmcilroy wrote: > Added the command line flag for memory_constrained in the ...
7 years, 3 months ago (2013-09-16 09:42:52 UTC) #10
Hannes Payer (out of office)
https://codereview.chromium.org/23480031/diff/29001/test/cctest/test-heap.cc File test/cctest/test-heap.cc (right): https://codereview.chromium.org/23480031/diff/29001/test/cctest/test-heap.cc#newcode1065 test/cctest/test-heap.cc:1065: // survive further). Since we have the mode now ...
7 years, 3 months ago (2013-09-16 14:31:45 UTC) #11
rmcilroy
https://codereview.chromium.org/23480031/diff/29001/test/cctest/test-heap.cc File test/cctest/test-heap.cc (right): https://codereview.chromium.org/23480031/diff/29001/test/cctest/test-heap.cc#newcode1065 test/cctest/test-heap.cc:1065: // survive further). On 2013/09/16 14:31:45, Hannes Payer wrote: ...
7 years, 3 months ago (2013-09-16 15:45:46 UTC) #12
Hannes Payer (out of office)
LGTM
7 years, 3 months ago (2013-09-16 16:13:03 UTC) #13
Michael Starzinger
Drive-by comment. https://codereview.chromium.org/23480031/diff/65001/src/ia32/full-codegen-ia32.cc File src/ia32/full-codegen-ia32.cc (right): https://codereview.chromium.org/23480031/diff/65001/src/ia32/full-codegen-ia32.cc#newcode166 src/ia32/full-codegen-ia32.cc:166: __ nop(); IIUC this is a glorified ...
7 years, 3 months ago (2013-09-17 22:56:38 UTC) #14
danno
NOT LGTM. I really don't like the conditional changes in the prologue. I am pretty ...
7 years, 3 months ago (2013-09-18 08:32:00 UTC) #15
rmcilroy
> IIUC this is a glorified way to store exactly one bit of information, namely ...
7 years, 3 months ago (2013-09-18 10:59:32 UTC) #16
Michael Starzinger
On 2013/09/18 10:59:32, rmcilroy wrote: > > IIUC this is a glorified way to store ...
7 years, 3 months ago (2013-09-18 11:51:16 UTC) #17
danno
The reason I suggested a counter is an intuition about aging of code. If a ...
7 years, 3 months ago (2013-09-18 12:15:08 UTC) #18
rmcilroy
> Currently we still don't flush optimized code, so adding the bit to > OPTIMIZED_FUNCTION ...
7 years, 3 months ago (2013-09-18 13:05:33 UTC) #19
rmcilroy
I've redo this to use code stubs which track whether code has been executed zero, ...
7 years, 3 months ago (2013-09-23 12:58:34 UTC) #20
rmcilroy
On 2013/09/23 12:58:34, rmcilroy wrote: > I've redo this to use code stubs which track ...
7 years, 2 months ago (2013-09-26 11:22:14 UTC) #21
danno
I like this approach much more. Go ahead and do the platform ports. https://codereview.chromium.org/23480031/diff/87001/src/objects.h File ...
7 years, 2 months ago (2013-09-26 16:29:05 UTC) #22
rmcilroy
Added support for x64 and ia32. This ended up being more complex than I hoped ...
7 years, 2 months ago (2013-09-30 19:38:43 UTC) #23
danno
Getting very close. https://codereview.chromium.org/23480031/diff/97001/src/ia32/full-codegen-ia32.cc File src/ia32/full-codegen-ia32.cc (right): https://codereview.chromium.org/23480031/diff/97001/src/ia32/full-codegen-ia32.cc#newcode171 src/ia32/full-codegen-ia32.cc:171: __ nop(); Use __ Nop(padding_size) here, ...
7 years, 2 months ago (2013-10-04 16:30:08 UTC) #24
rmcilroy
https://codereview.chromium.org/23480031/diff/97001/src/ia32/full-codegen-ia32.cc File src/ia32/full-codegen-ia32.cc (right): https://codereview.chromium.org/23480031/diff/97001/src/ia32/full-codegen-ia32.cc#newcode171 src/ia32/full-codegen-ia32.cc:171: __ nop(); On 2013/10/04 16:30:09, danno wrote: > Use ...
7 years, 2 months ago (2013-10-07 10:56:12 UTC) #25
rmcilroy
On 2013/10/07 10:56:12, rmcilroy wrote: > https://codereview.chromium.org/23480031/diff/97001/src/ia32/full-codegen-ia32.cc > File src/ia32/full-codegen-ia32.cc (right): > > https://codereview.chromium.org/23480031/diff/97001/src/ia32/full-codegen-ia32.cc#newcode171 > ...
7 years, 2 months ago (2013-10-14 12:22:25 UTC) #26
danno
Can you try making this: static const int kPrologueOffsetNotSet = -1; a public static memory ...
7 years, 2 months ago (2013-10-14 18:53:14 UTC) #27
rmcilroy
On 2013/10/14 18:53:14, danno wrote: > Can you try making this: > > static const ...
7 years, 2 months ago (2013-10-15 17:03:43 UTC) #28
rmcilroy
On 2013/10/15 17:03:43, rmcilroy wrote: > On 2013/10/14 18:53:14, danno wrote: > > Can you ...
7 years, 2 months ago (2013-10-22 09:24:03 UTC) #29
danno
Almost there, sorry, one comment on your last change. https://codereview.chromium.org/23480031/diff/117001/src/ia32/macro-assembler-ia32.h File src/ia32/macro-assembler-ia32.h (right): https://codereview.chromium.org/23480031/diff/117001/src/ia32/macro-assembler-ia32.h#newcode229 src/ia32/macro-assembler-ia32.h:229: ...
7 years, 2 months ago (2013-10-22 12:32:11 UTC) #30
danno
Nice. LGTM. I'll land this for you.
7 years, 2 months ago (2013-10-23 13:46:20 UTC) #31
danno
7 years, 2 months ago (2013-10-23 13:48:31 UTC) #32
Message was sent while issue was closed.
Committed patchset #24 manually as r17343 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698