diff --git a/src/hotspot/share/gc/shared/gcLocker.cpp b/src/hotspot/share/gc/shared/gcLocker.cpp index e2e6a1026b94b..bb8e02c00bf67 100644 --- a/src/hotspot/share/gc/shared/gcLocker.cpp +++ b/src/hotspot/share/gc/shared/gcLocker.cpp @@ -33,6 +33,7 @@ #include "runtime/javaThread.inline.hpp" #include "runtime/safepoint.hpp" #include "runtime/threadSMR.hpp" +#include "runtime/timer.hpp" volatile jint GCLocker::_jni_lock_count = 0; volatile bool GCLocker::_needs_gc = false; @@ -88,7 +89,7 @@ void GCLocker::log_debug_jni(const char* msg) { } } -void GCLocker::log_debug_jni(const char* msg, elapsedTimer elapsed_timer) { +void GCLocker::log_debug_jni(const char* msg, const elapsedTimer elapsed_timer) { Log(gc, jni) log; if (log.is_debug()) { ResourceMark rm; // JavaThread::name() allocates to convert to UTF8 diff --git a/src/hotspot/share/gc/shared/gcLocker.hpp b/src/hotspot/share/gc/shared/gcLocker.hpp index d47d4226b943b..d62fcf744bfd0 100644 --- a/src/hotspot/share/gc/shared/gcLocker.hpp +++ b/src/hotspot/share/gc/shared/gcLocker.hpp @@ -29,6 +29,7 @@ #include "memory/allStatic.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/macros.hpp" +#include "runtime/timer.hpp" class JavaThread;