Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/safepoint.cpp @ 6197:d2a62e0f25eb
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking
Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd
Reviewed-by: acorn, coleenp, fparain
author | zgu |
---|---|
date | Thu, 28 Jun 2012 17:03:16 -0400 |
parents | e9140bf80b4a |
children | 957c266d8bc5 f34d701e952e |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
46 #include "runtime/signature.hpp" | 46 #include "runtime/signature.hpp" |
47 #include "runtime/stubCodeGenerator.hpp" | 47 #include "runtime/stubCodeGenerator.hpp" |
48 #include "runtime/stubRoutines.hpp" | 48 #include "runtime/stubRoutines.hpp" |
49 #include "runtime/sweeper.hpp" | 49 #include "runtime/sweeper.hpp" |
50 #include "runtime/synchronizer.hpp" | 50 #include "runtime/synchronizer.hpp" |
51 #include "services/memTracker.hpp" | |
51 #include "services/runtimeService.hpp" | 52 #include "services/runtimeService.hpp" |
52 #include "utilities/events.hpp" | 53 #include "utilities/events.hpp" |
53 #ifdef TARGET_ARCH_x86 | 54 #ifdef TARGET_ARCH_x86 |
54 # include "nativeInst_x86.hpp" | 55 # include "nativeInst_x86.hpp" |
55 # include "vmreg_x86.inline.hpp" | 56 # include "vmreg_x86.inline.hpp" |
544 | 545 |
545 // rotate log files? | 546 // rotate log files? |
546 if (UseGCLogFileRotation) { | 547 if (UseGCLogFileRotation) { |
547 gclog_or_tty->rotate_log(); | 548 gclog_or_tty->rotate_log(); |
548 } | 549 } |
550 | |
551 if (MemTracker::is_on()) { | |
552 MemTracker::sync(); | |
553 } | |
549 } | 554 } |
550 | 555 |
551 | 556 |
552 bool SafepointSynchronize::safepoint_safe(JavaThread *thread, JavaThreadState state) { | 557 bool SafepointSynchronize::safepoint_safe(JavaThread *thread, JavaThreadState state) { |
553 switch(state) { | 558 switch(state) { |
1155 PrintSafepointStatistics = true; | 1160 PrintSafepointStatistics = true; |
1156 } else { | 1161 } else { |
1157 stats_array_size = PrintSafepointStatisticsCount; | 1162 stats_array_size = PrintSafepointStatisticsCount; |
1158 } | 1163 } |
1159 _safepoint_stats = (SafepointStats*)os::malloc(stats_array_size | 1164 _safepoint_stats = (SafepointStats*)os::malloc(stats_array_size |
1160 * sizeof(SafepointStats)); | 1165 * sizeof(SafepointStats), mtInternal); |
1161 guarantee(_safepoint_stats != NULL, | 1166 guarantee(_safepoint_stats != NULL, |
1162 "not enough memory for safepoint instrumentation data"); | 1167 "not enough memory for safepoint instrumentation data"); |
1163 | 1168 |
1164 if (UseCompilerSafepoints && DeferPollingPageLoopCount >= 0) { | 1169 if (UseCompilerSafepoints && DeferPollingPageLoopCount >= 0) { |
1165 need_to_track_page_armed_status = true; | 1170 need_to_track_page_armed_status = true; |