src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-gc-gccause-full-gc Sdiff src/share/vm/gc_implementation/concurrentMarkSweep

src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp

Print this page




 129 // Methods in class VM_CMS_Initial_Mark
 130 //////////////////////////////////////////////////////////
 131 void VM_CMS_Initial_Mark::doit() {
 132   if (lost_race()) {
 133     // Nothing to do.
 134     return;
 135   }
 136 #ifndef USDT2
 137   HS_DTRACE_PROBE(hs_private, cms__initmark__begin);
 138 #else /* USDT2 */
 139   HS_PRIVATE_CMS_INITMARK_BEGIN(
 140                                 );
 141 #endif /* USDT2 */
 142 
 143   GenCollectedHeap* gch = GenCollectedHeap::heap();
 144   GCCauseSetter gccs(gch, GCCause::_cms_initial_mark);
 145 
 146   VM_CMS_Operation::verify_before_gc();
 147 
 148   IsGCActiveMark x; // stop-world GC active
 149   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial);
 150 
 151   VM_CMS_Operation::verify_after_gc();
 152 #ifndef USDT2
 153   HS_DTRACE_PROBE(hs_private, cms__initmark__end);
 154 #else /* USDT2 */
 155   HS_PRIVATE_CMS_INITMARK_END(
 156                                 );
 157 #endif /* USDT2 */
 158 }
 159 
 160 //////////////////////////////////////////////////////////
 161 // Methods in class VM_CMS_Final_Remark_Operation
 162 //////////////////////////////////////////////////////////
 163 void VM_CMS_Final_Remark::doit() {
 164   if (lost_race()) {
 165     // Nothing to do.
 166     return;
 167   }
 168 #ifndef USDT2
 169   HS_DTRACE_PROBE(hs_private, cms__remark__begin);
 170 #else /* USDT2 */
 171   HS_PRIVATE_CMS_REMARK_BEGIN(
 172                                 );
 173 #endif /* USDT2 */
 174 
 175   GenCollectedHeap* gch = GenCollectedHeap::heap();
 176   GCCauseSetter gccs(gch, GCCause::_cms_final_remark);
 177 
 178   VM_CMS_Operation::verify_before_gc();
 179 
 180   IsGCActiveMark x; // stop-world GC active
 181   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsFinal);
 182 
 183   VM_CMS_Operation::verify_after_gc();
 184 #ifndef USDT2
 185   HS_DTRACE_PROBE(hs_private, cms__remark__end);
 186 #else /* USDT2 */
 187   HS_PRIVATE_CMS_REMARK_END(
 188                                 );
 189 #endif /* USDT2 */
 190 }
 191 
 192 // VM operation to invoke a concurrent collection of a
 193 // GenCollectedHeap heap.
 194 void VM_GenCollectFullConcurrent::doit() {
 195   assert(Thread::current()->is_VM_thread(), "Should be VM thread");
 196   assert(GCLockerInvokesConcurrent || ExplicitGCInvokesConcurrent, "Unexpected");
 197 
 198   GenCollectedHeap* gch = GenCollectedHeap::heap();
 199   if (_gc_count_before == gch->total_collections()) {
 200     // The "full" of do_full_collection call below "forces"
 201     // a collection; the second arg, 0, below ensures that




 129 // Methods in class VM_CMS_Initial_Mark
 130 //////////////////////////////////////////////////////////
 131 void VM_CMS_Initial_Mark::doit() {
 132   if (lost_race()) {
 133     // Nothing to do.
 134     return;
 135   }
 136 #ifndef USDT2
 137   HS_DTRACE_PROBE(hs_private, cms__initmark__begin);
 138 #else /* USDT2 */
 139   HS_PRIVATE_CMS_INITMARK_BEGIN(
 140                                 );
 141 #endif /* USDT2 */
 142 
 143   GenCollectedHeap* gch = GenCollectedHeap::heap();
 144   GCCauseSetter gccs(gch, GCCause::_cms_initial_mark);
 145 
 146   VM_CMS_Operation::verify_before_gc();
 147 
 148   IsGCActiveMark x; // stop-world GC active
 149   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial, gch->gc_cause());
 150 
 151   VM_CMS_Operation::verify_after_gc();
 152 #ifndef USDT2
 153   HS_DTRACE_PROBE(hs_private, cms__initmark__end);
 154 #else /* USDT2 */
 155   HS_PRIVATE_CMS_INITMARK_END(
 156                                 );
 157 #endif /* USDT2 */
 158 }
 159 
 160 //////////////////////////////////////////////////////////
 161 // Methods in class VM_CMS_Final_Remark_Operation
 162 //////////////////////////////////////////////////////////
 163 void VM_CMS_Final_Remark::doit() {
 164   if (lost_race()) {
 165     // Nothing to do.
 166     return;
 167   }
 168 #ifndef USDT2
 169   HS_DTRACE_PROBE(hs_private, cms__remark__begin);
 170 #else /* USDT2 */
 171   HS_PRIVATE_CMS_REMARK_BEGIN(
 172                                 );
 173 #endif /* USDT2 */
 174 
 175   GenCollectedHeap* gch = GenCollectedHeap::heap();
 176   GCCauseSetter gccs(gch, GCCause::_cms_final_remark);
 177 
 178   VM_CMS_Operation::verify_before_gc();
 179 
 180   IsGCActiveMark x; // stop-world GC active
 181   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsFinal, gch->gc_cause());
 182 
 183   VM_CMS_Operation::verify_after_gc();
 184 #ifndef USDT2
 185   HS_DTRACE_PROBE(hs_private, cms__remark__end);
 186 #else /* USDT2 */
 187   HS_PRIVATE_CMS_REMARK_END(
 188                                 );
 189 #endif /* USDT2 */
 190 }
 191 
 192 // VM operation to invoke a concurrent collection of a
 193 // GenCollectedHeap heap.
 194 void VM_GenCollectFullConcurrent::doit() {
 195   assert(Thread::current()->is_VM_thread(), "Should be VM thread");
 196   assert(GCLockerInvokesConcurrent || ExplicitGCInvokesConcurrent, "Unexpected");
 197 
 198   GenCollectedHeap* gch = GenCollectedHeap::heap();
 199   if (_gc_count_before == gch->total_collections()) {
 200     // The "full" of do_full_collection call below "forces"
 201     // a collection; the second arg, 0, below ensures that


src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File