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

Issue 688853007: Implement aging of maps embedded in optimized code. (Closed)

Created:
6 years, 1 month ago by ulan
Modified:
5 years, 1 month ago
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Implement aging of maps embedded in optimized code. Instead allowing a map to die immediately and deoptimize code that depenend on it, age the map gradually to descrease chances of deoptimizing the code. Note that maps die immediately if there is memory pressure (kReduceMemoryFootprint is on). BUG=v8:3664 LOG=N

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -17 lines) Patch
M src/heap/heap.h View 5 chunks +11 lines, -0 lines 0 comments Download
M src/heap/heap.cc View 4 chunks +27 lines, -0 lines 1 comment Download
M src/heap/incremental-marking.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/heap/mark-compact.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/heap/mark-compact.cc View 3 chunks +8 lines, -0 lines 2 comments Download
M src/lithium-codegen.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/objects.h View 4 chunks +34 lines, -6 lines 2 comments Download
M src/objects.cc View 2 chunks +43 lines, -1 line 0 comments Download
M src/objects-inl.h View 3 chunks +10 lines, -6 lines 1 comment Download
M src/serialize.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M test/cctest/test-heap.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-object-observe.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (1 generated)
ulan
Hi Hannes, WDYT about this approach?
6 years, 1 month ago (2014-11-11 14:11:32 UTC) #2
Hannes Payer (out of office)
6 years, 1 month ago (2014-11-17 17:34:33 UTC) #3
Your CL should fix the problem. However, the question is should we do something
more general like e.g. soft references which just get cleared on memory
pressure? Do you think soft references would be less performant? I am just
worried that we introduce another special weak handling mechanism instead of
doing a general, reusable solution.

https://codereview.chromium.org/688853007/diff/1/src/heap/heap.cc
File src/heap/heap.cc (right):

https://codereview.chromium.org/688853007/diff/1/src/heap/heap.cc#newcode1247
src/heap/heap.cc:1247: }
Factor that code out into a function to keep the prologue simple, e.g.
AgeEmbeddedMapCache.

https://codereview.chromium.org/688853007/diff/1/src/heap/mark-compact.cc
File src/heap/mark-compact.cc (right):

https://codereview.chromium.org/688853007/diff/1/src/heap/mark-compact.cc#new...
src/heap/mark-compact.cc:2204: ProcessMarkingDeque();
Why?

https://codereview.chromium.org/688853007/diff/1/src/heap/mark-compact.cc#new...
src/heap/mark-compact.cc:3541: // No need to iterate the contents of the
embedded map cache since
Please move the comment before
updating_visitor.VisitPointer(heap_->embedded_map_cache_address()); and say
something like "We just visit the embedded_map_cache slot here and update it if
needed.  No need to iterate the contents of the embedded map cache since maps do
not move."

https://codereview.chromium.org/688853007/diff/1/src/objects-inl.h
File src/objects-inl.h (right):

https://codereview.chromium.org/688853007/diff/1/src/objects-inl.h#newcode3314
src/objects-inl.h:3314: CAST_ACCESSOR(EmbeddedMapCache)
alphabetic order

https://codereview.chromium.org/688853007/diff/1/src/objects.h
File src/objects.h (right):

https://codereview.chromium.org/688853007/diff/1/src/objects.h#newcode4000
src/objects.h:4000: class HeapPointerShape : public BaseShape<Handle<Object> > {
Why is that a good name?

https://codereview.chromium.org/688853007/diff/1/src/objects.h#newcode4052
src/objects.h:4052: 
Please add a detailed description about what the EmbeddedMapCache is and what it
motivation is.

Powered by Google App Engine
This is Rietveld 408576698