6822263: G1: JVMTI heap iteration fails
Make object_iterate() traverse the perm gen Reviewed-by: apetrusenko, tonyp
This commit is contained in:
parent
cf2ae8d98d
commit
74e0691df5
@ -1722,14 +1722,20 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void G1CollectedHeap::oop_iterate(OopClosure* cl) {
|
||||
void G1CollectedHeap::oop_iterate(OopClosure* cl, bool do_perm) {
|
||||
IterateOopClosureRegionClosure blk(_g1_committed, cl);
|
||||
_hrs->iterate(&blk);
|
||||
if (do_perm) {
|
||||
perm_gen()->oop_iterate(cl);
|
||||
}
|
||||
}
|
||||
|
||||
void G1CollectedHeap::oop_iterate(MemRegion mr, OopClosure* cl) {
|
||||
void G1CollectedHeap::oop_iterate(MemRegion mr, OopClosure* cl, bool do_perm) {
|
||||
IterateOopClosureRegionClosure blk(mr, cl);
|
||||
_hrs->iterate(&blk);
|
||||
if (do_perm) {
|
||||
perm_gen()->oop_iterate(cl);
|
||||
}
|
||||
}
|
||||
|
||||
// Iterates an ObjectClosure over all objects within a HeapRegion.
|
||||
@ -1746,9 +1752,12 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void G1CollectedHeap::object_iterate(ObjectClosure* cl) {
|
||||
void G1CollectedHeap::object_iterate(ObjectClosure* cl, bool do_perm) {
|
||||
IterateObjectClosureRegionClosure blk(cl);
|
||||
_hrs->iterate(&blk);
|
||||
if (do_perm) {
|
||||
perm_gen()->object_iterate(cl);
|
||||
}
|
||||
}
|
||||
|
||||
void G1CollectedHeap::object_iterate_since_last_GC(ObjectClosure* cl) {
|
||||
@ -2375,7 +2384,7 @@ G1CollectedHeap::checkConcurrentMark() {
|
||||
VerifyMarkedObjsClosure verifycl(this);
|
||||
// MutexLockerEx x(getMarkBitMapLock(),
|
||||
// Mutex::_no_safepoint_check_flag);
|
||||
object_iterate(&verifycl);
|
||||
object_iterate(&verifycl, false);
|
||||
}
|
||||
|
||||
void G1CollectedHeap::do_sync_mark() {
|
||||
|
@ -865,14 +865,25 @@ public:
|
||||
|
||||
// Iterate over all the ref-containing fields of all objects, calling
|
||||
// "cl.do_oop" on each.
|
||||
virtual void oop_iterate(OopClosure* cl);
|
||||
virtual void oop_iterate(OopClosure* cl) {
|
||||
oop_iterate(cl, true);
|
||||
}
|
||||
void oop_iterate(OopClosure* cl, bool do_perm);
|
||||
|
||||
// Same as above, restricted to a memory region.
|
||||
virtual void oop_iterate(MemRegion mr, OopClosure* cl);
|
||||
virtual void oop_iterate(MemRegion mr, OopClosure* cl) {
|
||||
oop_iterate(mr, cl, true);
|
||||
}
|
||||
void oop_iterate(MemRegion mr, OopClosure* cl, bool do_perm);
|
||||
|
||||
// Iterate over all objects, calling "cl.do_object" on each.
|
||||
virtual void object_iterate(ObjectClosure* cl);
|
||||
virtual void safe_object_iterate(ObjectClosure* cl) { object_iterate(cl); }
|
||||
virtual void object_iterate(ObjectClosure* cl) {
|
||||
object_iterate(cl, true);
|
||||
}
|
||||
virtual void safe_object_iterate(ObjectClosure* cl) {
|
||||
object_iterate(cl, true);
|
||||
}
|
||||
void object_iterate(ObjectClosure* cl, bool do_perm);
|
||||
|
||||
// Iterate over all objects allocated since the last collection, calling
|
||||
// "cl.do_object" on each. The heap must have been initialized properly
|
||||
|
Loading…
Reference in New Issue
Block a user