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

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

Print this page
rev 4213 : 8008382: Remove redundant use of Atomic::add(jlong, jlong *) in create_new_gc_id()
Summary: There is no need to use atomics in create_new_gc_id() since it is not called by multiple threads in parallel. Also, Atomic::add(jlong, jlong *) is broken for ARM.
Reviewed-by:


 128   if (needs_pll()) {
 129     release_and_notify_pending_list_lock();
 130   }
 131 }
 132 
 133 //////////////////////////////////////////////////////////
 134 // Methods in class VM_CMS_Initial_Mark
 135 //////////////////////////////////////////////////////////
 136 void VM_CMS_Initial_Mark::doit() {
 137   if (lost_race()) {
 138     // Nothing to do.
 139     return;
 140   }
 141 #ifndef USDT2
 142   HS_DTRACE_PROBE(hs_private, cms__initmark__begin);
 143 #else /* USDT2 */
 144   HS_PRIVATE_CMS_INITMARK_BEGIN(
 145                                 );
 146 #endif /* USDT2 */
 147 

 148   _collector->_gc_timer_cm->register_gc_pause_start("Initial Mark", os::elapsed_counter());
 149 
 150   GenCollectedHeap* gch = GenCollectedHeap::heap();
 151   GCCauseSetter gccs(gch, GCCause::_cms_initial_mark);
 152 
 153   VM_CMS_Operation::verify_before_gc();
 154 
 155   IsGCActiveMark x; // stop-world GC active
 156   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial, gch->gc_cause());
 157 
 158   VM_CMS_Operation::verify_after_gc();
 159 
 160   _collector->_gc_timer_cm->register_gc_pause_end(os::elapsed_counter());
 161 
 162 #ifndef USDT2
 163   HS_DTRACE_PROBE(hs_private, cms__initmark__end);
 164 #else /* USDT2 */
 165   HS_PRIVATE_CMS_INITMARK_END(
 166                                 );
 167 #endif /* USDT2 */




 128   if (needs_pll()) {
 129     release_and_notify_pending_list_lock();
 130   }
 131 }
 132 
 133 //////////////////////////////////////////////////////////
 134 // Methods in class VM_CMS_Initial_Mark
 135 //////////////////////////////////////////////////////////
 136 void VM_CMS_Initial_Mark::doit() {
 137   if (lost_race()) {
 138     // Nothing to do.
 139     return;
 140   }
 141 #ifndef USDT2
 142   HS_DTRACE_PROBE(hs_private, cms__initmark__begin);
 143 #else /* USDT2 */
 144   HS_PRIVATE_CMS_INITMARK_BEGIN(
 145                                 );
 146 #endif /* USDT2 */
 147 
 148   _collector->register_gc_start(GCCause::_cms_concurrent_mark);
 149   _collector->_gc_timer_cm->register_gc_pause_start("Initial Mark", os::elapsed_counter());
 150 
 151   GenCollectedHeap* gch = GenCollectedHeap::heap();
 152   GCCauseSetter gccs(gch, GCCause::_cms_initial_mark);
 153 
 154   VM_CMS_Operation::verify_before_gc();
 155 
 156   IsGCActiveMark x; // stop-world GC active
 157   _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial, gch->gc_cause());
 158 
 159   VM_CMS_Operation::verify_after_gc();
 160 
 161   _collector->_gc_timer_cm->register_gc_pause_end(os::elapsed_counter());
 162 
 163 #ifndef USDT2
 164   HS_DTRACE_PROBE(hs_private, cms__initmark__end);
 165 #else /* USDT2 */
 166   HS_PRIVATE_CMS_INITMARK_END(
 167                                 );
 168 #endif /* USDT2 */


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