equal
deleted
inserted
replaced
75 #include "utilities/debug.hpp" |
75 #include "utilities/debug.hpp" |
76 #include "utilities/events.hpp" |
76 #include "utilities/events.hpp" |
77 #include "utilities/formatBuffer.hpp" |
77 #include "utilities/formatBuffer.hpp" |
78 #include "utilities/macros.hpp" |
78 #include "utilities/macros.hpp" |
79 #include "utilities/stack.inline.hpp" |
79 #include "utilities/stack.inline.hpp" |
|
80 #if INCLUDE_JVMCI |
|
81 #include "jvmci/jvmci.hpp" |
|
82 #endif |
80 |
83 |
81 #include <math.h> |
84 #include <math.h> |
82 |
85 |
83 // All sizes are in HeapWords. |
86 // All sizes are in HeapWords. |
84 const size_t ParallelCompactData::Log2RegionSize = 16; // 64K words |
87 const size_t ParallelCompactData::Log2RegionSize = 16; // 64K words |
2121 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::management)); |
2124 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::management)); |
2122 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::system_dictionary)); |
2125 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::system_dictionary)); |
2123 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::class_loader_data)); |
2126 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::class_loader_data)); |
2124 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmti)); |
2127 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmti)); |
2125 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::code_cache)); |
2128 q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::code_cache)); |
|
2129 JVMCI_ONLY(q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmci));) |
2126 |
2130 |
2127 if (active_gc_threads > 1) { |
2131 if (active_gc_threads > 1) { |
2128 for (uint j = 0; j < active_gc_threads; j++) { |
2132 for (uint j = 0; j < active_gc_threads; j++) { |
2129 q->enqueue(new StealMarkingTask(terminator.terminator())); |
2133 q->enqueue(new StealMarkingTask(terminator.terminator())); |
2130 } |
2134 } |
2174 // Unload nmethods. |
2178 // Unload nmethods. |
2175 CodeCache::do_unloading(is_alive_closure(), purged_class); |
2179 CodeCache::do_unloading(is_alive_closure(), purged_class); |
2176 |
2180 |
2177 // Prune dead klasses from subklass/sibling/implementor lists. |
2181 // Prune dead klasses from subklass/sibling/implementor lists. |
2178 Klass::clean_weak_klass_links(purged_class); |
2182 Klass::clean_weak_klass_links(purged_class); |
|
2183 |
|
2184 // Clean JVMCI metadata handles. |
|
2185 JVMCI_ONLY(JVMCI::do_unloading(purged_class)); |
2179 } |
2186 } |
2180 |
2187 |
2181 _gc_tracer.report_object_count_after_gc(is_alive_closure()); |
2188 _gc_tracer.report_object_count_after_gc(is_alive_closure()); |
2182 } |
2189 } |
2183 |
2190 |
2205 // have been cleared if they pointed to non-surviving objects.) |
2212 // have been cleared if they pointed to non-surviving objects.) |
2206 WeakProcessor::oops_do(&oop_closure); |
2213 WeakProcessor::oops_do(&oop_closure); |
2207 |
2214 |
2208 CodeBlobToOopClosure adjust_from_blobs(&oop_closure, CodeBlobToOopClosure::FixRelocations); |
2215 CodeBlobToOopClosure adjust_from_blobs(&oop_closure, CodeBlobToOopClosure::FixRelocations); |
2209 CodeCache::blobs_do(&adjust_from_blobs); |
2216 CodeCache::blobs_do(&adjust_from_blobs); |
2210 AOTLoader::oops_do(&oop_closure); |
2217 AOT_ONLY(AOTLoader::oops_do(&oop_closure);) |
|
2218 |
|
2219 JVMCI_ONLY(JVMCI::oops_do(&oop_closure);) |
|
2220 |
2211 ref_processor()->weak_oops_do(&oop_closure); |
2221 ref_processor()->weak_oops_do(&oop_closure); |
2212 // Roots were visited so references into the young gen in roots |
2222 // Roots were visited so references into the young gen in roots |
2213 // may have been scanned. Process them also. |
2223 // may have been scanned. Process them also. |
2214 // Should the reference processor have a span that excludes |
2224 // Should the reference processor have a span that excludes |
2215 // young gen objects? |
2225 // young gen objects? |