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

Issue 6014004: Implement HeapIterator that skips over unreachable objects. (Closed)

Created:
10 years ago by mnaganov (inactive)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Implement HeapIterator that skips over unreachable objects. I'm using it when creating heap snapshots. I decided that it will be more convenient to have it as a separate piece of code, instead of embedding into the snapshot generator. Committed: http://code.google.com/p/v8/source/detail?r=6091

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -27 lines) Patch
M src/heap.h View 2 chunks +7 lines, -6 lines 0 comments Download
M src/heap.cc View 7 chunks +84 lines, -13 lines 2 comments Download
M src/heap-profiler.cc View 3 chunks +2 lines, -2 lines 0 comments Download
M src/profile-generator.cc View 3 chunks +3 lines, -5 lines 0 comments Download
M test/cctest/test-heap.cc View 2 chunks +63 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
mnaganov (inactive)
10 years ago (2010-12-20 13:52:24 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/6014004/diff/1/src/heap.cc File src/heap.cc (right): http://codereview.chromium.org/6014004/diff/1/src/heap.cc#newcode4965 src/heap.cc:4965: class UnreachableObjectsFilter : public HeapObjectsFilter { Regarding the ...
10 years ago (2010-12-21 09:04:44 UTC) #2
mnaganov (inactive)
10 years ago (2010-12-21 10:48:00 UTC) #3
http://codereview.chromium.org/6014004/diff/1/src/heap.cc
File src/heap.cc (right):

http://codereview.chromium.org/6014004/diff/1/src/heap.cc#newcode4965
src/heap.cc:4965: class UnreachableObjectsFilter : public HeapObjectsFilter {
On 2010/12/21 09:04:44, Søren Gjesse wrote:
> Regarding the marking of unreachable objects - can't you just re-use the
GC-code
> for marking of all live objects and then skip the un-marked ones insteadm?

The problem is: once an object is marked, it doesn't appear as a valid heap
object (you need to get its map_word, unmark it, etc.) That's why I mark those
objects that are to be skipped by the iterator.

Powered by Google App Engine
This is Rietveld 408576698