equal
deleted
inserted
replaced
60 #include "services/management.hpp" |
60 #include "services/management.hpp" |
61 #include "services/memoryService.hpp" |
61 #include "services/memoryService.hpp" |
62 #include "utilities/align.hpp" |
62 #include "utilities/align.hpp" |
63 #include "utilities/events.hpp" |
63 #include "utilities/events.hpp" |
64 #include "utilities/stack.inline.hpp" |
64 #include "utilities/stack.inline.hpp" |
|
65 #if INCLUDE_JVMCI |
|
66 #include "jvmci/jvmci.hpp" |
|
67 #endif |
65 |
68 |
66 elapsedTimer PSMarkSweep::_accumulated_time; |
69 elapsedTimer PSMarkSweep::_accumulated_time; |
67 jlong PSMarkSweep::_time_of_last_gc = 0; |
70 jlong PSMarkSweep::_time_of_last_gc = 0; |
68 CollectorCounters* PSMarkSweep::_counters = NULL; |
71 CollectorCounters* PSMarkSweep::_counters = NULL; |
69 |
72 |
522 JvmtiExport::oops_do(mark_and_push_closure()); |
525 JvmtiExport::oops_do(mark_and_push_closure()); |
523 SystemDictionary::oops_do(mark_and_push_closure()); |
526 SystemDictionary::oops_do(mark_and_push_closure()); |
524 ClassLoaderDataGraph::always_strong_cld_do(follow_cld_closure()); |
527 ClassLoaderDataGraph::always_strong_cld_do(follow_cld_closure()); |
525 // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. |
528 // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. |
526 //ScavengableNMethods::scavengable_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); |
529 //ScavengableNMethods::scavengable_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); |
527 AOTLoader::oops_do(mark_and_push_closure()); |
530 AOT_ONLY(AOTLoader::oops_do(mark_and_push_closure());) |
|
531 JVMCI_ONLY(JVMCI::oops_do(mark_and_push_closure());) |
528 } |
532 } |
529 |
533 |
530 // Flush marking stack. |
534 // Flush marking stack. |
531 follow_stack(); |
535 follow_stack(); |
532 |
536 |
560 // Unload nmethods. |
564 // Unload nmethods. |
561 CodeCache::do_unloading(is_alive_closure(), purged_class); |
565 CodeCache::do_unloading(is_alive_closure(), purged_class); |
562 |
566 |
563 // Prune dead klasses from subklass/sibling/implementor lists. |
567 // Prune dead klasses from subklass/sibling/implementor lists. |
564 Klass::clean_weak_klass_links(purged_class); |
568 Klass::clean_weak_klass_links(purged_class); |
|
569 |
|
570 // Clean JVMCI metadata handles. |
|
571 JVMCI_ONLY(JVMCI::do_unloading(purged_class)); |
565 } |
572 } |
566 |
573 |
567 _gc_tracer->report_object_count_after_gc(is_alive_closure()); |
574 _gc_tracer->report_object_count_after_gc(is_alive_closure()); |
568 } |
575 } |
569 |
576 |
613 // Global (weak) JNI handles |
620 // Global (weak) JNI handles |
614 WeakProcessor::oops_do(adjust_pointer_closure()); |
621 WeakProcessor::oops_do(adjust_pointer_closure()); |
615 |
622 |
616 CodeBlobToOopClosure adjust_from_blobs(adjust_pointer_closure(), CodeBlobToOopClosure::FixRelocations); |
623 CodeBlobToOopClosure adjust_from_blobs(adjust_pointer_closure(), CodeBlobToOopClosure::FixRelocations); |
617 CodeCache::blobs_do(&adjust_from_blobs); |
624 CodeCache::blobs_do(&adjust_from_blobs); |
618 AOTLoader::oops_do(adjust_pointer_closure()); |
625 AOT_ONLY(AOTLoader::oops_do(adjust_pointer_closure());) |
|
626 |
|
627 JVMCI_ONLY(JVMCI::oops_do(adjust_pointer_closure());) |
|
628 |
619 ref_processor()->weak_oops_do(adjust_pointer_closure()); |
629 ref_processor()->weak_oops_do(adjust_pointer_closure()); |
620 PSScavenge::reference_processor()->weak_oops_do(adjust_pointer_closure()); |
630 PSScavenge::reference_processor()->weak_oops_do(adjust_pointer_closure()); |
621 |
631 |
622 adjust_marks(); |
632 adjust_marks(); |
623 |
633 |