changeset 162:2ff1af5592d4

Bug 2924: [JDK 9] Adapt to JEP 220
author Yasumasa Suenaga <yasuenag@gmail.com>
date Mon, 18 Apr 2016 21:29:12 +0900
parents cd0f0916adec
children 975c815a82d7
files agent/src/heapstats-engines/jvmInfo.cpp
diffstat 1 files changed, 17 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/agent/src/heapstats-engines/jvmInfo.cpp	Mon Apr 18 21:29:04 2016 +0900
+++ b/agent/src/heapstats-engines/jvmInfo.cpp	Mon Apr 18 21:29:12 2016 +0900
@@ -1,7 +1,7 @@
 /*!
  * \file jvmInfo.cpp
  * \brief This file is used to get JVM performance information.
- * Copyright (C) 2011-2015 Nippon Telegraph and Telephone Corporation
+ * Copyright (C) 2011-2016 Nippon Telegraph and Telephone Corporation
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -423,9 +423,16 @@
   for (int i = 0; i < count; i++) {
     /* If failure get target entry. */
     if (unlikely((*entries[i].entryValue) == NULL)) {
-      logger->printWarnMsg(
-          "Necessary information isn't found in performance data. Entry: %s",
-          entries[i].entryName);
+      /* JEP 220: Modular Run-Time Images */
+      if (!isAfterJDK9() && (
+          (strcmp(entries[i].entryName,
+                 "java.property.java.endorsed.dirs") == 0) ||
+          (strcmp(entries[i].entryName,
+                 "sun.property.sun.boot.class.path") == 0))) {
+        logger->printWarnMsg(
+             "Necessary information isn't found in performance data. Entry: %s",
+             entries[i].entryName);
+      }
     }
   }
 }
@@ -528,8 +535,12 @@
   /* Refresh delay log data load flag. */
   loadDelayLogFlag = (_freqTime != NULL) && (_vmVersion != NULL) &&
                      (_vmName != NULL) && (_classPath != NULL) &&
-                     (_endorsedPath != NULL) && (_javaVersion != NULL) &&
-                     (_javaHome != NULL) && (_bootClassPath != NULL) &&
+                     (_javaVersion != NULL) && (_javaHome != NULL) &&
                      (_vmArgs != NULL) && (_vmFlags != NULL) &&
                      (_javaCommand != NULL) && (_tickTime != NULL);
+
+  /* JEP 220: Modular Run-Time Images */
+  if (!isAfterJDK9()) {
+    loadDelayLogFlag &= (_endorsedPath != NULL) && (_bootClassPath != NULL);
+  }
 }