< prev index next >
src/hotspot/share/gc/parallel/psParallelCompact.cpp
Print this page
@@ -50,10 +50,11 @@
#include "gc/shared/gcTraceTime.inline.hpp"
#include "gc/shared/isGCActiveMark.hpp"
#include "gc/shared/referencePolicy.hpp"
#include "gc/shared/referenceProcessor.hpp"
#include "gc/shared/spaceDecorator.hpp"
+#include "gc/shared/weakProcessor.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "oops/instanceKlass.inline.hpp"
#include "oops/instanceMirrorKlass.inline.hpp"
#include "oops/methodData.hpp"
@@ -2116,10 +2117,15 @@
gc_tracer->report_gc_reference_stats(stats);
pt.print_all_references();
}
+ {
+ GCTraceTime(Debug, gc, phases) tm("Weak Processing", &_gc_timer);
+ WeakProcessor::weak_oops_do(is_alive_closure(), &mark_and_push_closure, &follow_stack_closure);
+ }
+
// This is the point where the entire marking should have completed.
assert(cm->marking_stacks_empty(), "Marking should have completed");
{
GCTraceTime(Debug, gc, phases) tm_m("Class Unloading", &_gc_timer);
@@ -2168,12 +2174,11 @@
SystemDictionary::oops_do(&oop_closure);
ClassLoaderDataGraph::oops_do(&oop_closure, true);
// Now adjust pointers in remaining weak roots. (All of which should
// have been cleared if they pointed to non-surviving objects.)
- // Global (weak) JNI handles
- JNIHandles::weak_oops_do(&oop_closure);
+ WeakProcessor::oops_do(&oop_closure);
CodeBlobToOopClosure adjust_from_blobs(&oop_closure, CodeBlobToOopClosure::FixRelocations);
CodeCache::blobs_do(&adjust_from_blobs);
AOTLoader::oops_do(&oop_closure);
StringTable::oops_do(&oop_closure);
< prev index next >