48 #include "runtime/stubCodeGenerator.hpp" |
48 #include "runtime/stubCodeGenerator.hpp" |
49 #include "runtime/stubRoutines.hpp" |
49 #include "runtime/stubRoutines.hpp" |
50 #include "runtime/sweeper.hpp" |
50 #include "runtime/sweeper.hpp" |
51 #include "runtime/synchronizer.hpp" |
51 #include "runtime/synchronizer.hpp" |
52 #include "runtime/thread.inline.hpp" |
52 #include "runtime/thread.inline.hpp" |
53 #include "services/memTracker.hpp" |
|
54 #include "services/runtimeService.hpp" |
53 #include "services/runtimeService.hpp" |
55 #include "utilities/events.hpp" |
54 #include "utilities/events.hpp" |
56 #include "utilities/macros.hpp" |
55 #include "utilities/macros.hpp" |
57 #ifdef TARGET_ARCH_x86 |
56 #ifdef TARGET_ARCH_x86 |
58 # include "nativeInst_x86.hpp" |
57 # include "nativeInst_x86.hpp" |
545 // CMS delays purging the CLDG until the beginning of the next safepoint and to |
544 // CMS delays purging the CLDG until the beginning of the next safepoint and to |
546 // make sure concurrent sweep is done |
545 // make sure concurrent sweep is done |
547 TraceTime t7("purging class loader data graph", TraceSafepointCleanupTime); |
546 TraceTime t7("purging class loader data graph", TraceSafepointCleanupTime); |
548 ClassLoaderDataGraph::purge_if_needed(); |
547 ClassLoaderDataGraph::purge_if_needed(); |
549 } |
548 } |
550 |
|
551 if (MemTracker::is_on()) { |
|
552 MemTracker::sync(); |
|
553 } |
|
554 } |
549 } |
555 |
550 |
556 |
551 |
557 bool SafepointSynchronize::safepoint_safe(JavaThread *thread, JavaThreadState state) { |
552 bool SafepointSynchronize::safepoint_safe(JavaThread *thread, JavaThreadState state) { |
558 switch(state) { |
553 switch(state) { |