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

Issue 509035: Compact map space when doing mark-sweep if after collection size of map space... (Closed)

Created:
11 years ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Compact map space when doing mark-sweep if after collection size of map space would drop below threshold. Committed: http://code.google.com/p/v8/source/detail?r=3600

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 21

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+307 lines, -6 lines) Patch
M src/heap.h View 1 2 3 4 5 6 3 chunks +4 lines, -4 lines 0 comments Download
M src/mark-compact.cc View 1 2 3 4 5 6 7 4 chunks +241 lines, -2 lines 0 comments Download
M src/spaces.h View 1 2 3 4 5 6 2 chunks +62 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
antonm
Kevin and Søren, that's not quite a call for review (but I would really appreciate ...
11 years ago (2009-12-22 20:47:36 UTC) #1
antonm
That should have been Søren instead of Kevic C. Sorry for noise.
11 years ago (2009-12-23 07:37:36 UTC) #2
antonm
Kevin, Søren, could you have now a look? I opted to do an additional pass ...
10 years, 12 months ago (2009-12-24 16:08:07 UTC) #3
antonm
ping
10 years, 11 months ago (2010-01-11 15:24:08 UTC) #4
Søren Thygesen Gjesse
LGTM Sorry for the delay I must admit this got lost over Christmas. The code ...
10 years, 11 months ago (2010-01-12 08:07:14 UTC) #5
antonm
Thanks a lot for comments, Søren. http://codereview.chromium.org/509035/diff/5006/5008 File src/mark-compact.cc (right): http://codereview.chromium.org/509035/diff/5006/5008#newcode1270 src/mark-compact.cc:1270: while (true) { ...
10 years, 11 months ago (2010-01-12 16:53:36 UTC) #6
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/509035/diff/5006/5008 File src/mark-compact.cc (right): http://codereview.chromium.org/509035/diff/5006/5008#newcode1412 src/mark-compact.cc:1412: ASSERT(Heap::map_space()->Contains(new_map)); On 2010/01/12 16:53:36, antonm wrote: > On ...
10 years, 11 months ago (2010-01-13 08:55:29 UTC) #7
antonm
Thanks a lot for review, Søren, committing. http://codereview.chromium.org/509035/diff/5006/5008 File src/mark-compact.cc (right): http://codereview.chromium.org/509035/diff/5006/5008#newcode1412 src/mark-compact.cc:1412: ASSERT(Heap::map_space()->Contains(new_map)); On ...
10 years, 11 months ago (2010-01-13 19:15:36 UTC) #8
Søren Thygesen Gjesse
10 years, 11 months ago (2010-01-14 08:28:07 UTC) #9
On 2010/01/13 19:15:36, antonm wrote:
> Thanks a lot for review, Søren, committing.
> 
> http://codereview.chromium.org/509035/diff/5006/5008
> File src/mark-compact.cc (right):
> 
> http://codereview.chromium.org/509035/diff/5006/5008#newcode1412
> src/mark-compact.cc:1412: ASSERT(Heap::map_space()->Contains(new_map));
> On 2010/01/13 08:55:30, Søren Gjesse wrote:
> > On 2010/01/12 16:53:36, antonm wrote:
> > > On 2010/01/12 08:07:14, Søren Gjesse wrote:
> > > > Does this ASSERT check against the resulting size of map space after
> > > compaction?
> > > 
> > > Very good question.  I don't think so as the space shouldn't have been
> shrunk
> > > yet.
> > > 
> > > I've added the check, but it feels somewhat ugly to me (esp. this
> > recalculation
> > > of # of live maps).  Maybe we'd better add this check (if it's not present
> > right
> > > now) into post GC verification code and remove it from here not to confuse
> > > readers?
> > > 
> > 
> > You are right it it both ugly and slow. Your suggestion to add some map
space
> > verification sounds much better,
> 
> Ok.  I double checked and it looks like all the cctest are ran with
verify_heap
> flag on, so we should get it for free.  Just removing.
> 
> http://codereview.chromium.org/509035/diff/5006/5008#newcode1483
> src/mark-compact.cc:1483: MapCompact map_compact(from_space);
> On 2010/01/13 08:55:30, Søren Gjesse wrote:
> > On 2010/01/12 16:53:36, antonm wrote:
> > > On 2010/01/12 08:07:14, Søren Gjesse wrote:
> > > > How about passing in Heap::map_space() explicitly as the to space here?
> > > 
> > > Sorry, don't quite understand you, could you elaborate?
> > > 
> > > In case it's due to bad naming, just dropped the var :)
> > 
> > My suggenstion was to add another parameter indicating the from space, but
you
> > can ignore that. Thinking about it again how about dropping the current
> > parameter? It's up to you.
> 
> Good idea, done.  I used to depend on it in the body before, but not now. 
Note:
> couldn't drop it completely as it depends on live map count.

I talked with Kasper about adding a test for this. How taking the JavaScript
code from test/mjsunit/regress/regress-524.js and allocate even more to exceed
the map compaction limit and then freeing up data to make map compaction run. It
will probably require a cctest.

Powered by Google App Engine
This is Rietveld 408576698