8219023: Investigate syncing JVMTI spec version with JDK version
Auto sync versions with the jdk versions Reviewed-by: dholmes, jcbeyler, cjplummer
This commit is contained in:
parent
e6b1cd1d4b
commit
1c202572d5
@ -100,12 +100,17 @@ define SetupJvmtiGeneration
|
||||
endef
|
||||
|
||||
$(eval $(call SetupJvmtiGeneration, jvmtiEnter.cpp, jvmtiEnter.xsl, \
|
||||
-PARAM majorversion $(VERSION_FEATURE) \
|
||||
-PARAM interface jvmti))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmtiEnterTrace.cpp, jvmtiEnter.xsl, \
|
||||
-PARAM majorversion $(VERSION_FEATURE) \
|
||||
-PARAM interface jvmti -PARAM trace Trace))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmtiEnv.hpp, jvmtiHpp.xsl))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmtiEnv.hpp, jvmtiHpp.xsl, \
|
||||
-PARAM majorversion $(VERSION_FEATURE)))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl, \
|
||||
-PARAM majorversion $(VERSION_FEATURE)))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl, \
|
||||
-PARAM majorversion $(VERSION_FEATURE)))
|
||||
|
||||
JVMTI_BC_SRCDIR := $(TOPDIR)/src/hotspot/share/interpreter
|
||||
|
||||
|
@ -26,10 +26,7 @@
|
||||
<!DOCTYPE specification [
|
||||
<!ELEMENT specification (title, intro*, functionsection, errorsection,
|
||||
eventsection, datasection, issuessection, changehistory)>
|
||||
<!ATTLIST specification label CDATA #REQUIRED
|
||||
majorversion CDATA #REQUIRED
|
||||
minorversion CDATA #REQUIRED
|
||||
microversion CDATA #REQUIRED>
|
||||
<!ATTLIST specification label CDATA #REQUIRED>
|
||||
|
||||
<!ELEMENT title (#PCDATA|jvmti|tm)*>
|
||||
<!ATTLIST title subtitle CDATA #REQUIRED>
|
||||
@ -357,10 +354,7 @@
|
||||
<!ELEMENT li ANY>
|
||||
]>
|
||||
|
||||
<specification label="JVM(TM) Tool Interface"
|
||||
majorversion="11"
|
||||
minorversion="0"
|
||||
microversion="0">
|
||||
<specification label="JVM(TM) Tool Interface">
|
||||
<title subtitle="Version">
|
||||
<tm>JVM</tm> Tool Interface
|
||||
</title>
|
||||
|
@ -1899,12 +1899,20 @@ typedef struct {
|
||||
</dd>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="lastchangeversion">
|
||||
<xsl:for-each select="//change">
|
||||
<xsl:if test="position() = last()">
|
||||
<xsl:value-of select="@version"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="changehistory">
|
||||
<div class="sep"/>
|
||||
<hr class="thick"/>
|
||||
<h2>Change History</h2>
|
||||
Last update: <xsl:value-of select="@update"/><br/>
|
||||
Version: <xsl:call-template name="showversion"/>
|
||||
Version: <xsl:call-template name="lastchangeversion"/>
|
||||
<div class="sep"/>
|
||||
<xsl:apply-templates select="intro"/>
|
||||
<div class="sep"/>
|
||||
|
@ -383,8 +383,11 @@ JvmtiExport::get_jvmti_interface(JavaVM *jvm, void **penv, jint version) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// Starting from 13 we do not care about minor version anymore
|
||||
if (major < 13 || major > Abstract_VM_Version::vm_major_version()) {
|
||||
return JNI_EVERSION; // unsupported major version number
|
||||
}
|
||||
}
|
||||
|
||||
if (JvmtiEnv::get_phase() == JVMTI_PHASE_LIVE) {
|
||||
JavaThread* current_thread = JavaThread::current();
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2002, 2019, 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
|
||||
@ -117,10 +117,10 @@ enum {
|
||||
JVMTI_VERSION_11 = 0x300B0000,
|
||||
|
||||
JVMTI_VERSION = 0x30000000 + (</xsl:text>
|
||||
<xsl:value-of select="//specification/@majorversion"/>
|
||||
<xsl:value-of select="$majorversion"/>
|
||||
<xsl:text> * 0x10000) + (</xsl:text>
|
||||
<xsl:value-of select="//specification/@minorversion"/>
|
||||
<xsl:text> * 0x100)</xsl:text>
|
||||
<!-- Now minorversion is always 0 -->
|
||||
<xsl:text> 0 * 0x100)</xsl:text>
|
||||
<xsl:variable name="micro">
|
||||
<xsl:call-template name="microversion"/>
|
||||
</xsl:variable>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2002, 2019, 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
|
||||
@ -27,14 +27,17 @@
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:param name="majorversion"></xsl:param>
|
||||
|
||||
<xsl:template name="microversion">
|
||||
<xsl:value-of select="//specification/@microversion"/>
|
||||
<!-- Now microversion is always 0 -->
|
||||
<xsl:text>0</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="showbasicversion">
|
||||
<xsl:value-of select="//specification/@majorversion"/>
|
||||
<xsl:text>.</xsl:text>
|
||||
<xsl:value-of select="//specification/@minorversion"/>
|
||||
<xsl:value-of select="$majorversion"/>
|
||||
<!-- Now minorversion is always 0 -->
|
||||
<xsl:text>.0</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="showversion">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2019, 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
|
||||
@ -52,7 +52,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManagerService {
|
||||
private final ThreadGroup mainGroupForJDI;
|
||||
private ResourceBundle messages = null;
|
||||
private int vmSequenceNumber = 0;
|
||||
private static final int majorVersion = 11;
|
||||
private static final int majorVersion = Runtime.version().feature();
|
||||
private static final int minorVersion = 0;
|
||||
|
||||
private static final Object lock = new Object();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2019, 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
|
||||
@ -35,8 +35,6 @@
|
||||
#include "FrameID.h"
|
||||
|
||||
static char *versionName = "Java Debug Wire Protocol (Reference Implementation)";
|
||||
static int majorVersion = 11; /* JDWP major version */
|
||||
static int minorVersion = 0; /* JDWP minor version */
|
||||
|
||||
static jboolean
|
||||
version(PacketInputStream *in, PacketOutputStream *out)
|
||||
@ -46,6 +44,10 @@ version(PacketInputStream *in, PacketOutputStream *out)
|
||||
char *vmVersion;
|
||||
char *vmInfo;
|
||||
|
||||
/* Now the JDWP versions are the same as JVMTI versions */
|
||||
int majorVersion = jvmtiMajorVersion();
|
||||
int minorVersion = 0;
|
||||
|
||||
if (gdata->vmDead) {
|
||||
outStream_setError(out, JDWP_ERROR(VM_DEAD));
|
||||
return JNI_TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user