equal
deleted
inserted
replaced
26 #include "gc/cms/concurrentMarkSweepGeneration.inline.hpp" |
26 #include "gc/cms/concurrentMarkSweepGeneration.inline.hpp" |
27 #include "gc/cms/concurrentMarkSweepThread.hpp" |
27 #include "gc/cms/concurrentMarkSweepThread.hpp" |
28 #include "gc/cms/vmCMSOperations.hpp" |
28 #include "gc/cms/vmCMSOperations.hpp" |
29 #include "gc/shared/gcLocker.inline.hpp" |
29 #include "gc/shared/gcLocker.inline.hpp" |
30 #include "gc/shared/gcTimer.hpp" |
30 #include "gc/shared/gcTimer.hpp" |
31 #include "gc/shared/gcTraceTime.hpp" |
31 #include "gc/shared/gcTraceTime.inline.hpp" |
32 #include "gc/shared/isGCActiveMark.hpp" |
32 #include "gc/shared/isGCActiveMark.hpp" |
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 |
56 } |
56 } |
57 |
57 |
58 void VM_CMS_Operation::verify_before_gc() { |
58 void VM_CMS_Operation::verify_before_gc() { |
59 if (VerifyBeforeGC && |
59 if (VerifyBeforeGC && |
60 GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) { |
60 GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) { |
61 GCTraceTime tm("Verify Before", false, false, _collector->_gc_timer_cm); |
61 GCTraceTime(Info, gc, verify) tm("Verify Before", _collector->_gc_timer_cm); |
62 HandleMark hm; |
62 HandleMark hm; |
63 FreelistLocker x(_collector); |
63 FreelistLocker x(_collector); |
64 MutexLockerEx y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag); |
64 MutexLockerEx y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag); |
65 GenCollectedHeap::heap()->prepare_for_verify(); |
65 GenCollectedHeap::heap()->prepare_for_verify(); |
66 Universe::verify(); |
66 Universe::verify(); |
68 } |
68 } |
69 |
69 |
70 void VM_CMS_Operation::verify_after_gc() { |
70 void VM_CMS_Operation::verify_after_gc() { |
71 if (VerifyAfterGC && |
71 if (VerifyAfterGC && |
72 GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) { |
72 GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) { |
73 GCTraceTime tm("Verify After", false, false, _collector->_gc_timer_cm); |
73 GCTraceTime(Info, gc, verify) tm("Verify After", _collector->_gc_timer_cm); |
74 HandleMark hm; |
74 HandleMark hm; |
75 FreelistLocker x(_collector); |
75 FreelistLocker x(_collector); |
76 MutexLockerEx y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag); |
76 MutexLockerEx y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag); |
77 Universe::verify(); |
77 Universe::verify(); |
78 } |
78 } |