Mercurial > hg > release > heapstats-1.0
changeset 17:5b0c1a7c3bf9
Bug 1493: HeapStats agent should use UseCompressedKlassPointers on JDK8.
reviewed-by: ykubota
author | Yasumasa Suenaga <suenaga.yasumasa@lab.ntt.co.jp> |
---|---|
date | Thu, 25 Jul 2013 21:57:01 +0900 |
parents | 5a930f8c514b |
children | ebd17a919599 |
files | agent/ChangeLog agent/src/oopUtil.cpp agent/src/oopUtil.hpp agent/src/util.cpp |
diffstat | 4 files changed, 36 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/agent/ChangeLog Wed Jun 26 17:44:08 2013 +0900 +++ b/agent/ChangeLog Thu Jul 25 21:57:01 2013 +0900 @@ -1,3 +1,8 @@ +2013-07-25 Yasumasa Suenaga <suenaga.yasumasa@lab.ntt.co.jp> + + * Bug 1493: HeapStats agent should use UseCompressedKlassPointers on + JDK8. + 2013-06-26 Yasumasa Suenaga <suenaga.yasumasa@lab.ntt.co.jp> * Bug 1488: Performance improvement for SSE2 instructions.
--- a/agent/src/oopUtil.cpp Wed Jun 26 17:44:08 2013 +0900 +++ b/agent/src/oopUtil.cpp Thu Jul 25 21:57:01 2013 +0900 @@ -1635,6 +1635,31 @@ (*flagList[i].flagPtr) = tempPtr; } +#ifdef __LP64__ + if(jvmInfo->isAfterCR6964458()){ + bool *tempPtr = NULL; + + /* Search symbol. */ + tempPtr = (bool*)symFinder->findSymbol("UseCompressedKlassPointers"); + + /* If not found symbol. */ + if (unlikely(tempPtr == NULL)) { + PRINT_WARN_MSG("UseCompressedKlassPointers not found."); + } + else{ + isCOOP = tempPtr; + } + + } +#endif + + if(*isCOOP){ + PRINT_DEBUG_MSG("Compressed Klass = true"); + } + else{ + PRINT_DEBUG_MSG("Compressed Klass = false"); + } + if(*useG1){ /* Add vtable offset */ #ifdef __LP64__
--- a/agent/src/oopUtil.hpp Wed Jun 26 17:44:08 2013 +0900 +++ b/agent/src/oopUtil.hpp Thu Jul 25 21:57:01 2013 +0900 @@ -136,7 +136,7 @@ /* Define JVM paramter pointer variable for calling from external. */ /*! - * \brief Pointer to "-XX:UseCompressedOops". + * \brief Pointer to "-XX:UseCompressedOops" or "-XX:UseCompressedKlassPointers". */ extern "C" bool *isCOOP;
--- a/agent/src/util.cpp Wed Jun 26 17:44:08 2013 +0900 +++ b/agent/src/util.cpp Thu Jul 25 21:57:01 2013 +0900 @@ -642,7 +642,11 @@ case INFO: PRINT_INFO_MSG_HEADER_NOIF << "LogLevel = Info" << NEWLINE; break; - + + case DEBUG: + PRINT_INFO_MSG_HEADER_NOIF << "LogLevel = Debug" << NEWLINE; + break; + default: /* Illegal log level. */ PRINT_INFO_MSG_HEADER_NOIF << "LogLevel = UNKNOWN" << NEWLINE; break;