33 #include "runtime/interfaceSupport.hpp"
34 #include "runtime/os.hpp"
35 #include "utilities/dtrace.hpp"
36
37 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
38
39 #ifndef USDT2
40 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__begin);
41 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__end);
42
43 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__begin);
44 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__end);
45 #endif /* !USDT2 */
46
47 //////////////////////////////////////////////////////////
48 // Methods in abstract class VM_CMS_Operation
49 //////////////////////////////////////////////////////////
50 void VM_CMS_Operation::acquire_pending_list_lock() {
51 // The caller may block while communicating
52 // with the SLT thread in order to acquire/release the PLL.
53 ConcurrentMarkSweepThread::slt()->
54 manipulatePLL(SurrogateLockerThread::acquirePLL);
55 }
56
57 void VM_CMS_Operation::release_and_notify_pending_list_lock() {
58 // The caller may block while communicating
59 // with the SLT thread in order to acquire/release the PLL.
60 ConcurrentMarkSweepThread::slt()->
61 manipulatePLL(SurrogateLockerThread::releaseAndNotifyPLL);
62 }
63
64 void VM_CMS_Operation::verify_before_gc() {
65 if (VerifyBeforeGC &&
66 GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
67 GCTraceTime tm("Verify Before", false, false, _collector->_gc_timer_cm, _collector->_gc_tracer_cm->gc_id());
68 HandleMark hm;
69 FreelistLocker x(_collector);
70 MutexLockerEx y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag);
71 Universe::heap()->prepare_for_verify();
72 Universe::verify();
73 }
74 }
|
33 #include "runtime/interfaceSupport.hpp"
34 #include "runtime/os.hpp"
35 #include "utilities/dtrace.hpp"
36
37 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
38
39 #ifndef USDT2
40 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__begin);
41 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__end);
42
43 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__begin);
44 HS_DTRACE_PROBE_DECL(hs_private, cms__remark__end);
45 #endif /* !USDT2 */
46
47 //////////////////////////////////////////////////////////
48 // Methods in abstract class VM_CMS_Operation
49 //////////////////////////////////////////////////////////
50 void VM_CMS_Operation::acquire_pending_list_lock() {
51 // The caller may block while communicating
52 // with the SLT thread in order to acquire/release the PLL.
53 SurrogateLockerThread* slt = ConcurrentMarkSweepThread::slt();
54 if (slt != NULL) {
55 slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
56 } else {
57 SurrogateLockerThread::report_missing_slt();
58 }
59 }
60
61 void VM_CMS_Operation::release_and_notify_pending_list_lock() {
62 // The caller may block while communicating
63 // with the SLT thread in order to acquire/release the PLL.
64 ConcurrentMarkSweepThread::slt()->
65 manipulatePLL(SurrogateLockerThread::releaseAndNotifyPLL);
66 }
67
68 void VM_CMS_Operation::verify_before_gc() {
69 if (VerifyBeforeGC &&
70 GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
71 GCTraceTime tm("Verify Before", false, false, _collector->_gc_timer_cm, _collector->_gc_tracer_cm->gc_id());
72 HandleMark hm;
73 FreelistLocker x(_collector);
74 MutexLockerEx y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag);
75 Universe::heap()->prepare_for_verify();
76 Universe::verify();
77 }
78 }
|