7003782: Update JVMTI version to 1.2 for jdk7
authorkamg
Mon, 06 Dec 2010 20:21:15 -0500
changeset 7413 59b978f8fbdf
parent 7412 f50bd8c3a2fd
child 7414 940d84ca7fca
7003782: Update JVMTI version to 1.2 for jdk7 Summary: Update minor version to 1.2 for jdk7 Reviewed-by: phh, dcubed
hotspot/src/share/vm/prims/jvmti.xml
hotspot/src/share/vm/prims/jvmtiEnvBase.cpp
hotspot/src/share/vm/prims/jvmtiEnvBase.hpp
hotspot/src/share/vm/prims/jvmtiExport.cpp
hotspot/src/share/vm/prims/jvmtiH.xsl
--- a/hotspot/src/share/vm/prims/jvmti.xml	Mon Dec 06 15:37:00 2010 -0500
+++ b/hotspot/src/share/vm/prims/jvmti.xml	Mon Dec 06 20:21:15 2010 -0500
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <?xml-stylesheet type="text/xsl" href="jvmti.xsl"?>
 <!--
- Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -359,8 +359,8 @@
 
 <specification label="JVM(TM) Tool Interface"
         majorversion="1"
-        minorversion="1"
-        microversion="109">
+        minorversion="2"
+        microversion="1">
   <title subtitle="Version">
     <tm>JVM</tm> Tool Interface
   </title>
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp	Mon Dec 06 15:37:00 2010 -0500
+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp	Mon Dec 06 20:21:15 2010 -0500
@@ -161,6 +161,14 @@
   return major == 1 && minor == 1;  // micro version doesn't matter here
 }
 
+bool
+JvmtiEnvBase::use_version_1_2_semantics() {
+  int major, minor, micro;
+
+  JvmtiExport::decode_version_values(_version, &major, &minor, &micro);
+  return major == 1 && minor == 2;  // micro version doesn't matter here
+}
+
 
 JvmtiEnvBase::JvmtiEnvBase(jint version) : _env_event_enable() {
   _version = version;
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp	Mon Dec 06 15:37:00 2010 -0500
+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp	Mon Dec 06 20:21:15 2010 -0500
@@ -66,7 +66,8 @@
 
   enum {
     JDK15_JVMTI_VERSION = JVMTI_VERSION_1_0 +  33,  /* version: 1.0.33  */
-    JDK16_JVMTI_VERSION = JVMTI_VERSION_1_1 + 102   /* version: 1.1.102 */
+    JDK16_JVMTI_VERSION = JVMTI_VERSION_1_1 + 102,  /* version: 1.1.102 */
+    JDK17_JVMTI_VERSION = JVMTI_VERSION_1_2 +   1   /* version: 1.2.1   */
   };
 
   static jvmtiPhase  get_phase()                    { return _phase; }
@@ -136,6 +137,7 @@
 
   bool use_version_1_0_semantics();  // agent asked for version 1.0
   bool use_version_1_1_semantics();  // agent asked for version 1.1
+  bool use_version_1_2_semantics();  // agent asked for version 1.2
 
   bool is_retransformable()                        { return _is_retransformable; }
 
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp	Mon Dec 06 15:37:00 2010 -0500
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp	Mon Dec 06 20:21:15 2010 -0500
@@ -354,18 +354,18 @@
   // micro version doesn't matter here (yet?)
   decode_version_values(version, &major, &minor, &micro);
   switch (major) {
-  case 1:
+    case 1:
       switch (minor) {
-      case 0:  // version 1.0.<micro> is recognized
-      case 1:  // version 1.1.<micro> is recognized
+        case 0:  // version 1.0.<micro> is recognized
+        case 1:  // version 1.1.<micro> is recognized
+        case 2:  // version 1.2.<micro> is recognized
           break;
 
-      default:
+        default:
           return JNI_EVERSION;  // unsupported minor version number
       }
       break;
-
-  default:
+    default:
       return JNI_EVERSION;  // unsupported major version number
   }
 
--- a/hotspot/src/share/vm/prims/jvmtiH.xsl	Mon Dec 06 15:37:00 2010 -0500
+++ b/hotspot/src/share/vm/prims/jvmtiH.xsl	Mon Dec 06 20:21:15 2010 -0500
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
- Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -112,6 +112,7 @@
     JVMTI_VERSION_1   = 0x30010000,
     JVMTI_VERSION_1_0 = 0x30010000,
     JVMTI_VERSION_1_1 = 0x30010100,
+    JVMTI_VERSION_1_2 = 0x30010200,
 
     JVMTI_VERSION = 0x30000000 + (</xsl:text>
   <xsl:value-of select="//specification/@majorversion"/>