comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @ 22294:d86b226e331a

Enable derived oop processing by the GC with JVMCI
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 21 Jul 2015 15:00:07 -0700
parents 7848fc12602b
children c28cb37b2e1d
comparison
equal deleted inserted replaced
22272:b6d504612b3f 22294:d86b226e331a
2545 NOT_PRODUCT(GCTraceTime t("CMS:MS (foreground) ", PrintGCDetails && Verbose, 2545 NOT_PRODUCT(GCTraceTime t("CMS:MS (foreground) ", PrintGCDetails && Verbose,
2546 true, NULL, gc_id);) 2546 true, NULL, gc_id);)
2547 if (UseAdaptiveSizePolicy) { 2547 if (UseAdaptiveSizePolicy) {
2548 size_policy()->ms_collection_begin(); 2548 size_policy()->ms_collection_begin();
2549 } 2549 }
2550 COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact); 2550 #if defined(COMPILER2) || defined(JVMCI)
2551 DerivedPointerTableDeactivate dpt_deact;
2552 #endif
2551 2553
2552 HandleMark hm; // Discard invalid handles created during verification 2554 HandleMark hm; // Discard invalid handles created during verification
2553 2555
2554 if (VerifyBeforeGC && 2556 if (VerifyBeforeGC &&
2555 GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) { 2557 GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
3019 // and traced those that need to be marked; moreover, 3021 // and traced those that need to be marked; moreover,
3020 // the marking done here is not going to intefere in any 3022 // the marking done here is not going to intefere in any
3021 // way with the marking information used by GC. 3023 // way with the marking information used by GC.
3022 NoRefDiscovery no_discovery(ref_processor()); 3024 NoRefDiscovery no_discovery(ref_processor());
3023 3025
3024 COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact;) 3026 #if defined(COMPILER2) || defined(JVMCI)
3027 DerivedPointerTableDeactivate dpt_deact;
3028 #endif
3025 3029
3026 // Clear any marks from a previous round 3030 // Clear any marks from a previous round
3027 verification_mark_bm()->clear_all(); 3031 verification_mark_bm()->clear_all();
3028 assert(verification_mark_stack()->isEmpty(), "markStack should be empty"); 3032 assert(verification_mark_stack()->isEmpty(), "markStack should be empty");
3029 verify_work_stacks_empty(); 3033 verify_work_stacks_empty();
3727 if (CMSPrintEdenSurvivorChunks) { 3731 if (CMSPrintEdenSurvivorChunks) {
3728 print_eden_and_survivor_chunk_arrays(); 3732 print_eden_and_survivor_chunk_arrays();
3729 } 3733 }
3730 3734
3731 { 3735 {
3732 COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact;) 3736 #if defined(COMPILER2) || defined(JVMCI)
3737 DerivedPointerTableDeactivate dpt_deact;
3738 #endif
3733 if (CMSParallelInitialMarkEnabled && CollectedHeap::use_parallel_gc_threads()) { 3739 if (CMSParallelInitialMarkEnabled && CollectedHeap::use_parallel_gc_threads()) {
3734 // The parallel version. 3740 // The parallel version.
3735 FlexibleWorkGang* workers = gch->workers(); 3741 FlexibleWorkGang* workers = gch->workers();
3736 assert(workers != NULL, "Need parallel worker threads."); 3742 assert(workers != NULL, "Need parallel worker threads.");
3737 int n_workers = workers->active_workers(); 3743 int n_workers = workers->active_workers();
5117 if (CMSPrintEdenSurvivorChunks) { 5123 if (CMSPrintEdenSurvivorChunks) {
5118 print_eden_and_survivor_chunk_arrays(); 5124 print_eden_and_survivor_chunk_arrays();
5119 } 5125 }
5120 5126
5121 { 5127 {
5122 COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact;) 5128 #if defined(COMPILER2) || defined(JVMCI)
5129 DerivedPointerTableDeactivate dpt_deact;
5130 #endif
5123 5131
5124 // Note on the role of the mod union table: 5132 // Note on the role of the mod union table:
5125 // Since the marker in "markFromRoots" marks concurrently with 5133 // Since the marker in "markFromRoots" marks concurrently with
5126 // mutators, it is possible for some reachable objects not to have been 5134 // mutators, it is possible for some reachable objects not to have been
5127 // scanned. For instance, an only reference to an object A was 5135 // scanned. For instance, an only reference to an object A was