< prev index next >
src/share/vm/memory/heapInspection.cpp
Print this page
rev 11777 : [mq]: gcinterface.patch
*** 702,712 ****
size_t HeapInspection::populate_table(KlassInfoTable* cit, BoolObjectClosure *filter) {
ResourceMark rm;
RecordInstanceClosure ric(cit, filter);
! Universe::heap()->object_iterate(&ric);
return ric.missed_count();
}
void HeapInspection::heap_inspection(outputStream* st) {
ResourceMark rm;
--- 702,712 ----
size_t HeapInspection::populate_table(KlassInfoTable* cit, BoolObjectClosure *filter) {
ResourceMark rm;
RecordInstanceClosure ric(cit, filter);
! GC::gc()->heap()->object_iterate(&ric);
return ric.missed_count();
}
void HeapInspection::heap_inspection(outputStream* st) {
ResourceMark rm;
*** 771,784 ****
void HeapInspection::find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) {
assert(SafepointSynchronize::is_at_safepoint(), "all threads are stopped");
assert(Heap_lock->is_locked(), "should have the Heap_lock");
// Ensure that the heap is parsable
! Universe::heap()->ensure_parsability(false); // no need to retire TALBs
// Iterate over objects in the heap
FindInstanceClosure fic(k, result);
// If this operation encounters a bad object when using CMS,
// consider using safe_object_iterate() which avoids metadata
// objects that may contain bad references.
! Universe::heap()->object_iterate(&fic);
}
--- 771,784 ----
void HeapInspection::find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) {
assert(SafepointSynchronize::is_at_safepoint(), "all threads are stopped");
assert(Heap_lock->is_locked(), "should have the Heap_lock");
// Ensure that the heap is parsable
! GC::gc()->heap()->ensure_parsability(false); // no need to retire TALBs
// Iterate over objects in the heap
FindInstanceClosure fic(k, result);
// If this operation encounters a bad object when using CMS,
// consider using safe_object_iterate() which avoids metadata
// objects that may contain bad references.
! GC::gc()->heap()->object_iterate(&fic);
}
< prev index next >