< prev index next >

src/hotspot/share/memory/heapInspection.cpp

Print this page

        

*** 516,526 **** }; class RecordInstanceClosure : public ObjectClosure { private: KlassInfoTable* _cit; ! uint _missed_count; BoolObjectClosure* _filter; public: RecordInstanceClosure(KlassInfoTable* cit, BoolObjectClosure* filter) : _cit(cit), _missed_count(0), _filter(filter) {} --- 516,526 ---- }; class RecordInstanceClosure : public ObjectClosure { private: KlassInfoTable* _cit; ! uintx _missed_count; BoolObjectClosure* _filter; public: RecordInstanceClosure(KlassInfoTable* cit, BoolObjectClosure* filter) : _cit(cit), _missed_count(0), _filter(filter) {}
*** 530,551 **** _missed_count++; } } } ! uint missed_count() { return _missed_count; } private: bool should_visit(oop obj) { return _filter == NULL || _filter->do_object_b(obj); } }; // Heap inspection for every worker. // When native OOM hanppens for KlassInfoTable, set _success to false. void ParHeapInspectTask::work(uint worker_id) { ! uint missed_count = 0; bool merge_success = true; if (!Atomic::load(&_success)) { // other worker has failed on parallel iteration. return; } --- 530,551 ---- _missed_count++; } } } ! uintx missed_count() { return _missed_count; } private: bool should_visit(oop obj) { return _filter == NULL || _filter->do_object_b(obj); } }; // Heap inspection for every worker. // When native OOM hanppens for KlassInfoTable, set _success to false. void ParHeapInspectTask::work(uint worker_id) { ! uintx missed_count = 0; bool merge_success = true; if (!Atomic::load(&_success)) { // other worker has failed on parallel iteration. return; }
*** 568,578 **** } else { Atomic::store(&_success, false); } } ! uint HeapInspection::populate_table(KlassInfoTable* cit, BoolObjectClosure *filter, uint parallel_thread_num) { // Try parallel first. if (parallel_thread_num > 1) { ResourceMark rm; ParallelObjectIterator* poi = Universe::heap()->parallel_object_iterator(parallel_thread_num); --- 568,578 ---- } else { Atomic::store(&_success, false); } } ! uintx HeapInspection::populate_table(KlassInfoTable* cit, BoolObjectClosure *filter, uint parallel_thread_num) { // Try parallel first. if (parallel_thread_num > 1) { ResourceMark rm; ParallelObjectIterator* poi = Universe::heap()->parallel_object_iterator(parallel_thread_num);
*** 597,607 **** ResourceMark rm; KlassInfoTable cit(false); if (!cit.allocation_failed()) { // populate table with object allocation info ! uint missed_count = populate_table(&cit, NULL, parallel_thread_num); if (missed_count != 0) { log_info(gc, classhisto)("WARNING: Ran out of C-heap; undercounted " UINTX_FORMAT " total instances in data below", (uintx)missed_count); } --- 597,607 ---- ResourceMark rm; KlassInfoTable cit(false); if (!cit.allocation_failed()) { // populate table with object allocation info ! uintx missed_count = populate_table(&cit, NULL, parallel_thread_num); if (missed_count != 0) { log_info(gc, classhisto)("WARNING: Ran out of C-heap; undercounted " UINTX_FORMAT " total instances in data below", (uintx)missed_count); }
< prev index next >