Mercurial > hg > graal-jvmci-8
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/runtime/safepoint.cpp Wed Jun 27 15:23:36 2012 +0200 +++ b/src/share/vm/runtime/safepoint.cpp Thu Jun 28 17:03:16 2012 -0400 @@ -48,6 +48,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/sweeper.hpp" #include "runtime/synchronizer.hpp" +#include "services/memTracker.hpp" #include "services/runtimeService.hpp" #include "utilities/events.hpp" #ifdef TARGET_ARCH_x86 @@ -546,6 +547,10 @@ if (UseGCLogFileRotation) { gclog_or_tty->rotate_log(); } + + if (MemTracker::is_on()) { + MemTracker::sync(); + } } @@ -1157,7 +1162,7 @@ stats_array_size = PrintSafepointStatisticsCount; } _safepoint_stats = (SafepointStats*)os::malloc(stats_array_size - * sizeof(SafepointStats)); + * sizeof(SafepointStats), mtInternal); guarantee(_safepoint_stats != NULL, "not enough memory for safepoint instrumentation data");