hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
changeset 10739 91935236600e
parent 8684 7ebbd0b3e295
child 12630 ddf6ee008138
equal deleted inserted replaced
10738:cc19612c6b9f 10739:91935236600e
    28 #include "gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp"
    28 #include "gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp"
    29 #include "gc_implementation/shared/isGCActiveMark.hpp"
    29 #include "gc_implementation/shared/isGCActiveMark.hpp"
    30 #include "memory/gcLocker.inline.hpp"
    30 #include "memory/gcLocker.inline.hpp"
    31 #include "runtime/interfaceSupport.hpp"
    31 #include "runtime/interfaceSupport.hpp"
    32 #include "utilities/dtrace.hpp"
    32 #include "utilities/dtrace.hpp"
       
    33 
       
    34 
       
    35 #ifndef USDT2
    33 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__begin);
    36 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__begin);
    34 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__end);
    37 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__end);
    35 
    38 
    36 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__begin);
    39 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__begin);
    37 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__end);
    40 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__end);
       
    41 #endif /* !USDT2 */
    38 
    42 
    39 //////////////////////////////////////////////////////////
    43 //////////////////////////////////////////////////////////
    40 // Methods in abstract class VM_CMS_Operation
    44 // Methods in abstract class VM_CMS_Operation
    41 //////////////////////////////////////////////////////////
    45 //////////////////////////////////////////////////////////
    42 void VM_CMS_Operation::acquire_pending_list_lock() {
    46 void VM_CMS_Operation::acquire_pending_list_lock() {
   127 void VM_CMS_Initial_Mark::doit() {
   131 void VM_CMS_Initial_Mark::doit() {
   128   if (lost_race()) {
   132   if (lost_race()) {
   129     // Nothing to do.
   133     // Nothing to do.
   130     return;
   134     return;
   131   }
   135   }
       
   136 #ifndef USDT2
   132   HS_DTRACE_PROBE(hs_private, cms__initmark__begin);
   137   HS_DTRACE_PROBE(hs_private, cms__initmark__begin);
       
   138 #else /* USDT2 */
       
   139   HS_PRIVATE_CMS_INITMARK_BEGIN(
       
   140                                 );
       
   141 #endif /* USDT2 */
   133 
   142 
   134   GenCollectedHeap* gch = GenCollectedHeap::heap();
   143   GenCollectedHeap* gch = GenCollectedHeap::heap();
   135   GCCauseSetter gccs(gch, GCCause::_cms_initial_mark);
   144   GCCauseSetter gccs(gch, GCCause::_cms_initial_mark);
   136 
   145 
   137   VM_CMS_Operation::verify_before_gc();
   146   VM_CMS_Operation::verify_before_gc();
   138 
   147 
   139   IsGCActiveMark x; // stop-world GC active
   148   IsGCActiveMark x; // stop-world GC active
   140   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial);
   149   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial);
   141 
   150 
   142   VM_CMS_Operation::verify_after_gc();
   151   VM_CMS_Operation::verify_after_gc();
       
   152 #ifndef USDT2
   143   HS_DTRACE_PROBE(hs_private, cms__initmark__end);
   153   HS_DTRACE_PROBE(hs_private, cms__initmark__end);
       
   154 #else /* USDT2 */
       
   155   HS_PRIVATE_CMS_INITMARK_END(
       
   156                                 );
       
   157 #endif /* USDT2 */
   144 }
   158 }
   145 
   159 
   146 //////////////////////////////////////////////////////////
   160 //////////////////////////////////////////////////////////
   147 // Methods in class VM_CMS_Final_Remark_Operation
   161 // Methods in class VM_CMS_Final_Remark_Operation
   148 //////////////////////////////////////////////////////////
   162 //////////////////////////////////////////////////////////
   149 void VM_CMS_Final_Remark::doit() {
   163 void VM_CMS_Final_Remark::doit() {
   150   if (lost_race()) {
   164   if (lost_race()) {
   151     // Nothing to do.
   165     // Nothing to do.
   152     return;
   166     return;
   153   }
   167   }
       
   168 #ifndef USDT2
   154   HS_DTRACE_PROBE(hs_private, cms__remark__begin);
   169   HS_DTRACE_PROBE(hs_private, cms__remark__begin);
       
   170 #else /* USDT2 */
       
   171   HS_PRIVATE_CMS_REMARK_BEGIN(
       
   172                                 );
       
   173 #endif /* USDT2 */
   155 
   174 
   156   GenCollectedHeap* gch = GenCollectedHeap::heap();
   175   GenCollectedHeap* gch = GenCollectedHeap::heap();
   157   GCCauseSetter gccs(gch, GCCause::_cms_final_remark);
   176   GCCauseSetter gccs(gch, GCCause::_cms_final_remark);
   158 
   177 
   159   VM_CMS_Operation::verify_before_gc();
   178   VM_CMS_Operation::verify_before_gc();
   160 
   179 
   161   IsGCActiveMark x; // stop-world GC active
   180   IsGCActiveMark x; // stop-world GC active
   162   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsFinal);
   181   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsFinal);
   163 
   182 
   164   VM_CMS_Operation::verify_after_gc();
   183   VM_CMS_Operation::verify_after_gc();
       
   184 #ifndef USDT2
   165   HS_DTRACE_PROBE(hs_private, cms__remark__end);
   185   HS_DTRACE_PROBE(hs_private, cms__remark__end);
       
   186 #else /* USDT2 */
       
   187   HS_PRIVATE_CMS_REMARK_END(
       
   188                                 );
       
   189 #endif /* USDT2 */
   166 }
   190 }
   167 
   191 
   168 // VM operation to invoke a concurrent collection of a
   192 // VM operation to invoke a concurrent collection of a
   169 // GenCollectedHeap heap.
   193 // GenCollectedHeap heap.
   170 void VM_GenCollectFullConcurrent::doit() {
   194 void VM_GenCollectFullConcurrent::doit() {