< prev index next >
src/hotspot/share/memory/heapInspection.hpp
Print this page
*** 214,240 ****
class KlassInfoTable;
class KlassInfoClosure;
class HeapInspection : public StackObj {
public:
! void heap_inspection(outputStream* st, size_t parallel_thread_num = 1) NOT_SERVICES_RETURN;
! size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL, size_t parallel_thread_num = 1) NOT_SERVICES_RETURN_(0);
static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
private:
void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
};
! // Task for parallel heap inspection. The parallel inspection can be fail
! // because of native OOM when allocation memory for TL-KlassInfoTable, it
! // will set success to false when OOM so serial inspection can be tried.
! // see work() implementation at heapInspection.cpp for more info.
class ParHeapInspectTask : public AbstractGangTask {
private:
ParallelObjectIterator* _poi;
KlassInfoTable* _shared_cit;
BoolObjectClosure* _filter;
! size_t _shared_missed_count;
bool _success;
Mutex _mutex;
public:
ParHeapInspectTask(ParallelObjectIterator* poi,
--- 214,239 ----
class KlassInfoTable;
class KlassInfoClosure;
class HeapInspection : public StackObj {
public:
! void heap_inspection(outputStream* st, uint parallel_thread_num = 1) NOT_SERVICES_RETURN;
! uint populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL, uint parallel_thread_num = 1) NOT_SERVICES_RETURN_(0);
static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
private:
void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
};
! // Parallel heap inspection task. Parallel inspection can fail due to
! // a native OOM when allocating memory for TL-KlassInfoTable.
! // _success will be set false on an OOM, and serial inspection tried.
class ParHeapInspectTask : public AbstractGangTask {
private:
ParallelObjectIterator* _poi;
KlassInfoTable* _shared_cit;
BoolObjectClosure* _filter;
! uint _missed_count;
bool _success;
Mutex _mutex;
public:
ParHeapInspectTask(ParallelObjectIterator* poi,
*** 242,257 ****
BoolObjectClosure* filter) :
AbstractGangTask("Iterating heap"),
_poi(poi),
_shared_cit(shared_cit),
_filter(filter),
! _shared_missed_count(0),
_success(true),
_mutex(Mutex::leaf, "Parallel heap iteration data merge lock") {}
uint missed_count() const {
! return _shared_missed_count;
}
bool success() {
return _success;
}
--- 241,256 ----
BoolObjectClosure* filter) :
AbstractGangTask("Iterating heap"),
_poi(poi),
_shared_cit(shared_cit),
_filter(filter),
! _missed_count(0),
_success(true),
_mutex(Mutex::leaf, "Parallel heap iteration data merge lock") {}
uint missed_count() const {
! return _missed_count;
}
bool success() {
return _success;
}
< prev index next >