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

Issue 7062004: Move young independent handles to the end of the global handle's list. (Closed)

Created:
9 years, 7 months ago by Vyacheslav Egorov (Chromium)
Modified:
9 years, 2 months ago
Reviewers:
antonm, Vitaly Repeshko
CC:
v8-dev
Visibility:
Public.

Description

Move young independent handles to the end of the global handle's list. This allows to reduce that pressure on scavenge: when searching for objects weakly reachable through independent handles it only has to iterate over a tail of the handle's list. The downside of this CL is that handle's list is now double linked.

Patch Set 1 #

Total comments: 21
Unified diffs Side-by-side diffs Delta from patch set Stats (+398 lines, -249 lines) Patch
M src/global-handles.h View 2 chunks +180 lines, -5 lines 5 comments Download
M src/global-handles.cc View 17 chunks +218 lines, -244 lines 16 comments Download

Messages

Total messages: 4 (0 generated)
Vyacheslav Egorov (Chromium)
9 years, 7 months ago (2011-05-23 12:35:02 UTC) #1
antonm
DBC http://codereview.chromium.org/7062004/diff/1/src/global-handles.cc File src/global-handles.cc (right): http://codereview.chromium.org/7062004/diff/1/src/global-handles.cc#newcode114 src/global-handles.cc:114: void GlobalHandles::Node::ClearWeakness(GlobalHandles* global_handles) { do we want to ...
9 years, 7 months ago (2011-05-23 19:44:19 UTC) #2
Vyacheslav Egorov (Chromium)
Thanks for looking at this, Anton. See my comments inline. Both Vitaly and me don't ...
9 years, 7 months ago (2011-05-23 20:08:15 UTC) #3
antonm
9 years, 7 months ago (2011-05-24 10:58:38 UTC) #4
http://codereview.chromium.org/7062004/diff/1/src/global-handles.cc
File src/global-handles.cc (right):

http://codereview.chromium.org/7062004/diff/1/src/global-handles.cc#newcode114
src/global-handles.cc:114: void
GlobalHandles::Node::ClearWeakness(GlobalHandles* global_handles) {
I am more concerned with is_in_independent_tail_

On 2011/05/23 20:08:15, Vyacheslav Egorov wrote:
> On 2011/05/23 19:44:19, antonm wrote:
> > do we want to persist independence related state across
MakeWeak/ClearWeakness
> > calls, maybe they should reset independence flags?
> >
> 
> I think independence is more a property of an object not a property of a
handle
> so I don't think ClearWeak should clean it. 
> 
> It's just an unfortunate design tradeoff that independence became property of
a
> handle.
>  
> > And shouldn't clearweakness move the handler out of the suffix as it's not
> > collectible anymore?
> 
> The invariant of the tail is: if object is young and independent it's in the
> tail. But converse of the invariant does not have to hold. I will update the
> comments to make it more clear.

I thought it need to be weak as well.  I am probably misinterpreting your CL,
but I thought the whole idea was to traverse the smaller set.  And all you need
is to traverse weak independent handles.  Hence all my questions :)

> 
> 
>

http://codereview.chromium.org/7062004/diff/1/src/global-handles.cc#newcode221
src/global-handles.cc:221: } else if (first_deallocated()) {
Not free, but deallocated.

On 2011/05/23 20:08:15, Vyacheslav Egorov wrote:
> On 2011/05/23 19:44:19, antonm wrote:
> > just FYI:  I recently thought about it, and chances really are we don't need
> > both free and deallocated since we allocate the stuff from the pool anyway. 
I
> > should have probably cleaned it up before.  In any event it may compensate
for
> > newly added complexity.
> 
> Well if we can remove "free" stuff than I don't need a double linked list ---
a
> single linked list will suffice. 
> 
> If there is not "reuse" in the middle of the list then the following
assumption
> will hold --- a handle is mark as independent soon after creation so we can
find
> it's "prev" by linear search. 
> 
> What do you think, Vitaly?

http://codereview.chromium.org/7062004/diff/1/src/global-handles.cc#newcode420
src/global-handles.cc:420: node->is_in_independent_tail_ = false;
Maybe it should go to this callsite then, but it's a nit.

On 2011/05/23 20:08:15, Vyacheslav Egorov wrote:
> On 2011/05/23 19:44:19, antonm wrote:
> > is it mandatory here?  apparently you overwrite it later anyway.
> 
> there is one callsite that calls UnlinkNode directly (see line 475).

Powered by Google App Engine
This is Rietveld 408576698