< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 47223 : [mq]: heapz8
rev 47224 : [mq]: heap9a
*** 75,84 ****
--- 75,85 ----
#include "memory/iterator.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "prims/resolvedMethodTable.hpp"
#include "runtime/atomic.hpp"
+ #include "runtime/heapMonitoring.hpp"
#include "runtime/init.hpp"
#include "runtime/orderAccess.inline.hpp"
#include "runtime/vmThread.hpp"
#include "utilities/align.hpp"
#include "utilities/globalDefinitions.hpp"
*** 4136,4145 ****
--- 4137,4153 ----
double ref_proc_time = os::elapsedTime() - ref_proc_start;
g1_policy()->phase_times()->record_ref_proc_time(ref_proc_time * 1000.0);
}
+ void G1CollectedHeap::process_heap_monitoring() {
+ log_develop_trace(gc, ref)("Heap Sampler: heap monitoring processing");
+ G1STWIsAliveClosure is_alive(this);
+ G1KeepAliveClosure keep_alive(this);
+ HeapMonitoring::weak_oops_do(&is_alive, &keep_alive);
+ }
+
void G1CollectedHeap::preserve_cm_referents(G1ParScanThreadStateSet* per_thread_states) {
// Any reference objects, in the collection set, that were 'discovered'
// by the CM ref processor should have already been copied (either by
// applying the external root copy closure to the discovered lists, or
// by following an RSet entry).
*** 4367,4376 ****
--- 4375,4385 ----
preserve_cm_referents(per_thread_states);
process_discovered_references(per_thread_states);
} else {
ref_processor_stw()->verify_no_references_recorded();
process_weak_jni_handles();
+ process_heap_monitoring();
}
if (G1StringDedup::is_enabled()) {
double fixup_start = os::elapsedTime();
< prev index next >