Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
During marking, when we move live objects during evacuation pauses, we actually have to propagate their marks along with them and also notify the marking threads that those objects have been moved. Consider that, during a marking cycle, we might do several evacuation pauses. It's likely that most of the objects that we copy to the survivor spaces would be objects that were allocated after the cycle started (i.e., all the objects copied from the eden to survivors during marking and after the initial-mark pause). But, according to the SATB invariant, we do not actually have to visit objects allocated after the snapshot has been taken. In fact, the only objects the marking phase really needs to visit in the survivor regions during marking are all the objects that were originally located in the survivor regions at the end of the initial-mark pause. Unfortunately, given that we do not segregate objects in regions according to age, it's not straightforward to keep track of which objects should be explicitly marked and visited by the marking threads and which were allocated during the marking cycle and we should consider them implicitly live. But, it would be a nice performance improvement to arrange it so that we avoid marking and scanning all survivor objects allocated during the marking cycle. The pause itself would be faster, as no object marking would be necessary and the marking threads would also have less overhead, as they would not have to deal with objects being moved during each GC pause.
|