6689653: JMapPerm fails with UseConcMarkSweepIncGC and compressed oops off

Added safe_object_iterate() for use by JMapPerm.

Reviewed-by: tonyp
This commit is contained in:
Jon Masamitsu 2009-01-06 07:05:05 -08:00
parent 34c4172bfe
commit 3474623106
16 changed files with 100 additions and 2 deletions

View file

@ -319,6 +319,21 @@ void Generation::object_iterate(ObjectClosure* cl) {
space_iterate(&blk);
}
class GenerationSafeObjIterateClosure : public SpaceClosure {
private:
ObjectClosure* _cl;
public:
virtual void do_space(Space* s) {
s->safe_object_iterate(_cl);
}
GenerationSafeObjIterateClosure(ObjectClosure* cl) : _cl(cl) {}
};
void Generation::safe_object_iterate(ObjectClosure* cl) {
GenerationSafeObjIterateClosure blk(cl);
space_iterate(&blk);
}
void Generation::prepare_for_compaction(CompactPoint* cp) {
// Generic implementation, can be specialized
CompactibleSpace* space = first_compaction_space();