7003782: Update JVMTI version to 1.2 for jdk7

Update minor version to 1.2 for jdk7

Reviewed-by: phh, dcubed
This commit is contained in:
Keith McGuigan 2010-12-06 20:21:15 -05:00
parent faf320aede
commit dd62e29b29
5 changed files with 22 additions and 11 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="jvmti.xsl"?> <?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. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -359,8 +359,8 @@
<specification label="JVM(TM) Tool Interface" <specification label="JVM(TM) Tool Interface"
majorversion="1" majorversion="1"
minorversion="1" minorversion="2"
microversion="109"> microversion="1">
<title subtitle="Version"> <title subtitle="Version">
<tm>JVM</tm> Tool Interface <tm>JVM</tm> Tool Interface
</title> </title>

View file

@ -161,6 +161,14 @@ JvmtiEnvBase::use_version_1_1_semantics() {
return major == 1 && minor == 1; // micro version doesn't matter here 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() { JvmtiEnvBase::JvmtiEnvBase(jint version) : _env_event_enable() {
_version = version; _version = version;

View file

@ -66,7 +66,8 @@ class JvmtiEnvBase : public CHeapObj {
enum { enum {
JDK15_JVMTI_VERSION = JVMTI_VERSION_1_0 + 33, /* version: 1.0.33 */ 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; } static jvmtiPhase get_phase() { return _phase; }
@ -136,6 +137,7 @@ class JvmtiEnvBase : public CHeapObj {
bool use_version_1_0_semantics(); // agent asked for version 1.0 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_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; } bool is_retransformable() { return _is_retransformable; }

View file

@ -354,18 +354,18 @@ JvmtiExport::get_jvmti_interface(JavaVM *jvm, void **penv, jint version) {
// micro version doesn't matter here (yet?) // micro version doesn't matter here (yet?)
decode_version_values(version, &major, &minor, &micro); decode_version_values(version, &major, &minor, &micro);
switch (major) { switch (major) {
case 1: case 1:
switch (minor) { switch (minor) {
case 0: // version 1.0.<micro> is recognized case 0: // version 1.0.<micro> is recognized
case 1: // version 1.1.<micro> is recognized case 1: // version 1.1.<micro> is recognized
case 2: // version 1.2.<micro> is recognized
break; break;
default: default:
return JNI_EVERSION; // unsupported minor version number return JNI_EVERSION; // unsupported minor version number
} }
break; break;
default:
default:
return JNI_EVERSION; // unsupported major version number return JNI_EVERSION; // unsupported major version number
} }

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?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. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -112,6 +112,7 @@ enum {
JVMTI_VERSION_1 = 0x30010000, JVMTI_VERSION_1 = 0x30010000,
JVMTI_VERSION_1_0 = 0x30010000, JVMTI_VERSION_1_0 = 0x30010000,
JVMTI_VERSION_1_1 = 0x30010100, JVMTI_VERSION_1_1 = 0x30010100,
JVMTI_VERSION_1_2 = 0x30010200,
JVMTI_VERSION = 0x30000000 + (</xsl:text> JVMTI_VERSION = 0x30000000 + (</xsl:text>
<xsl:value-of select="//specification/@majorversion"/> <xsl:value-of select="//specification/@majorversion"/>