--- old/src/share/vm/gc/shared/referenceProcessor.cpp 2017-06-12 10:25:12.026258138 -0700 +++ new/src/share/vm/gc/shared/referenceProcessor.cpp 2017-06-12 10:25:11.910258589 -0700 @@ -37,6 +37,7 @@ #include "oops/oop.inline.hpp" #include "runtime/java.hpp" #include "runtime/jniHandles.hpp" +#include "runtime/heapMonitoring.hpp" ReferencePolicy* ReferenceProcessor::_always_clear_soft_ref_policy = NULL; ReferencePolicy* ReferenceProcessor::_default_soft_ref_policy = NULL; @@ -257,6 +258,7 @@ process_phaseJNI(is_alive, keep_alive, complete_gc); } + HeapMonitoring::do_weak_oops(task_executor, is_alive, keep_alive, complete_gc); log_debug(gc, ref)("Ref Counts: Soft: " SIZE_FORMAT " Weak: " SIZE_FORMAT " Final: " SIZE_FORMAT " Phantom: " SIZE_FORMAT, stats.soft_count(), stats.weak_count(), stats.final_count(), stats.phantom_count()); log_develop_trace(gc, ref)("JNI Weak Reference count: " SIZE_FORMAT, count_jni_refs());