comparison src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents e6195383bcaf
children 52b4284cb496
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
33 #include "runtime/interfaceSupport.hpp" 33 #include "runtime/interfaceSupport.hpp"
34 #include "runtime/os.hpp" 34 #include "runtime/os.hpp"
35 #include "utilities/dtrace.hpp" 35 #include "utilities/dtrace.hpp"
36 36
37 37
38 #ifndef USDT2
39 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__begin);
40 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__end);
41
42 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__begin);
43 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__end);
44 #endif /* !USDT2 */
45
38 ////////////////////////////////////////////////////////// 46 //////////////////////////////////////////////////////////
39 // Methods in abstract class VM_CMS_Operation 47 // Methods in abstract class VM_CMS_Operation
40 ////////////////////////////////////////////////////////// 48 //////////////////////////////////////////////////////////
41 void VM_CMS_Operation::acquire_pending_list_lock() { 49 void VM_CMS_Operation::acquire_pending_list_lock() {
42 // The caller may block while communicating 50 // The caller may block while communicating
128 void VM_CMS_Initial_Mark::doit() { 136 void VM_CMS_Initial_Mark::doit() {
129 if (lost_race()) { 137 if (lost_race()) {
130 // Nothing to do. 138 // Nothing to do.
131 return; 139 return;
132 } 140 }
133 HS_PRIVATE_CMS_INITMARK_BEGIN(); 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 */
134 147
135 _collector->_gc_timer_cm->register_gc_pause_start("Initial Mark"); 148 _collector->_gc_timer_cm->register_gc_pause_start("Initial Mark");
136 149
137 GenCollectedHeap* gch = GenCollectedHeap::heap(); 150 GenCollectedHeap* gch = GenCollectedHeap::heap();
138 GCCauseSetter gccs(gch, GCCause::_cms_initial_mark); 151 GCCauseSetter gccs(gch, GCCause::_cms_initial_mark);
144 157
145 VM_CMS_Operation::verify_after_gc(); 158 VM_CMS_Operation::verify_after_gc();
146 159
147 _collector->_gc_timer_cm->register_gc_pause_end(); 160 _collector->_gc_timer_cm->register_gc_pause_end();
148 161
149 HS_PRIVATE_CMS_INITMARK_END(); 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 */
150 } 168 }
151 169
152 ////////////////////////////////////////////////////////// 170 //////////////////////////////////////////////////////////
153 // Methods in class VM_CMS_Final_Remark_Operation 171 // Methods in class VM_CMS_Final_Remark_Operation
154 ////////////////////////////////////////////////////////// 172 //////////////////////////////////////////////////////////
155 void VM_CMS_Final_Remark::doit() { 173 void VM_CMS_Final_Remark::doit() {
156 if (lost_race()) { 174 if (lost_race()) {
157 // Nothing to do. 175 // Nothing to do.
158 return; 176 return;
159 } 177 }
160 HS_PRIVATE_CMS_REMARK_BEGIN(); 178 #ifndef USDT2
179 HS_DTRACE_PROBE(hs_private, cms__remark__begin);
180 #else /* USDT2 */
181 HS_PRIVATE_CMS_REMARK_BEGIN(
182 );
183 #endif /* USDT2 */
161 184
162 _collector->_gc_timer_cm->register_gc_pause_start("Final Mark"); 185 _collector->_gc_timer_cm->register_gc_pause_start("Final Mark");
163 186
164 GenCollectedHeap* gch = GenCollectedHeap::heap(); 187 GenCollectedHeap* gch = GenCollectedHeap::heap();
165 GCCauseSetter gccs(gch, GCCause::_cms_final_remark); 188 GCCauseSetter gccs(gch, GCCause::_cms_final_remark);
172 VM_CMS_Operation::verify_after_gc(); 195 VM_CMS_Operation::verify_after_gc();
173 196
174 _collector->save_heap_summary(); 197 _collector->save_heap_summary();
175 _collector->_gc_timer_cm->register_gc_pause_end(); 198 _collector->_gc_timer_cm->register_gc_pause_end();
176 199
177 HS_PRIVATE_CMS_REMARK_END(); 200 #ifndef USDT2
201 HS_DTRACE_PROBE(hs_private, cms__remark__end);
202 #else /* USDT2 */
203 HS_PRIVATE_CMS_REMARK_END(
204 );
205 #endif /* USDT2 */
178 } 206 }
179 207
180 // VM operation to invoke a concurrent collection of a 208 // VM operation to invoke a concurrent collection of a
181 // GenCollectedHeap heap. 209 // GenCollectedHeap heap.
182 void VM_GenCollectFullConcurrent::doit() { 210 void VM_GenCollectFullConcurrent::doit() {
228 GenCollectedHeap* gch = GenCollectedHeap::heap(); 256 GenCollectedHeap* gch = GenCollectedHeap::heap();
229 if (_gc_count_before != gch->total_collections()) { 257 if (_gc_count_before != gch->total_collections()) {
230 // No need to do a young gc, we'll just nudge the CMS thread 258 // No need to do a young gc, we'll just nudge the CMS thread
231 // in the doit() method above, to be executed soon. 259 // in the doit() method above, to be executed soon.
232 assert(_gc_count_before < gch->total_collections(), 260 assert(_gc_count_before < gch->total_collections(),
233 "total_collections() should be monotonically increasing"); 261 "total_collections() should be monotnically increasing");
234 return false; // no need for foreground young gc 262 return false; // no need for foreground young gc
235 } 263 }
236 } 264 }
237 return true; // may still need foreground young gc 265 return true; // may still need foreground young gc
238 } 266 }