changeset 26:fa4bbeb769a3

Bug 1600: Adapt to JDK-8015107 reviewed-by: ykubota
author Yasumasa Suenaga <suenaga.yasumasa@lab.ntt.co.jp>
date Mon, 11 Nov 2013 18:02:40 +0900
parents e20b4494bc92
children 24f77b8a62fe
files agent/ChangeLog agent/src/jvmInfo.hpp agent/src/oopUtil.cpp
diffstat 3 files changed, 20 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/agent/ChangeLog	Mon Oct 07 22:03:14 2013 +0900
+++ b/agent/ChangeLog	Mon Nov 11 18:02:40 2013 +0900
@@ -1,3 +1,7 @@
+2013-11-11  Yasumasa Suenaga  <suenaga.yasumasa@lab.ntt.co.jp>
+
+	* Bug 1600: Adapt to JDK-8015107
+
 2013-10-07  Yasumasa Suenaga  <suenaga.yasumasa@lab.ntt.co.jp>
 
 	* Bug 1568: Crash on Java8 EA 
--- a/agent/src/jvmInfo.hpp	Mon Oct 07 22:03:14 2013 +0900
+++ b/agent/src/jvmInfo.hpp	Mon Nov 11 18:02:40 2013 +0900
@@ -404,6 +404,15 @@
     }
 
     /*!
+     * \brief Decision for 8015107: NPG: Use consistent naming for metaspace concepts
+     * https://bugs.openjdk.java.net/browse/JDK-8015107
+     */
+    inline bool isAfterCR8015107(void){
+      // hs25.0-b51
+      return (this->_hsVersion >= MAKE_HS_VERSION(25, 0, 51));
+    }
+
+    /*!
      * \brief Get JVM name.
      * \return JVM name.
      */
--- a/agent/src/oopUtil.cpp	Mon Oct 07 22:03:14 2013 +0900
+++ b/agent/src/oopUtil.cpp	Mon Nov 11 18:02:40 2013 +0900
@@ -1674,13 +1674,16 @@
 #ifdef __LP64__
   if(jvmInfo->isAfterCR6964458()){
     bool *tempPtr = NULL;
+    const char *target_sym = jvmInfo->isAfterCR8015107()
+                                     ? "UseCompressedClassPointers"
+                                     : "UseCompressedKlassPointers";
     
     /* Search symbol. */
-    tempPtr = (bool*)symFinder->findSymbol("UseCompressedKlassPointers");
+    tempPtr = (bool*)symFinder->findSymbol(target_sym);
     
     /* If not found symbol. */
     if (unlikely(tempPtr == NULL)) {
-      PRINT_WARN_MSG("UseCompressedKlassPointers not found.");
+      PRINT_WARN_MSG_HEADER << target_sym << " not found." << NEWLINE;
     }
     else{
       isCOOP = tempPtr;
@@ -1690,10 +1693,10 @@
 #endif
 
   if(*isCOOP){
-    PRINT_DEBUG_MSG("Compressed Klass = true");
+    PRINT_DEBUG_MSG("Compressed Class = true");
   }
   else{
-    PRINT_DEBUG_MSG("Compressed Klass = false");
+    PRINT_DEBUG_MSG("Compressed Class = false");
   }
 
   if(*useG1){