changeset 47765:b7c7428eaab9

8189610: Reconcile jvm.h and all jvm_md.h between java.base and hotspot Summary: Removed hotspot version of jvm*h and jni*h files. Reviewed-by: ihse, mchung, dholmes
author coleenp
date Tue, 31 Oct 2017 11:55:09 -0400
parents 029d5efaaa6c
children bfba73a06c8c
files make/copy/Copy-java.base.gmk make/hotspot/lib/CompileJvm.gmk make/hotspot/lib/CompileLibjsig.gmk src/hotspot/cpu/aarch64/jni_aarch64.h src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp src/hotspot/cpu/arm/interp_masm_arm.cpp src/hotspot/cpu/arm/jni_arm.h src/hotspot/cpu/arm/methodHandles_arm.cpp src/hotspot/cpu/arm/vm_version_arm_32.cpp src/hotspot/cpu/arm/vm_version_arm_64.cpp src/hotspot/cpu/ppc/jni_ppc.h src/hotspot/cpu/ppc/methodHandles_ppc.cpp src/hotspot/cpu/ppc/vm_version_ppc.cpp src/hotspot/cpu/s390/jni_s390.h src/hotspot/cpu/s390/methodHandles_s390.cpp src/hotspot/cpu/s390/vm_version_s390.cpp src/hotspot/cpu/sparc/jni_sparc.h src/hotspot/cpu/sparc/macroAssembler_sparc.cpp src/hotspot/cpu/sparc/methodHandles_sparc.cpp src/hotspot/cpu/sparc/vm_version_sparc.cpp src/hotspot/cpu/x86/jni_x86.h src/hotspot/cpu/x86/macroAssembler_x86.cpp src/hotspot/cpu/x86/methodHandles_x86.cpp src/hotspot/cpu/x86/vm_version_x86.cpp src/hotspot/cpu/zero/jni_zero.h src/hotspot/os/aix/jvm_aix.cpp src/hotspot/os/aix/jvm_aix.h src/hotspot/os/aix/os_aix.cpp src/hotspot/os/bsd/decoder_machO.cpp src/hotspot/os/bsd/jvm_bsd.cpp src/hotspot/os/bsd/jvm_bsd.h src/hotspot/os/bsd/os_bsd.cpp src/hotspot/os/linux/decoder_linux.cpp src/hotspot/os/linux/jvm_linux.cpp src/hotspot/os/linux/jvm_linux.h src/hotspot/os/linux/os_linux.cpp src/hotspot/os/posix/os_posix.cpp src/hotspot/os/solaris/jvm_solaris.cpp src/hotspot/os/solaris/jvm_solaris.h src/hotspot/os/solaris/os_solaris.cpp src/hotspot/os/windows/jvm_windows.cpp src/hotspot/os/windows/jvm_windows.h src/hotspot/os/windows/os_windows.cpp src/hotspot/os/windows/threadCritical_windows.cpp src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp src/hotspot/share/aot/aotLoader.cpp src/hotspot/share/c1/c1_CFGPrinter.cpp src/hotspot/share/c1/c1_Canonicalizer.hpp src/hotspot/share/c1/c1_LinearScan.cpp src/hotspot/share/ci/ciEnv.cpp src/hotspot/share/ci/ciFlags.hpp src/hotspot/share/ci/ciReplay.cpp src/hotspot/share/classfile/altHashing.cpp src/hotspot/share/classfile/altHashing.hpp src/hotspot/share/classfile/classFileParser.cpp src/hotspot/share/classfile/classLoader.cpp src/hotspot/share/classfile/compactHashtable.cpp src/hotspot/share/classfile/modules.cpp src/hotspot/share/classfile/systemDictionary.cpp src/hotspot/share/classfile/verifier.cpp src/hotspot/share/classfile/vmSymbols.cpp src/hotspot/share/code/codeBlob.cpp src/hotspot/share/code/nmethod.cpp src/hotspot/share/code/relocInfo.cpp src/hotspot/share/compiler/compileBroker.cpp src/hotspot/share/compiler/compileBroker.hpp src/hotspot/share/compiler/compileLog.cpp src/hotspot/share/compiler/compilerOracle.cpp src/hotspot/share/gc/g1/g1CollectedHeap.cpp src/hotspot/share/gc/g1/satbMarkQueue.cpp src/hotspot/share/gc/shared/ageTable.cpp src/hotspot/share/gc/shared/gcId.cpp src/hotspot/share/gc/shared/gcTimer.hpp src/hotspot/share/gc/shared/gcTraceTime.inline.hpp src/hotspot/share/interpreter/linkResolver.cpp src/hotspot/share/jvmci/jvmciCodeInstaller.cpp src/hotspot/share/jvmci/jvmciCompiler.cpp src/hotspot/share/jvmci/jvmciCompilerToVM.cpp src/hotspot/share/jvmci/jvmciRuntime.cpp src/hotspot/share/jvmci/jvmci_globals.cpp src/hotspot/share/logging/logConfiguration.cpp src/hotspot/share/logging/logDecorations.cpp src/hotspot/share/logging/logFileOutput.cpp src/hotspot/share/logging/logFileStreamOutput.cpp src/hotspot/share/logging/logOutput.cpp src/hotspot/share/logging/logTagSet.cpp src/hotspot/share/memory/filemap.cpp src/hotspot/share/memory/metaspaceShared.cpp src/hotspot/share/oops/constantPool.cpp src/hotspot/share/oops/generateOopMap.cpp src/hotspot/share/oops/instanceKlass.cpp src/hotspot/share/oops/klassVtable.cpp src/hotspot/share/opto/castnode.cpp src/hotspot/share/opto/loopTransform.cpp src/hotspot/share/opto/mulnode.cpp src/hotspot/share/opto/output.cpp src/hotspot/share/opto/parse3.cpp src/hotspot/share/opto/phaseX.cpp src/hotspot/share/opto/type.cpp src/hotspot/share/precompiled/precompiled.hpp src/hotspot/share/prims/jni.cpp src/hotspot/share/prims/jniCheck.cpp src/hotspot/share/prims/jni_md.h src/hotspot/share/prims/jvm.cpp src/hotspot/share/prims/jvm.h src/hotspot/share/prims/jvmtiEnvBase.cpp src/hotspot/share/prims/jvmtiImpl.cpp src/hotspot/share/prims/jvmtiTagMap.cpp src/hotspot/share/prims/methodHandles.hpp src/hotspot/share/prims/perf.cpp src/hotspot/share/prims/unsafe.cpp src/hotspot/share/runtime/arguments.cpp src/hotspot/share/runtime/commandLineFlagRangeList.cpp src/hotspot/share/runtime/deoptimization.cpp src/hotspot/share/runtime/globals.cpp src/hotspot/share/runtime/interfaceSupport.cpp src/hotspot/share/runtime/java.cpp src/hotspot/share/runtime/os.cpp src/hotspot/share/runtime/os.hpp src/hotspot/share/runtime/perfData.cpp src/hotspot/share/runtime/perfMemory.cpp src/hotspot/share/runtime/perfMemory.hpp src/hotspot/share/runtime/reflection.cpp src/hotspot/share/runtime/sharedRuntime.cpp src/hotspot/share/runtime/thread.cpp src/hotspot/share/runtime/thread.hpp src/hotspot/share/runtime/vmStructs.cpp src/hotspot/share/services/diagnosticArgument.cpp src/hotspot/share/services/diagnosticCommand.cpp src/hotspot/share/services/diagnosticFramework.cpp src/hotspot/share/services/heapDumper.cpp src/hotspot/share/services/mallocSiteTable.cpp src/hotspot/share/services/memTracker.cpp src/hotspot/share/utilities/accessFlags.hpp src/hotspot/share/utilities/constantTag.hpp src/hotspot/share/utilities/debug.cpp src/hotspot/share/utilities/decoder.cpp src/hotspot/share/utilities/elfStringTable.cpp src/hotspot/share/utilities/formatBuffer.cpp src/hotspot/share/utilities/formatBuffer.hpp src/hotspot/share/utilities/globalDefinitions_xlc.hpp src/hotspot/share/utilities/macros.hpp src/hotspot/share/utilities/ostream.cpp src/hotspot/share/utilities/vmError.cpp src/java.base/macosx/native/include/jni_md.h src/java.base/macosx/native/include/jvm_md.h src/java.base/share/native/include/classfile_constants.h src/java.base/share/native/include/jvm.h src/java.base/solaris/native/libjsig/jsig.c src/java.base/unix/native/include/jni_md.h src/java.base/unix/native/include/jvm_md.h src/java.base/unix/native/libjava/UnixFileSystem_md.c src/java.base/windows/native/include/jni_md.h src/java.base/windows/native/include/jvm_md.h test/hotspot/gtest/classfile/test_AltHashing.cpp test/hotspot/gtest/logging/logTestFixture.cpp test/hotspot/gtest/logging/test_log.cpp test/hotspot/gtest/logging/test_logConfiguration.cpp test/hotspot/gtest/logging/test_logDecorators.cpp test/hotspot/gtest/logging/test_logFileOutput.cpp test/hotspot/gtest/logging/test_logMessageTest.cpp test/hotspot/gtest/logging/test_logTagLevelExpression.cpp test/hotspot/gtest/logging/test_logTagSetDescriptions.cpp test/hotspot/gtest/runtime/test_arguments.cpp test/hotspot/gtest/utilities/test_json.cpp
diffstat 177 files changed, 308 insertions(+), 2713 deletions(-) [+]
line wrap: on
line diff
--- a/make/copy/Copy-java.base.gmk	Mon Oct 30 16:37:53 2017 +0100
+++ b/make/copy/Copy-java.base.gmk	Tue Oct 31 11:55:09 2017 -0400
@@ -42,7 +42,7 @@
 	$(call install-file)
 
 $(INCLUDE_DST_OS_DIR)/%.h: \
-    $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h
+    $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include/%.h
 	$(call install-file)
 
 ################################################################################
--- a/make/hotspot/lib/CompileJvm.gmk	Mon Oct 30 16:37:53 2017 +0100
+++ b/make/hotspot/lib/CompileJvm.gmk	Tue Oct 31 11:55:09 2017 -0400
@@ -57,8 +57,8 @@
     $(patsubst %,-I%,$(filter-out $(JVM_VARIANT_OUTPUTDIR)/gensrc/%, $(JVM_SRC_DIRS))) \
     -I$(JVM_VARIANT_OUTPUTDIR)/gensrc \
     -I$(TOPDIR)/src/hotspot/share/precompiled \
-    -I$(TOPDIR)/src/hotspot/share/prims \
     -I$(TOPDIR)/src/java.base/share/native/include \
+    -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
     #
 
 # INCLUDE_SUFFIX_* is only meant for including the proper
--- a/make/hotspot/lib/CompileLibjsig.gmk	Mon Oct 30 16:37:53 2017 +0100
+++ b/make/hotspot/lib/CompileLibjsig.gmk	Tue Oct 31 11:55:09 2017 -0400
@@ -57,7 +57,7 @@
       endif
 
     else ifeq ($(OPENJDK_TARGET_OS), solaris)
-      LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/hotspot/os/solaris
+      LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/java.base/unix/native/include
       LIBJSIG_LDFLAGS := -m64 -mt -xnolib
       LIBJSIG_LIBS := $(LIBDL)
 
--- a/src/hotspot/cpu/aarch64/jni_aarch64.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-#if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE)
-
-
-// Note: please do not change these without also changing jni_md.h in the JDK
-// repository
-#ifndef __has_attribute
-  #define __has_attribute(x) 0
-#endif
-#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
-  #define JNIEXPORT     __attribute__((visibility("default")))
-  #define JNIIMPORT     __attribute__((visibility("default")))
-#else
-  #define JNIEXPORT
-  #define JNIIMPORT
-#endif
-
-  #define JNICALL
-  typedef int jint;
-  typedef long jlong;
-
-#else
-  #define JNIEXPORT __declspec(dllexport)
-  #define JNIIMPORT __declspec(dllimport)
-  #define JNICALL __stdcall
-
-  typedef int jint;
-  typedef __int64 jlong;
-#endif
-
-typedef signed char jbyte;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/assembler.hpp"
 #include "asm/assembler.inline.hpp"
 #include "interpreter/interpreter.hpp"
@@ -38,7 +39,6 @@
 #include "opto/compile.hpp"
 #include "opto/intrinsicnode.hpp"
 #include "opto/node.hpp"
-#include "prims/jvm.h"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/icache.hpp"
 #include "runtime/interfaceSupport.hpp"
--- a/src/hotspot/cpu/arm/interp_masm_arm.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/arm/interp_masm_arm.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "gc/shared/barrierSet.inline.hpp"
 #include "gc/shared/cardTableModRefBS.inline.hpp"
 #include "gc/shared/collectedHeap.hpp"
--- a/src/hotspot/cpu/arm/jni_arm.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2008, 2013, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-// Note: please do not change these without also changing jni_md.h in the JDK
-// repository
-#ifndef __has_attribute
-  #define __has_attribute(x) 0
-#endif
-#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
-  #define JNIEXPORT     __attribute__((externally_visible,visibility("default")))
-  #define JNIIMPORT     __attribute__((externally_visible,visibility("default")))
-#else
-  #define JNIEXPORT
-  #define JNIIMPORT
-#endif
-
-#define JNICALL
-
-typedef int jint;
-#if defined(_LP64)
-  typedef long jlong;
-#else
-  typedef long long jlong;
-#endif
-typedef signed char jbyte;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
--- a/src/hotspot/cpu/arm/methodHandles_arm.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/arm/methodHandles_arm.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -27,12 +27,12 @@
 // Last synchronization: changeset f8c9417e3571
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/javaClasses.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "prims/methodHandles.hpp"
 
 #define __ _masm->
--- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,9 +23,9 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/macroAssembler.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "runtime/java.hpp"
 #include "runtime/os.inline.hpp"
 #include "runtime/stubCodeGenerator.hpp"
--- a/src/hotspot/cpu/arm/vm_version_arm_64.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/arm/vm_version_arm_64.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,9 +23,9 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/macroAssembler.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "runtime/java.hpp"
 #include "runtime/os.inline.hpp"
 #include "runtime/stubCodeGenerator.hpp"
--- a/src/hotspot/cpu/ppc/jni_ppc.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2013 SAP SE. 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef CPU_PPC_VM_JNI_PPC_H
-#define CPU_PPC_VM_JNI_PPC_H
-
-// Note: please do not change these without also changing jni_md.h in the JDK
-// repository
-#ifndef __has_attribute
-  #define __has_attribute(x) 0
-#endif
-#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
-  #define JNIEXPORT     __attribute__((visibility("default")))
-  #define JNIIMPORT     __attribute__((visibility("default")))
-#else
-  #define JNIEXPORT
-  #define JNIIMPORT
-#endif
-
-#define JNICALL
-
-typedef int jint;
-
-#if defined(_LP64)
-  typedef long jlong;
-#else
-  typedef long long jlong;
-#endif
-
-typedef signed char jbyte;
-
-#endif // CPU_PPC_VM_JNI_PPC_H
--- a/src/hotspot/cpu/ppc/methodHandles_ppc.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/ppc/methodHandles_ppc.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,12 +24,12 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/macroAssembler.inline.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "prims/methodHandles.hpp"
 
 #define __ _masm->
--- a/src/hotspot/cpu/ppc/vm_version_ppc.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/ppc/vm_version_ppc.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,11 +24,11 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/assembler.inline.hpp"
 #include "asm/macroAssembler.inline.hpp"
 #include "compiler/disassembler.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
 #include "runtime/stubCodeGenerator.hpp"
--- a/src/hotspot/cpu/s390/jni_s390.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2016 SAP SE. 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-#if defined(__GNUC__) && (__GNUC__ >= 4)
-  #define JNIEXPORT     __attribute__((visibility("default")))
-  #define JNIIMPORT     __attribute__((visibility("default")))
-#else
-  #define JNIEXPORT
-  #define JNIIMPORT
-#endif
-
-#define JNICALL
-
-typedef int jint;
-
-typedef long int jlong;
-
-typedef signed char jbyte;
-
-#endif // _JAVASOFT_JNI_MD_H_
--- a/src/hotspot/cpu/s390/methodHandles_s390.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/s390/methodHandles_s390.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,12 +24,12 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/macroAssembler.inline.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "prims/methodHandles.hpp"
 
 #ifdef PRODUCT
--- a/src/hotspot/cpu/s390/vm_version_s390.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/s390/vm_version_s390.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,11 +24,11 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/assembler.inline.hpp"
 #include "compiler/disassembler.hpp"
 #include "code/compiledIC.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "runtime/java.hpp"
 #include "runtime/stubCodeGenerator.hpp"
 #include "vm_version_s390.hpp"
--- a/src/hotspot/cpu/sparc/jni_sparc.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997, 2017, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// Note: please do not change these without also changing jni_md.h in the JDK
-// repository
-#ifndef __has_attribute
-  #define __has_attribute(x) 0
-#endif
-#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
-  #define JNIEXPORT     __attribute__((visibility("default")))
-  #define JNIIMPORT     __attribute__((visibility("default")))
-#else
-  #define JNIEXPORT
-  #define JNIIMPORT
-#endif
-#define JNICALL
-
-typedef int jint;
-
-typedef long jlong;
-
-typedef signed char jbyte;
--- a/src/hotspot/cpu/sparc/macroAssembler_sparc.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/sparc/macroAssembler_sparc.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/macroAssembler.inline.hpp"
 #include "compiler/disassembler.hpp"
 #include "gc/shared/cardTableModRefBS.hpp"
@@ -31,7 +32,6 @@
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
 #include "oops/klass.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/methodHandles.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/interfaceSupport.hpp"
--- a/src/hotspot/cpu/sparc/methodHandles_sparc.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/sparc/methodHandles_sparc.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,13 +23,13 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interp_masm.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "prims/methodHandles.hpp"
 
 #define __ _masm->
--- a/src/hotspot/cpu/sparc/vm_version_sparc.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/sparc/vm_version_sparc.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,11 +23,11 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/macroAssembler.inline.hpp"
 #include "logging/log.hpp"
 #include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
 #include "runtime/stubCodeGenerator.hpp"
--- a/src/hotspot/cpu/x86/jni_x86.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-#if defined(_WIN32)
-  #define JNIEXPORT __declspec(dllexport)
-  #define JNIIMPORT __declspec(dllimport)
-  #define JNICALL __stdcall
-
-  typedef int jint;
-  typedef __int64 jlong;
-#else
-
-// Note: please do not change these without also changing jni_md.h in the JDK
-// repository
-#ifndef __has_attribute
-  #define __has_attribute(x) 0
-#endif
-#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
-  #define JNIEXPORT     __attribute__((visibility("default")))
-  #define JNIIMPORT     __attribute__((visibility("default")))
-#else
-  #define JNIEXPORT
-  #define JNIIMPORT
-#endif
-
-  #define JNICALL
-  typedef int jint;
-#if defined(_LP64)
-  typedef long jlong;
-#else
-  typedef long long jlong;
-#endif
-
-#endif
-
-typedef signed char jbyte;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
--- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/assembler.hpp"
 #include "asm/assembler.inline.hpp"
 #include "compiler/disassembler.hpp"
@@ -32,7 +33,6 @@
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
 #include "oops/klass.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/methodHandles.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/interfaceSupport.hpp"
--- a/src/hotspot/cpu/x86/methodHandles_x86.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/x86/methodHandles_x86.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,13 +23,13 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "prims/methodHandles.hpp"
 
 #define __ _masm->
--- a/src/hotspot/cpu/x86/vm_version_x86.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/cpu/x86/vm_version_x86.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,12 +23,12 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "asm/macroAssembler.inline.hpp"
 #include "logging/log.hpp"
 #include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
 #include "runtime/stubCodeGenerator.hpp"
--- a/src/hotspot/cpu/zero/jni_zero.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2009 Red Hat, Inc.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-
-// Note: please do not change these without also changing jni_md.h in the JDK
-// repository
-#ifndef __has_attribute
-  #define __has_attribute(x) 0
-#endif
-#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
-  #define JNIEXPORT     __attribute__((visibility("default")))
-  #define JNIIMPORT     __attribute__((visibility("default")))
-#else
-  #define JNIEXPORT
-  #define JNIIMPORT
-#endif
-#define JNICALL
-
-typedef int jint;
-typedef signed char jbyte;
-
-#ifdef _LP64
-typedef long jlong;
-#else
-typedef long long jlong;
-#endif
--- a/src/hotspot/os/aix/jvm_aix.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/aix/jvm_aix.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,7 +24,7 @@
  */
 
 #include "precompiled.hpp"
-#include "prims/jvm.h"
+#include "jvm.h"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/osThread.hpp"
 
--- a/src/hotspot/os/aix/jvm_aix.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2013 SAP SE. 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef OS_AIX_VM_JVM_AIX_H
-#define OS_AIX_VM_JVM_AIX_H
-
-// HotSpot integration note:
-//
-// This is derived from the JDK classic file:
-// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
-// All local includes have been commented out.
-
-#ifndef JVM_MD_H
-#define JVM_MD_H
-
-/*
- * This file is currently collecting system-specific dregs for the
- * JNI conversion, which should be sorted out later.
- */
-
-#include <dirent.h>             /* For DIR */
-
-// Must redefine NULL because the macro gets redefined to int 0
-// by dirent.h. This redefinition is included later then the standard definition in
-// globalDefinitions_<compiler>.hpp and leads to assertions in the VM initialization.
-// We definitely need NULL to have the same lengh as an address pointer.
-#ifdef _LP64
-#undef NULL
-#define NULL 0L
-#else
-#ifndef NULL
-#define NULL 0
-#endif
-#endif
-
-#include <sys/param.h>          /* For MAXPATHLEN */
-#include <sys/socket.h>         /* For socklen_t */
-#include <unistd.h>             /* For F_OK, R_OK, W_OK */
-
-#define JNI_ONLOAD_SYMBOLS      {"JNI_OnLoad"}
-#define JNI_ONUNLOAD_SYMBOLS    {"JNI_OnUnload"}
-#define JVM_ONLOAD_SYMBOLS      {"JVM_OnLoad"}
-#define AGENT_ONLOAD_SYMBOLS    {"Agent_OnLoad"}
-#define AGENT_ONUNLOAD_SYMBOLS  {"Agent_OnUnload"}
-#define AGENT_ONATTACH_SYMBOLS  {"Agent_OnAttach"}
-
-#define JNI_LIB_PREFIX "lib"
-#define JNI_LIB_SUFFIX ".so"
-
-#define JVM_MAXPATHLEN MAXPATHLEN
-
-#define JVM_R_OK    R_OK
-#define JVM_W_OK    W_OK
-#define JVM_X_OK    X_OK
-#define JVM_F_OK    F_OK
-
-/*
- * File I/O
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/* O Flags */
-
-#define JVM_O_RDONLY     O_RDONLY
-#define JVM_O_WRONLY     O_WRONLY
-#define JVM_O_RDWR       O_RDWR
-#define JVM_O_O_APPEND   O_APPEND
-#define JVM_O_EXCL       O_EXCL
-#define JVM_O_CREAT      O_CREAT
-
-/* Signal definitions */
-
-#define BREAK_SIGNAL     SIGQUIT           /* Thread dumping support.    */
-#define SHUTDOWN1_SIGNAL SIGHUP            /* Shutdown Hooks support.    */
-#define SHUTDOWN2_SIGNAL SIGINT
-#define SHUTDOWN3_SIGNAL SIGTERM
-
-#endif /* JVM_MD_H */
-
-#endif // OS_AIX_VM_JVM_AIX_H
--- a/src/hotspot/os/aix/os_aix.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/aix/os_aix.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -28,6 +28,7 @@
 #pragma alloca
 
 // no precompiled headers
+#include "jvm.h"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
@@ -35,7 +36,6 @@
 #include "code/vtableStubs.hpp"
 #include "compiler/compileBroker.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_aix.h"
 #include "logging/log.hpp"
 #include "libo4.hpp"
 #include "libperfstat_aix.hpp"
@@ -49,7 +49,6 @@
 #include "os_share_aix.hpp"
 #include "porting_aix.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
@@ -3249,7 +3248,7 @@
   }
 
   // ReduceSignalUsage allows the user to override these handlers
-  // see comments at the very top and jvm_solaris.h
+  // see comments at the very top and jvm_md.h
   if (!ReduceSignalUsage) {
     DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL);
     DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL);
--- a/src/hotspot/os/bsd/decoder_machO.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/bsd/decoder_machO.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 
 #ifdef __APPLE__
-#include "prims/jvm.h"
+#include "jvm.h"
 #include "decoder_machO.hpp"
 
 #include <cxxabi.h>
--- a/src/hotspot/os/bsd/jvm_bsd.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/bsd/jvm_bsd.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "prims/jvm.h"
+#include "jvm.h"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/osThread.hpp"
 
--- a/src/hotspot/os/bsd/jvm_bsd.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 1999, 2017, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef OS_BSD_VM_JVM_BSD_H
-#define OS_BSD_VM_JVM_BSD_H
-
-/*
-// HotSpot integration note:
-//
-// This is derived from the JDK classic file:
-// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
-// All local includes have been commented out.
-*/
-
-#ifndef JVM_MD_H
-#define JVM_MD_H
-
-/*
- * This file is currently collecting system-specific dregs for the
- * JNI conversion, which should be sorted out later.
- */
-
-#include <dirent.h>             /* For DIR */
-#include <sys/param.h>          /* For MAXPATHLEN */
-#include <sys/socket.h>         /* For socklen_t */
-#include <unistd.h>             /* For F_OK, R_OK, W_OK */
-
-#define JNI_ONLOAD_SYMBOLS      {"JNI_OnLoad"}
-#define JNI_ONUNLOAD_SYMBOLS    {"JNI_OnUnload"}
-#define JVM_ONLOAD_SYMBOLS      {"JVM_OnLoad"}
-#define AGENT_ONLOAD_SYMBOLS    {"Agent_OnLoad"}
-#define AGENT_ONUNLOAD_SYMBOLS  {"Agent_OnUnload"}
-#define AGENT_ONATTACH_SYMBOLS  {"Agent_OnAttach"}
-
-#define JNI_LIB_PREFIX "lib"
-#ifdef __APPLE__
-#define JNI_LIB_SUFFIX ".dylib"
-#else
-#define JNI_LIB_SUFFIX ".so"
-#endif
-
-// Hack: MAXPATHLEN is 4095 on some Bsd and 4096 on others. This may
-//       cause problems if JVM and the rest of JDK are built on different
-//       Bsd releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
-//       so buffers declared in VM are always >= 4096.
-#define JVM_MAXPATHLEN MAXPATHLEN + 1
-
-#define JVM_R_OK    R_OK
-#define JVM_W_OK    W_OK
-#define JVM_X_OK    X_OK
-#define JVM_F_OK    F_OK
-
-/*
- * File I/O
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/* O Flags */
-
-#define JVM_O_RDONLY     O_RDONLY
-#define JVM_O_WRONLY     O_WRONLY
-#define JVM_O_RDWR       O_RDWR
-#define JVM_O_O_APPEND   O_APPEND
-#define JVM_O_EXCL       O_EXCL
-#define JVM_O_CREAT      O_CREAT
-
-/* Signal definitions */
-
-#define BREAK_SIGNAL     SIGQUIT           /* Thread dumping support.    */
-#define SHUTDOWN1_SIGNAL SIGHUP            /* Shutdown Hooks support.    */
-#define SHUTDOWN2_SIGNAL SIGINT
-#define SHUTDOWN3_SIGNAL SIGTERM
-
-#ifndef SIGRTMIN
-#ifdef __OpenBSD__
-#define SIGRTMIN        1
-#else
-#define SIGRTMIN        33
-#endif
-#endif
-#ifndef SIGRTMAX
-#ifdef __OpenBSD__
-#define SIGRTMAX        31
-#else
-#define SIGRTMAX        63
-#endif
-#endif
-#endif /* JVM_MD_H */
-
-#endif // OS_BSD_VM_JVM_BSD_H
--- a/src/hotspot/os/bsd/os_bsd.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/bsd/os_bsd.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
@@ -31,7 +32,6 @@
 #include "compiler/compileBroker.hpp"
 #include "compiler/disassembler.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_bsd.h"
 #include "logging/log.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/filemap.hpp"
@@ -39,7 +39,6 @@
 #include "os_bsd.inline.hpp"
 #include "os_share_bsd.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
@@ -3240,7 +3239,7 @@
 
 
   // ReduceSignalUsage allows the user to override these handlers
-  // see comments at the very top and jvm_solaris.h
+  // see comments at the very top and jvm_md.h
   if (!ReduceSignalUsage) {
     DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL);
     DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL);
--- a/src/hotspot/os/linux/decoder_linux.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/linux/decoder_linux.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,7 +22,7 @@
  *
  */
 
-#include "prims/jvm.h"
+#include "jvm.h"
 #include "utilities/decoder_elf.hpp"
 
 #include <cxxabi.h>
--- a/src/hotspot/os/linux/jvm_linux.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/linux/jvm_linux.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "prims/jvm.h"
+#include "jvm.h"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/osThread.hpp"
 
--- a/src/hotspot/os/linux/jvm_linux.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1999, 2015, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef OS_LINUX_VM_JVM_LINUX_H
-#define OS_LINUX_VM_JVM_LINUX_H
-
-/*
-// HotSpot integration note:
-//
-// This is derived from the JDK classic file:
-// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
-// All local includes have been commented out.
-*/
-
-#ifndef JVM_MD_H
-#define JVM_MD_H
-
-/*
- * This file is currently collecting system-specific dregs for the
- * JNI conversion, which should be sorted out later.
- */
-
-#include <dirent.h>             /* For DIR */
-#include <sys/param.h>          /* For MAXPATHLEN */
-#include <sys/socket.h>         /* For socklen_t */
-#include <unistd.h>             /* For F_OK, R_OK, W_OK */
-
-#define JNI_ONLOAD_SYMBOLS      {"JNI_OnLoad"}
-#define JNI_ONUNLOAD_SYMBOLS    {"JNI_OnUnload"}
-#define JVM_ONLOAD_SYMBOLS      {"JVM_OnLoad"}
-#define AGENT_ONLOAD_SYMBOLS    {"Agent_OnLoad"}
-#define AGENT_ONUNLOAD_SYMBOLS  {"Agent_OnUnload"}
-#define AGENT_ONATTACH_SYMBOLS  {"Agent_OnAttach"}
-
-#define JNI_LIB_PREFIX "lib"
-#define JNI_LIB_SUFFIX ".so"
-
-// Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may
-//       cause problems if JVM and the rest of JDK are built on different
-//       Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
-//       so buffers declared in VM are always >= 4096.
-#define JVM_MAXPATHLEN MAXPATHLEN + 1
-
-#define JVM_R_OK    R_OK
-#define JVM_W_OK    W_OK
-#define JVM_X_OK    X_OK
-#define JVM_F_OK    F_OK
-
-/*
- * File I/O
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/* O Flags */
-
-#define JVM_O_RDONLY     O_RDONLY
-#define JVM_O_WRONLY     O_WRONLY
-#define JVM_O_RDWR       O_RDWR
-#define JVM_O_O_APPEND   O_APPEND
-#define JVM_O_EXCL       O_EXCL
-#define JVM_O_CREAT      O_CREAT
-
-/* Signal definitions */
-
-#define BREAK_SIGNAL     SIGQUIT           /* Thread dumping support.    */
-#define SHUTDOWN1_SIGNAL SIGHUP            /* Shutdown Hooks support.    */
-#define SHUTDOWN2_SIGNAL SIGINT
-#define SHUTDOWN3_SIGNAL SIGTERM
-
-#endif /* JVM_MD_H */
-
-#endif // OS_LINUX_VM_JVM_LINUX_H
--- a/src/hotspot/os/linux/os_linux.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/linux/os_linux.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
@@ -31,7 +32,6 @@
 #include "compiler/compileBroker.hpp"
 #include "compiler/disassembler.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_linux.h"
 #include "logging/log.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/filemap.hpp"
@@ -39,7 +39,6 @@
 #include "os_linux.inline.hpp"
 #include "os_share_linux.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
@@ -4664,7 +4663,7 @@
 #endif
 
   // ReduceSignalUsage allows the user to override these handlers
-  // see comments at the very top and jvm_solaris.h
+  // see comments at the very top and jvm_md.h
   if (!ReduceSignalUsage) {
     DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL);
     DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL);
--- a/src/hotspot/os/posix/os_posix.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/posix/os_posix.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,8 +22,8 @@
  *
  */
 
+#include "jvm.h"
 #include "utilities/globalDefinitions.hpp"
-#include "prims/jvm.h"
 #include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/os/solaris/jvm_solaris.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/solaris/jvm_solaris.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "prims/jvm.h"
+#include "jvm.h"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/osThread.hpp"
 
--- a/src/hotspot/os/solaris/jvm_solaris.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1998, 2017, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef OS_SOLARIS_VM_JVM_SOLARIS_H
-#define OS_SOLARIS_VM_JVM_SOLARIS_H
-
-/*
-// HotSpot integration note:
-//
-// This is derived from the JDK classic file:
-// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
-// All local includes have been commented out.
-*/
-
-#ifndef JVM_MD_H
-#define JVM_MD_H
-
-/*
- * This file is currently collecting system-specific dregs for the
- * JNI conversion, which should be sorted out later.
- */
-
-#include <dirent.h>             /* For DIR */
-#include <sys/param.h>          /* For MAXPATHLEN */
-#include <sys/socket.h>         /* For socklen_t */
-#include <unistd.h>             /* For F_OK, R_OK, W_OK */
-#include <sys/int_types.h>      /* for intptr_t types (64 Bit cleanliness) */
-
-#define JNI_ONLOAD_SYMBOLS      {"JNI_OnLoad"}
-#define JNI_ONUNLOAD_SYMBOLS    {"JNI_OnUnload"}
-#define JVM_ONLOAD_SYMBOLS      {"JVM_OnLoad"}
-#define AGENT_ONLOAD_SYMBOLS    {"Agent_OnLoad"}
-#define AGENT_ONUNLOAD_SYMBOLS  {"Agent_OnUnload"}
-#define AGENT_ONATTACH_SYMBOLS  {"Agent_OnAttach"}
-
-#define JNI_LIB_PREFIX "lib"
-#define JNI_LIB_SUFFIX ".so"
-
-#define JVM_MAXPATHLEN MAXPATHLEN
-
-#define JVM_R_OK    R_OK
-#define JVM_W_OK    W_OK
-#define JVM_X_OK    X_OK
-#define JVM_F_OK    F_OK
-
-/*
- * File I/O
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/* O Flags */
-
-#define JVM_O_RDONLY     O_RDONLY
-#define JVM_O_WRONLY     O_WRONLY
-#define JVM_O_RDWR       O_RDWR
-#define JVM_O_O_APPEND   O_APPEND
-#define JVM_O_EXCL       O_EXCL
-#define JVM_O_CREAT      O_CREAT
-
-/* Signal definitions */
-
-#define BREAK_SIGNAL     SIGQUIT           /* Thread dumping support.    */
-#define ASYNC_SIGNAL     SIGJVM2           /* Event-based suspend/resume support */
-#define SHUTDOWN1_SIGNAL SIGHUP            /* Shutdown Hooks support.    */
-#define SHUTDOWN2_SIGNAL SIGINT
-#define SHUTDOWN3_SIGNAL SIGTERM
-
-/* With 1.4.1 libjsig added versioning: used in os_solaris.cpp and jsig.c */
-#define JSIG_VERSION_1_4_1   0x30140100
-
-#endif /* JVM_MD_H */
-
-#endif // OS_SOLARIS_VM_JVM_SOLARIS_H
--- a/src/hotspot/os/solaris/os_solaris.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/solaris/os_solaris.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
@@ -31,7 +32,6 @@
 #include "compiler/compileBroker.hpp"
 #include "compiler/disassembler.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_solaris.h"
 #include "logging/log.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/filemap.hpp"
@@ -39,7 +39,6 @@
 #include "os_share_solaris.hpp"
 #include "os_solaris.inline.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
--- a/src/hotspot/os/windows/jvm_windows.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/windows/jvm_windows.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "prims/jvm.h"
+#include "jvm.h"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/osThread.hpp"
 
--- a/src/hotspot/os/windows/jvm_windows.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 1998, 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef OS_WINDOWS_VM_JVM_WINDOWS_H
-#define OS_WINDOWS_VM_JVM_WINDOWS_H
-
-#ifndef _JAVASOFT_JVM_MD_H_
-#define _JAVASOFT_JVM_MD_H_
-
-/*
- * This file is currently collecting system-specific dregs for the
- * JNI conversion, which should be sorted out later.
- */
-
-// JDK7 requires VS2010
-#if _MSC_VER >= 1600
-// JDK7 minimum platform requirement: Windows XP
-#if _WIN32_WINNT < 0x0501
-#undef _WIN32_WINNT
-#define _WIN32_WINNT  0x0501
-#endif
-#endif
-
-#include <windows.h>
-
-#include <Psapi.h>
-#include <Tlhelp32.h>
-
-typedef int socklen_t;
-
-#define JNI_ONLOAD_SYMBOLS      {"_JNI_OnLoad@8", "JNI_OnLoad"}
-#define JNI_ONUNLOAD_SYMBOLS    {"_JNI_OnUnload@8", "JNI_OnUnload"}
-#define JVM_ONLOAD_SYMBOLS      {"_JVM_OnLoad@12", "JVM_OnLoad"}
-#define AGENT_ONLOAD_SYMBOLS    {"_Agent_OnLoad@12", "Agent_OnLoad"}
-#define AGENT_ONUNLOAD_SYMBOLS  {"_Agent_OnUnload@4", "Agent_OnUnload"}
-#define AGENT_ONATTACH_SYMBOLS  {"_Agent_OnAttach@12", "Agent_OnAttach"}
-
-#define JNI_LIB_PREFIX ""
-#define JNI_LIB_SUFFIX ".dll"
-
-struct dirent {
-    char d_name[MAX_PATH];
-};
-
-typedef struct {
-    struct dirent dirent;
-    char *path;
-    HANDLE handle;
-    WIN32_FIND_DATA find_data;
-} DIR;
-
-#include <stdlib.h>
-
-#define JVM_MAXPATHLEN _MAX_PATH
-
-#define JVM_R_OK    4
-#define JVM_W_OK    2
-#define JVM_X_OK    1
-#define JVM_F_OK    0
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-JNIEXPORT void * JNICALL
-JVM_GetThreadInterruptEvent();
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-/*
- * File I/O
- */
-
-#include <sys/stat.h>
-
-/* O Flags */
-
-#define JVM_O_RDONLY     O_RDONLY
-#define JVM_O_WRONLY     O_WRONLY
-#define JVM_O_RDWR       O_RDWR
-#define JVM_O_O_APPEND   O_APPEND
-#define JVM_O_EXCL       O_EXCL
-#define JVM_O_CREAT      O_CREAT
-
-/* Signals */
-
-#define JVM_SIGINT     SIGINT
-#define JVM_SIGTERM    SIGTERM
-
-#define SHUTDOWN1_SIGNAL SIGINT            /* Shutdown Hooks support.    */
-#define SHUTDOWN2_SIGNAL SIGTERM
-
-#endif /* !_JAVASOFT_JVM_MD_H_ */
-
-#endif // OS_WINDOWS_VM_JVM_WINDOWS_H
--- a/src/hotspot/os/windows/os_windows.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/windows/os_windows.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -26,6 +26,7 @@
 #define _WIN32_WINNT 0x0600
 
 // no precompiled headers
+#include "jvm.h"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
@@ -34,7 +35,6 @@
 #include "compiler/compileBroker.hpp"
 #include "compiler/disassembler.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_windows.h"
 #include "logging/log.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/filemap.hpp"
@@ -42,7 +42,6 @@
 #include "os_share_windows.hpp"
 #include "os_windows.inline.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
@@ -100,6 +99,7 @@
 #include <imagehlp.h>             // For os::dll_address_to_function_name
 // for enumerating dll libraries
 #include <vdmdbg.h>
+#include <psapi.h>
 
 // for timer info max values which include all bits
 #define ALL_64_BITS CONST64(-1)
@@ -3656,7 +3656,7 @@
 
     static INIT_ONCE init_once_crit_sect = INIT_ONCE_STATIC_INIT;
     static CRITICAL_SECTION crit_sect;
-    static volatile jint process_exiting = 0;
+    static volatile DWORD process_exiting = 0;
     int i, j;
     DWORD res;
     HANDLE hproc, hthr;
@@ -3675,7 +3675,7 @@
       if (what != EPT_THREAD) {
         // Atomically set process_exiting before the critical section
         // to increase the visibility between racing threads.
-        Atomic::cmpxchg((jint)GetCurrentThreadId(), &process_exiting, 0);
+        Atomic::cmpxchg(GetCurrentThreadId(), &process_exiting, (DWORD)0);
       }
       EnterCriticalSection(&crit_sect);
 
@@ -3793,7 +3793,7 @@
 
     if (!registered &&
         OrderAccess::load_acquire(&process_exiting) != 0 &&
-        process_exiting != (jint)GetCurrentThreadId()) {
+        process_exiting != GetCurrentThreadId()) {
       // Some other thread is about to call exit(), so we don't let
       // the current unregistered thread proceed to exit() or _endthreadex()
       while (true) {
--- a/src/hotspot/os/windows/threadCritical_windows.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os/windows/threadCritical_windows.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -36,7 +36,7 @@
 //
 
 static bool initialized = false;
-static volatile jint lock_count = -1;
+static volatile int lock_count = -1;
 static HANDLE lock_event;
 static DWORD lock_owner = -1;
 
--- a/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,6 +24,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/assembler.inline.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -32,12 +33,10 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_aix.h"
 #include "memory/allocation.inline.hpp"
 #include "nativeInst_ppc.hpp"
 #include "os_share_aix.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "porting_aix.hpp"
 #include "runtime/arguments.hpp"
--- a/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -31,11 +32,9 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_bsd.h"
 #include "memory/allocation.inline.hpp"
 #include "os_share_bsd.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -29,6 +29,7 @@
 #endif
 
 // no precompiled headers
+#include "jvm.h"
 #include "assembler_zero.inline.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -36,12 +37,10 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_bsd.h"
 #include "memory/allocation.inline.hpp"
 #include "nativeInst_zero.hpp"
 #include "os_share_bsd.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,6 +24,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -33,11 +34,9 @@
 #include "code/vtableStubs.hpp"
 #include "code/nativeInst.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_linux.h"
 #include "memory/allocation.inline.hpp"
 #include "os_share_linux.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "assembler_arm.inline.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -30,12 +31,10 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_linux.h"
 #include "memory/allocation.inline.hpp"
 #include "nativeInst_arm.hpp"
 #include "os_share_linux.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,6 +24,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/assembler.inline.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -32,12 +33,10 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_linux.h"
 #include "memory/allocation.inline.hpp"
 #include "nativeInst_ppc.hpp"
 #include "os_share_linux.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -26,6 +26,7 @@
 // This file is organized as os_linux_x86.cpp.
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/assembler.inline.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -35,12 +36,10 @@
 #include "code/vtableStubs.hpp"
 #include "compiler/disassembler.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_linux.h"
 #include "memory/allocation.inline.hpp"
 #include "nativeInst_s390.hpp"
 #include "os_share_linux.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -31,12 +32,10 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_linux.h"
 #include "memory/allocation.inline.hpp"
 #include "nativeInst_sparc.hpp"
 #include "os_share_linux.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -31,11 +32,9 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_linux.h"
 #include "memory/allocation.inline.hpp"
 #include "os_share_linux.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,6 +24,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "assembler_zero.inline.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -31,12 +32,10 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_linux.h"
 #include "memory/allocation.inline.hpp"
 #include "nativeInst_zero.hpp"
 #include "os_share_linux.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "macroAssembler_sparc.hpp"
 #include "classfile/classLoader.hpp"
@@ -32,12 +33,10 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_solaris.h"
 #include "memory/allocation.inline.hpp"
 #include "nativeInst_sparc.hpp"
 #include "os_share_solaris.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -31,11 +32,9 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_solaris.h"
 #include "memory/allocation.inline.hpp"
 #include "os_share_solaris.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
--- a/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 // no precompiled headers
+#include "jvm.h"
 #include "asm/macroAssembler.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -30,13 +31,11 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
-#include "jvm_windows.h"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "nativeInst_x86.hpp"
 #include "os_share_windows.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/extendedPC.hpp"
--- a/src/hotspot/share/aot/aotLoader.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/aot/aotLoader.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,12 +22,12 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 
 #include "aot/aotCodeHeap.hpp"
 #include "aot/aotLoader.inline.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #include "oops/method.hpp"
-#include "prims/jvm.h"
 #include "runtime/os.hpp"
 #include "runtime/timerTrace.hpp"
 
--- a/src/hotspot/share/c1/c1_CFGPrinter.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/c1/c1_CFGPrinter.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,13 +23,13 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "c1/c1_CFGPrinter.hpp"
 #include "c1/c1_IR.hpp"
 #include "c1/c1_InstructionPrinter.hpp"
 #include "c1/c1_LIR.hpp"
 #include "c1/c1_LinearScan.hpp"
 #include "c1/c1_ValueStack.hpp"
-#include "prims/jvm.h"
 
 #ifndef PRODUCT
 
--- a/src/hotspot/share/c1/c1_Canonicalizer.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/c1/c1_Canonicalizer.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -40,6 +40,10 @@
   void set_constant(jlong x)                     { set_canonical(new Constant(new LongConstant(x))); }
   void set_constant(jfloat x)                    { set_canonical(new Constant(new FloatConstant(x))); }
   void set_constant(jdouble x)                   { set_canonical(new Constant(new DoubleConstant(x))); }
+#ifdef _WINDOWS
+  // jint is defined as long in jni_md.h, so convert from int to jint
+  void set_constant(int x)                       { set_constant((jint)x); }
+#endif
   void move_const_to_right(Op2* x);
   void do_Op2(Op2* x);
   void do_UnsafeRawOp(UnsafeRawOp* x);
--- a/src/hotspot/share/c1/c1_LinearScan.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/c1/c1_LinearScan.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -2507,7 +2507,7 @@
 // use).
 ConstantOopWriteValue* LinearScan::_oop_null_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantOopWriteValue(NULL);
 ConstantIntValue*      LinearScan::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
-ConstantIntValue*      LinearScan::_int_0_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(0);
+ConstantIntValue*      LinearScan::_int_0_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue((jint)0);
 ConstantIntValue*      LinearScan::_int_1_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
 ConstantIntValue*      LinearScan::_int_2_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
 LocationValue*         _illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());
--- a/src/hotspot/share/ci/ciEnv.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/ci/ciEnv.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "ci/ciConstant.hpp"
 #include "ci/ciEnv.hpp"
 #include "ci/ciField.hpp"
@@ -49,7 +50,6 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiExport.hpp"
 #include "runtime/init.hpp"
 #include "runtime/reflection.hpp"
--- a/src/hotspot/share/ci/ciFlags.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/ci/ciFlags.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -25,9 +25,9 @@
 #ifndef SHARE_VM_CI_CIFLAGS_HPP
 #define SHARE_VM_CI_CIFLAGS_HPP
 
+#include "jvm.h"
 #include "ci/ciClassList.hpp"
 #include "memory/allocation.hpp"
-#include "prims/jvm.h"
 #include "utilities/accessFlags.hpp"
 #include "utilities/ostream.hpp"
 
--- a/src/hotspot/share/ci/ciReplay.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/ci/ciReplay.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "ci/ciMethodData.hpp"
 #include "ci/ciReplay.hpp"
 #include "ci/ciSymbol.hpp"
@@ -33,7 +34,6 @@
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "utilities/copy.hpp"
 #include "utilities/macros.hpp"
 
@@ -790,7 +790,7 @@
         while (field_signature[rank] == '[') {
           rank++;
         }
-        int* dims = NEW_RESOURCE_ARRAY(int, rank);
+        jint* dims = NEW_RESOURCE_ARRAY(jint, rank);
         dims[0] = length;
         for (int i = 1; i < rank; i++) {
           dims[i] = 1; // These aren't relevant to the compiler
--- a/src/hotspot/share/classfile/altHashing.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/classfile/altHashing.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -42,15 +42,15 @@
 juint AltHashing::compute_seed() {
   jlong nanos = os::javaTimeNanos();
   jlong now = os::javaTimeMillis();
-  int SEED_MATERIAL[8] = {
-            (int) object_hash(SystemDictionary::String_klass()),
-            (int) object_hash(SystemDictionary::System_klass()),
-            os::random(),  // current thread isn't a java thread
-            (int) (((julong)nanos) >> 32),
-            (int) nanos,
-            (int) (((julong)now) >> 32),
-            (int) now,
-            (int) (os::javaTimeNanos() >> 2)
+  jint SEED_MATERIAL[8] = {
+            (jint) object_hash(SystemDictionary::String_klass()),
+            (jint) object_hash(SystemDictionary::System_klass()),
+            (jint) os::random(),  // current thread isn't a java thread
+            (jint) (((julong)nanos) >> 32),
+            (jint) nanos,
+            (jint) (((julong)now) >> 32),
+            (jint) now,
+            (jint) (os::javaTimeNanos() >> 2)
   };
 
   return murmur3_32(SEED_MATERIAL, 8);
@@ -167,7 +167,7 @@
 }
 
 // Hash used for the seed.
-juint AltHashing::murmur3_32(juint seed, const int* data, int len) {
+juint AltHashing::murmur3_32(juint seed, const jint* data, int len) {
   juint h1 = seed;
 
   int off = 0;
@@ -202,6 +202,6 @@
   return h1;
 }
 
-juint AltHashing::murmur3_32(const int* data, int len) {
+juint AltHashing::murmur3_32(const jint* data, int len) {
   return murmur3_32(0, data, len);
 }
--- a/src/hotspot/share/classfile/altHashing.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/classfile/altHashing.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -43,8 +43,8 @@
   static juint Integer_rotateLeft(juint i, int distance) {
     return (i << distance) | (i >> (32 - distance));
   }
-  static juint murmur3_32(const int* data, int len);
-  static juint murmur3_32(juint seed, const int* data, int len);
+  static juint murmur3_32(const jint* data, int len);
+  static juint murmur3_32(juint seed, const jint* data, int len);
 
  public:
   static juint compute_seed();
--- a/src/hotspot/share/classfile/classFileParser.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,6 +22,7 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "aot/aotLoader.hpp"
 #include "classfile/classFileParser.hpp"
 #include "classfile/classFileStream.hpp"
@@ -54,7 +55,6 @@
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/javaCalls.hpp"
--- a/src/hotspot/share/classfile/classLoader.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/classfile/classLoader.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classFileStream.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/classLoaderData.inline.hpp"
@@ -53,7 +54,6 @@
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/compilationPolicy.hpp"
--- a/src/hotspot/share/classfile/compactHashtable.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/classfile/compactHashtable.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,12 +23,12 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/compactHashtable.inline.hpp"
 #include "classfile/javaClasses.hpp"
 #include "logging/logMessage.hpp"
 #include "memory/metadataFactory.hpp"
 #include "memory/metaspaceShared.hpp"
-#include "prims/jvm.h"
 #include "runtime/vmThread.hpp"
 #include "utilities/numberSeq.hpp"
 #include <sys/stat.h>
--- a/src/hotspot/share/classfile/modules.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/classfile/modules.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
 */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classFileParser.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/classLoaderData.inline.hpp"
@@ -40,7 +41,6 @@
 #include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/instanceKlass.hpp"
-#include "prims/jvm.h"
 #include "runtime/arguments.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "aot/aotLoader.hpp"
 #include "classfile/classFileParser.hpp"
 #include "classfile/classFileStream.hpp"
@@ -61,7 +62,6 @@
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
 #include "oops/typeArrayKlass.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiEnvBase.hpp"
 #include "prims/resolvedMethodTable.hpp"
 #include "prims/methodHandles.hpp"
--- a/src/hotspot/share/classfile/verifier.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/classfile/verifier.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classFileStream.hpp"
 #include "classfile/javaClasses.hpp"
 #include "classfile/stackMapTable.hpp"
@@ -40,7 +41,6 @@
 #include "oops/instanceKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayOop.hpp"
-#include "prims/jvm.h"
 #include "runtime/fieldDescriptor.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
--- a/src/hotspot/share/classfile/vmSymbols.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/classfile/vmSymbols.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,12 +23,12 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/vmSymbols.hpp"
 #include "compiler/compilerDirectives.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/metaspaceClosure.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/handles.inline.hpp"
 #include "utilities/xmlstream.hpp"
 
--- a/src/hotspot/share/code/codeBlob.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/code/codeBlob.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "code/codeBlob.hpp"
 #include "code/codeCache.hpp"
 #include "code/relocInfo.hpp"
@@ -33,7 +34,6 @@
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/forte.hpp"
-#include "prims/jvm.h"
 #include "runtime/handles.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/mutexLocker.hpp"
--- a/src/hotspot/share/code/nmethod.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/code/nmethod.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "code/codeCache.hpp"
 #include "code/compiledIC.hpp"
 #include "code/dependencies.hpp"
@@ -41,7 +42,6 @@
 #include "memory/resourceArea.hpp"
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiImpl.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/orderAccess.inline.hpp"
--- a/src/hotspot/share/code/relocInfo.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/code/relocInfo.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -489,7 +489,7 @@
 #ifndef _LP64
   _target = (address) (intptr_t)unpack_1_int();
 #else
-  int32_t lo, hi;
+  jint lo, hi;
   unpack_2_ints(lo, hi);
   jlong t = jlong_from(hi, lo);;
   _target = (address) t;
--- a/src/hotspot/share/compiler/compileBroker.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/compiler/compileBroker.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
@@ -40,7 +41,6 @@
 #include "oops/methodData.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/nativeLookup.hpp"
 #include "prims/whitebox.hpp"
 #include "runtime/arguments.hpp"
@@ -108,7 +108,7 @@
 
 bool CompileBroker::_initialized = false;
 volatile bool CompileBroker::_should_block = false;
-volatile jint CompileBroker::_print_compilation_warning = 0;
+volatile int  CompileBroker::_print_compilation_warning = 0;
 volatile jint CompileBroker::_should_compile_new_jobs = run_compilation;
 
 // The installed compiler(s)
--- a/src/hotspot/share/compiler/compileBroker.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/compiler/compileBroker.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -217,7 +217,7 @@
   static int _sum_nmethod_code_size;
   static long _peak_compilation_time;
 
-  static volatile jint _print_compilation_warning;
+  static volatile int _print_compilation_warning;
 
   static JavaThread* make_thread(const char* name, CompileQueue* queue, CompilerCounters* counters, AbstractCompiler* comp, bool compiler_thread, TRAPS);
   static void init_compiler_sweeper_threads(int c1_compiler_count, int c2_compiler_count);
--- a/src/hotspot/share/compiler/compileLog.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/compiler/compileLog.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,12 +23,12 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "ci/ciMethod.hpp"
 #include "code/codeCache.hpp"
 #include "compiler/compileLog.hpp"
 #include "memory/allocation.inline.hpp"
 #include "oops/method.hpp"
-#include "prims/jvm.h"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/os.hpp"
 
--- a/src/hotspot/share/compiler/compilerOracle.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/compiler/compilerOracle.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "compiler/compilerOracle.hpp"
 #include "compiler/methodMatcher.hpp"
 #include "memory/allocation.inline.hpp"
@@ -31,7 +32,6 @@
 #include "oops/klass.hpp"
 #include "oops/method.hpp"
 #include "oops/symbol.hpp"
-#include "prims/jvm.h"
 #include "runtime/handles.inline.hpp"
 #include "runtime/jniHandles.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -3621,7 +3621,7 @@
 
 class G1KlassCleaningTask : public StackObj {
   BoolObjectClosure*                      _is_alive;
-  volatile jint                           _clean_klass_tree_claimed;
+  volatile int                            _clean_klass_tree_claimed;
   ClassLoaderDataGraphKlassIteratorAtomic _klass_iterator;
 
  public:
@@ -3637,7 +3637,7 @@
       return false;
     }
 
-    return Atomic::cmpxchg(1, (jint*)&_clean_klass_tree_claimed, 0) == 0;
+    return Atomic::cmpxchg(1, &_clean_klass_tree_claimed, 0) == 0;
   }
 
   InstanceKlass* claim_next_klass() {
@@ -3674,7 +3674,7 @@
 
 class G1ResolvedMethodCleaningTask : public StackObj {
   BoolObjectClosure* _is_alive;
-  volatile jint      _resolved_method_task_claimed;
+  volatile int       _resolved_method_task_claimed;
 public:
   G1ResolvedMethodCleaningTask(BoolObjectClosure* is_alive) :
       _is_alive(is_alive), _resolved_method_task_claimed(0) {}
@@ -3683,7 +3683,7 @@
     if (_resolved_method_task_claimed) {
       return false;
     }
-    return Atomic::cmpxchg(1, (jint*)&_resolved_method_task_claimed, 0) == 0;
+    return Atomic::cmpxchg(1, &_resolved_method_task_claimed, 0) == 0;
   }
 
   // These aren't big, one thread can do it all.
--- a/src/hotspot/share/gc/g1/satbMarkQueue.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/gc/g1/satbMarkQueue.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,12 +23,12 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
 #include "gc/g1/satbMarkQueue.hpp"
 #include "gc/shared/collectedHeap.hpp"
 #include "memory/allocation.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/safepoint.hpp"
 #include "runtime/thread.hpp"
--- a/src/hotspot/share/gc/shared/ageTable.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/gc/shared/ageTable.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "gc/shared/ageTable.inline.hpp"
 #include "gc/shared/ageTableTracer.hpp"
 #include "gc/shared/collectedHeap.hpp"
@@ -30,7 +31,6 @@
 #include "memory/resourceArea.hpp"
 #include "logging/log.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "utilities/copy.hpp"
 
 /* Copyright (c) 1992, 2016, Oracle and/or its affiliates, and Stanford University.
--- a/src/hotspot/share/gc/shared/gcId.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/gc/shared/gcId.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,8 +23,8 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "gc/shared/gcId.hpp"
-#include "prims/jvm.h"
 #include "runtime/safepoint.hpp"
 #include "runtime/thread.inline.hpp"
 
--- a/src/hotspot/share/gc/shared/gcTimer.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/gc/shared/gcTimer.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -26,7 +26,6 @@
 #define SHARE_VM_GC_SHARED_GCTIMER_HPP
 
 #include "memory/allocation.hpp"
-#include "prims/jni_md.h"
 #include "utilities/macros.hpp"
 #include "utilities/ticks.hpp"
 
--- a/src/hotspot/share/gc/shared/gcTraceTime.inline.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/gc/shared/gcTraceTime.inline.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -32,7 +32,6 @@
 #include "logging/log.hpp"
 #include "logging/logStream.hpp"
 #include "memory/universe.hpp"
-#include "prims/jni_md.h"
 #include "utilities/ticks.hpp"
 
 #define LOG_STOP_HEAP_FORMAT SIZE_FORMAT "M->" SIZE_FORMAT "M("  SIZE_FORMAT "M)"
--- a/src/hotspot/share/interpreter/linkResolver.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/interpreter/linkResolver.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/defaultMethods.hpp"
 #include "classfile/javaClasses.hpp"
 #include "classfile/resolutionErrors.hpp"
@@ -42,7 +43,6 @@
 #include "oops/method.hpp"
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/methodHandles.hpp"
 #include "prims/nativeLookup.hpp"
 #include "runtime/compilationPolicy.hpp"
--- a/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -45,7 +45,7 @@
 // use).
 ConstantOopWriteValue* CodeInstaller::_oop_null_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantOopWriteValue(NULL);
 ConstantIntValue*      CodeInstaller::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
-ConstantIntValue*      CodeInstaller::_int_0_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(0);
+ConstantIntValue*      CodeInstaller::_int_0_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue((jint)0);
 ConstantIntValue*      CodeInstaller::_int_1_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
 ConstantIntValue*      CodeInstaller::_int_2_scope_value =  new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
 LocationValue*         CodeInstaller::_illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());
--- a/src/hotspot/share/jvmci/jvmciCompiler.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/jvmci/jvmciCompiler.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,10 +22,10 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/javaCalls.hpp"
 #include "runtime/handles.hpp"
 #include "jvmci/jvmciJavaClasses.hpp"
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -1697,7 +1697,7 @@
   }
   while (length > 0) {
     jbyte* start = array->byte_at_addr(offset);
-    tty->write((char*) start, MIN2(length, O_BUFLEN));
+    tty->write((char*) start, MIN2(length, (jint)O_BUFLEN));
     length -= O_BUFLEN;
     offset += O_BUFLEN;
   }
--- a/src/hotspot/share/jvmci/jvmciRuntime.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,6 +22,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "asm/codeBuffer.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "code/codeCache.hpp"
@@ -37,7 +38,6 @@
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/objArrayOop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/reflection.hpp"
@@ -611,7 +611,7 @@
   }
 JRT_END
 
-JRT_ENTRY(jint, JVMCIRuntime::test_deoptimize_call_int(JavaThread* thread, int value))
+JRT_ENTRY(int, JVMCIRuntime::test_deoptimize_call_int(JavaThread* thread, int value))
   deopt_caller();
   return value;
 JRT_END
--- a/src/hotspot/share/jvmci/jvmci_globals.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/jvmci/jvmci_globals.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,8 +23,8 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "jvmci/jvmci_globals.hpp"
-#include "prims/jvm.h"
 #include "utilities/defaultStream.hpp"
 #include "runtime/globals_extension.hpp"
 
--- a/src/hotspot/share/logging/logConfiguration.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/logging/logConfiguration.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,6 +22,7 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logging/log.hpp"
 #include "logging/logConfiguration.hpp"
 #include "logging/logDecorations.hpp"
@@ -34,7 +35,6 @@
 #include "logging/logTagSet.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "runtime/os.inline.hpp"
 #include "runtime/semaphore.hpp"
 #include "utilities/globalDefinitions.hpp"
--- a/src/hotspot/share/logging/logDecorations.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/logging/logDecorations.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,9 +22,9 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logging/logConfiguration.hpp"
 #include "logging/logDecorations.hpp"
-#include "prims/jvm.h"
 #include "runtime/os.inline.hpp"
 #include "runtime/thread.inline.hpp"
 #include "services/management.hpp"
--- a/src/hotspot/share/logging/logFileOutput.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/logging/logFileOutput.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,11 +22,11 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logging/log.hpp"
 #include "logging/logConfiguration.hpp"
 #include "logging/logFileOutput.hpp"
 #include "memory/allocation.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/arguments.hpp"
 #include "runtime/os.inline.hpp"
 #include "utilities/globalDefinitions.hpp"
--- a/src/hotspot/share/logging/logFileStreamOutput.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/logging/logFileStreamOutput.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,12 +22,12 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logging/logDecorators.hpp"
 #include "logging/logDecorations.hpp"
 #include "logging/logFileStreamOutput.hpp"
 #include "logging/logMessageBuffer.hpp"
 #include "memory/allocation.inline.hpp"
-#include "prims/jvm.h"
 
 static bool initialized;
 static union {
--- a/src/hotspot/share/logging/logOutput.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/logging/logOutput.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,11 +22,11 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logging/logFileStreamOutput.hpp"
 #include "logging/logOutput.hpp"
 #include "logging/logTagSet.hpp"
 #include "memory/allocation.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/os.inline.hpp"
 
--- a/src/hotspot/share/logging/logTagSet.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/logging/logTagSet.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,6 +22,7 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logging/logDecorations.hpp"
 #include "logging/logFileStreamOutput.hpp"
 #include "logging/logLevel.hpp"
@@ -31,7 +32,6 @@
 #include "logging/logTagSet.hpp"
 #include "logging/logTagSetDescriptions.hpp"
 #include "memory/allocation.inline.hpp"
-#include "prims/jvm.h"
 #include "utilities/ostream.hpp"
 
 LogTagSet*  LogTagSet::_list      = NULL;
--- a/src/hotspot/share/memory/filemap.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/memory/filemap.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classLoader.hpp"
 #include "classfile/compactHashtable.inline.hpp"
 #include "classfile/sharedClassUtil.hpp"
@@ -42,7 +43,6 @@
 #include "memory/metaspaceShared.hpp"
 #include "memory/oopFactory.hpp"
 #include "oops/objArrayOop.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiExport.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/java.hpp"
--- a/src/hotspot/share/memory/metaspaceShared.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/memory/metaspaceShared.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classListParser.hpp"
 #include "classfile/classLoaderExt.hpp"
 #include "classfile/dictionary.hpp"
@@ -55,7 +56,6 @@
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayKlass.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiRedefineClasses.hpp"
 #include "runtime/timerTrace.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/share/oops/constantPool.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/oops/constantPool.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classLoaderData.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "classfile/metadataOnStackMark.hpp"
@@ -41,7 +42,6 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/fieldType.hpp"
 #include "runtime/init.hpp"
 #include "runtime/javaCalls.hpp"
--- a/src/hotspot/share/oops/generateOopMap.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/oops/generateOopMap.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,13 +23,13 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "interpreter/bytecodeStream.hpp"
 #include "logging/log.hpp"
 #include "logging/logStream.hpp"
 #include "oops/generateOopMap.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
-#include "prims/jvm.h"
 #include "runtime/handles.inline.hpp"
 #include "runtime/java.hpp"
 #include "runtime/relocator.hpp"
--- a/src/hotspot/share/oops/instanceKlass.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/oops/instanceKlass.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "aot/aotLoader.hpp"
 #include "classfile/classFileParser.hpp"
 #include "classfile/classFileStream.hpp"
@@ -59,7 +60,6 @@
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiRedefineClasses.hpp"
 #include "prims/jvmtiThreadState.hpp"
--- a/src/hotspot/share/oops/klassVtable.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/oops/klassVtable.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "gc/shared/gcLocker.hpp"
@@ -36,7 +37,6 @@
 #include "oops/method.hpp"
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/arguments.hpp"
 #include "runtime/handles.inline.hpp"
 #include "utilities/copy.hpp"
--- a/src/hotspot/share/opto/castnode.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/opto/castnode.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -237,8 +237,8 @@
     if (in_type != NULL && this_type != NULL &&
         (in_type->_lo != this_type->_lo ||
          in_type->_hi != this_type->_hi)) {
-      int lo1 = this_type->_lo;
-      int hi1 = this_type->_hi;
+      jint lo1 = this_type->_lo;
+      jint hi1 = this_type->_hi;
       int w1  = this_type->_widen;
 
       if (lo1 >= 0) {
--- a/src/hotspot/share/opto/loopTransform.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/opto/loopTransform.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -2129,7 +2129,7 @@
       // Look for trip_counter + offset vs limit
       Node *rc_exp = cmp->in(1);
       Node *limit  = cmp->in(2);
-      jint scale_con= 1;        // Assume trip counter not scaled
+      int scale_con= 1;        // Assume trip counter not scaled
 
       Node *limit_c = get_ctrl(limit);
       if( loop->is_member(get_loop(limit_c) ) ) {
--- a/src/hotspot/share/opto/mulnode.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/opto/mulnode.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -235,13 +235,13 @@
   const TypeInt *r1 = t1->is_int();
 
   // Fetch endpoints of all ranges
-  int32_t lo0 = r0->_lo;
+  jint lo0 = r0->_lo;
   double a = (double)lo0;
-  int32_t hi0 = r0->_hi;
+  jint hi0 = r0->_hi;
   double b = (double)hi0;
-  int32_t lo1 = r1->_lo;
+  jint lo1 = r1->_lo;
   double c = (double)lo1;
-  int32_t hi1 = r1->_hi;
+  jint hi1 = r1->_hi;
   double d = (double)hi1;
 
   // Compute all endpoints & check for overflow
--- a/src/hotspot/share/opto/output.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/opto/output.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -577,10 +577,10 @@
     // arbitrary, and are not tied to any machine-level encodings.)
 #ifdef _LP64
     if( t->base() == Type::DoubleBot || t->base() == Type::DoubleCon ) {
-      array->append(new ConstantIntValue(0));
+      array->append(new ConstantIntValue((jint)0));
       array->append(new_loc_value( _regalloc, regnum, Location::dbl ));
     } else if ( t->base() == Type::Long ) {
-      array->append(new ConstantIntValue(0));
+      array->append(new ConstantIntValue((jint)0));
       array->append(new_loc_value( _regalloc, regnum, Location::lng ));
     } else if ( t->base() == Type::RawPtr ) {
       // jsr/ret return address which must be restored into a the full
@@ -663,7 +663,7 @@
   case Type::DoubleCon: {
     jdouble d = t->is_double_constant()->getd();
 #ifdef _LP64
-    array->append(new ConstantIntValue(0));
+    array->append(new ConstantIntValue((jint)0));
     array->append(new ConstantDoubleValue(d));
 #else
     // Repack the double as two jints.
@@ -683,7 +683,7 @@
   case Type::Long: {
     jlong d = t->is_long()->get_con();
 #ifdef _LP64
-    array->append(new ConstantIntValue(0));
+    array->append(new ConstantIntValue((jint)0));
     array->append(new ConstantLongValue(d));
 #else
     // Repack the long as two jints.
--- a/src/hotspot/share/opto/parse3.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/opto/parse3.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -412,11 +412,11 @@
   // The original expression was of this form: new T[length0][length1]...
   // It is often the case that the lengths are small (except the last).
   // If that happens, use the fast 1-d creator a constant number of times.
-  const jint expand_limit = MIN2((jint)MultiArrayExpandLimit, 100);
-  jint expand_count = 1;        // count of allocations in the expansion
-  jint expand_fanout = 1;       // running total fanout
+  const int expand_limit = MIN2((int)MultiArrayExpandLimit, 100);
+  int expand_count = 1;        // count of allocations in the expansion
+  int expand_fanout = 1;       // running total fanout
   for (j = 0; j < ndimensions-1; j++) {
-    jint dim_con = find_int_con(length[j], -1);
+    int dim_con = find_int_con(length[j], -1);
     expand_fanout *= dim_con;
     expand_count  += expand_fanout; // count the level-J sub-arrays
     if (dim_con <= 0
--- a/src/hotspot/share/opto/phaseX.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/opto/phaseX.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -723,7 +723,7 @@
 
 //------------------------------intcon-----------------------------------------
 // Fast integer constant.  Same as "transform(new ConINode(TypeInt::make(i)))"
-ConINode* PhaseTransform::intcon(int i) {
+ConINode* PhaseTransform::intcon(jint i) {
   // Small integer?  Check cache! Check that cached node is not dead
   if (i >= _icon_min && i <= _icon_max) {
     ConINode* icon = _icons[i-_icon_min];
--- a/src/hotspot/share/opto/type.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/opto/type.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -1503,7 +1503,7 @@
 //------------------------------hash-------------------------------------------
 // Type-specific hashing function.
 int TypeInt::hash(void) const {
-  return java_add(java_add(_lo, _hi), java_add(_widen, (int)Type::Int));
+  return java_add(java_add(_lo, _hi), java_add((jint)_widen, (jint)Type::Int));
 }
 
 //------------------------------is_finite--------------------------------------
@@ -2505,7 +2505,7 @@
 //------------------------------hash-------------------------------------------
 // Type-specific hashing function.
 int TypePtr::hash(void) const {
-  return java_add(java_add(_ptr, _offset), java_add( hash_speculative(), _inline_depth));
+  return java_add(java_add((jint)_ptr, (jint)_offset), java_add((jint)hash_speculative(), (jint)_inline_depth));
 ;
 }
 
@@ -3338,8 +3338,8 @@
 // Type-specific hashing function.
 int TypeOopPtr::hash(void) const {
   return
-    java_add(java_add(const_oop() ? const_oop()->hash() : 0, _klass_is_exact),
-             java_add(_instance_id, TypePtr::hash()));
+    java_add(java_add((jint)(const_oop() ? const_oop()->hash() : 0), (jint)_klass_is_exact),
+             java_add((jint)_instance_id, (jint)TypePtr::hash()));
 }
 
 //------------------------------dump2------------------------------------------
@@ -3946,7 +3946,7 @@
 //------------------------------hash-------------------------------------------
 // Type-specific hashing function.
 int TypeInstPtr::hash(void) const {
-  int hash = java_add(klass()->hash(), TypeOopPtr::hash());
+  int hash = java_add((jint)klass()->hash(), (jint)TypeOopPtr::hash());
   return hash;
 }
 
@@ -4871,7 +4871,7 @@
 //------------------------------hash-------------------------------------------
 // Type-specific hashing function.
 int TypeKlassPtr::hash(void) const {
-  return java_add(klass()->hash(), TypePtr::hash());
+  return java_add((jint)klass()->hash(), (jint)TypePtr::hash());
 }
 
 //------------------------------singleton--------------------------------------
--- a/src/hotspot/share/precompiled/precompiled.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/precompiled/precompiled.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -27,6 +27,7 @@
 
 #ifndef DONT_USE_PRECOMPILED_HEADER
 # include "jni.h"
+# include "jvm.h"
 # include "asm/assembler.hpp"
 # include "asm/assembler.inline.hpp"
 # include "asm/codeBuffer.hpp"
@@ -160,7 +161,6 @@
 # include "oops/symbol.hpp"
 # include "oops/typeArrayKlass.hpp"
 # include "oops/typeArrayOop.hpp"
-# include "prims/jvm.h"
 # include "prims/jvmtiExport.hpp"
 # include "prims/methodHandles.hpp"
 # include "runtime/arguments.hpp"
--- a/src/hotspot/share/prims/jni.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/prims/jni.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -25,6 +25,7 @@
 
 #include "precompiled.hpp"
 #include "jni.h"
+#include "jvm.h"
 #include "ci/ciReplay.hpp"
 #include "classfile/altHashing.hpp"
 #include "classfile/classFileStream.hpp"
@@ -55,7 +56,6 @@
 #include "prims/jniCheck.hpp"
 #include "prims/jniExport.hpp"
 #include "prims/jniFastGetField.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
@@ -263,7 +263,7 @@
 
 #ifdef ASSERT
   Histogram* JNIHistogram;
-  static volatile jint JNIHistogram_lock = 0;
+  static volatile int JNIHistogram_lock = 0;
 
   class JNIHistogramElement : public HistogramElement {
     public:
@@ -3277,9 +3277,9 @@
 
 // Initialization state for three routines below relating to
 // java.nio.DirectBuffers
-static          jint directBufferSupportInitializeStarted = 0;
-static volatile jint directBufferSupportInitializeEnded   = 0;
-static volatile jint directBufferSupportInitializeFailed  = 0;
+static          int directBufferSupportInitializeStarted = 0;
+static volatile int directBufferSupportInitializeEnded   = 0;
+static volatile int directBufferSupportInitializeFailed  = 0;
 static jclass    bufferClass                 = NULL;
 static jclass    directBufferClass           = NULL;
 static jclass    directByteBufferClass       = NULL;
@@ -3844,9 +3844,9 @@
 extern const struct JNIInvokeInterface_ jni_InvokeInterface;
 
 // Global invocation API vars
-volatile jint vm_created = 0;
+volatile int vm_created = 0;
 // Indicate whether it is safe to recreate VM
-volatile jint safe_to_recreate_vm = 1;
+volatile int safe_to_recreate_vm = 1;
 struct JavaVM_ main_vm = {&jni_InvokeInterface};
 
 
@@ -4045,7 +4045,7 @@
 
   HOTSPOT_JNI_GETCREATEDJAVAVMS_ENTRY((void **) vm_buf, bufLen, (uintptr_t *) numVMs);
 
-  if (vm_created) {
+  if (vm_created == 1) {
     if (numVMs != NULL) *numVMs = 1;
     if (bufLen > 0)     *vm_buf = (JavaVM *)(&main_vm);
   } else {
@@ -4065,7 +4065,7 @@
   jint res = JNI_ERR;
   DT_RETURN_MARK(DestroyJavaVM, jint, (const jint&)res);
 
-  if (!vm_created) {
+  if (vm_created == 0) {
     res = JNI_ERR;
     return res;
   }
@@ -4086,7 +4086,7 @@
   ThreadStateTransition::transition_from_native(thread, _thread_in_vm);
   if (Threads::destroy_vm()) {
     // Should not change thread state, VM is gone
-    vm_created = false;
+    vm_created = 0;
     res = JNI_OK;
     return res;
   } else {
@@ -4226,7 +4226,7 @@
 
 jint JNICALL jni_AttachCurrentThread(JavaVM *vm, void **penv, void *_args) {
   HOTSPOT_JNI_ATTACHCURRENTTHREAD_ENTRY(vm, penv, _args);
-  if (!vm_created) {
+  if (vm_created == 0) {
   HOTSPOT_JNI_ATTACHCURRENTTHREAD_RETURN((uint32_t) JNI_ERR);
     return JNI_ERR;
   }
@@ -4285,7 +4285,7 @@
   jint ret = JNI_ERR;
   DT_RETURN_MARK(GetEnv, jint, (const jint&)ret);
 
-  if (!vm_created) {
+  if (vm_created == 0) {
     *penv = NULL;
     ret = JNI_EDETACHED;
     return ret;
@@ -4336,7 +4336,7 @@
 
 jint JNICALL jni_AttachCurrentThreadAsDaemon(JavaVM *vm, void **penv, void *_args) {
   HOTSPOT_JNI_ATTACHCURRENTTHREADASDAEMON_ENTRY(vm, penv, _args);
-  if (!vm_created) {
+  if (vm_created == 0) {
   HOTSPOT_JNI_ATTACHCURRENTTHREADASDAEMON_RETURN((uint32_t) JNI_ERR);
     return JNI_ERR;
   }
--- a/src/hotspot/share/prims/jniCheck.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/prims/jniCheck.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "jni.h"
+#include "jvm.h"
 #include "classfile/javaClasses.inline.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
@@ -32,7 +33,6 @@
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
 #include "prims/jniCheck.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/fieldDescriptor.hpp"
 #include "runtime/handles.hpp"
--- a/src/hotspot/share/prims/jni_md.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1997, 2016, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "utilities/macros.hpp"
-
-/* Switch to the correct jni_md.h file without reliance on -I options. */
-#include CPU_HEADER_H(jni)
-
-/*
-  The local copies of JNI header files may be refreshed
-  from a JDK distribution by means of these commands:
-
-  cp ${JDK_DIST}/solaris/include/solaris/jni_md.h  ./jni_sparc.h
-  cp ${JDK_DIST}/win32/include/win32/jni_md.h      ./jni_i486.h
-  cp ${JDK_DIST}/win32/include/jni.h               ./jni.h
-
-*/
--- a/src/hotspot/share/prims/jvm.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/prims/jvm.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classFileStream.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/classLoaderData.inline.hpp"
@@ -46,7 +47,6 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
@@ -215,7 +215,7 @@
 
 #ifdef ASSERT
   Histogram* JVMHistogram;
-  volatile jint JVMHistogram_lock = 0;
+  volatile int JVMHistogram_lock = 0;
 
   class JVMHistogramElement : public HistogramElement {
     public:
@@ -3766,7 +3766,7 @@
   // when we add a new capability in the jvm_version_info struct, we should also
   // consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat
   // counter defined in runtimeService.cpp.
-  info->is_attachable = AttachListener::is_attach_supported();
+  info->is_attach_supported = AttachListener::is_attach_supported();
 }
 JVM_END
 
--- a/src/hotspot/share/prims/jvm.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1373 +0,0 @@
-/*
- * Copyright (c) 1997, 2017, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_VM_PRIMS_JVM_H
-#define SHARE_VM_PRIMS_JVM_H
-
-#include "jni.h"
-#include "utilities/macros.hpp"
-
-#include OS_HEADER_H(jvm)
-
-#ifndef _JAVASOFT_JVM_H_
-#define _JAVASOFT_JVM_H_
-
-// HotSpot integration note:
-//
-// This file and jvm.h used with the JDK are identical,
-// except for the three includes removed below
-
-// #include <sys/stat.h>
-// #include "jni.h"
-// #include "jvm_md.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains additional functions exported from the VM.
- * These functions are complementary to the standard JNI support.
- * There are three parts to this file:
- *
- * First, this file contains the VM-related functions needed by native
- * libraries in the standard Java API. For example, the java.lang.Object
- * class needs VM-level functions that wait for and notify monitors.
- *
- * Second, this file contains the functions and constant definitions
- * needed by the byte code verifier and class file format checker.
- * These functions allow the verifier and format checker to be written
- * in a VM-independent way.
- *
- * Third, this file contains various I/O and nerwork operations needed
- * by the standard Java I/O and network APIs.
- */
-
-/*
- * Bump the version number when either of the following happens:
- *
- * 1. There is a change in JVM_* functions.
- *
- * 2. There is a change in the contract between VM and Java classes.
- *    For example, if the VM relies on a new private field in Thread
- *    class.
- */
-
-#define JVM_INTERFACE_VERSION 5
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetMethodParameters(JNIEnv *env, jobject method);
-
-JNIEXPORT jint JNICALL
-JVM_GetInterfaceVersion(void);
-
-/*************************************************************************
- PART 1: Functions for Native Libraries
- ************************************************************************/
-/*
- * java.lang.Object
- */
-JNIEXPORT jint JNICALL
-JVM_IHashCode(JNIEnv *env, jobject obj);
-
-JNIEXPORT void JNICALL
-JVM_MonitorWait(JNIEnv *env, jobject obj, jlong ms);
-
-JNIEXPORT void JNICALL
-JVM_MonitorNotify(JNIEnv *env, jobject obj);
-
-JNIEXPORT void JNICALL
-JVM_MonitorNotifyAll(JNIEnv *env, jobject obj);
-
-JNIEXPORT jobject JNICALL
-JVM_Clone(JNIEnv *env, jobject obj);
-
-/*
- * java.lang.String
- */
-JNIEXPORT jstring JNICALL
-JVM_InternString(JNIEnv *env, jstring str);
-
-/*
- * java.lang.System
- */
-JNIEXPORT jlong JNICALL
-JVM_CurrentTimeMillis(JNIEnv *env, jclass ignored);
-
-JNIEXPORT jlong JNICALL
-JVM_NanoTime(JNIEnv *env, jclass ignored);
-
-JNIEXPORT jlong JNICALL
-JVM_GetNanoTimeAdjustment(JNIEnv *env, jclass ignored, jlong offset_secs);
-
-JNIEXPORT void JNICALL
-JVM_ArrayCopy(JNIEnv *env, jclass ignored, jobject src, jint src_pos,
-              jobject dst, jint dst_pos, jint length);
-
-JNIEXPORT jobject JNICALL
-JVM_InitProperties(JNIEnv *env, jobject p);
-
-/*
- * java.lang.Runtime
- */
-
-JNIEXPORT void JNICALL
-JVM_Halt(jint code);
-
-JNIEXPORT void JNICALL
-JVM_GC(void);
-
-/* Returns the number of real-time milliseconds that have elapsed since the
- * least-recently-inspected heap object was last inspected by the garbage
- * collector.
- *
- * For simple stop-the-world collectors this value is just the time
- * since the most recent collection.  For generational collectors it is the
- * time since the oldest generation was most recently collected.  Other
- * collectors are free to return a pessimistic estimate of the elapsed time, or
- * simply the time since the last full collection was performed.
- *
- * Note that in the presence of reference objects, a given object that is no
- * longer strongly reachable may have to be inspected multiple times before it
- * can be reclaimed.
- */
-JNIEXPORT jlong JNICALL
-JVM_MaxObjectInspectionAge(void);
-
-JNIEXPORT jlong JNICALL
-JVM_TotalMemory(void);
-
-JNIEXPORT jlong JNICALL
-JVM_FreeMemory(void);
-
-JNIEXPORT jlong JNICALL
-JVM_MaxMemory(void);
-
-JNIEXPORT jint JNICALL
-JVM_ActiveProcessorCount(void);
-
-JNIEXPORT void * JNICALL
-JVM_LoadLibrary(const char *name);
-
-JNIEXPORT void JNICALL
-JVM_UnloadLibrary(void * handle);
-
-JNIEXPORT void * JNICALL
-JVM_FindLibraryEntry(void *handle, const char *name);
-
-JNIEXPORT jboolean JNICALL
-JVM_IsSupportedJNIVersion(jint version);
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetVmArguments(JNIEnv *env);
-
-/*
- * java.lang.Throwable
- */
-JNIEXPORT void JNICALL
-JVM_FillInStackTrace(JNIEnv *env, jobject throwable);
-
-/*
- * java.lang.StackTraceElement
- */
-JNIEXPORT void JNICALL
-JVM_InitStackTraceElementArray(JNIEnv *env, jobjectArray elements, jobject throwable);
-
-JNIEXPORT void JNICALL
-JVM_InitStackTraceElement(JNIEnv* env, jobject element, jobject stackFrameInfo);
-
-/*
- * java.lang.StackWalker
- */
-enum {
-  JVM_STACKWALK_FILL_CLASS_REFS_ONLY       = 0x02,
-  JVM_STACKWALK_GET_CALLER_CLASS           = 0x04,
-  JVM_STACKWALK_SHOW_HIDDEN_FRAMES         = 0x20,
-  JVM_STACKWALK_FILL_LIVE_STACK_FRAMES     = 0x100
-};
-
-JNIEXPORT jobject JNICALL
-JVM_CallStackWalk(JNIEnv *env, jobject stackStream, jlong mode,
-                  jint skip_frames, jint frame_count, jint start_index,
-                  jobjectArray frames);
-
-JNIEXPORT jint JNICALL
-JVM_MoreStackWalk(JNIEnv *env, jobject stackStream, jlong mode, jlong anchor,
-                  jint frame_count, jint start_index,
-                  jobjectArray frames);
-
-/*
- * java.lang.Thread
- */
-JNIEXPORT void JNICALL
-JVM_StartThread(JNIEnv *env, jobject thread);
-
-JNIEXPORT void JNICALL
-JVM_StopThread(JNIEnv *env, jobject thread, jobject exception);
-
-JNIEXPORT jboolean JNICALL
-JVM_IsThreadAlive(JNIEnv *env, jobject thread);
-
-JNIEXPORT void JNICALL
-JVM_SuspendThread(JNIEnv *env, jobject thread);
-
-JNIEXPORT void JNICALL
-JVM_ResumeThread(JNIEnv *env, jobject thread);
-
-JNIEXPORT void JNICALL
-JVM_SetThreadPriority(JNIEnv *env, jobject thread, jint prio);
-
-JNIEXPORT void JNICALL
-JVM_Yield(JNIEnv *env, jclass threadClass);
-
-JNIEXPORT void JNICALL
-JVM_Sleep(JNIEnv *env, jclass threadClass, jlong millis);
-
-JNIEXPORT jobject JNICALL
-JVM_CurrentThread(JNIEnv *env, jclass threadClass);
-
-JNIEXPORT jint JNICALL
-JVM_CountStackFrames(JNIEnv *env, jobject thread);
-
-JNIEXPORT void JNICALL
-JVM_Interrupt(JNIEnv *env, jobject thread);
-
-JNIEXPORT jboolean JNICALL
-JVM_IsInterrupted(JNIEnv *env, jobject thread, jboolean clearInterrupted);
-
-JNIEXPORT jboolean JNICALL
-JVM_HoldsLock(JNIEnv *env, jclass threadClass, jobject obj);
-
-JNIEXPORT void JNICALL
-JVM_DumpAllStacks(JNIEnv *env, jclass unused);
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetAllThreads(JNIEnv *env, jclass dummy);
-
-JNIEXPORT void JNICALL
-JVM_SetNativeThreadName(JNIEnv *env, jobject jthread, jstring name);
-
-/* getStackTrace() and getAllStackTraces() method */
-JNIEXPORT jobjectArray JNICALL
-JVM_DumpThreads(JNIEnv *env, jclass threadClass, jobjectArray threads);
-
-/*
- * java.lang.SecurityManager
- */
-JNIEXPORT jclass JNICALL
-JVM_CurrentLoadedClass(JNIEnv *env);
-
-JNIEXPORT jobject JNICALL
-JVM_CurrentClassLoader(JNIEnv *env);
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetClassContext(JNIEnv *env);
-
-JNIEXPORT jint JNICALL
-JVM_ClassDepth(JNIEnv *env, jstring name);
-
-JNIEXPORT jint JNICALL
-JVM_ClassLoaderDepth(JNIEnv *env);
-
-/*
- * java.lang.Package
- */
-JNIEXPORT jstring JNICALL
-JVM_GetSystemPackage(JNIEnv *env, jstring name);
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetSystemPackages(JNIEnv *env);
-
-/*
- * java.lang.ref.Reference
- */
-JNIEXPORT jobject JNICALL
-JVM_GetAndClearReferencePendingList(JNIEnv *env);
-
-JNIEXPORT jboolean JNICALL
-JVM_HasReferencePendingList(JNIEnv *env);
-
-JNIEXPORT void JNICALL
-JVM_WaitForReferencePendingList(JNIEnv *env);
-
-/*
- * java.io.ObjectInputStream
- */
-JNIEXPORT jobject JNICALL
-JVM_LatestUserDefinedLoader(JNIEnv *env);
-
-/*
- * java.lang.reflect.Array
- */
-JNIEXPORT jint JNICALL
-JVM_GetArrayLength(JNIEnv *env, jobject arr);
-
-JNIEXPORT jobject JNICALL
-JVM_GetArrayElement(JNIEnv *env, jobject arr, jint index);
-
-JNIEXPORT jvalue JNICALL
-JVM_GetPrimitiveArrayElement(JNIEnv *env, jobject arr, jint index, jint wCode);
-
-JNIEXPORT void JNICALL
-JVM_SetArrayElement(JNIEnv *env, jobject arr, jint index, jobject val);
-
-JNIEXPORT void JNICALL
-JVM_SetPrimitiveArrayElement(JNIEnv *env, jobject arr, jint index, jvalue v,
-                             unsigned char vCode);
-
-JNIEXPORT jobject JNICALL
-JVM_NewArray(JNIEnv *env, jclass eltClass, jint length);
-
-JNIEXPORT jobject JNICALL
-JVM_NewMultiArray(JNIEnv *env, jclass eltClass, jintArray dim);
-
-/*
- * java.lang.Class and java.lang.ClassLoader
- */
-
-#define JVM_CALLER_DEPTH -1
-
-/*
- * Returns the class in which the code invoking the native method
- * belongs.
- *
- * Note that in JDK 1.1, native methods did not create a frame.
- * In 1.2, they do. Therefore native methods like Class.forName
- * can no longer look at the current frame for the caller class.
- */
-JNIEXPORT jclass JNICALL
-JVM_GetCallerClass(JNIEnv *env, int n);
-
-/*
- * Find primitive classes
- * utf: class name
- */
-JNIEXPORT jclass JNICALL
-JVM_FindPrimitiveClass(JNIEnv *env, const char *utf);
-
-/*
- * Find a class from a boot class loader. Returns NULL if class not found.
- */
-JNIEXPORT jclass JNICALL
-JVM_FindClassFromBootLoader(JNIEnv *env, const char *name);
-
-/*
- * Find a class from a given class loader.  Throws ClassNotFoundException.
- *  name:   name of class
- *  init:   whether initialization is done
- *  loader: class loader to look up the class. This may not be the same as the caller's
- *          class loader.
- *  caller: initiating class. The initiating class may be null when a security
- *          manager is not installed.
- */
-JNIEXPORT jclass JNICALL
-JVM_FindClassFromCaller(JNIEnv *env, const char *name, jboolean init,
-                        jobject loader, jclass caller);
-
-/*
- * Find a class from a given class.
- */
-JNIEXPORT jclass JNICALL
-JVM_FindClassFromClass(JNIEnv *env, const char *name, jboolean init,
-                             jclass from);
-
-/* Find a loaded class cached by the VM */
-JNIEXPORT jclass JNICALL
-JVM_FindLoadedClass(JNIEnv *env, jobject loader, jstring name);
-
-/* Define a class */
-JNIEXPORT jclass JNICALL
-JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
-                jsize len, jobject pd);
-
-/* Define a class with a source (added in JDK1.5) */
-JNIEXPORT jclass JNICALL
-JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader,
-                          const jbyte *buf, jsize len, jobject pd,
-                          const char *source);
-
-/*
- * Module support funcions
- */
-
-/*
- * Define a module with the specified packages and bind the module to the
- * given class loader.
- *  module:       module to define
- *  is_open:      specifies if module is open (currently ignored)
- *  version:      the module version
- *  location:     the module location
- *  packages:     list of packages in the module
- *  num_packages: number of packages in the module
- */
-JNIEXPORT void JNICALL
-JVM_DefineModule(JNIEnv *env, jobject module, jboolean is_open, jstring version,
-                 jstring location, const char* const* packages, jsize num_packages);
-
-/*
- * Set the boot loader's unnamed module.
- *  module: boot loader's unnamed module
- */
-JNIEXPORT void JNICALL
-JVM_SetBootLoaderUnnamedModule(JNIEnv *env, jobject module);
-
-/*
- * Do a qualified export of a package.
- *  from_module: module containing the package to export
- *  package:     name of the package to export
- *  to_module:   module to export the package to
- */
-JNIEXPORT void JNICALL
-JVM_AddModuleExports(JNIEnv *env, jobject from_module, const char* package, jobject to_module);
-
-/*
- * Do an export of a package to all unnamed modules.
- *  from_module: module containing the package to export
- *  package:     name of the package to export to all unnamed modules
- */
-JNIEXPORT void JNICALL
-JVM_AddModuleExportsToAllUnnamed(JNIEnv *env, jobject from_module, const char* package);
-
-/*
- * Do an unqualified export of a package.
- *  from_module: module containing the package to export
- *  package:     name of the package to export
- */
-JNIEXPORT void JNICALL
-JVM_AddModuleExportsToAll(JNIEnv *env, jobject from_module, const char* package);
-
-/*
- * Add a module to the list of modules that a given module can read.
- *  from_module:   module requesting read access
- *  source_module: module that from_module wants to read
- */
-JNIEXPORT void JNICALL
-JVM_AddReadsModule(JNIEnv *env, jobject from_module, jobject source_module);
-
-/*
- * Reflection support functions
- */
-
-JNIEXPORT jstring JNICALL
-JVM_GetClassName(JNIEnv *env, jclass cls);
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetClassInterfaces(JNIEnv *env, jclass cls);
-
-JNIEXPORT jboolean JNICALL
-JVM_IsInterface(JNIEnv *env, jclass cls);
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetClassSigners(JNIEnv *env, jclass cls);
-
-JNIEXPORT void JNICALL
-JVM_SetClassSigners(JNIEnv *env, jclass cls, jobjectArray signers);
-
-JNIEXPORT jobject JNICALL
-JVM_GetProtectionDomain(JNIEnv *env, jclass cls);
-
-JNIEXPORT jboolean JNICALL
-JVM_IsArrayClass(JNIEnv *env, jclass cls);
-
-JNIEXPORT jboolean JNICALL
-JVM_IsPrimitiveClass(JNIEnv *env, jclass cls);
-
-JNIEXPORT jint JNICALL
-JVM_GetClassModifiers(JNIEnv *env, jclass cls);
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetDeclaredClasses(JNIEnv *env, jclass ofClass);
-
-JNIEXPORT jclass JNICALL
-JVM_GetDeclaringClass(JNIEnv *env, jclass ofClass);
-
-JNIEXPORT jstring JNICALL
-JVM_GetSimpleBinaryName(JNIEnv *env, jclass ofClass);
-
-/* Generics support (JDK 1.5) */
-JNIEXPORT jstring JNICALL
-JVM_GetClassSignature(JNIEnv *env, jclass cls);
-
-/* Annotations support (JDK 1.5) */
-JNIEXPORT jbyteArray JNICALL
-JVM_GetClassAnnotations(JNIEnv *env, jclass cls);
-
-/* Annotations support (JDK 1.6) */
-
-/* Type use annotations support (JDK 1.8) */
-
-JNIEXPORT jbyteArray JNICALL
-JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls);
-
-// field is a handle to a java.lang.reflect.Field object
-JNIEXPORT jbyteArray JNICALL
-JVM_GetFieldTypeAnnotations(JNIEnv *env, jobject field);
-
-// method is a handle to a java.lang.reflect.Method object
-JNIEXPORT jbyteArray JNICALL
-JVM_GetMethodTypeAnnotations(JNIEnv *env, jobject method);
-
-/*
- * New (JDK 1.4) reflection implementation
- */
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetClassDeclaredMethods(JNIEnv *env, jclass ofClass, jboolean publicOnly);
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetClassDeclaredFields(JNIEnv *env, jclass ofClass, jboolean publicOnly);
-
-JNIEXPORT jobjectArray JNICALL
-JVM_GetClassDeclaredConstructors(JNIEnv *env, jclass ofClass, jboolean publicOnly);
-
-/* Differs from JVM_GetClassModifiers in treatment of inner classes.
-   This returns the access flags for the class as specified in the
-   class file rather than searching the InnerClasses attribute (if
-   present) to find the source-level access flags. Only the values of
-   the low 13 bits (i.e., a mask of 0x1FFF) are guaranteed to be
-   valid. */
-JNIEXPORT jint JNICALL
-JVM_GetClassAccessFlags(JNIEnv *env, jclass cls);
-
-/*
- * Constant pool access; currently used to implement reflective access to annotations (JDK 1.5)
- */
-
-JNIEXPORT jobject JNICALL
-JVM_GetClassConstantPool(JNIEnv *env, jclass cls);
-
-JNIEXPORT jint JNICALL JVM_ConstantPoolGetSize
-(JNIEnv *env, jobject obj, jobject unused);
-
-JNIEXPORT jclass JNICALL JVM_ConstantPoolGetClassAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jclass JNICALL JVM_ConstantPoolGetClassAtIfLoaded
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jobject JNICALL JVM_ConstantPoolGetMethodAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jobject JNICALL JVM_ConstantPoolGetMethodAtIfLoaded
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jobject JNICALL JVM_ConstantPoolGetFieldAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jobject JNICALL JVM_ConstantPoolGetFieldAtIfLoaded
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jobjectArray JNICALL JVM_ConstantPoolGetMemberRefInfoAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jobjectArray JNICALL JVM_ConstantPoolGetNameAndTypeRefInfoAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jint JNICALL JVM_ConstantPoolGetNameAndTypeRefIndexAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jint JNICALL JVM_ConstantPoolGetClassRefIndexAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jint JNICALL JVM_ConstantPoolGetIntAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jlong JNICALL JVM_ConstantPoolGetLongAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jfloat JNICALL JVM_ConstantPoolGetFloatAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jdouble JNICALL JVM_ConstantPoolGetDoubleAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jstring JNICALL JVM_ConstantPoolGetStringAt
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jstring JNICALL JVM_ConstantPoolGetUTF8At
-(JNIEnv *env, jobject obj, jobject unused, jint index);
-
-JNIEXPORT jbyte JNICALL JVM_ConstantPoolGetTagAt
-(JNIEnv *env, jobject unused, jobject jcpool, jint index);
-
-/*
- * java.security.*
- */
-
-JNIEXPORT jobject JNICALL
-JVM_DoPrivileged(JNIEnv *env, jclass cls,
-                 jobject action, jobject context, jboolean wrapException);
-
-JNIEXPORT jobject JNICALL
-JVM_GetInheritedAccessControlContext(JNIEnv *env, jclass cls);
-
-JNIEXPORT jobject JNICALL
-JVM_GetStackAccessControlContext(JNIEnv *env, jclass cls);
-
-/*
- * Signal support, used to implement the shutdown sequence.  Every VM must
- * support JVM_SIGINT and JVM_SIGTERM, raising the former for user interrupts
- * (^C) and the latter for external termination (kill, system shutdown, etc.).
- * Other platform-dependent signal values may also be supported.
- */
-
-JNIEXPORT void * JNICALL
-JVM_RegisterSignal(jint sig, void *handler);
-
-JNIEXPORT jboolean JNICALL
-JVM_RaiseSignal(jint sig);
-
-JNIEXPORT jint JNICALL
-JVM_FindSignal(const char *name);
-
-/*
- * Retrieve the assertion directives for the specified class.
- */
-JNIEXPORT jboolean JNICALL
-JVM_DesiredAssertionStatus(JNIEnv *env, jclass unused, jclass cls);
-
-/*
- * Retrieve the assertion directives from the VM.
- */
-JNIEXPORT jobject JNICALL
-JVM_AssertionStatusDirectives(JNIEnv *env, jclass unused);
-
-/*
- * java.util.concurrent.atomic.AtomicLong
- */
-JNIEXPORT jboolean JNICALL
-JVM_SupportsCX8(void);
-
-/*************************************************************************
- PART 2: Support for the Verifier and Class File Format Checker
- ************************************************************************/
-/*
- * Return the class name in UTF format. The result is valid
- * until JVM_ReleaseUTf is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetClassNameUTF(JNIEnv *env, jclass cb);
-
-/*
- * Returns the constant pool types in the buffer provided by "types."
- */
-JNIEXPORT void JNICALL
-JVM_GetClassCPTypes(JNIEnv *env, jclass cb, unsigned char *types);
-
-/*
- * Returns the number of Constant Pool entries.
- */
-JNIEXPORT jint JNICALL
-JVM_GetClassCPEntriesCount(JNIEnv *env, jclass cb);
-
-/*
- * Returns the number of *declared* fields or methods.
- */
-JNIEXPORT jint JNICALL
-JVM_GetClassFieldsCount(JNIEnv *env, jclass cb);
-
-JNIEXPORT jint JNICALL
-JVM_GetClassMethodsCount(JNIEnv *env, jclass cb);
-
-/*
- * Returns the CP indexes of exceptions raised by a given method.
- * Places the result in the given buffer.
- *
- * The method is identified by method_index.
- */
-JNIEXPORT void JNICALL
-JVM_GetMethodIxExceptionIndexes(JNIEnv *env, jclass cb, jint method_index,
-                                unsigned short *exceptions);
-/*
- * Returns the number of exceptions raised by a given method.
- * The method is identified by method_index.
- */
-JNIEXPORT jint JNICALL
-JVM_GetMethodIxExceptionsCount(JNIEnv *env, jclass cb, jint method_index);
-
-/*
- * Returns the byte code sequence of a given method.
- * Places the result in the given buffer.
- *
- * The method is identified by method_index.
- */
-JNIEXPORT void JNICALL
-JVM_GetMethodIxByteCode(JNIEnv *env, jclass cb, jint method_index,
-                        unsigned char *code);
-
-/*
- * Returns the length of the byte code sequence of a given method.
- * The method is identified by method_index.
- */
-JNIEXPORT jint JNICALL
-JVM_GetMethodIxByteCodeLength(JNIEnv *env, jclass cb, jint method_index);
-
-/*
- * A structure used to a capture exception table entry in a Java method.
- */
-typedef struct {
-    jint start_pc;
-    jint end_pc;
-    jint handler_pc;
-    jint catchType;
-} JVM_ExceptionTableEntryType;
-
-/*
- * Returns the exception table entry at entry_index of a given method.
- * Places the result in the given buffer.
- *
- * The method is identified by method_index.
- */
-JNIEXPORT void JNICALL
-JVM_GetMethodIxExceptionTableEntry(JNIEnv *env, jclass cb, jint method_index,
-                                   jint entry_index,
-                                   JVM_ExceptionTableEntryType *entry);
-
-/*
- * Returns the length of the exception table of a given method.
- * The method is identified by method_index.
- */
-JNIEXPORT jint JNICALL
-JVM_GetMethodIxExceptionTableLength(JNIEnv *env, jclass cb, int index);
-
-/*
- * Returns the modifiers of a given field.
- * The field is identified by field_index.
- */
-JNIEXPORT jint JNICALL
-JVM_GetFieldIxModifiers(JNIEnv *env, jclass cb, int index);
-
-/*
- * Returns the modifiers of a given method.
- * The method is identified by method_index.
- */
-JNIEXPORT jint JNICALL
-JVM_GetMethodIxModifiers(JNIEnv *env, jclass cb, int index);
-
-/*
- * Returns the number of local variables of a given method.
- * The method is identified by method_index.
- */
-JNIEXPORT jint JNICALL
-JVM_GetMethodIxLocalsCount(JNIEnv *env, jclass cb, int index);
-
-/*
- * Returns the number of arguments (including this pointer) of a given method.
- * The method is identified by method_index.
- */
-JNIEXPORT jint JNICALL
-JVM_GetMethodIxArgsSize(JNIEnv *env, jclass cb, int index);
-
-/*
- * Returns the maximum amount of stack (in words) used by a given method.
- * The method is identified by method_index.
- */
-JNIEXPORT jint JNICALL
-JVM_GetMethodIxMaxStack(JNIEnv *env, jclass cb, int index);
-
-/*
- * Is a given method a constructor.
- * The method is identified by method_index.
- */
-JNIEXPORT jboolean JNICALL
-JVM_IsConstructorIx(JNIEnv *env, jclass cb, int index);
-
-/*
- * Is the given method generated by the VM.
- * The method is identified by method_index.
- */
-JNIEXPORT jboolean JNICALL
-JVM_IsVMGeneratedMethodIx(JNIEnv *env, jclass cb, int index);
-
-/*
- * Returns the name of a given method in UTF format.
- * The result remains valid until JVM_ReleaseUTF is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetMethodIxNameUTF(JNIEnv *env, jclass cb, jint index);
-
-/*
- * Returns the signature of a given method in UTF format.
- * The result remains valid until JVM_ReleaseUTF is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetMethodIxSignatureUTF(JNIEnv *env, jclass cb, jint index);
-
-/*
- * Returns the name of the field refered to at a given constant pool
- * index.
- *
- * The result is in UTF format and remains valid until JVM_ReleaseUTF
- * is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetCPFieldNameUTF(JNIEnv *env, jclass cb, jint index);
-
-/*
- * Returns the name of the method refered to at a given constant pool
- * index.
- *
- * The result is in UTF format and remains valid until JVM_ReleaseUTF
- * is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetCPMethodNameUTF(JNIEnv *env, jclass cb, jint index);
-
-/*
- * Returns the signature of the method refered to at a given constant pool
- * index.
- *
- * The result is in UTF format and remains valid until JVM_ReleaseUTF
- * is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetCPMethodSignatureUTF(JNIEnv *env, jclass cb, jint index);
-
-/*
- * Returns the signature of the field refered to at a given constant pool
- * index.
- *
- * The result is in UTF format and remains valid until JVM_ReleaseUTF
- * is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetCPFieldSignatureUTF(JNIEnv *env, jclass cb, jint index);
-
-/*
- * Returns the class name refered to at a given constant pool index.
- *
- * The result is in UTF format and remains valid until JVM_ReleaseUTF
- * is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetCPClassNameUTF(JNIEnv *env, jclass cb, jint index);
-
-/*
- * Returns the class name refered to at a given constant pool index.
- *
- * The constant pool entry must refer to a CONSTANT_Fieldref.
- *
- * The result is in UTF format and remains valid until JVM_ReleaseUTF
- * is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetCPFieldClassNameUTF(JNIEnv *env, jclass cb, jint index);
-
-/*
- * Returns the class name refered to at a given constant pool index.
- *
- * The constant pool entry must refer to CONSTANT_Methodref or
- * CONSTANT_InterfaceMethodref.
- *
- * The result is in UTF format and remains valid until JVM_ReleaseUTF
- * is called.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- */
-JNIEXPORT const char * JNICALL
-JVM_GetCPMethodClassNameUTF(JNIEnv *env, jclass cb, jint index);
-
-/*
- * Returns the modifiers of a field in calledClass. The field is
- * referred to in class cb at constant pool entry index.
- *
- * The caller must treat the string as a constant and not modify it
- * in any way.
- *
- * Returns -1 if the field does not exist in calledClass.
- */
-JNIEXPORT jint JNICALL
-JVM_GetCPFieldModifiers(JNIEnv *env, jclass cb, int index, jclass calledClass);
-
-/*
- * Returns the modifiers of a method in calledClass. The method is
- * referred to in class cb at constant pool entry index.
- *
- * Returns -1 if the method does not exist in calledClass.
- */
-JNIEXPORT jint JNICALL
-JVM_GetCPMethodModifiers(JNIEnv *env, jclass cb, int index, jclass calledClass);
-
-/*
- * Releases the UTF string obtained from the VM.
- */
-JNIEXPORT void JNICALL
-JVM_ReleaseUTF(const char *utf);
-
-/*
- * Compare if two classes are in the same package.
- */
-JNIEXPORT jboolean JNICALL
-JVM_IsSameClassPackage(JNIEnv *env, jclass class1, jclass class2);
-
-/* Constants in class files */
-
-#define JVM_ACC_PUBLIC        0x0001  /* visible to everyone */
-#define JVM_ACC_PRIVATE       0x0002  /* visible only to the defining class */
-#define JVM_ACC_PROTECTED     0x0004  /* visible to subclasses */
-#define JVM_ACC_STATIC        0x0008  /* instance variable is static */
-#define JVM_ACC_FINAL         0x0010  /* no further subclassing, overriding */
-#define JVM_ACC_SYNCHRONIZED  0x0020  /* wrap method call in monitor lock */
-#define JVM_ACC_SUPER         0x0020  /* funky handling of invokespecial */
-#define JVM_ACC_VOLATILE      0x0040  /* can not cache in registers */
-#define JVM_ACC_BRIDGE        0x0040  /* bridge method generated by compiler */
-#define JVM_ACC_TRANSIENT     0x0080  /* not persistent */
-#define JVM_ACC_VARARGS       0x0080  /* method declared with variable number of args */
-#define JVM_ACC_NATIVE        0x0100  /* implemented in C */
-#define JVM_ACC_INTERFACE     0x0200  /* class is an interface */
-#define JVM_ACC_ABSTRACT      0x0400  /* no definition provided */
-#define JVM_ACC_STRICT        0x0800  /* strict floating point */
-#define JVM_ACC_SYNTHETIC     0x1000  /* compiler-generated class, method or field */
-#define JVM_ACC_ANNOTATION    0x2000  /* annotation type */
-#define JVM_ACC_ENUM          0x4000  /* field is declared as element of enum */
-#define JVM_ACC_MODULE        0x8000  /* module-info class file */
-
-#define JVM_ACC_PUBLIC_BIT        0
-#define JVM_ACC_PRIVATE_BIT       1
-#define JVM_ACC_PROTECTED_BIT     2
-#define JVM_ACC_STATIC_BIT        3
-#define JVM_ACC_FINAL_BIT         4
-#define JVM_ACC_SYNCHRONIZED_BIT  5
-#define JVM_ACC_SUPER_BIT         5
-#define JVM_ACC_VOLATILE_BIT      6
-#define JVM_ACC_BRIDGE_BIT        6
-#define JVM_ACC_TRANSIENT_BIT     7
-#define JVM_ACC_VARARGS_BIT       7
-#define JVM_ACC_NATIVE_BIT        8
-#define JVM_ACC_INTERFACE_BIT     9
-#define JVM_ACC_ABSTRACT_BIT      10
-#define JVM_ACC_STRICT_BIT        11
-#define JVM_ACC_SYNTHETIC_BIT     12
-#define JVM_ACC_ANNOTATION_BIT    13
-#define JVM_ACC_ENUM_BIT          14
-
-// NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/utilities/ConstantTag.java
-enum {
-    JVM_CONSTANT_Utf8 = 1,
-    JVM_CONSTANT_Unicode,               /* unused */
-    JVM_CONSTANT_Integer,
-    JVM_CONSTANT_Float,
-    JVM_CONSTANT_Long,
-    JVM_CONSTANT_Double,
-    JVM_CONSTANT_Class,
-    JVM_CONSTANT_String,
-    JVM_CONSTANT_Fieldref,
-    JVM_CONSTANT_Methodref,
-    JVM_CONSTANT_InterfaceMethodref,
-    JVM_CONSTANT_NameAndType,
-    JVM_CONSTANT_MethodHandle           = 15,  // JSR 292
-    JVM_CONSTANT_MethodType             = 16,  // JSR 292
-    //JVM_CONSTANT_(unused)             = 17,  // JSR 292 early drafts only
-    JVM_CONSTANT_InvokeDynamic          = 18,  // JSR 292
-    JVM_CONSTANT_ExternalMax            = 18   // Last tag found in classfiles
-};
-
-/* JVM_CONSTANT_MethodHandle subtypes */
-enum {
-    JVM_REF_getField                = 1,
-    JVM_REF_getStatic               = 2,
-    JVM_REF_putField                = 3,
-    JVM_REF_putStatic               = 4,
-    JVM_REF_invokeVirtual           = 5,
-    JVM_REF_invokeStatic            = 6,
-    JVM_REF_invokeSpecial           = 7,
-    JVM_REF_newInvokeSpecial        = 8,
-    JVM_REF_invokeInterface         = 9
-};
-
-/* Used in the newarray instruction. */
-
-#define JVM_T_BOOLEAN 4
-#define JVM_T_CHAR    5
-#define JVM_T_FLOAT   6
-#define JVM_T_DOUBLE  7
-#define JVM_T_BYTE    8
-#define JVM_T_SHORT   9
-#define JVM_T_INT    10
-#define JVM_T_LONG   11
-
-/* JVM method signatures */
-
-#define JVM_SIGNATURE_ARRAY             '['
-#define JVM_SIGNATURE_BYTE              'B'
-#define JVM_SIGNATURE_CHAR              'C'
-#define JVM_SIGNATURE_CLASS             'L'
-#define JVM_SIGNATURE_ENDCLASS          ';'
-#define JVM_SIGNATURE_ENUM              'E'
-#define JVM_SIGNATURE_FLOAT             'F'
-#define JVM_SIGNATURE_DOUBLE            'D'
-#define JVM_SIGNATURE_FUNC              '('
-#define JVM_SIGNATURE_ENDFUNC           ')'
-#define JVM_SIGNATURE_INT               'I'
-#define JVM_SIGNATURE_LONG              'J'
-#define JVM_SIGNATURE_SHORT             'S'
-#define JVM_SIGNATURE_VOID              'V'
-#define JVM_SIGNATURE_BOOLEAN           'Z'
-
-/*
- * A function defined by the byte-code verifier and called by the VM.
- * This is not a function implemented in the VM.
- *
- * Returns JNI_FALSE if verification fails. A detailed error message
- * will be places in msg_buf, whose length is specified by buf_len.
- */
-typedef jboolean (*verifier_fn_t)(JNIEnv *env,
-                                  jclass cb,
-                                  char * msg_buf,
-                                  jint buf_len);
-
-
-/*
- * Support for a VM-independent class format checker.
- */
-typedef struct {
-    unsigned long code;    /* byte code */
-    unsigned long excs;    /* exceptions */
-    unsigned long etab;    /* catch table */
-    unsigned long lnum;    /* line number */
-    unsigned long lvar;    /* local vars */
-} method_size_info;
-
-typedef struct {
-    unsigned int constants;    /* constant pool */
-    unsigned int fields;
-    unsigned int methods;
-    unsigned int interfaces;
-    unsigned int fields2;      /* number of static 2-word fields */
-    unsigned int innerclasses; /* # of records in InnerClasses attr */
-
-    method_size_info clinit;   /* memory used in clinit */
-    method_size_info main;     /* used everywhere else */
-} class_size_info;
-
-/*
- * Functions defined in libjava.so to perform string conversions.
- *
- */
-
-typedef jstring (*to_java_string_fn_t)(JNIEnv *env, char *str);
-
-typedef char *(*to_c_string_fn_t)(JNIEnv *env, jstring s, jboolean *b);
-
-/* This is the function defined in libjava.so that performs class
- * format checks. This functions fills in size information about
- * the class file and returns:
- *
- *   0: good
- *  -1: out of memory
- *  -2: bad format
- *  -3: unsupported version
- *  -4: bad class name
- */
-
-typedef jint (*check_format_fn_t)(char *class_name,
-                                  unsigned char *data,
-                                  unsigned int data_size,
-                                  class_size_info *class_size,
-                                  char *message_buffer,
-                                  jint buffer_length,
-                                  jboolean measure_only,
-                                  jboolean check_relaxed);
-
-#define JVM_RECOGNIZED_CLASS_MODIFIERS (JVM_ACC_PUBLIC | \
-                                        JVM_ACC_FINAL | \
-                                        JVM_ACC_SUPER | \
-                                        JVM_ACC_INTERFACE | \
-                                        JVM_ACC_ABSTRACT | \
-                                        JVM_ACC_ANNOTATION | \
-                                        JVM_ACC_ENUM | \
-                                        JVM_ACC_SYNTHETIC)
-
-#define JVM_RECOGNIZED_FIELD_MODIFIERS (JVM_ACC_PUBLIC | \
-                                        JVM_ACC_PRIVATE | \
-                                        JVM_ACC_PROTECTED | \
-                                        JVM_ACC_STATIC | \
-                                        JVM_ACC_FINAL | \
-                                        JVM_ACC_VOLATILE | \
-                                        JVM_ACC_TRANSIENT | \
-                                        JVM_ACC_ENUM | \
-                                        JVM_ACC_SYNTHETIC)
-
-#define JVM_RECOGNIZED_METHOD_MODIFIERS (JVM_ACC_PUBLIC | \
-                                         JVM_ACC_PRIVATE | \
-                                         JVM_ACC_PROTECTED | \
-                                         JVM_ACC_STATIC | \
-                                         JVM_ACC_FINAL | \
-                                         JVM_ACC_SYNCHRONIZED | \
-                                         JVM_ACC_BRIDGE | \
-                                         JVM_ACC_VARARGS | \
-                                         JVM_ACC_NATIVE | \
-                                         JVM_ACC_ABSTRACT | \
-                                         JVM_ACC_STRICT | \
-                                         JVM_ACC_SYNTHETIC)
-
-/*
- * This is the function defined in libjava.so to perform path
- * canonicalization. VM call this function before opening jar files
- * to load system classes.
- *
- */
-
-typedef int (*canonicalize_fn_t)(JNIEnv *env, char *orig, char *out, int len);
-
-/*************************************************************************
- PART 3: I/O and Network Support
- ************************************************************************/
-
-/*
- * Convert a pathname into native format.  This function does syntactic
- * cleanup, such as removing redundant separator characters.  It modifies
- * the given pathname string in place.
- */
-JNIEXPORT char * JNICALL
-JVM_NativePath(char *);
-
-/*
- * The standard printing functions supported by the Java VM. (Should they
- * be renamed to JVM_* in the future?
- */
-
-/* jio_snprintf() and jio_vsnprintf() behave like snprintf(3) and vsnprintf(3),
- *  respectively, with the following differences:
- * - The string written to str is always zero-terminated, also in case of
- *   truncation (count is too small to hold the result string), unless count
- *   is 0. In case of truncation count-1 characters are written and '\0'
- *   appendend.
- * - If count is too small to hold the whole string, -1 is returned across
- *   all platforms. */
-JNIEXPORT int
-jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
-
-JNIEXPORT int
-jio_snprintf(char *str, size_t count, const char *fmt, ...);
-
-JNIEXPORT int
-jio_fprintf(FILE *, const char *fmt, ...);
-
-JNIEXPORT int
-jio_vfprintf(FILE *, const char *fmt, va_list args);
-
-
-JNIEXPORT void * JNICALL
-JVM_RawMonitorCreate(void);
-
-JNIEXPORT void JNICALL
-JVM_RawMonitorDestroy(void *mon);
-
-JNIEXPORT jint JNICALL
-JVM_RawMonitorEnter(void *mon);
-
-JNIEXPORT void JNICALL
-JVM_RawMonitorExit(void *mon);
-
-/*
- * java.lang.reflect.Method
- */
-JNIEXPORT jobject JNICALL
-JVM_InvokeMethod(JNIEnv *env, jobject method, jobject obj, jobjectArray args0);
-
-/*
- * java.lang.reflect.Constructor
- */
-JNIEXPORT jobject JNICALL
-JVM_NewInstanceFromConstructor(JNIEnv *env, jobject c, jobjectArray args0);
-
-/*
- * java.lang.management support
- */
-JNIEXPORT void* JNICALL
-JVM_GetManagement(jint version);
-
-/*
- * com.sun.tools.attach.VirtualMachine support
- *
- * Initialize the agent properties with the properties maintained in the VM.
- */
-JNIEXPORT jobject JNICALL
-JVM_InitAgentProperties(JNIEnv *env, jobject agent_props);
-
-JNIEXPORT jstring JNICALL
-JVM_GetTemporaryDirectory(JNIEnv *env);
-
-/* Generics reflection support.
- *
- * Returns information about the given class's EnclosingMethod
- * attribute, if present, or null if the class had no enclosing
- * method.
- *
- * If non-null, the returned array contains three elements. Element 0
- * is the java.lang.Class of which the enclosing method is a member,
- * and elements 1 and 2 are the java.lang.Strings for the enclosing
- * method's name and descriptor, respectively.
- */
-JNIEXPORT jobjectArray JNICALL
-JVM_GetEnclosingMethodInfo(JNIEnv* env, jclass ofClass);
-
-/* =========================================================================
- * The following defines a private JVM interface that the JDK can query
- * for the JVM version and capabilities.  sun.misc.Version defines
- * the methods for getting the VM version and its capabilities.
- *
- * When a new bit is added, the following should be updated to provide
- * access to the new capability:
- *    HS:   JVM_GetVersionInfo and Abstract_VM_Version class
- *    SDK:  Version class
- *
- * Similary, a private JDK interface JDK_GetVersionInfo0 is defined for
- * JVM to query for the JDK version and capabilities.
- *
- * When a new bit is added, the following should be updated to provide
- * access to the new capability:
- *    HS:   JDK_Version class
- *    SDK:  JDK_GetVersionInfo0
- *
- * ==========================================================================
- */
-typedef struct {
-    unsigned int jvm_version; /* Encoded $VNUM as defined by JEP-223 */
-    unsigned int patch_version : 8; /* JEP-223 patch version */
-    unsigned int reserved3 : 8;
-    unsigned int reserved1 : 16;
-    unsigned int reserved2;
-
-    /* The following bits represents JVM supports that JDK has dependency on.
-     * JDK can use these bits to determine which JVM version
-     * and support it has to maintain runtime compatibility.
-     *
-     * When a new bit is added in a minor or update release, make sure
-     * the new bit is also added in the main/baseline.
-     */
-    unsigned int is_attachable : 1;
-    unsigned int : 31;
-    unsigned int : 32;
-    unsigned int : 32;
-} jvm_version_info;
-
-#define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
-#define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
-#define JVM_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
-#define JVM_VERSION_BUILD(version) ((version & 0x000000FF))
-
-JNIEXPORT void JNICALL
-JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size);
-
-typedef struct {
-    unsigned int jdk_version; /* Encoded $VNUM as defined by JEP-223 */
-    unsigned int patch_version : 8; /* JEP-223 patch version */
-    unsigned int reserved3 : 8;
-    unsigned int reserved1 : 16;
-    unsigned int reserved2;
-
-    /* The following bits represents new JDK supports that VM has dependency on.
-     * VM implementation can use these bits to determine which JDK version
-     * and support it has to maintain runtime compatibility.
-     *
-     * When a new bit is added in a minor or update release, make sure
-     * the new bit is also added in the main/baseline.
-     */
-    unsigned int thread_park_blocker : 1;
-    unsigned int post_vm_init_hook_enabled : 1;
-    unsigned int pending_list_uses_discovered_field : 1;
-    unsigned int : 29;
-    unsigned int : 32;
-    unsigned int : 32;
-} jdk_version_info;
-
-#define JDK_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
-#define JDK_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
-#define JDK_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
-#define JDK_VERSION_BUILD(version) ((version & 0x000000FF))
-
-/*
- * This is the function JDK_GetVersionInfo0 defined in libjava.so
- * that is dynamically looked up by JVM.
- */
-typedef void (*jdk_version_info_fn_t)(jdk_version_info* info, size_t info_size);
-
-/*
- * This structure is used by the launcher to get the default thread
- * stack size from the VM using JNI_GetDefaultJavaVMInitArgs() with a
- * version of 1.1.  As it is not supported otherwise, it has been removed
- * from jni.h
- */
-typedef struct JDK1_1InitArgs {
-    jint version;
-
-    char **properties;
-    jint checkSource;
-    jint nativeStackSize;
-    jint javaStackSize;
-    jint minHeapSize;
-    jint maxHeapSize;
-    jint verifyMode;
-    char *classpath;
-
-    jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args);
-    void (JNICALL *exit)(jint code);
-    void (JNICALL *abort)(void);
-
-    jint enableClassGC;
-    jint enableVerboseGC;
-    jint disableAsyncGC;
-    jint verbose;
-    jboolean debugging;
-    jint debugPort;
-} JDK1_1InitArgs;
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* !_JAVASOFT_JVM_H_ */
-
-#endif // SHARE_VM_PRIMS_JVM_H
--- a/src/hotspot/share/prims/jvmtiEnvBase.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/prims/jvmtiEnvBase.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -741,7 +741,7 @@
 // Save JNI local handles for any objects that this frame owns.
 jvmtiError
 JvmtiEnvBase::get_locked_objects_in_frame(JavaThread* calling_thread, JavaThread* java_thread,
-                                 javaVFrame *jvf, GrowableArray<jvmtiMonitorStackDepthInfo*>* owned_monitors_list, int stack_depth) {
+                                 javaVFrame *jvf, GrowableArray<jvmtiMonitorStackDepthInfo*>* owned_monitors_list, jint stack_depth) {
   jvmtiError err = JVMTI_ERROR_NONE;
   ResourceMark rm;
 
--- a/src/hotspot/share/prims/jvmtiImpl.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/prims/jvmtiImpl.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -523,7 +523,7 @@
 //
 
 // Constructor for non-object getter
-VM_GetOrSetLocal::VM_GetOrSetLocal(JavaThread* thread, jint depth, int index, BasicType type)
+VM_GetOrSetLocal::VM_GetOrSetLocal(JavaThread* thread, jint depth, jint index, BasicType type)
   : _thread(thread)
   , _calling_thread(NULL)
   , _depth(depth)
@@ -536,7 +536,7 @@
 }
 
 // Constructor for object or non-object setter
-VM_GetOrSetLocal::VM_GetOrSetLocal(JavaThread* thread, jint depth, int index, BasicType type, jvalue value)
+VM_GetOrSetLocal::VM_GetOrSetLocal(JavaThread* thread, jint depth, jint index, BasicType type, jvalue value)
   : _thread(thread)
   , _calling_thread(NULL)
   , _depth(depth)
--- a/src/hotspot/share/prims/jvmtiTagMap.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/prims/jvmtiTagMap.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -2006,7 +2006,7 @@
                                                              jlong thread_tag,
                                                              jint depth,
                                                              jmethodID method,
-                                                             jint slot,
+                                                             int slot,
                                                              oop obj) {
   assert(ServiceUtil::visible_oop(obj), "checking");
 
--- a/src/hotspot/share/prims/methodHandles.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/prims/methodHandles.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -27,7 +27,6 @@
 
 #include "classfile/javaClasses.hpp"
 #include "classfile/vmSymbols.hpp"
-#include "prims/jvm.h"
 #include "runtime/frame.inline.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/interfaceSupport.hpp"
--- a/src/hotspot/share/prims/perf.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/prims/perf.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,11 +24,11 @@
 
 #include "precompiled.hpp"
 #include "jni.h"
+#include "jvm.h"
 #include "classfile/vmSymbols.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/perfData.hpp"
 #include "runtime/perfMemory.hpp"
--- a/src/hotspot/share/prims/unsafe.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/prims/unsafe.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "jni.h"
+#include "jvm.h"
 #include "classfile/classFileStream.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "memory/allocation.inline.hpp"
@@ -31,7 +32,6 @@
 #include "oops/fieldStreams.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/unsafe.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/globals.hpp"
--- a/src/hotspot/share/runtime/arguments.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/arguments.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classLoader.hpp"
 #include "classfile/javaAssertions.hpp"
 #include "classfile/moduleEntry.hpp"
@@ -39,7 +40,6 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiExport.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/arguments_ext.hpp"
--- a/src/hotspot/share/runtime/commandLineFlagRangeList.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/commandLineFlagRangeList.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,10 +23,10 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/stringTable.hpp"
 #include "classfile/symbolTable.hpp"
 #include "gc/shared/referenceProcessor.hpp"
-#include "prims/jvm.h"
 #include "oops/markOop.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/commandLineFlagConstraintList.hpp"
--- a/src/hotspot/share/runtime/deoptimization.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/deoptimization.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/systemDictionary.hpp"
 #include "code/codeCache.hpp"
 #include "code/debugInfoRec.hpp"
@@ -40,7 +41,6 @@
 #include "oops/oop.inline.hpp"
 #include "oops/fieldStreams.hpp"
 #include "oops/verifyOopClosure.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/compilationPolicy.hpp"
--- a/src/hotspot/share/runtime/globals.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/globals.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,9 +23,9 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "memory/allocation.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/arguments.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/globals_extension.hpp"
--- a/src/hotspot/share/runtime/interfaceSupport.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/interfaceSupport.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -47,7 +47,7 @@
 Histogram* RuntimeHistogram;
 
 RuntimeHistogramElement::RuntimeHistogramElement(const char* elementName) {
-  static volatile jint RuntimeHistogram_lock = 0;
+  static volatile int RuntimeHistogram_lock = 0;
   _name = elementName;
   uintx count = 0;
 
--- a/src/hotspot/share/runtime/java.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/java.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "aot/aotLoader.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/stringTable.hpp"
@@ -49,7 +50,6 @@
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiExport.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/biasedLocking.hpp"
--- a/src/hotspot/share/runtime/os.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/os.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classLoader.hpp"
 #include "classfile/javaClasses.hpp"
 #include "classfile/moduleEntry.hpp"
@@ -41,7 +42,6 @@
 #endif
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "prims/privilegedStack.hpp"
 #include "runtime/arguments.hpp"
--- a/src/hotspot/share/runtime/os.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/os.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -25,8 +25,8 @@
 #ifndef SHARE_VM_RUNTIME_OS_HPP
 #define SHARE_VM_RUNTIME_OS_HPP
 
+#include "jvm.h"
 #include "jvmtifiles/jvmti.h"
-#include "prims/jvm.h"
 #include "runtime/extendedPC.hpp"
 #include "runtime/handles.hpp"
 #include "utilities/macros.hpp"
--- a/src/hotspot/share/runtime/perfData.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/perfData.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,10 +23,10 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/vmSymbols.hpp"
 #include "logging/log.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/handles.inline.hpp"
 #include "runtime/java.hpp"
 #include "runtime/mutex.hpp"
@@ -420,11 +420,11 @@
 
 PerfStringVariable* PerfDataManager::create_string_variable(CounterNS ns,
                                                             const char* name,
-                                                            jint max_length,
+                                                            int max_length,
                                                             const char* s,
                                                             TRAPS) {
 
-  if (max_length == 0 && s != NULL) max_length = (jint)strlen(s);
+  if (max_length == 0 && s != NULL) max_length = (int)strlen(s);
 
   assert(max_length != 0, "PerfStringVariable with length 0");
 
--- a/src/hotspot/share/runtime/perfMemory.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/perfMemory.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,9 +23,9 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logging/log.hpp"
 #include "memory/allocation.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/arguments.hpp"
 #include "runtime/java.hpp"
 #include "runtime/mutex.hpp"
@@ -51,7 +51,7 @@
 char*                    PerfMemory::_end = NULL;
 char*                    PerfMemory::_top = NULL;
 size_t                   PerfMemory::_capacity = 0;
-jint                     PerfMemory::_initialized = false;
+int                      PerfMemory::_initialized = false;
 PerfDataPrologue*        PerfMemory::_prologue = NULL;
 bool                     PerfMemory::_destroyed = false;
 
--- a/src/hotspot/share/runtime/perfMemory.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/perfMemory.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -120,7 +120,7 @@
     static char*  _top;
     static size_t _capacity;
     static PerfDataPrologue*  _prologue;
-    static jint   _initialized;
+    static int    _initialized;
     static bool   _destroyed;
 
     static void create_memory_region(size_t sizep);
--- a/src/hotspot/share/runtime/reflection.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/reflection.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/javaClasses.hpp"
 #include "classfile/moduleEntry.hpp"
 #include "classfile/packageEntry.hpp"
@@ -38,7 +39,6 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiExport.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/handles.inline.hpp"
--- a/src/hotspot/share/runtime/sharedRuntime.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "aot/aotLoader.hpp"
 #include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
@@ -45,7 +46,6 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/forte.hpp"
-#include "prims/jvm.h"
 #include "prims/jvmtiExport.hpp"
 #include "prims/methodHandles.hpp"
 #include "prims/nativeLookup.hpp"
--- a/src/hotspot/share/runtime/thread.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/thread.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classLoader.hpp"
 #include "classfile/javaClasses.hpp"
 #include "classfile/moduleEntry.hpp"
@@ -51,7 +52,6 @@
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
 #include "oops/verifyOopClosure.hpp"
-#include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
@@ -762,7 +762,7 @@
 
 // GC Support
 bool Thread::claim_oops_do_par_case(int strong_roots_parity) {
-  jint thread_parity = _oops_do_parity;
+  int thread_parity = _oops_do_parity;
   if (thread_parity != strong_roots_parity) {
     jint res = Atomic::cmpxchg(strong_roots_parity, &_oops_do_parity, thread_parity);
     if (res == thread_parity) {
--- a/src/hotspot/share/runtime/thread.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/thread.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -244,7 +244,7 @@
 
   // The parity of the last strong_roots iteration in which this thread was
   // claimed as a task.
-  jint _oops_do_parity;
+  int _oops_do_parity;
 
  public:
   void set_last_handle_mark(HandleMark* mark)   { _last_handle_mark = mark; }
--- a/src/hotspot/share/runtime/vmStructs.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/runtime/vmStructs.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -356,7 +356,7 @@
   nonstatic_field(Symbol,                      _length,                                       unsigned short)                        \
   unchecked_nonstatic_field(Symbol,            _body,                                         sizeof(jbyte)) /* NOTE: no type */     \
   nonstatic_field(Symbol,                      _body[0],                                      jbyte)                                 \
-  nonstatic_field(TypeArrayKlass,              _max_length,                                   int)                                   \
+  nonstatic_field(TypeArrayKlass,              _max_length,                                   jint)                                  \
                                                                                                                                      \
   /***********************/                                                                                                          \
   /* Constant Pool Cache */                                                                                                          \
@@ -579,7 +579,7 @@
      static_field(PerfMemory,                  _top,                                          char*)                                 \
      static_field(PerfMemory,                  _capacity,                                     size_t)                                \
      static_field(PerfMemory,                  _prologue,                                     PerfDataPrologue*)                     \
-     static_field(PerfMemory,                  _initialized,                                  jint)                                  \
+     static_field(PerfMemory,                  _initialized,                                  int)                                   \
                                                                                                                                      \
   /***************/                                                                                                                  \
   /* SymbolTable */                                                                                                                  \
--- a/src/hotspot/share/services/diagnosticArgument.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/services/diagnosticArgument.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,9 +23,9 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "runtime/thread.hpp"
 #include "services/diagnosticArgument.hpp"
 
--- a/src/hotspot/share/services/diagnosticCommand.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/services/diagnosticCommand.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/classLoaderStats.hpp"
 #include "classfile/compactHashtable.hpp"
 #include "compiler/compileBroker.hpp"
@@ -30,7 +31,6 @@
 #include "gc/shared/vmGCOperations.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/globals.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/share/services/diagnosticFramework.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/services/diagnosticFramework.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,10 +23,10 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/javaCalls.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "services/diagnosticArgument.hpp"
--- a/src/hotspot/share/services/heapDumper.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/services/heapDumper.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
@@ -34,7 +35,6 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/javaCalls.hpp"
 #include "runtime/jniHandles.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/share/services/mallocSiteTable.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/services/mallocSiteTable.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -235,8 +235,8 @@
 
 
 void MallocSiteTable::AccessLock::exclusiveLock() {
-  jint target;
-  jint val;
+  int target;
+  int val;
 
   assert(_lock_state != ExclusiveLock, "Can only call once");
   assert(*_lock >= 0, "Can not content exclusive lock");
--- a/src/hotspot/share/services/memTracker.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/services/memTracker.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,8 +22,8 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 
-#include "prims/jvm.h"
 #include "runtime/mutex.hpp"
 #include "services/memBaseline.hpp"
 #include "services/memReporter.hpp"
--- a/src/hotspot/share/utilities/accessFlags.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/accessFlags.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -25,8 +25,8 @@
 #ifndef SHARE_VM_UTILITIES_ACCESSFLAGS_HPP
 #define SHARE_VM_UTILITIES_ACCESSFLAGS_HPP
 
+#include "jvm.h"
 #include "memory/allocation.hpp"
-#include "prims/jvm.h"
 #include "utilities/macros.hpp"
 
 // AccessFlags is an abstraction over Java access flags.
--- a/src/hotspot/share/utilities/constantTag.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/constantTag.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -25,8 +25,8 @@
 #ifndef SHARE_VM_UTILITIES_CONSTANTTAG_HPP
 #define SHARE_VM_UTILITIES_CONSTANTTAG_HPP
 
+#include "jvm.h"
 #include "memory/allocation.hpp"
-#include "prims/jvm.h"
 
 // constant tags in Java .class files
 
--- a/src/hotspot/share/utilities/debug.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/debug.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "classfile/systemDictionary.hpp"
 #include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
@@ -36,7 +37,6 @@
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "prims/privilegedStack.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
@@ -276,7 +276,7 @@
 }
 
 void report_java_out_of_memory(const char* message) {
-  static jint out_of_memory_reported = 0;
+  static int out_of_memory_reported = 0;
 
   // A number of threads may attempt to report OutOfMemoryError at around the
   // same time. To avoid dumping the heap or executing the data collection
--- a/src/hotspot/share/utilities/decoder.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/decoder.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "prims/jvm.h"
+#include "jvm.h"
 #include "runtime/os.hpp"
 #include "utilities/decoder.hpp"
 #include "utilities/vmError.hpp"
--- a/src/hotspot/share/utilities/elfStringTable.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/elfStringTable.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -26,8 +26,8 @@
 
 #if !defined(_WINDOWS) && !defined(__APPLE__)
 
+#include "jvm.h"
 #include "memory/allocation.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/os.hpp"
 #include "utilities/elfStringTable.hpp"
 
--- a/src/hotspot/share/utilities/formatBuffer.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/formatBuffer.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,8 +23,8 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "memory/allocation.hpp"
-#include "prims/jvm.h"
 #include "utilities/formatBuffer.hpp"
 
 #include <stdarg.h>
--- a/src/hotspot/share/utilities/formatBuffer.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/formatBuffer.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -25,8 +25,8 @@
 #ifndef SHARE_VM_UTILITIES_FORMATBUFFER_HPP
 #define SHARE_VM_UTILITIES_FORMATBUFFER_HPP
 
+#include "jvm.h"
 #include "utilities/globalDefinitions.hpp"
-#include "prims/jvm.h"
 #include <stdarg.h>
 
 // Simple class to format the ctor arguments into a fixed-sized buffer.
--- a/src/hotspot/share/utilities/globalDefinitions_xlc.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/globalDefinitions_xlc.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -86,6 +86,7 @@
 // In this case you need to copy the following defines to a position after #include <dirent.h>
 // (see jmv_aix.h).
 #ifdef AIX
+  #include <dirent.h>
   #ifdef _LP64
     #undef NULL
     #define NULL 0L
--- a/src/hotspot/share/utilities/macros.hpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/macros.hpp	Tue Oct 31 11:55:09 2017 -0400
@@ -322,7 +322,9 @@
 #endif
 
 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
+#ifndef BSD
 #define BSD
+#endif // BSD defined in <sys/param.h>
 #define BSD_ONLY(code) code
 #define NOT_BSD(code)
 #else
--- a/src/hotspot/share/utilities/ostream.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/ostream.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,9 +23,9 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "compiler/compileLog.hpp"
 #include "oops/oop.inline.hpp"
-#include "prims/jvm.h"
 #include "runtime/arguments.hpp"
 #include "runtime/os.hpp"
 #include "runtime/vm_version.hpp"
--- a/src/hotspot/share/utilities/vmError.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/hotspot/share/utilities/vmError.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -23,12 +23,12 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "code/codeCache.hpp"
 #include "compiler/compileBroker.hpp"
 #include "compiler/disassembler.hpp"
 #include "gc/shared/collectedHeap.hpp"
 #include "logging/logConfiguration.hpp"
-#include "prims/jvm.h"
 #include "prims/whitebox.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
--- a/src/java.base/macosx/native/include/jni_md.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1996, 2013, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-#define JNIEXPORT     __attribute__((visibility("default")))
-#define JNIIMPORT     __attribute__((visibility("default")))
-#define JNICALL
-
-typedef int jint;
-#ifdef _LP64 /* 64-bit */
-typedef long jlong;
-#else
-typedef long long jlong;
-#endif
-
-typedef signed char jbyte;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
--- a/src/java.base/macosx/native/include/jvm_md.h	Mon Oct 30 16:37:53 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _JAVASOFT_JVM_MD_H_
-#define _JAVASOFT_JVM_MD_H_
-
-/*
- * This file is currently collecting system-specific dregs for the
- * JNI conversion, which should be sorted out later.
- */
-
-#include <dirent.h>             /* For DIR */
-#include <sys/param.h>          /* For MAXPATHLEN */
-#include <unistd.h>             /* For F_OK, R_OK, W_OK */
-#include <stddef.h>             /* For ptrdiff_t */
-#include <stdint.h>             /* For uintptr_t */
-
-#define JNI_ONLOAD_SYMBOLS   {"JNI_OnLoad"}
-#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
-
-#define JNI_LIB_PREFIX "lib"
-#define JNI_LIB_SUFFIX ".dylib"
-#define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME "." VERSION JNI_LIB_SUFFIX
-#define JNI_LIB_NAME(NAME) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX
-
-#define JVM_MAXPATHLEN MAXPATHLEN
-
-#define JVM_R_OK    R_OK
-#define JVM_W_OK    W_OK
-#define JVM_X_OK    X_OK
-#define JVM_F_OK    F_OK
-
-/*
- * File I/O
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <signal.h>
-
-/* O Flags */
-
-#define JVM_O_RDONLY     O_RDONLY
-#define JVM_O_WRONLY     O_WRONLY
-#define JVM_O_RDWR       O_RDWR
-#define JVM_O_O_APPEND   O_APPEND
-#define JVM_O_EXCL       O_EXCL
-#define JVM_O_CREAT      O_CREAT
-
-/* Signals */
-
-#define JVM_SIGINT     SIGINT
-#define JVM_SIGTERM    SIGTERM
-
-
-#endif /* !_JAVASOFT_JVM_MD_H_ */
--- a/src/java.base/share/native/include/classfile_constants.h	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/java.base/share/native/include/classfile_constants.h	Tue Oct 31 11:55:09 2017 -0400
@@ -54,9 +54,29 @@
     JVM_ACC_STRICT        = 0x0800,
     JVM_ACC_SYNTHETIC     = 0x1000,
     JVM_ACC_ANNOTATION    = 0x2000,
-    JVM_ACC_ENUM          = 0x4000
+    JVM_ACC_ENUM          = 0x4000,
+    JVM_ACC_MODULE        = 0x8000
 };
 
+#define JVM_ACC_PUBLIC_BIT        0
+#define JVM_ACC_PRIVATE_BIT       1
+#define JVM_ACC_PROTECTED_BIT     2
+#define JVM_ACC_STATIC_BIT        3
+#define JVM_ACC_FINAL_BIT         4
+#define JVM_ACC_SYNCHRONIZED_BIT  5
+#define JVM_ACC_SUPER_BIT         5
+#define JVM_ACC_VOLATILE_BIT      6
+#define JVM_ACC_BRIDGE_BIT        6
+#define JVM_ACC_TRANSIENT_BIT     7
+#define JVM_ACC_VARARGS_BIT       7
+#define JVM_ACC_NATIVE_BIT        8
+#define JVM_ACC_INTERFACE_BIT     9
+#define JVM_ACC_ABSTRACT_BIT      10
+#define JVM_ACC_STRICT_BIT        11
+#define JVM_ACC_SYNTHETIC_BIT     12
+#define JVM_ACC_ANNOTATION_BIT    13
+#define JVM_ACC_ENUM_BIT          14
+
 /* Used in newarray instruction. */
 
 enum {
@@ -86,8 +106,9 @@
     JVM_CONSTANT_InterfaceMethodref     = 11,
     JVM_CONSTANT_NameAndType            = 12,
     JVM_CONSTANT_MethodHandle           = 15,  // JSR 292
-    JVM_CONSTANT_MethodType             = 16,   // JSR 292
-    JVM_CONSTANT_InvokeDynamic          = 18
+    JVM_CONSTANT_MethodType             = 16,  // JSR 292
+    JVM_CONSTANT_InvokeDynamic          = 18,
+    JVM_CONSTANT_ExternalMax            = 18
 };
 
 /* JVM_CONSTANT_MethodHandle subtypes */
--- a/src/java.base/share/native/include/jvm.h	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/java.base/share/native/include/jvm.h	Tue Oct 31 11:55:09 2017 -0400
@@ -1155,20 +1155,25 @@
  * be renamed to JVM_* in the future?
  */
 
-/*
- * BE CAREFUL! The following functions do not implement the
- * full feature set of standard C printf formats.
- */
-int
+/* jio_snprintf() and jio_vsnprintf() behave like snprintf(3) and vsnprintf(3),
+ *  respectively, with the following differences:
+ * - The string written to str is always zero-terminated, also in case of
+ *   truncation (count is too small to hold the result string), unless count
+ *   is 0. In case of truncation count-1 characters are written and '\0'
+ *   appendend.
+ * - If count is too small to hold the whole string, -1 is returned across
+ *   all platforms. */
+
+JNIEXPORT int
 jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
 
-int
+JNIEXPORT int
 jio_snprintf(char *str, size_t count, const char *fmt, ...);
 
-int
+JNIEXPORT int
 jio_fprintf(FILE *, const char *fmt, ...);
 
-int
+JNIEXPORT int
 jio_vfprintf(FILE *, const char *fmt, va_list args);
 
 
--- a/src/java.base/solaris/native/libjsig/jsig.c	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/java.base/solaris/native/libjsig/jsig.c	Tue Oct 31 11:55:09 2017 -0400
@@ -37,7 +37,7 @@
 #include <dlfcn.h>
 #include <thread.h>
 #include <synch.h>
-#include "jvm_solaris.h"
+#include "jvm_md.h"
 
 #define bool int
 #define true 1
--- a/src/java.base/unix/native/include/jni_md.h	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/java.base/unix/native/include/jni_md.h	Tue Oct 31 11:55:09 2017 -0400
@@ -30,8 +30,13 @@
   #define __has_attribute(x) 0
 #endif
 #if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
-  #define JNIEXPORT     __attribute__((visibility("default")))
-  #define JNIIMPORT     __attribute__((visibility("default")))
+  #ifdef ARM
+    #define JNIEXPORT     __attribute__((externally_visible,visibility("default")))
+    #define JNIIMPORT     __attribute__((externally_visible,visibility("default")))
+  #else
+    #define JNIEXPORT     __attribute__((visibility("default")))
+    #define JNIIMPORT     __attribute__((visibility("default")))
+  #endif
 #else
   #define JNIEXPORT
   #define JNIIMPORT
@@ -40,7 +45,7 @@
 #define JNICALL
 
 typedef int jint;
-#ifdef _LP64 /* 64-bit Solaris */
+#ifdef _LP64
 typedef long jlong;
 #else
 typedef long long jlong;
--- a/src/java.base/unix/native/include/jvm_md.h	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/java.base/unix/native/include/jvm_md.h	Tue Oct 31 11:55:09 2017 -0400
@@ -39,6 +39,10 @@
 
 #define JNI_ONLOAD_SYMBOLS   {"JNI_OnLoad"}
 #define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
+#define JVM_ONLOAD_SYMBOLS      {"JVM_OnLoad"}
+#define AGENT_ONLOAD_SYMBOLS    {"Agent_OnLoad"}
+#define AGENT_ONUNLOAD_SYMBOLS  {"Agent_OnUnload"}
+#define AGENT_ONATTACH_SYMBOLS  {"Agent_OnAttach"}
 
 #define JNI_LIB_PREFIX "lib"
 #ifdef __APPLE__
@@ -50,7 +54,15 @@
 #endif
 #define JNI_LIB_NAME(NAME) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX
 
+#if defined(AIX) || defined(SOLARIS)
 #define JVM_MAXPATHLEN MAXPATHLEN
+#else
+// Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may
+//       cause problems if JVM and the rest of JDK are built on different
+//       Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
+//       so buffers declared in VM are always >= 4096.
+#define JVM_MAXPATHLEN MAXPATHLEN + 1
+#endif
 
 #define JVM_R_OK    R_OK
 #define JVM_W_OK    W_OK
@@ -67,19 +79,22 @@
 #include <errno.h>
 #include <signal.h>
 
-/* O Flags */
+/* Signals */
 
-#define JVM_O_RDONLY     O_RDONLY
-#define JVM_O_WRONLY     O_WRONLY
-#define JVM_O_RDWR       O_RDWR
-#define JVM_O_O_APPEND   O_APPEND
-#define JVM_O_EXCL       O_EXCL
-#define JVM_O_CREAT      O_CREAT
-
-/* Signals */
+#include <sys/socket.h>   // for socklen_t
 
 #define JVM_SIGINT     SIGINT
 #define JVM_SIGTERM    SIGTERM
 
+#define BREAK_SIGNAL     SIGQUIT           /* Thread dumping support.    */
+#ifdef SOLARIS
+#define ASYNC_SIGNAL     SIGJVM2           /* Event-based suspend/resume support */
+#endif // SOLARIS
+#define SHUTDOWN1_SIGNAL SIGHUP            /* Shutdown Hooks support.    */
+#define SHUTDOWN2_SIGNAL SIGINT
+#define SHUTDOWN3_SIGNAL SIGTERM
+
+/* With 1.4.1 libjsig added versioning: used in os_solaris.cpp and jsig.c */
+#define JSIG_VERSION_1_4_1   0x30140100
 
 #endif /* !_JAVASOFT_JVM_MD_H_ */
--- a/src/java.base/unix/native/libjava/UnixFileSystem_md.c	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/java.base/unix/native/libjava/UnixFileSystem_md.c	Tue Oct 31 11:55:09 2017 -0400
@@ -38,11 +38,13 @@
 #include <stdlib.h>
 #include <dlfcn.h>
 #include <limits.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <dirent.h>
 
 #include "jni.h"
 #include "jni_util.h"
 #include "jlong.h"
-#include "jvm.h"
 #include "io_util.h"
 #include "io_util_md.h"
 #include "java_io_FileSystem.h"
@@ -97,9 +99,9 @@
     jstring rv = NULL;
 
     WITH_PLATFORM_STRING(env, pathname, path) {
-        char canonicalPath[JVM_MAXPATHLEN];
+        char canonicalPath[PATH_MAX];
         if (canonicalize((char *)path,
-                         canonicalPath, JVM_MAXPATHLEN) < 0) {
+                         canonicalPath, PATH_MAX) < 0) {
             JNU_ThrowIOExceptionWithLastError(env, "Bad pathname");
         } else {
 #ifdef MACOSX
--- a/src/java.base/windows/native/include/jni_md.h	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/java.base/windows/native/include/jni_md.h	Tue Oct 31 11:55:09 2017 -0400
@@ -30,6 +30,7 @@
 #define JNIIMPORT __declspec(dllimport)
 #define JNICALL __stdcall
 
+// 'long' is always 32 bit on windows so this matches what jdk expects
 typedef long jint;
 typedef __int64 jlong;
 typedef signed char jbyte;
--- a/src/java.base/windows/native/include/jvm_md.h	Mon Oct 30 16:37:53 2017 +0100
+++ b/src/java.base/windows/native/include/jvm_md.h	Tue Oct 31 11:55:09 2017 -0400
@@ -31,13 +31,20 @@
  * JNI conversion, which should be sorted out later.
  */
 
+#include <windows.h>
 #include <windef.h>
 #include <winbase.h>
 
 #include "jni.h"
 
+typedef int socklen_t;
+
 #define JNI_ONLOAD_SYMBOLS   {"_JNI_OnLoad@8", "JNI_OnLoad"}
 #define JNI_ONUNLOAD_SYMBOLS {"_JNI_OnUnload@8", "JNI_OnUnload"}
+#define JVM_ONLOAD_SYMBOLS      {"_JVM_OnLoad@12", "JVM_OnLoad"}
+#define AGENT_ONLOAD_SYMBOLS    {"_Agent_OnLoad@12", "Agent_OnLoad"}
+#define AGENT_ONUNLOAD_SYMBOLS  {"_Agent_OnUnload@4", "Agent_OnUnload"}
+#define AGENT_ONATTACH_SYMBOLS  {"_Agent_OnAttach@12", "Agent_OnAttach"}
 
 #define JNI_LIB_PREFIX ""
 #define JNI_LIB_SUFFIX ".dll"
@@ -63,21 +70,16 @@
 #define JVM_X_OK    1
 #define JVM_F_OK    0
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 JNIEXPORT void * JNICALL
 JVM_GetThreadInterruptEvent();
 
-/*
- * These routines are only reentrant on Windows
- */
-
-JNIEXPORT struct protoent * JNICALL
-JVM_GetProtoByName(char* name);
-
-JNIEXPORT struct hostent* JNICALL
-JVM_GetHostByAddr(const char* name, int len, int type);
-
-JNIEXPORT struct hostent* JNICALL
-JVM_GetHostByName(char* name);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
 
 /*
  * File I/O
@@ -89,19 +91,12 @@
 #include <errno.h>
 #include <signal.h>
 
-/* O Flags */
-
-#define JVM_O_RDONLY     O_RDONLY
-#define JVM_O_WRONLY     O_WRONLY
-#define JVM_O_RDWR       O_RDWR
-#define JVM_O_O_APPEND   O_APPEND
-#define JVM_O_EXCL       O_EXCL
-#define JVM_O_CREAT      O_CREAT
-
 /* Signals */
 
 #define JVM_SIGINT     SIGINT
 #define JVM_SIGTERM    SIGTERM
 
+#define SHUTDOWN1_SIGNAL SIGINT            /* Shutdown Hooks support. */
+#define SHUTDOWN2_SIGNAL SIGTERM
 
 #endif /* !_JAVASOFT_JVM_MD_H_ */
--- a/test/hotspot/gtest/classfile/test_AltHashing.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/classfile/test_AltHashing.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -51,7 +51,7 @@
 class AltHashingTest : public ::testing::Test {
  public:
 
-  static juint murmur3_32(const int* data, int len) {
+  static juint murmur3_32(const jint* data, int len) {
     return AltHashing::murmur3_32(data, len);
   }
 };
--- a/test/hotspot/gtest/logging/logTestFixture.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/logging/logTestFixture.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,11 +22,11 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logTestFixture.hpp"
 #include "logTestUtils.inline.hpp"
 #include "logging/logConfiguration.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "unittest.hpp"
 #include "utilities/ostream.hpp"
 
--- a/test/hotspot/gtest/logging/test_log.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/logging/test_log.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,11 +22,11 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "gc/shared/gcTraceTime.inline.hpp"
 #include "logTestFixture.hpp"
 #include "logTestUtils.inline.hpp"
 #include "logging/log.hpp"
-#include "prims/jvm.h"
 #include "unittest.hpp"
 
 class LogTest : public LogTestFixture {
--- a/test/hotspot/gtest/logging/test_logConfiguration.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/logging/test_logConfiguration.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,6 +22,7 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logTestFixture.hpp"
 #include "logTestUtils.inline.hpp"
 #include "logging/logConfiguration.hpp"
@@ -31,7 +32,6 @@
 #include "logging/logTag.hpp"
 #include "logging/logTagSet.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "unittest.hpp"
 #include "utilities/ostream.hpp"
 
--- a/test/hotspot/gtest/logging/test_logDecorators.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/logging/test_logDecorators.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,8 +22,8 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logging/logDecorators.hpp"
-#include "prims/jvm.h"
 #include "unittest.hpp"
 
 static LogDecorators::Decorator decorator_array[] = {
--- a/test/hotspot/gtest/logging/test_logFileOutput.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/logging/test_logFileOutput.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,10 +22,10 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logTestUtils.inline.hpp"
 #include "logging/logFileOutput.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "runtime/os.hpp"
 #include "unittest.hpp"
 #include "utilities/globalDefinitions.hpp"
--- a/test/hotspot/gtest/logging/test_logMessageTest.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/logging/test_logMessageTest.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,11 +22,11 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logTestFixture.hpp"
 #include "logTestUtils.inline.hpp"
 #include "logging/log.hpp"
 #include "logging/logMessage.hpp"
-#include "prims/jvm.h"
 #include "unittest.hpp"
 #include "utilities/globalDefinitions.hpp"
 
--- a/test/hotspot/gtest/logging/test_logTagLevelExpression.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/logging/test_logTagLevelExpression.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,10 +22,10 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logging/logLevel.hpp"
 #include "logging/logTagLevelExpression.hpp"
 #include "logging/logTagSet.hpp"
-#include "prims/jvm.h"
 #include "unittest.hpp"
 #include "utilities/globalDefinitions.hpp"
 
--- a/test/hotspot/gtest/logging/test_logTagSetDescriptions.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/logging/test_logTagSetDescriptions.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,12 +22,12 @@
  *
  */
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "logTestUtils.inline.hpp"
 #include "logging/logConfiguration.hpp"
 #include "logging/logTagSet.hpp"
 #include "logging/logTagSetDescriptions.hpp"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "unittest.hpp"
 #include "utilities/ostream.hpp"
 
--- a/test/hotspot/gtest/runtime/test_arguments.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/runtime/test_arguments.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,9 +22,9 @@
  */
 
 #include "precompiled.hpp"
-#include "prims/jvm.h"
+#include "jvm.h"
+#include "unittest.hpp"
 #include "runtime/arguments.hpp"
-#include "unittest.hpp"
 #include "utilities/align.hpp"
 #include "utilities/globalDefinitions.hpp"
 
--- a/test/hotspot/gtest/utilities/test_json.cpp	Mon Oct 30 16:37:53 2017 +0100
+++ b/test/hotspot/gtest/utilities/test_json.cpp	Tue Oct 31 11:55:09 2017 -0400
@@ -22,8 +22,8 @@
  */
 
 #include "precompiled.hpp"
+#include "jvm.h"
 #include "memory/resourceArea.hpp"
-#include "prims/jvm.h"
 #include "utilities/json.hpp"
 #include "unittest.hpp"