changeset 40105:b33c14adfcc3

Merge
author kvn
date Mon, 01 Aug 2016 20:47:51 -0700
parents 3edf5d1e6399 3c3569845229
children 6be13673b3c1 37f09cfca393
files hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.hpp hotspot/src/cpu/ppc/vm/ppc_64.ad hotspot/src/cpu/ppc/vm/stubRoutines_ppc_64.hpp hotspot/src/cpu/ppc/vm/templateTable_ppc_64.hpp hotspot/src/cpu/x86/vm/stubRoutines_x86_32.hpp hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp hotspot/src/jdk.hotspot.agent/doc/ReadMe-JavaScript.text hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ArrayReferenceImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ArrayTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/BaseLineInfo.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/BooleanTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/BooleanValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ByteTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ByteValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/CharTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/CharValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ClassLoaderReferenceImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ClassObjectReferenceImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ClassTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ConcreteMethodImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/DoubleTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/DoubleValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/FieldImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/FloatTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/FloatValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/IntegerTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/IntegerValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/InterfaceTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/JNITypeParser.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/JVMTIThreadState.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/LineInfo.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/LocalVariableImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/LocationImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/LongTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/LongValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/MethodImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/MirrorImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/MonitorInfoImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/NonConcreteMethodImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/PrimitiveTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/PrimitiveValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ReferenceTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/SACoreAttachingConnector.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/SADebugServer.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/SADebugServerAttachingConnector.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/SAJDIClassLoader.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/SAPIDAttachingConnector.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/SDE.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ShortTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ShortValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/StackFrameImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/StratumLineInfo.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/StringReferenceImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ThreadGroupReferenceImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/TypeComponentImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/TypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/VMModifiers.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ValueContainer.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ValueImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/VoidTypeImpl.java hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/VoidValueImpl.java hotspot/src/jdk.hotspot.agent/test/jdi/README.jjh hotspot/src/jdk.hotspot.agent/test/jdi/SASanityChecker.java hotspot/src/jdk.hotspot.agent/test/jdi/TEST.ROOT hotspot/src/jdk.hotspot.agent/test/jdi/TargetAdapter.java hotspot/src/jdk.hotspot.agent/test/jdi/TargetListener.java hotspot/src/jdk.hotspot.agent/test/jdi/TestScaffold.java hotspot/src/jdk.hotspot.agent/test/jdi/VMConnection.java hotspot/src/jdk.hotspot.agent/test/jdi/jstack.sh hotspot/src/jdk.hotspot.agent/test/jdi/jstack64.sh hotspot/src/jdk.hotspot.agent/test/jdi/multivm.java hotspot/src/jdk.hotspot.agent/test/jdi/multivm.sh hotspot/src/jdk.hotspot.agent/test/jdi/runjdb.sh hotspot/src/jdk.hotspot.agent/test/jdi/runjpda.sh hotspot/src/jdk.hotspot.agent/test/jdi/runsa.sh hotspot/src/jdk.hotspot.agent/test/jdi/sagclient.java hotspot/src/jdk.hotspot.agent/test/jdi/sagdoit.java hotspot/src/jdk.hotspot.agent/test/jdi/sagtarg.java hotspot/src/jdk.hotspot.agent/test/jdi/sagtest.java hotspot/src/jdk.hotspot.agent/test/jdi/sasanity.sh hotspot/src/jdk.hotspot.agent/test/jdi/serialvm.java hotspot/src/jdk.hotspot.agent/test/jdi/serialvm.sh hotspot/src/os/aix/vm/mutex_aix.inline.hpp hotspot/src/os/bsd/vm/mutex_bsd.cpp hotspot/src/os/bsd/vm/mutex_bsd.inline.hpp hotspot/src/os/linux/vm/mutex_linux.cpp hotspot/src/os/linux/vm/mutex_linux.inline.hpp hotspot/src/os/solaris/vm/mutex_solaris.cpp hotspot/src/os/solaris/vm/mutex_solaris.inline.hpp hotspot/src/os/windows/vm/mutex_windows.cpp hotspot/src/os/windows/vm/mutex_windows.inline.hpp hotspot/test/runtime/Unsafe/GetUnsafe.java hotspot/test/serviceability/sa/TestClassLoaderStats.java hotspot/test/serviceability/sa/TestStackTrace.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeatureManager.java jdk/src/java.base/linux/classes/sun/nio/fs/GioFileTypeDetector.java jdk/src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java jdk/src/java.base/linux/native/libnio/fs/GioFileTypeDetector.c jdk/src/java.base/linux/native/libnio/fs/MagicFileTypeDetector.c jdk/src/java.base/windows/conf/security/java.policy jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/AccessibilityEventMonitor.java jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/AbstractModuleEntry.java jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ArchiveEntryModuleEntry.java jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ByteArrayModuleEntry.java jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleEntryFactory.java jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModulePoolImpl.java jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/PathModuleEntry.java jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/LinkModule.java jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/ModuleEntry.java jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/ModulePool.java jdk/test/java/net/URLPermission/policy.1 jdk/test/java/net/URLPermission/policy.2 jdk/test/java/net/URLPermission/policy.3 jdk/test/java/util/SplittableRandom/SplittableRandomTest.java jdk/test/java/util/concurrent/ThreadLocalRandom/ThreadLocalRandomTest.java jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarIterators.java langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/jdi/ClassTracker.java langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/jdi/FailOverExecutionControl.java langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/jdi/JDIConnection.java langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/jdi/JDIEventHandler.java langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/jdi/JDIExecutionControl.java langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/jdi/JDINotConnectedException.java langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/remote/RemoteAgent.java langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/remote/RemoteClassLoader.java langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/remote/RemoteCodes.java langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Internal.java langtools/test/jdk/jshell/LocalExecutionControl.java nashorn/test/script/currently-failing/logcoverage.js
diffstat 1102 files changed, 33480 insertions(+), 33305 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Jul 29 17:41:14 2016 +0300
+++ b/.hgtags	Mon Aug 01 20:47:51 2016 -0700
@@ -370,3 +370,5 @@
 3aa52182b3ad7c5b3a61cf05a59dd07e4c5884e5 jdk-9+125
 03e7b2c5ae345be3caf981d76ceb3efe5ff447f8 jdk-9+126
 8e45018bde9de4ad15b972ae62874bba52dba2d5 jdk-9+127
+5bf88dce615f6804f9e101a96ffa7c9dfb4fbbbe jdk-9+128
+e8373543a3f0f60589b7d72b1f9b172721124caf jdk-9+129
--- a/.hgtags-top-repo	Fri Jul 29 17:41:14 2016 +0300
+++ b/.hgtags-top-repo	Mon Aug 01 20:47:51 2016 -0700
@@ -370,3 +370,5 @@
 9aa7d40f3a453f51e47f4c1b19eff5740a74a9f8 jdk-9+125
 3a58466296d36944454756ef01e7513ac5e14a16 jdk-9+126
 8fa686245bd2a072ece3392743460030f0854520 jdk-9+127
+b30ae794d974d7dd3eb4e84203f70021823fa6c6 jdk-9+128
+f5902d3841b82cac6e7716a20c24e8e916fb14a8 jdk-9+129
--- a/common/autoconf/boot-jdk.m4	Fri Jul 29 17:41:14 2016 +0300
+++ b/common/autoconf/boot-jdk.m4	Mon Aug 01 20:47:51 2016 -0700
@@ -345,6 +345,9 @@
   # Disable special log output when a debug build is used as Boot JDK...
   ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
 
+  # Force en-US environment
+  ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
+
   # Apply user provided options.
   ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
 
--- a/common/autoconf/generated-configure.sh	Fri Jul 29 17:41:14 2016 +0300
+++ b/common/autoconf/generated-configure.sh	Mon Aug 01 20:47:51 2016 -0700
@@ -5094,7 +5094,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1467960715
+DATE_WHEN_GENERATED=1469202305
 
 ###############################################################################
 #
@@ -65048,6 +65048,23 @@
   fi
 
 
+  # Force en-US environment
+
+  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
+  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
+  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
+
+
   # Apply user provided options.
 
   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
--- a/common/autoconf/spec.gmk.in	Fri Jul 29 17:41:14 2016 +0300
+++ b/common/autoconf/spec.gmk.in	Mon Aug 01 20:47:51 2016 -0700
@@ -175,8 +175,8 @@
 VERSION_STRING := @VERSION_STRING@
 # The short version string, without trailing zeroes and just PRE, if present.
 VERSION_SHORT := @VERSION_SHORT@
-# The Java specification version. It should be equal to version number.
-VERSION_SPECIFICATION := @VERSION_NUMBER@
+# The Java specification version. It usually equals to the major version number.
+VERSION_SPECIFICATION := @VERSION_MAJOR@
 # A GA version is defined by the PRE string being empty. Rather than testing for
 # that, this variable defines it with true/false.
 VERSION_IS_GA := @VERSION_IS_GA@
--- a/corba/.hgtags	Fri Jul 29 17:41:14 2016 +0300
+++ b/corba/.hgtags	Mon Aug 01 20:47:51 2016 -0700
@@ -370,3 +370,5 @@
 1d48e67d1b91eb9f72e49e69a4021edb85e357fc jdk-9+125
 c7f5ba08fcd4b8416e62c21229f9a07c95498919 jdk-9+126
 8fab452b6f4710762ba1d8e55fd62db00b1355fe jdk-9+127
+1f093d3f8cd99cd37c3b0af4cf5c3bffaa9c8b98 jdk-9+128
+c3e83ccab3bb1733ae903d681879a33f85ed465c jdk-9+129
--- a/corba/src/java.corba/share/classes/com/sun/corba/se/impl/activation/ORBD.java	Fri Jul 29 17:41:14 2016 +0300
+++ b/corba/src/java.corba/share/classes/com/sun/corba/se/impl/activation/ORBD.java	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,4 @@
 /*
- *
  * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -22,7 +21,6 @@
  * 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.
- *
  */
 
 package com.sun.corba.se.impl.activation;
--- a/corba/src/java.corba/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java	Fri Jul 29 17:41:14 2016 +0300
+++ b/corba/src/java.corba/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java	Mon Aug 01 20:47:51 2016 -0700
@@ -34,21 +34,13 @@
 import java.security.Policy;
 import java.security.PrivilegedAction;
 import java.security.ProtectionDomain;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Map;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.Collection;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Enumeration;
-import java.util.Properties;
-import java.util.IdentityHashMap;
 import java.util.StringTokenizer;
 import java.util.NoSuchElementException;
 
@@ -165,8 +157,18 @@
      * Return default ValueHandler
      */
     public static ValueHandler createValueHandler() {
+        ValueHandler vh;
+        try {
+            vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
+                public ValueHandler run() throws Exception {
         return Util.createValueHandler();
     }
+            });
+        } catch (PrivilegedActionException e) {
+            throw new InternalError(e.getCause());
+        }
+        return vh;
+    }
 
     /**
      * Returns true if it was accurately determined that the remote ORB is
@@ -664,7 +666,16 @@
      * ValueHandler.
      */
     public static byte getMaxStreamFormatVersion() {
-        ValueHandler vh = Util.createValueHandler();
+        ValueHandler vh;
+        try {
+            vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
+                public ValueHandler run() throws Exception {
+                    return Util.createValueHandler();
+                }
+            });
+        } catch (PrivilegedActionException e) {
+            throw new InternalError(e.getCause());
+        }
 
         if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
             return ORBConstants.STREAM_FORMAT_VERSION_1;
--- a/corba/src/java.corba/share/classes/javax/rmi/CORBA/Util.java	Fri Jul 29 17:41:14 2016 +0300
+++ b/corba/src/java.corba/share/classes/javax/rmi/CORBA/Util.java	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -45,6 +45,7 @@
 import java.rmi.Remote;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.SerializablePermission;
 import java.net.MalformedURLException ;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -195,6 +196,8 @@
      */
     public static ValueHandler createValueHandler() {
 
+        isCustomSerializationPermitted();
+
         if (utilDelegate != null) {
             return utilDelegate.createValueHandler();
         }
@@ -337,6 +340,7 @@
     // security reasons. If you know a better solution how to share this code
     // then remove it from PortableRemoteObject. Also in Stub.java
     private static Object createDelegate(String classKey) {
+
         String className = (String)
             AccessController.doPrivileged(new GetPropertyAction(classKey));
         if (className == null) {
@@ -345,7 +349,6 @@
                 className = props.getProperty(classKey);
             }
         }
-
         if (className == null) {
             return new com.sun.corba.se.impl.javax.rmi.CORBA.Util();
         }
@@ -389,4 +392,14 @@
             new GetORBPropertiesFileAction());
     }
 
+    private static void isCustomSerializationPermitted() {
+        SecurityManager sm = System.getSecurityManager();
+        if ( sm != null) {
+            // check that a serialization permission has been
+            // set to allow the loading of the Util delegate
+            // which provides access to custom ValueHandler
+            sm.checkPermission(new SerializablePermission(
+                    "enableCustomValueHandler"));
 }
+    }
+}
--- a/hotspot/.hgtags	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/.hgtags	Mon Aug 01 20:47:51 2016 -0700
@@ -530,3 +530,5 @@
 bb640b49741af3f57f9994129934c46fc173219f jdk-9+125
 adc8c84b7cf8c540d920182f78a2bc982366432a jdk-9+126
 352357128f602dcf0426b1cbe011a4685a4d9f97 jdk-9+127
+22bf6db9767b1b3a1994cbf32eb3331f31ae2093 jdk-9+128
+e96b34b76d863ed1fa04e0eeb3f297ac17b490fd jdk-9+129
--- a/hotspot/make/gensrc/GensrcAdlc.gmk	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/make/gensrc/GensrcAdlc.gmk	Mon Aug 01 20:47:51 2016 -0700
@@ -156,10 +156,10 @@
 	$(call MakeDir, $(@D))
 	$(call ExecuteWithLog, $(ADLC_SUPPORT_DIR)/adlc_run, \
 	    $(FIXPATH) $(ADLC_TOOL) $(ADLCFLAGS) $(SINGLE_AD_SRCFILE) \
-	        -c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU).cpp \
-	        -h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU).hpp \
-	        -a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU).cpp \
-	        -v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU).hpp)
+	        -c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
+	        -h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
+	        -a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
+	        -v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU_ARCH).hpp)
 	$(TOUCH) $@
 
   ##############################################################################
@@ -167,17 +167,17 @@
   # and postprocess them by fixing dummy #line directives.
 
   ADLC_GENERATED_FILES := $(addprefix $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/, \
-      ad_$(HOTSPOT_TARGET_CPU).cpp \
-      ad_$(HOTSPOT_TARGET_CPU).hpp \
-      ad_$(HOTSPOT_TARGET_CPU)_clone.cpp \
-      ad_$(HOTSPOT_TARGET_CPU)_expand.cpp \
-      ad_$(HOTSPOT_TARGET_CPU)_format.cpp \
-      ad_$(HOTSPOT_TARGET_CPU)_gen.cpp \
-      ad_$(HOTSPOT_TARGET_CPU)_misc.cpp \
-      ad_$(HOTSPOT_TARGET_CPU)_peephole.cpp \
-      ad_$(HOTSPOT_TARGET_CPU)_pipeline.cpp \
-      adGlobals_$(HOTSPOT_TARGET_CPU).hpp \
-      dfa_$(HOTSPOT_TARGET_CPU).cpp \
+      ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
+      ad_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
+      ad_$(HOTSPOT_TARGET_CPU_ARCH)_clone.cpp \
+      ad_$(HOTSPOT_TARGET_CPU_ARCH)_expand.cpp \
+      ad_$(HOTSPOT_TARGET_CPU_ARCH)_format.cpp \
+      ad_$(HOTSPOT_TARGET_CPU_ARCH)_gen.cpp \
+      ad_$(HOTSPOT_TARGET_CPU_ARCH)_misc.cpp \
+      ad_$(HOTSPOT_TARGET_CPU_ARCH)_peephole.cpp \
+      ad_$(HOTSPOT_TARGET_CPU_ARCH)_pipeline.cpp \
+      adGlobals_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
+      dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
   )
 
   $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/%: $(ADLC_RUN_MARKER)
--- a/hotspot/make/lib/CompileGtest.gmk	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/make/lib/CompileGtest.gmk	Mon Aug 01 20:47:51 2016 -0700
@@ -104,7 +104,7 @@
         -I$(GTEST_FRAMEWORK_SRC)/include, \
     CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
     CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
-    LDFLAGS := $(LDFLAGS_TESTEXE), \
+    LDFLAGS := $(LDFLAGS_JDKEXE), \
     LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/gtest $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_solaris := -library=stlport4, \
     LIBS_unix := -ljvm, \
--- a/hotspot/make/lib/CompileJvm.gmk	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/make/lib/CompileJvm.gmk	Mon Aug 01 20:47:51 2016 -0700
@@ -60,12 +60,15 @@
     -I$(HOTSPOT_TOPDIR)/src/share/vm/prims \
     #
 
+# INCLUDE_SUFFIX_* is only meant for including the proper
+# platform files. Don't use it to guard code. Use the value of
+# HOTSPOT_TARGET_CPU_DEFINE etc. instead.
+# Remaining TARGET_ARCH_* is needed to distinguish closed and open
+# 64-bit ARM ports (also called AARCH64).
 JVM_CFLAGS_TARGET_DEFINES += \
-    -DTARGET_OS_FAMILY_$(HOTSPOT_TARGET_OS) \
-    -DTARGET_ARCH_MODEL_$(HOTSPOT_TARGET_CPU) \
     -DTARGET_ARCH_$(HOTSPOT_TARGET_CPU_ARCH) \
-    -DTARGET_OS_ARCH_MODEL_$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU) \
-    -DTARGET_OS_ARCH_$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH) \
+    -DINCLUDE_SUFFIX_OS=_$(HOTSPOT_TARGET_OS) \
+    -DINCLUDE_SUFFIX_CPU=_$(HOTSPOT_TARGET_CPU_ARCH) \
     -DTARGET_COMPILER_$(HOTSPOT_TOOLCHAIN_TYPE) \
     -D$(HOTSPOT_TARGET_CPU_DEFINE) \
     -DHOTSPOT_LIB_ARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' \
--- a/hotspot/make/test/JtregNative.gmk	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/make/test/JtregNative.gmk	Mon Aug 01 20:47:51 2016 -0700
@@ -50,9 +50,11 @@
     $(HOTSPOT_TOPDIR)/test/runtime/BoolReturn \
     $(HOTSPOT_TOPDIR)/test/compiler/floatingpoint/ \
     $(HOTSPOT_TOPDIR)/test/compiler/calls \
+    $(HOTSPOT_TOPDIR)/test/compiler/native \
     $(HOTSPOT_TOPDIR)/test/serviceability/jvmti/GetNamedModule \
     $(HOTSPOT_TOPDIR)/test/testlibrary/jvmti \
     $(HOTSPOT_TOPDIR)/test/compiler/jvmci/jdk.vm.ci.code.test \
+    $(HOTSPOT_TOPDIR)/test/serviceability/jvmti/GetModulesInfo \
     #
 
 # Add conditional directories here when needed.
--- a/hotspot/src/cpu/aarch64/vm/bytes_aarch64.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/aarch64/vm/bytes_aarch64.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -67,9 +67,6 @@
 
 
 // The following header contains the implementations of swap_u2, swap_u4, and swap_u8[_base]
-
-#ifdef TARGET_OS_ARCH_linux_aarch64
-# include "bytes_linux_aarch64.inline.hpp"
-#endif
+#include OS_CPU_HEADER_INLINE(bytes)
 
 #endif // CPU_AARCH64_VM_BYTES_AARCH64_HPP
--- a/hotspot/src/cpu/aarch64/vm/copy_aarch64.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/aarch64/vm/copy_aarch64.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,9 +29,7 @@
 // Inline functions for memory copy and fill.
 
 // Contains inline asm implementations
-#ifdef TARGET_OS_ARCH_linux_aarch64
-# include "copy_linux_aarch64.inline.hpp"
-#endif
+#include OS_CPU_HEADER_INLINE(copy)
 
 
 static void pd_fill_to_words(HeapWord* tohw, size_t count, juint value) {
--- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2015, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,10 +29,10 @@
 #include "memory/resourceArea.hpp"
 #include "runtime/java.hpp"
 #include "runtime/stubCodeGenerator.hpp"
+#include "utilities/macros.hpp"
 #include "vm_version_aarch64.hpp"
-#ifdef TARGET_OS_FAMILY_linux
-# include "os_linux.inline.hpp"
-#endif
+
+#include OS_HEADER_INLINE(os)
 
 #ifndef BUILTIN_SIM
 #include <sys/auxv.h>
--- a/hotspot/src/cpu/ppc/vm/bytes_ppc.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/bytes_ppc.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2013 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -274,8 +274,6 @@
 #endif // VM_LITTLE_ENDIAN
 };
 
-#if defined(TARGET_OS_ARCH_linux_ppc)
-#include "bytes_linux_ppc.inline.hpp"
-#endif
+#include OS_CPU_HEADER_INLINE(bytes)
 
 #endif // CPU_PPC_VM_BYTES_PPC_HPP
--- a/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -47,7 +47,7 @@
 // The expected size in bytes of a cache line, used to pad data structures.
 #define DEFAULT_CACHE_LINE_SIZE 128
 
-#if defined(COMPILER2) && (defined(AIX) || defined(linux))
+#if defined(COMPILER2) && (defined(AIX) || defined(LINUX))
 // Include Transactional Memory lock eliding optimization
 #define INCLUDE_RTM_OPT 1
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/ppc/vm/interp_masm_ppc.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -0,0 +1,266 @@
+/*
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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 CPU_PPC_VM_INTERP_MASM_PPC_HPP
+#define CPU_PPC_VM_INTERP_MASM_PPC_HPP
+
+#include "asm/macroAssembler.hpp"
+#include "interpreter/invocationCounter.hpp"
+
+// This file specializes the assembler with interpreter-specific macros.
+
+
+class InterpreterMacroAssembler: public MacroAssembler {
+
+ public:
+  InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {}
+
+  void null_check_throw(Register a, int offset, Register temp_reg);
+
+  void jump_to_entry(address entry, Register Rscratch);
+
+  // Handy address generation macros.
+#define thread_(field_name) in_bytes(JavaThread::field_name ## _offset()), R16_thread
+#define method_(field_name) in_bytes(Method::field_name ## _offset()), R19_method
+
+  virtual void check_and_handle_popframe(Register java_thread);
+  virtual void check_and_handle_earlyret(Register java_thread);
+
+  // Base routine for all dispatches.
+  void dispatch_base(TosState state, address* table);
+
+  void load_earlyret_value(TosState state, Register Rscratch1);
+
+  static const Address l_tmp;
+  static const Address d_tmp;
+
+  // dispatch routines
+  void dispatch_next(TosState state, int step = 0);
+  void dispatch_via (TosState state, address* table);
+  void load_dispatch_table(Register dst, address* table);
+  void dispatch_Lbyte_code(TosState state, Register bytecode, address* table, bool verify = false);
+
+  // Called by shared interpreter generator.
+  void dispatch_prolog(TosState state, int step = 0);
+  void dispatch_epilog(TosState state, int step = 0);
+
+  // Super call_VM calls - correspond to MacroAssembler::call_VM(_leaf) calls.
+  void super_call_VM_leaf(Register thread_cache, address entry_point, Register arg_1);
+  void super_call_VM(Register thread_cache, Register oop_result, Register last_java_sp,
+                     address entry_point, Register arg_1, Register arg_2, bool check_exception = true);
+
+  // Generate a subtype check: branch to ok_is_subtype if sub_klass is
+  // a subtype of super_klass.  Blows registers tmp1, tmp2 and tmp3.
+  void gen_subtype_check(Register sub_klass, Register super_klass,
+                         Register tmp1, Register tmp2, Register tmp3, Label &ok_is_subtype);
+
+  // Load object from cpool->resolved_references(index).
+  void load_resolved_reference_at_index(Register result, Register index, Label *is_null = NULL);
+
+  void load_receiver(Register Rparam_count, Register Rrecv_dst);
+
+  // helpers for expression stack
+  void pop_i(     Register r = R17_tos);
+  void pop_ptr(   Register r = R17_tos);
+  void pop_l(     Register r = R17_tos);
+  void pop_f(FloatRegister f = F15_ftos);
+  void pop_d(FloatRegister f = F15_ftos );
+
+  void push_i(     Register r = R17_tos);
+  void push_ptr(   Register r = R17_tos);
+  void push_l(     Register r = R17_tos);
+  void push_f(FloatRegister f = F15_ftos );
+  void push_d(FloatRegister f = F15_ftos);
+
+  void push_2ptrs(Register first, Register second);
+
+  void push_l_pop_d(Register l = R17_tos, FloatRegister d = F15_ftos);
+  void push_d_pop_l(FloatRegister d = F15_ftos, Register l = R17_tos);
+
+  void pop (TosState state);           // transition vtos -> state
+  void push(TosState state);           // transition state -> vtos
+  void empty_expression_stack();       // Resets both Lesp and SP.
+
+ public:
+  // Load values from bytecode stream:
+
+  enum signedOrNot { Signed, Unsigned };
+  enum setCCOrNot  { set_CC, dont_set_CC };
+
+  void get_2_byte_integer_at_bcp(int         bcp_offset,
+                                 Register    Rdst,
+                                 signedOrNot is_signed);
+
+  void get_4_byte_integer_at_bcp(int         bcp_offset,
+                                 Register    Rdst,
+                                 signedOrNot is_signed = Unsigned);
+
+  void get_cache_index_at_bcp(Register Rdst, int bcp_offset, size_t index_size);
+
+  void get_cache_and_index_at_bcp(Register cache, int bcp_offset, size_t index_size = sizeof(u2));
+
+  void get_u4(Register Rdst, Register Rsrc, int offset, signedOrNot is_signed);
+
+  // common code
+
+  void field_offset_at(int n, Register tmp, Register dest, Register base);
+  int  field_offset_at(Register object, address bcp, int offset);
+  void fast_iaaccess(int n, address bcp);
+  void fast_iaputfield(address bcp, bool do_store_check);
+
+  void index_check(Register array, Register index, int index_shift, Register tmp, Register res);
+  void index_check_without_pop(Register array, Register index, int index_shift, Register tmp, Register res);
+
+  void get_const(Register Rdst);
+  void get_constant_pool(Register Rdst);
+  void get_constant_pool_cache(Register Rdst);
+  void get_cpool_and_tags(Register Rcpool, Register Rtags);
+  void is_a(Label& L);
+
+  void narrow(Register result);
+
+  // Java Call Helpers
+  void call_from_interpreter(Register Rtarget_method, Register Rret_addr, Register Rscratch1, Register Rscratch2);
+
+  // --------------------------------------------------
+
+  void unlock_if_synchronized_method(TosState state, bool throw_monitor_exception = true,
+                                     bool install_monitor_exception = true);
+
+  // Removes the current activation (incl. unlocking of monitors).
+  // Additionally this code is used for earlyReturn in which case we
+  // want to skip throwing an exception and installing an exception.
+  void remove_activation(TosState state,
+                         bool throw_monitor_exception = true,
+                         bool install_monitor_exception = true);
+  void merge_frames(Register Rtop_frame_sp, Register return_pc, Register Rscratch1, Register Rscratch2); // merge top frames
+
+  void add_monitor_to_stack(bool stack_is_empty, Register Rtemp1, Register Rtemp2);
+
+  // Local variable access helpers
+  void load_local_int(Register Rdst_value, Register Rdst_address, Register Rindex);
+  void load_local_long(Register Rdst_value, Register Rdst_address, Register Rindex);
+  void load_local_ptr(Register Rdst_value, Register Rdst_address, Register Rindex);
+  void load_local_float(FloatRegister Rdst_value, Register Rdst_address, Register Rindex);
+  void load_local_double(FloatRegister Rdst_value, Register Rdst_address, Register Rindex);
+  void store_local_int(Register Rvalue, Register Rindex);
+  void store_local_long(Register Rvalue, Register Rindex);
+  void store_local_ptr(Register Rvalue, Register Rindex);
+  void store_local_float(FloatRegister Rvalue, Register Rindex);
+  void store_local_double(FloatRegister Rvalue, Register Rindex);
+
+  // Call VM for std frames
+  // Special call VM versions that check for exceptions and forward exception
+  // via short cut (not via expensive forward exception stub).
+  void check_and_forward_exception(Register Rscratch1, Register Rscratch2);
+  void call_VM(Register oop_result, address entry_point, bool check_exceptions = true);
+  void call_VM(Register oop_result, address entry_point, Register arg_1, bool check_exceptions = true);
+  void call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, bool check_exceptions = true);
+  void call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, Register arg_3, bool check_exceptions = true);
+  // Should not be used:
+  void call_VM(Register oop_result, Register last_java_sp, address entry_point, bool check_exceptions = true) {ShouldNotReachHere();}
+  void call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, bool check_exceptions = true) {ShouldNotReachHere();}
+  void call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, Register arg_2, bool check_exceptions = true) {ShouldNotReachHere();}
+  void call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, Register arg_2, Register arg_3, bool check_exceptions = true) {ShouldNotReachHere();}
+
+  Address first_local_in_stack();
+
+  enum LoadOrStore { load, store };
+  void static_iload_or_store(int which_local, LoadOrStore direction, Register Rtmp);
+  void static_aload_or_store(int which_local, LoadOrStore direction, Register Rtmp);
+  void static_dload_or_store(int which_local, LoadOrStore direction);
+
+  void save_interpreter_state(Register scratch);
+  void restore_interpreter_state(Register scratch, bool bcp_and_mdx_only = false);
+
+  void increment_backedge_counter(const Register Rcounters, Register Rtmp, Register Rtmp2, Register Rscratch);
+  void test_backedge_count_for_osr(Register backedge_count, Register method_counters, Register target_bcp, Register disp, Register Rtmp);
+
+  void record_static_call_in_profile(Register Rentry, Register Rtmp);
+  void record_receiver_call_in_profile(Register Rklass, Register Rentry, Register Rtmp);
+
+  void get_method_counters(Register method, Register Rcounters, Label& skip);
+  void increment_invocation_counter(Register iv_be_count, Register Rtmp1, Register Rtmp2_r0);
+
+  // Object locking
+  void lock_object  (Register lock_reg, Register obj_reg);
+  void unlock_object(Register lock_reg, bool check_for_exceptions = true);
+
+  // Interpreter profiling operations
+  void set_method_data_pointer_for_bcp();
+  void test_method_data_pointer(Label& zero_continue);
+  void verify_method_data_pointer();
+  void test_invocation_counter_for_mdp(Register invocation_count, Register method_counters, Register Rscratch, Label &profile_continue);
+
+  void set_mdp_data_at(int constant, Register value);
+
+  void increment_mdp_data_at(int constant, Register counter_addr, Register Rbumped_count, bool decrement = false);
+
+  void increment_mdp_data_at(Register counter_addr, Register Rbumped_count, bool decrement = false);
+  void increment_mdp_data_at(Register reg, int constant, Register scratch, Register Rbumped_count, bool decrement = false);
+
+  void set_mdp_flag_at(int flag_constant, Register scratch);
+  void test_mdp_data_at(int offset, Register value, Label& not_equal_continue, Register test_out);
+
+  void update_mdp_by_offset(int offset_of_disp, Register scratch);
+  void update_mdp_by_offset(Register reg, int offset_of_disp,
+                            Register scratch);
+  void update_mdp_by_constant(int constant);
+  void update_mdp_for_ret(TosState state, Register return_bci);
+
+  void profile_taken_branch(Register scratch, Register bumped_count);
+  void profile_not_taken_branch(Register scratch1, Register scratch2);
+  void profile_call(Register scratch1, Register scratch2);
+  void profile_final_call(Register scratch1, Register scratch2);
+  void profile_virtual_call(Register Rreceiver, Register Rscratch1, Register Rscratch2,  bool receiver_can_be_null);
+  void profile_typecheck(Register Rklass, Register Rscratch1, Register Rscratch2);
+  void profile_typecheck_failed(Register Rscratch1, Register Rscratch2);
+  void profile_ret(TosState state, Register return_bci, Register scratch1, Register scratch2);
+  void profile_switch_default(Register scratch1, Register scratch2);
+  void profile_switch_case(Register index, Register scratch1,Register scratch2, Register scratch3);
+  void profile_null_seen(Register Rscratch1, Register Rscratch2);
+  void record_klass_in_profile(Register receiver, Register scratch1, Register scratch2, bool is_virtual_call);
+  void record_klass_in_profile_helper(Register receiver, Register scratch1, Register scratch2, int start_row, Label& done, bool is_virtual_call);
+
+  // Argument and return type profiling.
+  void profile_obj_type(Register obj, Register mdo_addr_base, RegisterOrConstant mdo_addr_offs, Register tmp, Register tmp2);
+  void profile_arguments_type(Register callee, Register tmp1, Register tmp2, bool is_virtual);
+  void profile_return_type(Register ret, Register tmp1, Register tmp2);
+  void profile_parameters_type(Register tmp1, Register tmp2, Register tmp3, Register tmp4);
+
+  // Debugging
+  void verify_oop(Register reg, TosState state = atos);    // only if +VerifyOops && state == atos
+  void verify_oop_or_return_address(Register reg, Register rtmp); // for astore
+  void verify_FPU(int stack_depth, TosState state = ftos);
+
+  typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
+
+  // Support for jvmdi/jvmpi.
+  void notify_method_entry();
+  void notify_method_exit(bool is_native_method, TosState state,
+                          NotifyMethodExitMode mode, bool check_exceptions);
+};
+
+#endif // CPU_PPC_VM_INTERP_MASM_PPC_HPP
--- a/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp	Mon Aug 01 20:47:51 2016 -0700
@@ -26,7 +26,7 @@
 
 #include "precompiled.hpp"
 #include "asm/macroAssembler.inline.hpp"
-#include "interp_masm_ppc_64.hpp"
+#include "interp_masm_ppc.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 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 CPU_PPC_VM_INTERP_MASM_PPC_64_HPP
-#define CPU_PPC_VM_INTERP_MASM_PPC_64_HPP
-
-#include "asm/macroAssembler.hpp"
-#include "interpreter/invocationCounter.hpp"
-
-// This file specializes the assembler with interpreter-specific macros.
-
-
-class InterpreterMacroAssembler: public MacroAssembler {
-
- public:
-  InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {}
-
-  void null_check_throw(Register a, int offset, Register temp_reg);
-
-  void jump_to_entry(address entry, Register Rscratch);
-
-  // Handy address generation macros.
-#define thread_(field_name) in_bytes(JavaThread::field_name ## _offset()), R16_thread
-#define method_(field_name) in_bytes(Method::field_name ## _offset()), R19_method
-
-  virtual void check_and_handle_popframe(Register java_thread);
-  virtual void check_and_handle_earlyret(Register java_thread);
-
-  // Base routine for all dispatches.
-  void dispatch_base(TosState state, address* table);
-
-  void load_earlyret_value(TosState state, Register Rscratch1);
-
-  static const Address l_tmp;
-  static const Address d_tmp;
-
-  // dispatch routines
-  void dispatch_next(TosState state, int step = 0);
-  void dispatch_via (TosState state, address* table);
-  void load_dispatch_table(Register dst, address* table);
-  void dispatch_Lbyte_code(TosState state, Register bytecode, address* table, bool verify = false);
-
-  // Called by shared interpreter generator.
-  void dispatch_prolog(TosState state, int step = 0);
-  void dispatch_epilog(TosState state, int step = 0);
-
-  // Super call_VM calls - correspond to MacroAssembler::call_VM(_leaf) calls.
-  void super_call_VM_leaf(Register thread_cache, address entry_point, Register arg_1);
-  void super_call_VM(Register thread_cache, Register oop_result, Register last_java_sp,
-                     address entry_point, Register arg_1, Register arg_2, bool check_exception = true);
-
-  // Generate a subtype check: branch to ok_is_subtype if sub_klass is
-  // a subtype of super_klass.  Blows registers tmp1, tmp2 and tmp3.
-  void gen_subtype_check(Register sub_klass, Register super_klass,
-                         Register tmp1, Register tmp2, Register tmp3, Label &ok_is_subtype);
-
-  // Load object from cpool->resolved_references(index).
-  void load_resolved_reference_at_index(Register result, Register index, Label *is_null = NULL);
-
-  void load_receiver(Register Rparam_count, Register Rrecv_dst);
-
-  // helpers for expression stack
-  void pop_i(     Register r = R17_tos);
-  void pop_ptr(   Register r = R17_tos);
-  void pop_l(     Register r = R17_tos);
-  void pop_f(FloatRegister f = F15_ftos);
-  void pop_d(FloatRegister f = F15_ftos );
-
-  void push_i(     Register r = R17_tos);
-  void push_ptr(   Register r = R17_tos);
-  void push_l(     Register r = R17_tos);
-  void push_f(FloatRegister f = F15_ftos );
-  void push_d(FloatRegister f = F15_ftos);
-
-  void push_2ptrs(Register first, Register second);
-
-  void push_l_pop_d(Register l = R17_tos, FloatRegister d = F15_ftos);
-  void push_d_pop_l(FloatRegister d = F15_ftos, Register l = R17_tos);
-
-  void pop (TosState state);           // transition vtos -> state
-  void push(TosState state);           // transition state -> vtos
-  void empty_expression_stack();       // Resets both Lesp and SP.
-
- public:
-  // Load values from bytecode stream:
-
-  enum signedOrNot { Signed, Unsigned };
-  enum setCCOrNot  { set_CC, dont_set_CC };
-
-  void get_2_byte_integer_at_bcp(int         bcp_offset,
-                                 Register    Rdst,
-                                 signedOrNot is_signed);
-
-  void get_4_byte_integer_at_bcp(int         bcp_offset,
-                                 Register    Rdst,
-                                 signedOrNot is_signed = Unsigned);
-
-  void get_cache_index_at_bcp(Register Rdst, int bcp_offset, size_t index_size);
-
-  void get_cache_and_index_at_bcp(Register cache, int bcp_offset, size_t index_size = sizeof(u2));
-
-  void get_u4(Register Rdst, Register Rsrc, int offset, signedOrNot is_signed);
-
-  // common code
-
-  void field_offset_at(int n, Register tmp, Register dest, Register base);
-  int  field_offset_at(Register object, address bcp, int offset);
-  void fast_iaaccess(int n, address bcp);
-  void fast_iaputfield(address bcp, bool do_store_check);
-
-  void index_check(Register array, Register index, int index_shift, Register tmp, Register res);
-  void index_check_without_pop(Register array, Register index, int index_shift, Register tmp, Register res);
-
-  void get_const(Register Rdst);
-  void get_constant_pool(Register Rdst);
-  void get_constant_pool_cache(Register Rdst);
-  void get_cpool_and_tags(Register Rcpool, Register Rtags);
-  void is_a(Label& L);
-
-  void narrow(Register result);
-
-  // Java Call Helpers
-  void call_from_interpreter(Register Rtarget_method, Register Rret_addr, Register Rscratch1, Register Rscratch2);
-
-  // --------------------------------------------------
-
-  void unlock_if_synchronized_method(TosState state, bool throw_monitor_exception = true,
-                                     bool install_monitor_exception = true);
-
-  // Removes the current activation (incl. unlocking of monitors).
-  // Additionally this code is used for earlyReturn in which case we
-  // want to skip throwing an exception and installing an exception.
-  void remove_activation(TosState state,
-                         bool throw_monitor_exception = true,
-                         bool install_monitor_exception = true);
-  void merge_frames(Register Rtop_frame_sp, Register return_pc, Register Rscratch1, Register Rscratch2); // merge top frames
-
-  void add_monitor_to_stack(bool stack_is_empty, Register Rtemp1, Register Rtemp2);
-
-  // Local variable access helpers
-  void load_local_int(Register Rdst_value, Register Rdst_address, Register Rindex);
-  void load_local_long(Register Rdst_value, Register Rdst_address, Register Rindex);
-  void load_local_ptr(Register Rdst_value, Register Rdst_address, Register Rindex);
-  void load_local_float(FloatRegister Rdst_value, Register Rdst_address, Register Rindex);
-  void load_local_double(FloatRegister Rdst_value, Register Rdst_address, Register Rindex);
-  void store_local_int(Register Rvalue, Register Rindex);
-  void store_local_long(Register Rvalue, Register Rindex);
-  void store_local_ptr(Register Rvalue, Register Rindex);
-  void store_local_float(FloatRegister Rvalue, Register Rindex);
-  void store_local_double(FloatRegister Rvalue, Register Rindex);
-
-  // Call VM for std frames
-  // Special call VM versions that check for exceptions and forward exception
-  // via short cut (not via expensive forward exception stub).
-  void check_and_forward_exception(Register Rscratch1, Register Rscratch2);
-  void call_VM(Register oop_result, address entry_point, bool check_exceptions = true);
-  void call_VM(Register oop_result, address entry_point, Register arg_1, bool check_exceptions = true);
-  void call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, bool check_exceptions = true);
-  void call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, Register arg_3, bool check_exceptions = true);
-  // Should not be used:
-  void call_VM(Register oop_result, Register last_java_sp, address entry_point, bool check_exceptions = true) {ShouldNotReachHere();}
-  void call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, bool check_exceptions = true) {ShouldNotReachHere();}
-  void call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, Register arg_2, bool check_exceptions = true) {ShouldNotReachHere();}
-  void call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, Register arg_2, Register arg_3, bool check_exceptions = true) {ShouldNotReachHere();}
-
-  Address first_local_in_stack();
-
-  enum LoadOrStore { load, store };
-  void static_iload_or_store(int which_local, LoadOrStore direction, Register Rtmp);
-  void static_aload_or_store(int which_local, LoadOrStore direction, Register Rtmp);
-  void static_dload_or_store(int which_local, LoadOrStore direction);
-
-  void save_interpreter_state(Register scratch);
-  void restore_interpreter_state(Register scratch, bool bcp_and_mdx_only = false);
-
-  void increment_backedge_counter(const Register Rcounters, Register Rtmp, Register Rtmp2, Register Rscratch);
-  void test_backedge_count_for_osr(Register backedge_count, Register method_counters, Register target_bcp, Register disp, Register Rtmp);
-
-  void record_static_call_in_profile(Register Rentry, Register Rtmp);
-  void record_receiver_call_in_profile(Register Rklass, Register Rentry, Register Rtmp);
-
-  void get_method_counters(Register method, Register Rcounters, Label& skip);
-  void increment_invocation_counter(Register iv_be_count, Register Rtmp1, Register Rtmp2_r0);
-
-  // Object locking
-  void lock_object  (Register lock_reg, Register obj_reg);
-  void unlock_object(Register lock_reg, bool check_for_exceptions = true);
-
-  // Interpreter profiling operations
-  void set_method_data_pointer_for_bcp();
-  void test_method_data_pointer(Label& zero_continue);
-  void verify_method_data_pointer();
-  void test_invocation_counter_for_mdp(Register invocation_count, Register method_counters, Register Rscratch, Label &profile_continue);
-
-  void set_mdp_data_at(int constant, Register value);
-
-  void increment_mdp_data_at(int constant, Register counter_addr, Register Rbumped_count, bool decrement = false);
-
-  void increment_mdp_data_at(Register counter_addr, Register Rbumped_count, bool decrement = false);
-  void increment_mdp_data_at(Register reg, int constant, Register scratch, Register Rbumped_count, bool decrement = false);
-
-  void set_mdp_flag_at(int flag_constant, Register scratch);
-  void test_mdp_data_at(int offset, Register value, Label& not_equal_continue, Register test_out);
-
-  void update_mdp_by_offset(int offset_of_disp, Register scratch);
-  void update_mdp_by_offset(Register reg, int offset_of_disp,
-                            Register scratch);
-  void update_mdp_by_constant(int constant);
-  void update_mdp_for_ret(TosState state, Register return_bci);
-
-  void profile_taken_branch(Register scratch, Register bumped_count);
-  void profile_not_taken_branch(Register scratch1, Register scratch2);
-  void profile_call(Register scratch1, Register scratch2);
-  void profile_final_call(Register scratch1, Register scratch2);
-  void profile_virtual_call(Register Rreceiver, Register Rscratch1, Register Rscratch2,  bool receiver_can_be_null);
-  void profile_typecheck(Register Rklass, Register Rscratch1, Register Rscratch2);
-  void profile_typecheck_failed(Register Rscratch1, Register Rscratch2);
-  void profile_ret(TosState state, Register return_bci, Register scratch1, Register scratch2);
-  void profile_switch_default(Register scratch1, Register scratch2);
-  void profile_switch_case(Register index, Register scratch1,Register scratch2, Register scratch3);
-  void profile_null_seen(Register Rscratch1, Register Rscratch2);
-  void record_klass_in_profile(Register receiver, Register scratch1, Register scratch2, bool is_virtual_call);
-  void record_klass_in_profile_helper(Register receiver, Register scratch1, Register scratch2, int start_row, Label& done, bool is_virtual_call);
-
-  // Argument and return type profiling.
-  void profile_obj_type(Register obj, Register mdo_addr_base, RegisterOrConstant mdo_addr_offs, Register tmp, Register tmp2);
-  void profile_arguments_type(Register callee, Register tmp1, Register tmp2, bool is_virtual);
-  void profile_return_type(Register ret, Register tmp1, Register tmp2);
-  void profile_parameters_type(Register tmp1, Register tmp2, Register tmp3, Register tmp4);
-
-  // Debugging
-  void verify_oop(Register reg, TosState state = atos);    // only if +VerifyOops && state == atos
-  void verify_oop_or_return_address(Register reg, Register rtmp); // for astore
-  void verify_FPU(int stack_depth, TosState state = ftos);
-
-  typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
-
-  // Support for jvmdi/jvmpi.
-  void notify_method_entry();
-  void notify_method_exit(bool is_native_method, TosState state,
-                          NotifyMethodExitMode mode, bool check_exceptions);
-};
-
-#endif // CPU_PPC_VM_INTERP_MASM_PPC_64_HPP
--- a/hotspot/src/cpu/ppc/vm/ppc_64.ad	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-//
-// Copyright (c) 2011, 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.
-//
-// 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.
-//
-//
--- a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp	Mon Aug 01 20:47:51 2016 -0700
@@ -40,7 +40,7 @@
 #include "c1/c1_Runtime1.hpp"
 #endif
 #ifdef COMPILER2
-#include "adfiles/ad_ppc_64.hpp"
+#include "opto/ad.hpp"
 #include "opto/runtime.hpp"
 #endif
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/ppc/vm/stubRoutines_ppc.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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 CPU_PPC_VM_STUBROUTINES_PPC_HPP
+#define CPU_PPC_VM_STUBROUTINES_PPC_HPP
+
+// This file holds the platform specific parts of the StubRoutines
+// definition. See stubRoutines.hpp for a description on how to
+// extend it.
+
+static bool returns_to_call_stub(address return_pc) { return return_pc == _call_stub_return_address; }
+
+enum platform_dependent_constants {
+  code_size1 = 20000,          // simply increase if too small (assembler will crash if too small)
+  code_size2 = 20000           // simply increase if too small (assembler will crash if too small)
+};
+
+// CRC32 Intrinsics.
+#define CRC32_COLUMN_SIZE 256
+#define CRC32_BYFOUR
+#ifdef  CRC32_BYFOUR
+  #define CRC32_TABLES 8
+#else
+  #define CRC32_TABLES 1
+#endif
+
+class ppc64 {
+ friend class StubGenerator;
+
+ private:
+
+  // CRC32 Intrinsics.
+  static juint _crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE];
+
+ public:
+
+  // CRC32 Intrinsics.
+  static void generate_load_crc_table_addr(MacroAssembler* masm, Register table);
+
+};
+
+#endif // CPU_PPC_VM_STUBROUTINES_PPC_HPP
--- a/hotspot/src/cpu/ppc/vm/stubRoutines_ppc_64.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2015 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 CPU_PPC_VM_STUBROUTINES_PPC_64_HPP
-#define CPU_PPC_VM_STUBROUTINES_PPC_64_HPP
-
-// This file holds the platform specific parts of the StubRoutines
-// definition. See stubRoutines.hpp for a description on how to
-// extend it.
-
-static bool returns_to_call_stub(address return_pc) { return return_pc == _call_stub_return_address; }
-
-enum platform_dependent_constants {
-  code_size1 = 20000,          // simply increase if too small (assembler will crash if too small)
-  code_size2 = 20000           // simply increase if too small (assembler will crash if too small)
-};
-
-// CRC32 Intrinsics.
-#define CRC32_COLUMN_SIZE 256
-#define CRC32_BYFOUR
-#ifdef  CRC32_BYFOUR
-  #define CRC32_TABLES 8
-#else
-  #define CRC32_TABLES 1
-#endif
-
-class ppc64 {
- friend class StubGenerator;
-
- private:
-
-  // CRC32 Intrinsics.
-  static juint _crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE];
-
- public:
-
-  // CRC32 Intrinsics.
-  static void generate_load_crc_table_addr(MacroAssembler* masm, Register table);
-
-};
-
-#endif // CPU_PPC_VM_STUBROUTINES_PPC_64_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/ppc/vm/templateTable_ppc.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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 CPU_PPC_VM_TEMPLATETABLE_PPC_HPP
+#define CPU_PPC_VM_TEMPLATETABLE_PPC_HPP
+
+  static void prepare_invoke(int byte_no, Register Rmethod, Register Rret_addr, Register Rindex, Register Rrecv, Register Rflags, Register Rscratch);
+  static void invokevfinal_helper(Register Rmethod, Register Rflags, Register Rscratch1, Register Rscratch2);
+  static void generate_vtable_call(Register Rrecv_klass, Register Rindex, Register Rret, Register Rtemp);
+  static void invokeinterface_object_method(Register Rrecv_klass, Register Rret, Register Rflags, Register Rindex, Register Rtemp, Register Rtemp2);
+
+  // Branch_conditional which takes TemplateTable::Condition.
+  static void branch_conditional(ConditionRegister crx, TemplateTable::Condition cc, Label& L, bool invert = false);
+  static void if_cmp_common(Register Rfirst, Register Rsecond, Register Rscratch1, Register Rscratch2, Condition cc, bool is_jint, bool cmp0);
+
+#endif // CPU_PPC_VM_TEMPLATETABLE_PPC_HPP
--- a/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013, 2014 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 CPU_PPC_VM_TEMPLATETABLE_PPC_64_HPP
-#define CPU_PPC_VM_TEMPLATETABLE_PPC_64_HPP
-
-  static void prepare_invoke(int byte_no, Register Rmethod, Register Rret_addr, Register Rindex, Register Rrecv, Register Rflags, Register Rscratch);
-  static void invokevfinal_helper(Register Rmethod, Register Rflags, Register Rscratch1, Register Rscratch2);
-  static void generate_vtable_call(Register Rrecv_klass, Register Rindex, Register Rret, Register Rtemp);
-  static void invokeinterface_object_method(Register Rrecv_klass, Register Rret, Register Rflags, Register Rindex, Register Rtemp, Register Rtemp2);
-
-  // Branch_conditional which takes TemplateTable::Condition.
-  static void branch_conditional(ConditionRegister crx, TemplateTable::Condition cc, Label& L, bool invert = false);
-  static void if_cmp_common(Register Rfirst, Register Rsecond, Register Rscratch1, Register Rscratch2, Condition cc, bool is_jint, bool cmp0);
-
-#endif // CPU_PPC_VM_TEMPLATETABLE_PPC_64_HPP
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp	Mon Aug 01 20:47:51 2016 -0700
@@ -278,7 +278,7 @@
       os_too_old = false;
     }
 #endif
-#ifdef linux
+#ifdef LINUX
     // At least Linux kernel 4.2, as the problematic behavior of syscalls
     // being called in the middle of a transaction has been addressed.
     // Please, refer to commit b4b56f9ecab40f3b4ef53e130c9f6663be491894
--- a/hotspot/src/cpu/ppc/vm/vtableStubs_ppc_64.cpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/vtableStubs_ppc_64.cpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -26,7 +26,7 @@
 #include "precompiled.hpp"
 #include "asm/macroAssembler.inline.hpp"
 #include "code/vtableStubs.hpp"
-#include "interp_masm_ppc_64.hpp"
+#include "interp_masm_ppc.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/klassVtable.hpp"
--- a/hotspot/src/cpu/x86/vm/bytes_x86.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/x86/vm/bytes_x86.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -26,6 +26,7 @@
 #define CPU_X86_VM_BYTES_X86_HPP
 
 #include "memory/allocation.hpp"
+#include "utilities/macros.hpp"
 
 class Bytes: AllStatic {
  private:
@@ -70,20 +71,7 @@
   static inline u8   swap_u8(u8 x);
 };
 
-
 // The following header contains the implementations of swap_u2, swap_u4, and swap_u8[_base]
-#ifdef TARGET_OS_ARCH_linux_x86
-# include "bytes_linux_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_x86
-# include "bytes_solaris_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_windows_x86
-# include "bytes_windows_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_x86
-# include "bytes_bsd_x86.inline.hpp"
-#endif
-
+#include OS_CPU_HEADER_INLINE(bytes)
 
 #endif // CPU_X86_VM_BYTES_X86_HPP
--- a/hotspot/src/cpu/x86/vm/copy_x86.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/x86/vm/copy_x86.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -28,19 +28,7 @@
 // Inline functions for memory copy and fill.
 
 // Contains inline asm implementations
-#ifdef TARGET_OS_ARCH_linux_x86
-# include "copy_linux_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_x86
-# include "copy_solaris_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_windows_x86
-# include "copy_windows_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_x86
-# include "copy_bsd_x86.inline.hpp"
-#endif
-
+#include OS_CPU_HEADER_INLINE(copy)
 
 static void pd_fill_to_words(HeapWord* tohw, size_t count, juint value) {
 #ifdef AMD64
--- a/hotspot/src/cpu/x86/vm/globalDefinitions_x86.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/x86/vm/globalDefinitions_x86.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -56,7 +56,7 @@
   #endif
 #endif
 
-#if defined(COMPILER2) && !defined(JAVASE_EMBEDDED)
+#if defined(COMPILER2)
 // Include Restricted Transactional Memory lock eliding optimization
 #define INCLUDE_RTM_OPT 1
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.inline.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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_X86_VM_MACROASSEMBLER_X86_INLINE_HPP
+#define CPU_X86_VM_MACROASSEMBLER_X86_INLINE_HPP
+
+// Still empty.
+
+#endif // CPU_X86_VM_MACROASSEMBLER_X86_INLINE_HPP
--- a/hotspot/src/cpu/x86/vm/register_definitions_x86.cpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/x86/vm/register_definitions_x86.cpp	Mon Aug 01 20:47:51 2016 -0700
@@ -26,9 +26,7 @@
 #include "asm/assembler.hpp"
 #include "asm/register.hpp"
 #include "register_x86.hpp"
-#ifdef TARGET_ARCH_x86
-# include "interp_masm_x86.hpp"
-#endif
+#include "interp_masm_x86.hpp"
 
 REGISTER_DEFINITION(Register, noreg);
 REGISTER_DEFINITION(Register, rax);
--- a/hotspot/src/cpu/x86/vm/stubRoutines_x86.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/x86/vm/stubRoutines_x86.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -29,6 +29,83 @@
 // definition. See stubRoutines.hpp for a description on how to
 // extend it.
 
+static bool returns_to_call_stub(address return_pc) { return return_pc == _call_stub_return_address; }
+
+enum platform_dependent_constants {
+  code_size1 = 20000 LP64_ONLY(+10000),         // simply increase if too small (assembler will crash if too small)
+  code_size2 = 33800 LP64_ONLY(+1200)           // simply increase if too small (assembler will crash if too small)
+};
+
+class x86 {
+ friend class StubGenerator;
+ friend class VMStructs;
+
+#ifdef _LP64
+ private:
+  static address _get_previous_fp_entry;
+  static address _get_previous_sp_entry;
+
+  static address _f2i_fixup;
+  static address _f2l_fixup;
+  static address _d2i_fixup;
+  static address _d2l_fixup;
+
+  static address _float_sign_mask;
+  static address _float_sign_flip;
+  static address _double_sign_mask;
+  static address _double_sign_flip;
+
+ public:
+
+  static address get_previous_fp_entry() {
+    return _get_previous_fp_entry;
+  }
+
+  static address get_previous_sp_entry() {
+    return _get_previous_sp_entry;
+  }
+
+  static address f2i_fixup() {
+    return _f2i_fixup;
+  }
+
+  static address f2l_fixup() {
+    return _f2l_fixup;
+  }
+
+  static address d2i_fixup() {
+    return _d2i_fixup;
+  }
+
+  static address d2l_fixup() {
+    return _d2l_fixup;
+  }
+
+  static address float_sign_mask() {
+    return _float_sign_mask;
+  }
+
+  static address float_sign_flip() {
+    return _float_sign_flip;
+  }
+
+  static address double_sign_mask() {
+    return _double_sign_mask;
+  }
+
+  static address double_sign_flip() {
+    return _double_sign_flip;
+  }
+#else // !LP64
+
+ private:
+  static address _verify_fpu_cntrl_wrd_entry;
+
+ public:
+  static address verify_fpu_cntrl_wrd_entry() { return _verify_fpu_cntrl_wrd_entry; }
+
+#endif // !LP64
+
  private:
   static address _verify_mxcsr_entry;
   // shuffle mask for fixing up 128-bit words consisting of big-endian 32-bit integers
@@ -138,4 +215,6 @@
   static address _Pi4x4_addr()      { return _Pi4x4_adr; }
   static address _ones_addr()      { return _ones_adr; }
 
-#endif // CPU_X86_VM_STUBROUTINES_X86_32_HPP
+};
+
+#endif // CPU_X86_VM_STUBROUTINES_X86_HPP
--- a/hotspot/src/cpu/x86/vm/stubRoutines_x86_32.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +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.
- *
- * 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_X86_VM_STUBROUTINES_X86_32_HPP
-#define CPU_X86_VM_STUBROUTINES_X86_32_HPP
-
-// This file holds the platform specific parts of the StubRoutines
-// definition. See stubRoutines.hpp for a description on how to
-// extend it.
-
-enum platform_dependent_constants {
-  code_size1 =  20000,           // simply increase if too small (assembler will crash if too small)
-  code_size2 = 33800            // simply increase if too small (assembler will crash if too small)
-};
-
-class x86 {
- friend class StubGenerator;
- friend class VMStructs;
-
- private:
-  static address _verify_fpu_cntrl_wrd_entry;
-
- public:
-  static address verify_fpu_cntrl_wrd_entry()                { return _verify_fpu_cntrl_wrd_entry; }
-
-# include "stubRoutines_x86.hpp"
-
-};
-
-  static bool    returns_to_call_stub(address return_pc)     { return return_pc == _call_stub_return_address; }
-
-#endif // CPU_X86_VM_STUBROUTINES_X86_32_HPP
--- a/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2003, 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.
- *
- * 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_X86_VM_STUBROUTINES_X86_64_HPP
-#define CPU_X86_VM_STUBROUTINES_X86_64_HPP
-
-// This file holds the platform specific parts of the StubRoutines
-// definition. See stubRoutines.hpp for a description on how to
-// extend it.
-
-static bool    returns_to_call_stub(address return_pc)   { return return_pc == _call_stub_return_address; }
-
-enum platform_dependent_constants {
-  code_size1 = 30000,          // simply increase if too small (assembler will crash if too small)
-  code_size2 = 35000           // simply increase if too small (assembler will crash if too small)
-};
-
-class x86 {
- friend class StubGenerator;
-
- private:
-  static address _get_previous_fp_entry;
-  static address _get_previous_sp_entry;
-
-  static address _f2i_fixup;
-  static address _f2l_fixup;
-  static address _d2i_fixup;
-  static address _d2l_fixup;
-
-  static address _float_sign_mask;
-  static address _float_sign_flip;
-  static address _double_sign_mask;
-  static address _double_sign_flip;
-
- public:
-
-  static address get_previous_fp_entry()
-  {
-    return _get_previous_fp_entry;
-  }
-
-  static address get_previous_sp_entry()
-  {
-    return _get_previous_sp_entry;
-  }
-
-  static address f2i_fixup()
-  {
-    return _f2i_fixup;
-  }
-
-  static address f2l_fixup()
-  {
-    return _f2l_fixup;
-  }
-
-  static address d2i_fixup()
-  {
-    return _d2i_fixup;
-  }
-
-  static address d2l_fixup()
-  {
-    return _d2l_fixup;
-  }
-
-  static address float_sign_mask()
-  {
-    return _float_sign_mask;
-  }
-
-  static address float_sign_flip()
-  {
-    return _float_sign_flip;
-  }
-
-  static address double_sign_mask()
-  {
-    return _double_sign_mask;
-  }
-
-  static address double_sign_flip()
-  {
-    return _double_sign_flip;
-  }
-
-# include "stubRoutines_x86.hpp"
-
-};
-
-#endif // CPU_X86_VM_STUBROUTINES_X86_64_HPP
--- a/hotspot/src/cpu/zero/vm/bytes_zero.hpp	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/cpu/zero/vm/bytes_zero.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -165,12 +165,8 @@
 #ifdef VM_LITTLE_ENDIAN
 // The following header contains the implementations of swap_u2,
 // swap_u4, and swap_u8
-#ifdef TARGET_OS_ARCH_linux_zero
-# include "bytes_linux_zero.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_zero
-# include "bytes_bsd_zero.inline.hpp"
-#endif
+
+#include OS_CPU_HEADER_INLINE(bytes)
 
 #endif // VM_LITTLE_ENDIAN
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/zero/vm/macroAssembler_zero.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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_ZERO_VM_MACROASSEMBLER_ZERO_HPP
+#define CPU_ZERO_VM_MACROASSEMBLER_ZERO_HPP
+
+// Needed for includes in shared files.
+
+#endif // CPU_ZERO_VM_MACROASSEMBLER_ZERO_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/zero/vm/macroAssembler_zero.inline.hpp	Mon Aug 01 20:47:51 2016 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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_ZERO_VM_MACROASSEMBLER_ZERO_INLINE_HPP
+#define CPU_ZERO_VM_MACROASSEMBLER_ZERO_INLINE_HPP
+
+// Needed for includes in shared files.
+
+#endif // CPU_ZERO_VM_MACROASSEMBLER_ZERO_INLINE_HPP
--- a/hotspot/src/jdk.hotspot.agent/doc/ReadMe-JavaScript.text	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-The HotSpot Serviceability Agent (SA) is a debugger for hotspot core
-dumps and hung processes. There is a read-only JDI (Java Debugger
-Interface) implementation on top of SA. This is part of JDK product and
-the classes are in $JDK/tools/sa-jdi.jar.
-
-In addition, there are few serviceability tools in $JDK/bin, namely,
-jstack (java stack trace tool), jmap (heap tool), jinfo (Java config
-tool) and jsadebugd. The classes for these are also in sa-jdi.jar
-file. sa-jdi.jar file is built along with hotspot (libjvm.so) on Solaris
-and Linux platforms. On Windows platform, SA-JDI is not included and
-serviceability tools do not use SA.
-
-Apart from these, HotSpot SA consists of a number of tools that are
-*not* included in JDK product bits.
-
-The sources and makefile for all-of-SA (including non-productized stuff)
-are under $HOTSPOT_WS/agent directory. The makefile $HOTSPOT/agent/make
-directory and shell scripts (and batch files) are used to build and run
-SA non-product tools. There is also documentation of SA under
-$HOTSPOT/agent/doc directory.
-
-To build complete SA, you need to have Rhino Mozilla jar (js.jar)
-version 1.5R5 under $HOTSPOT/agent/src/share/lib directory. Rhino is
-JavaScript interpreter written in Java. Rhino is used to implement SA
-features such as
-
-* SA command line debugger's JavaScript interface
- - refer to $HOTSPOT/agent/doc/clhsdb.html
- - refer to $HOTSPOT/agent/doc/jsdb.html
-* SA simple object query language (SOQL) 
- - language to query Java heap. 
-
-Rhino's "js.jar" is not included in hotspot source bundles. You need to
-download it from http://www.mozilla.org/rhino/download.html.
- 
-Without js.jar, $HOTSPOT/agent/make/Makefile will fail to build. But,
-note that sa-jdi.jar containing the productized portions of SA will
-still be built when you build hotspot JVM. 
--- a/hotspot/src/jdk.hotspot.agent/share/classes/module-info.java	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/module-info.java	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -28,12 +28,8 @@
     requires java.desktop;
     requires java.rmi;
     requires java.scripting;
-    requires jdk.jdi;
 
     // RMI needs to serialize types in this package
     exports sun.jvm.hotspot.debugger.remote to java.rmi;
-    provides com.sun.jdi.connect.Connector with sun.jvm.hotspot.jdi.SACoreAttachingConnector;
-    provides com.sun.jdi.connect.Connector with sun.jvm.hotspot.jdi.SADebugServerAttachingConnector;
-    provides com.sun.jdi.connect.Connector with sun.jvm.hotspot.jdi.SAPIDAttachingConnector;
 
 }
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/SALauncher.java	Fri Jul 29 17:41:14 2016 +0300
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/SALauncher.java	Mon Aug 01 20:47:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -36,6 +36,7 @@
 
     private static boolean launcherHelp() {
         System.out.println("    clhsdb       \tcommand line debugger");
+        System.out.println("    debugd       \tdebug server");
         System.out.println("    hsdb         \tui debugger");
         System.out.println("    jstack --help\tto get more information");
         System.out.println("    jmap   --help\tto get more information");
@@ -54,6 +55,21 @@
         return false;
     }
 
+    private static boolean debugdHelp() {
+        // [options] <pid> [server-id]
+        // [options] <executable> <core> [server-id]
+        java.io.PrintStream out = System.out;
+        out.print(" [option] <pid> [server-id]");
+        out.println("\t\t(to connect to a live java process)");
+        out.print("   or  [option] <executable> <core> [server-id]");
+        out.println("\t\t(to connect to a core file produced by <executable>)");
+        out.print("\t\tserver-id is an optional unique id for this debug server, needed ");
+        out.println("\t\tif multiple debug servers are run on the same machine");
+        out.println("where option includes:");
+        out.println("   -h | -help\tto print this help message");
+        return false;
+    }
+
     private static boolean jinfoHelp() {
         // --flags -> -flags
         // --sysprops -> -sysprops
@@ -106,6 +122,9 @@
         if (toolName.equals("jsnap")) {
             return jsnapHelp();
         }
+        if (toolName.equals("debugd")) {
+            return debugdHelp();
+        }
         if (toolName.equals("hsdb") || toolName.equals("clhsdb")) {
             return commonHelp();
         }
@@ -377,13 +396,28 @@
         JSnap.main(newArgs.toArray(new String[newArgs.size()]));
     }
 
+    private static void runDEBUGD(String[] oldArgs) {
+        if ((oldArgs.length < 1) || (oldArgs.length > 3)) {
+            debugdHelp();
+        }
+
+        // By default SA agent classes prefer Windows process debugger
+        // to windbg debugger. SA expects special properties to be set
+        // to choose other debuggers. We will set those here before
+        // attaching to SA agent.
+        System.setProperty("sun.jvm.hotspot.debugger.useWindbgDebugger", "true");
+
+        // delegate to the actual SA debug server.
+        sun.jvm.hotspot.DebugServer.main(oldArgs);
+    }
+
     public static void main(String[] args) {
         // Provide a help
         if (args.length == 0) {
             launcherHelp();
             return;
         }
-        // No arguments imply help for jstack, jmap, jinfo but launch clhsdb and hsdb
+        // No arguments imply help for debugd, jstack, jmap, jinfo but launch clhsdb and hsdb
         if (args.length == 1 && !args[0].equals("clhsdb") && !args[0].equals("hsdb")) {
             toolHelp(args[0]);
             return;
@@ -431,6 +465,11 @@
                 return;
             }
 
+            if (args[0].equals("debugd")) {
+                runDEBUGD(oldArgs);
+                return;
+            }
+
             throw new SAGetoptException("Unknown tool: " + args[0]);
         } catch (SAGetoptException e) {
             System.err.println(e.getMessage());
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ArrayReferenceImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2002, 2004, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import sun.jvm.hotspot.oops.Instance;
-import sun.jvm.hotspot.oops.Array;
-import sun.jvm.hotspot.runtime.BasicType;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class ArrayReferenceImpl extends ObjectReferenceImpl
-    implements ArrayReference
-{
-    private int length;
-    ArrayReferenceImpl(VirtualMachine aVm, sun.jvm.hotspot.oops.Array aRef) {
-        super(aVm, aRef);
-        length = (int) aRef.getLength();
-    }
-
-    ArrayTypeImpl arrayType() {
-        return (ArrayTypeImpl)type();
-    }
-
-    /**
-     * Return array length.
-     */
-    public int length() {
-        return length;
-    }
-
-    public Value getValue(int index) {
-        List list = getValues(index, 1);
-        return (Value)list.get(0);
-    }
-
-    public List getValues() {
-        return getValues(0, -1);
-    }
-
-    /**
-     * Validate that the range to set/get is valid.
-     * length of -1 (meaning rest of array) has been converted
-     * before entry.
-     */
-    private void validateArrayAccess(int index, int len) {
-        // because length can be computed from index,
-        // index must be tested first for correct error message
-        if ((index < 0) || (index > length())) {
-            throw new IndexOutOfBoundsException(
-                        "Invalid array index: " + index);
-        }
-        if (len < 0) {
-            throw new IndexOutOfBoundsException(
-                        "Invalid array range length: " + len);
-        }
-        if (index + len > length()) {
-            throw new IndexOutOfBoundsException(
-                        "Invalid array range: " +
-                        index + " to " + (index + len - 1));
-        }
-    }
-
-    public List getValues(int index, int len) {
-        if (len == -1) { // -1 means the rest of the array
-           len = length() - index;
-        }
-        validateArrayAccess(index, len);
-        List vals = new ArrayList();
-        if (len == 0) {
-            return vals;
-        }
-
-        sun.jvm.hotspot.oops.TypeArray typeArray = null;
-        sun.jvm.hotspot.oops.ObjArray objArray = null;
-        if (ref() instanceof sun.jvm.hotspot.oops.TypeArray) {
-            typeArray = (sun.jvm.hotspot.oops.TypeArray)ref();
-        } else if (ref() instanceof sun.jvm.hotspot.oops.ObjArray) {
-            objArray = (sun.jvm.hotspot.oops.ObjArray)ref();
-        } else {
-            throw new RuntimeException("should not reach here");
-        }
-
-        char c = arrayType().componentSignature().charAt(0);
-        BasicType variableType = BasicType.charToBasicType(c);
-
-        final int limit = index + len;
-        for (int ii = index; ii < limit; ii++) {
-            ValueImpl valueImpl;
-            if (variableType == BasicType.T_BOOLEAN) {
-                valueImpl = (BooleanValueImpl) vm.mirrorOf(typeArray.getBooleanAt(ii));
-            } else if (variableType == BasicType.T_CHAR) {
-                valueImpl = (CharValueImpl) vm.mirrorOf(typeArray.getCharAt(ii));
-            } else if (variableType == BasicType.T_FLOAT) {
-                valueImpl = (FloatValueImpl) vm.mirrorOf(typeArray.getFloatAt(ii));
-            } else if (variableType == BasicType.T_DOUBLE) {
-                valueImpl =  (DoubleValueImpl) vm.mirrorOf(typeArray.getDoubleAt(ii));
-            } else if (variableType == BasicType.T_BYTE) {
-                valueImpl =  (ByteValueImpl) vm.mirrorOf(typeArray.getByteAt(ii));
-            } else if (variableType == BasicType.T_SHORT) {
-                valueImpl =  (ShortValueImpl) vm.mirrorOf(typeArray.getShortAt(ii));
-            } else if (variableType == BasicType.T_INT) {
-                valueImpl =  (IntegerValueImpl) vm.mirrorOf(typeArray.getIntAt(ii));
-            } else if (variableType == BasicType.T_LONG) {
-                valueImpl =  (LongValueImpl) vm.mirrorOf(typeArray.getLongAt(ii));
-            } else if (variableType == BasicType.T_OBJECT) {
-                // we may have an [Ljava/lang/Object; - i.e., Object[] with the
-                // elements themselves may be arrays because every array is an Object.
-                valueImpl = (ObjectReferenceImpl) vm.objectMirror(objArray.getObjAt(ii));
-            } else if (variableType == BasicType.T_ARRAY) {
-                valueImpl = (ArrayReferenceImpl) vm.arrayMirror((Array) objArray.getObjAt(ii));
-            } else {
-                throw new RuntimeException("should not reach here");
-            }
-            vals.add (valueImpl);
-        }
-        return vals;
-    }
-
-    public void setValue(int index, Value value)
-            throws InvalidTypeException,
-                   ClassNotLoadedException {
-        vm.throwNotReadOnlyException("ArrayReference.setValue(...)");
-    }
-
-    public void setValues(List values)
-            throws InvalidTypeException,
-                   ClassNotLoadedException {
-        setValues(0, values, 0, -1);
-    }
-
-    public void setValues(int index, List values,
-                          int srcIndex, int length)
-            throws InvalidTypeException,
-                   ClassNotLoadedException {
-
-        vm.throwNotReadOnlyException("ArrayReference.setValue(...)");
-
-    }
-
-    public String toString() {
-        return "instance of " + arrayType().componentTypeName() +
-               "[" + length() + "] (id=" + uniqueID() + ")";
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ArrayTypeImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
- * Copyright (c) 2002, 2004, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import sun.jvm.hotspot.oops.ArrayKlass;
-import sun.jvm.hotspot.oops.Instance;
-import sun.jvm.hotspot.oops.InstanceKlass;
-import sun.jvm.hotspot.oops.Klass;
-import sun.jvm.hotspot.oops.ObjArrayKlass;
-import sun.jvm.hotspot.oops.Symbol;
-import sun.jvm.hotspot.oops.TypeArrayKlass;
-
-import com.sun.jdi.ArrayReference;
-import com.sun.jdi.ArrayType;
-import com.sun.jdi.ClassLoaderReference;
-import com.sun.jdi.ClassNotLoadedException;
-import com.sun.jdi.InterfaceType;
-import com.sun.jdi.Method;
-import com.sun.jdi.PrimitiveType;
-import com.sun.jdi.ReferenceType;
-import com.sun.jdi.Type;
-import com.sun.jdi.VirtualMachine;
-
-public class ArrayTypeImpl extends ReferenceTypeImpl implements ArrayType {
-  protected ArrayTypeImpl(VirtualMachine aVm, ArrayKlass aRef) {
-        super(aVm, aRef);
-    }
-
-    public ArrayReference newInstance(int length) {
-        vm.throwNotReadOnlyException("ArrayType.newInstance(int)");
-        return null;
-    }
-
-    public String componentSignature() {
-        return signature().substring(1); // Just skip the leading '['
-    }
-
-    public String componentTypeName() {
-        JNITypeParser parser = new JNITypeParser(componentSignature());
-        return parser.typeName();
-    }
-
-    public ClassLoaderReference classLoader() {
-        if (ref() instanceof TypeArrayKlass) {
-            // primitive array klasses are loaded by bootstrap loader
-            return null;
-        } else {
-            Klass bottomKlass = ((ObjArrayKlass)ref()).getBottomKlass();
-            if (bottomKlass instanceof TypeArrayKlass) {
-                // multidimensional primitive array klasses are loaded by bootstrap loader
-                return null;
-            } else {
-                // class loader of any other obj array klass is same as the loader
-                // that loaded the bottom InstanceKlass
-                Instance xx = (Instance)(((InstanceKlass) bottomKlass).getClassLoader());
-                return vm.classLoaderMirror(xx);
-            }
-        }
-    }
-
-    @Override
-    void addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> handledInterfaces) {
-        // arrays don't have methods
-    }
-
-    List getAllMethods() {
-        // arrays don't have methods
-        // JLS says arrays have methods of java.lang.Object. But
-        // JVMDI-JDI returns zero size list. We do the same here
-        // for consistency.
-        return new ArrayList(0);
-    }
-
-    /*
-     * Find the type object, if any, of a component type of this array.
-     * The component type does not have to be immediate; e.g. this method
-     * can be used to find the component Foo of Foo[][].
-     */
-    public Type componentType() throws ClassNotLoadedException {
-        ArrayKlass k = (ArrayKlass) ref();
-        if (k instanceof ObjArrayKlass) {
-            Klass elementKlass = ((ObjArrayKlass)k).getElementKlass();
-            if (elementKlass == null) {
-                throw new ClassNotLoadedException(componentSignature());
-            } else {
-                return vm.referenceType(elementKlass);
-            }
-        } else {
-            // It's a primitive type
-            return vm.primitiveTypeMirror(signature().charAt(1));
-        }
-    }
-
-    static boolean isComponentAssignable(Type destination, Type source) {
-        if (source instanceof PrimitiveType) {
-            // Assignment of primitive arrays requires identical
-            // component types.
-            return source.equals(destination);
-        } else {
-           if (destination instanceof PrimitiveType) {
-                return false;
-            }
-
-            ReferenceTypeImpl refSource = (ReferenceTypeImpl)source;
-            ReferenceTypeImpl refDestination = (ReferenceTypeImpl)destination;
-            // Assignment of object arrays requires availability
-            // of widening conversion of component types
-            return refSource.isAssignableTo(refDestination);
-        }
-    }
-
-
-    /*
-    * Return true if an instance of the  given reference type
-    * can be assigned to a variable of this type
-    */
-    boolean isAssignableTo(ReferenceType destType) {
-        if (destType instanceof ArrayType) {
-            try {
-                Type destComponentType = ((ArrayType)destType).componentType();
-                return isComponentAssignable(destComponentType, componentType());
-            } catch (ClassNotLoadedException e) {
-                // One or both component types has not yet been
-                // loaded => can't assign
-                return false;
-            }
-        } else {
-            Symbol typeName = ((ReferenceTypeImpl)destType).typeNameAsSymbol();
-            if (destType instanceof InterfaceType) {
-                // Every array type implements java.io.Serializable and
-                // java.lang.Cloneable. fixme in JVMDI-JDI, includes only
-                // Cloneable but not Serializable.
-                return typeName.equals(vm.javaLangCloneable()) ||
-                       typeName.equals(vm.javaIoSerializable());
-            } else {
-                // Only valid ClassType assignee is Object
-                return typeName.equals(vm.javaLangObject());
-            }
-        }
-    }
-
-    List inheritedTypes() {
-        // arrays are derived from java.lang.Object and
-        // B[] is derived from A[] if B is derived from A.
-        // But JVMDI-JDI returns zero sized list and we do the
-        // same for consistency.
-        return new ArrayList(0);
-    }
-
-    int getModifiers() {
-        /*
-         * For object arrays, the return values for Interface
-         * Accessible.isPrivate(), Accessible.isProtected(),
-         * etc... are the same as would be returned for the
-         * component type.  Fetch the modifier bits from the
-         * component type and use those.
-         *
-         * For primitive arrays, the modifiers are always
-         *   VMModifiers.FINAL | VMModifiers.PUBLIC
-         *
-         * Reference com.sun.jdi.Accessible.java.
-         */
-        try {
-            Type t = componentType();
-            if (t instanceof PrimitiveType) {
-                return VMModifiers.FINAL | VMModifiers.PUBLIC;
-            } else {
-                ReferenceType rt = (ReferenceType)t;
-                return rt.modifiers();
-            }
-        } catch (ClassNotLoadedException cnle) {
-            cnle.printStackTrace();
-        }
-        return -1;
-    }
-
-    public String toString() {
-       return "array class " + name() + " (" + loaderString() + ")";
-    }
-
-    /*
-     * Save a pointless trip over the wire for these methods
-     * which have undefined results for arrays.
-     */
-    public boolean isPrepared() { return true; }
-    public boolean isVerified() { return true; }
-    public boolean isInitialized() { return true; }
-    public boolean failedToInitialize() { return false; }
-    public boolean isAbstract() { return false; }
-
-    /*
-     * Defined always to be true for arrays
-     */
-    public boolean isFinal() { return true; }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/BaseLineInfo.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-class BaseLineInfo implements LineInfo {
-    private final int lineNumber;
-    private final ReferenceTypeImpl declaringType;
-
-    BaseLineInfo(int lineNumber,
-                 ReferenceTypeImpl declaringType) {
-        this.lineNumber = lineNumber;
-        this.declaringType = declaringType;
-    }
-
-    public String liStratum() {
-        return SDE.BASE_STRATUM_NAME;
-    }
-
-    public int liLineNumber() {
-        return lineNumber;
-    }
-
-    public String liSourceName()
-                            throws AbsentInformationException {
-        return declaringType.baseSourceName();
-    }
-
-    public String liSourcePath()
-                            throws AbsentInformationException {
-        return declaringType.baseSourcePath();
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/BooleanTypeImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class BooleanTypeImpl extends PrimitiveTypeImpl implements BooleanType {
-    BooleanTypeImpl(VirtualMachine vm) {
-        super(vm);
-    }
-
-    public String signature() {
-        return "Z";
-    }
-
-    PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
-        return vm.mirrorOf(((PrimitiveValueImpl)value).checkedBooleanValue());
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/BooleanValueImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class BooleanValueImpl extends PrimitiveValueImpl
-                              implements BooleanValue {
-    private boolean value;
-
-    BooleanValueImpl(VirtualMachine aVm,boolean aValue) {
-        super(aVm);
-
-        value = aValue;
-    }
-
-    public boolean equals(Object obj) {
-        if ((obj != null) && (obj instanceof BooleanValue)) {
-            return (value == ((BooleanValue)obj).value())
-                   && super.equals(obj);
-        } else {
-            return false;
-        }
-    }
-
-    public int hashCode() {
-        /*
-         * TO DO: Better hash code
-         */
-        return intValue();
-    }
-
-    public Type type() {
-        return vm.theBooleanType();
-    }
-
-    public boolean value() {
-        return value;
-    }
-
-    public boolean booleanValue() {
-        return value;
-    }
-
-    public byte byteValue() {
-        return(byte)((value)?1:0);
-    }
-
-    public char charValue() {
-        return(char)((value)?1:0);
-    }
-
-    public short shortValue() {
-        return(short)((value)?1:0);
-    }
-
-    public int intValue() {
-        return(int)((value)?1:0);
-    }
-
-    public long longValue() {
-        return(long)((value)?1:0);
-    }
-
-    public float floatValue() {
-        return(float)((value)?1.0:0.0);
-    }
-
-    public double doubleValue() {
-        return(double)((value)?1.0:0.0);
-    }
-
-    public String toString() {
-        return "" + value;
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ByteTypeImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class ByteTypeImpl extends PrimitiveTypeImpl implements ByteType {
-    ByteTypeImpl(VirtualMachine vm) {
-        super(vm);
-    }
-
-
-    public String signature() {
-        return "B";
-    }
-
-    PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
-        return vm.mirrorOf(((PrimitiveValueImpl)value).checkedByteValue());
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ByteValueImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2002, 2011, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class ByteValueImpl extends PrimitiveValueImpl
-                           implements ByteValue {
-    private byte value;
-
-    ByteValueImpl(VirtualMachine aVm,byte aValue) {
-        super(aVm);
-
-        value = aValue;
-    }
-
-    public boolean equals(Object obj) {
-        if ((obj != null) && (obj instanceof ByteValue)) {
-            return (value == ((ByteValue)obj).value())
-                   && super.equals(obj);
-        } else {
-            return false;
-        }
-    }
-
-    public int hashCode() {
-        /*
-         * TO DO: Better hash code
-         */
-        return intValue();
-    }
-
-    public int compareTo(ByteValue byteVal) {
-        return value() - byteVal.value();
-    }
-
-    public Type type() {
-        return vm.theByteType();
-    }
-
-    public byte value() {
-        return value;
-    }
-
-    public boolean booleanValue() {
-        return(value == 0)?false:true;
-    }
-
-    public byte byteValue() {
-        return value;
-    }
-
-    public char charValue() {
-        return(char)value;
-    }
-
-    public short shortValue() {
-        return(short)value;
-    }
-
-    public int intValue() {
-        return(int)value;
-    }
-
-    public long longValue() {
-        return(long)value;
-    }
-
-    public float floatValue() {
-        return(float)value;
-    }
-
-    public double doubleValue() {
-        return(double)value;
-    }
-
-    char checkedCharValue() throws InvalidTypeException {
-        if ((value > Character.MAX_VALUE) || (value < Character.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to char");
-        } else {
-            return super.checkedCharValue();
-        }
-    }
-
-    public String toString() {
-        return "" + value;
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/CharTypeImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class CharTypeImpl extends PrimitiveTypeImpl implements CharType {
-    CharTypeImpl(VirtualMachine vm) {
-        super(vm);
-    }
-
-
-    public String signature() {
-        return "C";
-    }
-
-    PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
-        return vm.mirrorOf(((PrimitiveValueImpl)value).checkedCharValue());
-    }
-
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/CharValueImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2002, 2011, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class CharValueImpl extends PrimitiveValueImpl
-                           implements CharValue {
-    private char value;
-
-    CharValueImpl(VirtualMachine aVm,char aValue) {
-        super(aVm);
-
-        value = aValue;
-    }
-
-    public boolean equals(Object obj) {
-        if ((obj != null) && (obj instanceof CharValue)) {
-            return (value == ((CharValue)obj).value()) &&
-                   super.equals(obj);
-        } else {
-            return false;
-        }
-    }
-
-    public int hashCode() {
-        /*
-         * TO DO: Better hash code
-         */
-        return intValue();
-    }
-
-    public int compareTo(CharValue charVal) {
-        return value() - charVal.value();
-    }
-
-    public Type type() {
-        return vm.theCharType();
-    }
-
-    public char value() {
-        return value;
-    }
-
-    public boolean booleanValue() {
-        return(value == 0)?false:true;
-    }
-
-    public byte byteValue() {
-        return(byte)value;
-    }
-
-    public char charValue() {
-        return(char)value;
-    }
-
-    public short shortValue() {
-        return(short)value;
-    }
-
-    public int intValue() {
-        return(int)value;
-    }
-
-    public long longValue() {
-        return(long)value;
-    }
-
-    public float floatValue() {
-        return(float)value;
-    }
-
-    public double doubleValue() {
-        return(double)value;
-    }
-
-    public String toString() {
-        return "" + value;
-    }
-
-    byte checkedByteValue() throws InvalidTypeException {
-        // Note: since char is unsigned, don't check against MIN_VALUE
-        if (value > Byte.MAX_VALUE) {
-            throw new InvalidTypeException("Can't convert " + value + " to byte");
-        } else {
-            return super.checkedByteValue();
-        }
-    }
-
-    short checkedShortValue() throws InvalidTypeException {
-        // Note: since char is unsigned, don't check against MIN_VALUE
-        if (value > Short.MAX_VALUE) {
-            throw new InvalidTypeException("Can't convert " + value + " to short");
-        } else {
-            return super.checkedShortValue();
-        }
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ClassLoaderReferenceImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import sun.jvm.hotspot.oops.Oop;
-import sun.jvm.hotspot.oops.Instance;
-import sun.jvm.hotspot.oops.Klass;
-import sun.jvm.hotspot.memory.SystemDictionary;
-import sun.jvm.hotspot.memory.Universe;
-import sun.jvm.hotspot.runtime.VM;
-
-import com.sun.jdi.*;
-import java.util.*;
-
-public class ClassLoaderReferenceImpl
-    extends ObjectReferenceImpl
-    implements ClassLoaderReference
-{
-     // because we work on process snapshot or core we can
-     // cache visibleClasses & definedClasses always (i.e., no suspension)
-     private List visibleClassesCache;
-     private List definedClassesCache;
-
-     ClassLoaderReferenceImpl(VirtualMachine aVm, Instance oRef) {
-         super(aVm, oRef);
-     }
-
-     protected String description() {
-         return "ClassLoaderReference " + uniqueID();
-     }
-
-     public List definedClasses() {
-         if (definedClassesCache == null) {
-             definedClassesCache = new ArrayList();
-             Iterator iter = vm.allClasses().iterator();
-             while (iter.hasNext()) {
-                 ReferenceType type = (ReferenceType)iter.next();
-                 if (equals(type.classLoader())) {  /* thanks OTI */
-                     definedClassesCache.add(type);
-                 }
-             }
-         }
-         return definedClassesCache;
-     }
-
-     private SystemDictionary getSystemDictionary() {
-         return vm.saSystemDictionary();
-     }
-
-     private Universe getUniverse() {
-         return vm.saUniverse();
-     }
-
-     public List visibleClasses() {
-         if (visibleClassesCache != null)
-            return visibleClassesCache;
-
-         visibleClassesCache = new ArrayList();
-
-         // refer to getClassLoaderClasses in jvmtiGetLoadedClasses.cpp
-         //  a. SystemDictionary::classes_do doesn't include arrays of primitive types (any dimensions)
-         SystemDictionary sysDict = getSystemDictionary();
-         sysDict.classesDo(
-                           new SystemDictionary.ClassAndLoaderVisitor() {
-                                public void visit(Klass k, Oop loader) {
-                                    if (ref().equals(loader)) {
-                                        for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
-                                            visibleClassesCache.add(vm.referenceType(l));
-                                        }
-                                    }
-                                }
-                           }
-                           );
-
-         // b. multi dimensional arrays of primitive types
-         sysDict.primArrayClassesDo(
-                                    new SystemDictionary.ClassAndLoaderVisitor() {
-                                         public void visit(Klass k, Oop loader) {
-                                             if (ref().equals(loader)) {
-                                                 visibleClassesCache.add(vm.referenceType(k));
-                                             }
-                                         }
-                                     }
-                                     );
-
-         // c. single dimensional primitive array klasses from Universe
-         // these are not added to SystemDictionary
-         getUniverse().basicTypeClassesDo(
-                            new SystemDictionary.ClassVisitor() {
-                                public void visit(Klass k) {
-                                    visibleClassesCache.add(vm.referenceType(k));
-                                }
-                            }
-                            );
-
-         return visibleClassesCache;
-     }
-
-     Type findType(String signature) throws ClassNotLoadedException {
-         List types = visibleClasses();
-         Iterator iter = types.iterator();
-         while (iter.hasNext()) {
-             ReferenceType type = (ReferenceType)iter.next();
-             if (type.signature().equals(signature)) {
-                 return type;
-             }
-         }
-         JNITypeParser parser = new JNITypeParser(signature);
-         throw new ClassNotLoadedException(parser.typeName(),
-                                          "Class " + parser.typeName() + " not loaded");
-     }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ClassObjectReferenceImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2002, 2011, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-import sun.jvm.hotspot.oops.Instance;
-import sun.jvm.hotspot.oops.Klass;
-import sun.jvm.hotspot.oops.java_lang_Class;
-
-public class ClassObjectReferenceImpl extends ObjectReferenceImpl
-                                      implements ClassObjectReference {
-    private ReferenceType reflectedType;
-
-    ClassObjectReferenceImpl(VirtualMachine vm, Instance oRef) {
-        super(vm, oRef);
-    }
-
-    public ReferenceType reflectedType() {
-        if (reflectedType == null) {
-            Klass k = java_lang_Class.asKlass(ref());
-            reflectedType = vm.referenceType(k);
-        }
-        return reflectedType;
-    }
-
-    public String toString() {
-        return "instance of " + referenceType().name() +
-               "(reflected class=" + reflectedType().name() + ", " + "id=" +
-               uniqueID() + ")";
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ClassTypeImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-/*
- * Copyright (c) 2002, 2007, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import java.lang.ref.SoftReference;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import sun.jvm.hotspot.oops.InstanceKlass;
-
-import com.sun.jdi.ClassNotLoadedException;
-import com.sun.jdi.ClassType;
-import com.sun.jdi.Field;
-import com.sun.jdi.IncompatibleThreadStateException;
-import com.sun.jdi.InterfaceType;
-import com.sun.jdi.InvalidTypeException;
-import com.sun.jdi.InvocationException;
-import com.sun.jdi.Method;
-import com.sun.jdi.ObjectReference;
-import com.sun.jdi.ReferenceType;
-import com.sun.jdi.ThreadReference;
-import com.sun.jdi.Value;
-import com.sun.jdi.VirtualMachine;
-
-public class ClassTypeImpl extends ReferenceTypeImpl
-    implements ClassType
-{
-    private SoftReference interfacesCache    = null;
-    private SoftReference allInterfacesCache = null;
-    private SoftReference subclassesCache    = null;
-
-    protected ClassTypeImpl(VirtualMachine aVm, InstanceKlass aRef) {
-        super(aVm, aRef);
-    }
-
-    public ClassType superclass() {
-        InstanceKlass kk = (InstanceKlass)ref().getSuper();
-        if (kk == null) {
-            return null;
-        }
-        return (ClassType) vm.referenceType(kk);
-    }
-
-    public List interfaces()  {
-        List interfaces = (interfacesCache != null)? (List) interfacesCache.get() : null;
-        if (interfaces == null) {
-            checkPrepared();
-            interfaces = Collections.unmodifiableList(getInterfaces());
-            interfacesCache = new SoftReference(interfaces);
-        }
-        return interfaces;
-    }
-
-    void addInterfaces(List list) {
-        List immediate = interfaces();
-
-        HashSet hashList = new HashSet(list);
-        hashList.addAll(immediate);
-        list.clear();
-        list.addAll(hashList);
-
-        Iterator iter = immediate.iterator();
-        while (iter.hasNext()) {
-            InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-            interfaze.addSuperinterfaces(list);
-        }
-
-        ClassTypeImpl superclass = (ClassTypeImpl)superclass();
-        if (superclass != null) {
-            superclass.addInterfaces(list);
-        }
-    }
-
-    public List allInterfaces()  {
-        List allinterfaces = (allInterfacesCache != null)? (List) allInterfacesCache.get() : null;
-        if (allinterfaces == null) {
-            checkPrepared();
-            allinterfaces = new ArrayList();
-            addInterfaces(allinterfaces);
-            allinterfaces = Collections.unmodifiableList(allinterfaces);
-            allInterfacesCache = new SoftReference(allinterfaces);
-        }
-        return allinterfaces;
-    }
-
-    public List subclasses() {
-        List subclasses = (subclassesCache != null)? (List) subclassesCache.get() : null;
-        if (subclasses == null) {
-            List all = vm.allClasses();
-            subclasses = new ArrayList(0);
-            Iterator iter = all.iterator();
-            while (iter.hasNext()) {
-                ReferenceType refType = (ReferenceType)iter.next();
-                if (refType instanceof ClassType) {
-                    ClassType clazz = (ClassType)refType;
-                    ClassType superclass = clazz.superclass();
-                    if ((superclass != null) && superclass.equals(this)) {
-                        subclasses.add(refType);
-                    }
-                }
-            }
-            subclasses = Collections.unmodifiableList(subclasses);
-            subclassesCache = new SoftReference(subclasses);
-        }
-        return subclasses;
-    }
-
-    public Method concreteMethodByName(String name, String signature)  {
-       checkPrepared();
-       List methods = visibleMethods();
-       Method method = null;
-       Iterator iter = methods.iterator();
-       while (iter.hasNext()) {
-           Method candidate = (Method)iter.next();
-           if (candidate.name().equals(name) &&
-               candidate.signature().equals(signature) &&
-               !candidate.isAbstract()) {
-
-               method = candidate;
-               break;
-           }
-       }
-       return method;
-   }
-
-   List getAllMethods() {
-        ArrayList list = new ArrayList(methods());
-        ClassType clazz = superclass();
-        while (clazz != null) {
-            list.addAll(clazz.methods());
-            clazz = clazz.superclass();
-        }
-        /*
-         * Avoid duplicate checking on each method by iterating through
-         * duplicate-free allInterfaces() rather than recursing
-         */
-        Iterator iter = allInterfaces().iterator();
-        while (iter.hasNext()) {
-            InterfaceType interfaze = (InterfaceType)iter.next();
-            list.addAll(interfaze.methods());
-        }
-        return list;
-    }
-
-    List inheritedTypes() {
-        List inherited = new ArrayList(interfaces());
-        if (superclass() != null) {
-            inherited.add(0, superclass()); /* insert at front */
-        }
-        return inherited;
-    }
-
-    public boolean isEnum() {
-        ClassTypeImpl superclass = (ClassTypeImpl) superclass();
-        if (superclass != null) {
-            return superclass.typeNameAsSymbol().equals(vm.javaLangEnum());
-        } else {
-            return false;
-        }
-    }
-
-    public void setValue(Field field, Value value)
-        throws InvalidTypeException, ClassNotLoadedException {
-        vm.throwNotReadOnlyException("ClassType.setValue(...)");
-    }
-
-
-    public Value invokeMethod(ThreadReference threadIntf, Method methodIntf,
-                              List arguments, int options)
-                                   throws InvalidTypeException,
-                                          ClassNotLoadedException,
-                                          IncompatibleThreadStateException,
-                                          InvocationException {
-        vm.throwNotReadOnlyException("ClassType.invokeMethod(...)");
-        return null;
-    }
-
-    public ObjectReference newInstance(ThreadReference threadIntf,
-                                       Method methodIntf,
-                                       List arguments, int options)
-                                   throws InvalidTypeException,
-                                          ClassNotLoadedException,
-                                          IncompatibleThreadStateException,
-                                          InvocationException {
-        vm.throwNotReadOnlyException("ClassType.newInstance(...)");
-        return null;
-    }
-
-    @Override
-    void addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> seenInterfaces) {
-        /*
-         * Add methods from
-         * parent types first, so that the methods in this class will
-         * overwrite them in the hash table
-         */
-
-        Iterator<InterfaceType> iter = interfaces().iterator();
-        while (iter.hasNext()) {
-            InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-            if (!seenInterfaces.contains(interfaze)) {
-                interfaze.addVisibleMethods(methodMap, seenInterfaces);
-                seenInterfaces.add(interfaze);
-            }
-        }
-
-        ClassTypeImpl clazz = (ClassTypeImpl)superclass();
-        if (clazz != null) {
-            clazz.addVisibleMethods(methodMap, seenInterfaces);
-        }
-
-        addToMethodMap(methodMap, methods());
-    }
-
-    boolean isAssignableTo(ReferenceType type) {
-        ClassTypeImpl superclazz = (ClassTypeImpl)superclass();
-        if (this.equals(type)) {
-            return true;
-        } else if ((superclazz != null) && superclazz.isAssignableTo(type)) {
-            return true;
-        } else {
-            List interfaces = interfaces();
-            Iterator iter = interfaces.iterator();
-            while (iter.hasNext()) {
-                InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-                if (interfaze.isAssignableTo(type)) {
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
-
-    public String toString() {
-       return "class " + name() + "(" + loaderString() + ")";
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ConcreteMethodImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,467 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-import sun.jvm.hotspot.oops.Symbol;
-import sun.jvm.hotspot.oops.LocalVariableTableElement;
-import sun.jvm.hotspot.oops.LineNumberTableElement;
-import java.util.List;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.lang.ref.SoftReference;
-import java.util.Collections;
-
-public class ConcreteMethodImpl extends MethodImpl {
-
-    /*
-     * A subset of the line number info that is softly cached
-     */
-    static private class SoftLocationXRefs {
-        final String stratumID;   // The stratum of this information
-        final Map lineMapper;     // Maps line number to location(s)
-        final List lineLocations; // List of locations ordered by code index
-
-        /*
-         * Note: these do not necessarily correspond to
-         * the line numbers of the first and last elements
-         * in the lineLocations list. Use these only for bounds
-         * checking and with lineMapper.
-         */
-        final int lowestLine;
-        final int highestLine;
-
-        SoftLocationXRefs(String stratumID, Map lineMapper, List lineLocations,
-                     int lowestLine, int highestLine) {
-            this.stratumID = stratumID;
-            this.lineMapper = Collections.unmodifiableMap(lineMapper);
-            this.lineLocations =
-                Collections.unmodifiableList(lineLocations);
-            this.lowestLine = lowestLine;
-            this.highestLine = highestLine;
-        }
-    }
-
-    private SoftReference softBaseLocationXRefsRef;
-    private SoftReference softOtherLocationXRefsRef;
-    private SoftReference variablesRef = null;
-    private int firstIndex = -1;
-    private int lastIndex = -1;
-    private Location location;
-    private SoftReference bytecodesRef = null;
-
-    ConcreteMethodImpl(VirtualMachine vm, ReferenceTypeImpl declaringType,
-               sun.jvm.hotspot.oops.Method saMethod ) {
-        super(vm, declaringType, saMethod);
-    }
-
-    int argSlotCount() throws AbsentInformationException {
-        return (int) saMethod.getSizeOfParameters();
-    }
-
-    private SoftLocationXRefs getLocations(SDE.Stratum stratum) {
-        if (stratum.isJava()) {
-            return getBaseLocations();
-        }
-        String stratumID = stratum.id();
-        SoftLocationXRefs info =
-            (softOtherLocationXRefsRef == null) ? null :
-               (SoftLocationXRefs)softOtherLocationXRefsRef.get();
-        if (info != null && info.stratumID.equals(stratumID)) {
-            return info;
-        }
-
-        List lineLocations = new ArrayList();
-        Map lineMapper = new HashMap();
-        int lowestLine = -1;
-        int highestLine = -1;
-        SDE.LineStratum lastLineStratum = null;
-        SDE.Stratum baseStratum =
-            declaringType.stratum(SDE.BASE_STRATUM_NAME);
-        Iterator it = getBaseLocations().lineLocations.iterator();
-        while(it.hasNext()) {
-            LocationImpl loc = (LocationImpl)it.next();
-            int baseLineNumber = loc.lineNumber(baseStratum);
-            SDE.LineStratum lineStratum =
-                  stratum.lineStratum(declaringType,
-                                      baseLineNumber);
-
-            if (lineStratum == null) {
-                // location not mapped in this stratum
-                continue;
-            }
-
-            int lineNumber = lineStratum.lineNumber();
-
-            // remove unmapped and dup lines
-            if ((lineNumber != -1) &&
-                          (!lineStratum.equals(lastLineStratum))) {
-                lastLineStratum = lineStratum;
-                // Remember the largest/smallest line number
-                if (lineNumber > highestLine) {
-                    highestLine = lineNumber;
-                }
-                if ((lineNumber < lowestLine) || (lowestLine == -1)) {
-                    lowestLine = lineNumber;
-                }
-
-                loc.addStratumLineInfo(
-                new StratumLineInfo(stratumID,
-                                      lineNumber,
-                                      lineStratum.sourceName(),
-                                      lineStratum.sourcePath()));
-
-                // Add to the location list
-                lineLocations.add(loc);
-
-                // Add to the line -> locations map
-                Integer key = new Integer(lineNumber);
-                List mappedLocs = (List)lineMapper.get(key);
-                if (mappedLocs == null) {
-                    mappedLocs = new ArrayList(1);
-                    lineMapper.put(key, mappedLocs);
-                }
-                mappedLocs.add(loc);
-            }
-        }
-
-        info = new SoftLocationXRefs(stratumID,
-                                lineMapper, lineLocations,
-                                lowestLine, highestLine);
-        softOtherLocationXRefsRef = new SoftReference(info);
-        return info;
-    }
-
-    private SoftLocationXRefs getBaseLocations() {
-        SoftLocationXRefs info = (softBaseLocationXRefsRef == null) ? null :
-                                     (SoftLocationXRefs)softBaseLocationXRefsRef.get();
-        if (info != null) {
-            return info;
-        }
-
-        byte[] codeBuf = bytecodes();
-        firstIndex = 0;
-        lastIndex = codeBuf.length - 1;
-        // This is odd; what is the Location of a Method?
-        // A StackFrame can have a location, but a Method?
-        // I guess it must be the Location for bci 0.
-        location = new LocationImpl(virtualMachine(), this, 0);
-
-        boolean hasLineInfo = saMethod.hasLineNumberTable();
-        LineNumberTableElement[] lntab = null;
-        int count;
-
-        if (hasLineInfo) {
-            lntab = saMethod.getLineNumberTable();
-            count = lntab.length;
-        } else {
-            count = 0;
-        }
-
-        List lineLocations = new ArrayList(count);
-        Map lineMapper = new HashMap();
-        int lowestLine = -1;
-        int highestLine = -1;
-        for (int i = 0; i < count; i++) {
-            long bci = lntab[i].getStartBCI();
-            int lineNumber = lntab[i].getLineNumber();
-
-            /*
-             * Some compilers will point multiple consecutive
-             * lines at the same location. We need to choose
-             * one of them so that we can consistently map back
-             * and forth between line and location. So we choose
-             * to record only the last line entry at a particular
-             * location.
-             */
-            if ((i + 1 == count) || (bci != lntab[i+1].getStartBCI())) {
-                // Remember the largest/smallest line number
-                if (lineNumber > highestLine) {
-                    highestLine = lineNumber;
-                }
-                if ((lineNumber < lowestLine) || (lowestLine == -1)) {
-                    lowestLine = lineNumber;
-                }
-                LocationImpl loc =
-                    new LocationImpl(virtualMachine(), this, bci);
-                loc.addBaseLineInfo(
-                    new BaseLineInfo(lineNumber, declaringType));
-
-                // Add to the location list
-                lineLocations.add(loc);
-
-                // Add to the line -> locations map
-                Integer key = new Integer(lineNumber);
-                List mappedLocs = (List)lineMapper.get(key);
-                if (mappedLocs == null) {
-                    mappedLocs = new ArrayList(1);
-                    lineMapper.put(key, mappedLocs);
-                }
-                mappedLocs.add(loc);
-            }
-        }
-
-        info = new SoftLocationXRefs(SDE.BASE_STRATUM_NAME,
-                                lineMapper, lineLocations,
-                                lowestLine, highestLine);
-        softBaseLocationXRefsRef = new SoftReference(info);
-        return info;
-    }
-
-    List sourceNameFilter(List list,
-                          SDE.Stratum stratum,
-                          String sourceName)
-                            throws AbsentInformationException {
-        if (sourceName == null) {
-            return list;
-        } else {
-            /* needs sourceName filteration */
-            List locs = new ArrayList();
-            Iterator it = list.iterator();
-            while (it.hasNext()) {
-                LocationImpl loc = (LocationImpl)it.next();
-                if (loc.sourceName(stratum).equals(sourceName)) {
-                    locs.add(loc);
-                }
-            }
-            return locs;
-        }
-    }
-
-    public List allLineLocations(SDE.Stratum stratum, String sourceName)
-        throws AbsentInformationException {
-        List lineLocations = getLocations(stratum).lineLocations;
-
-        if (lineLocations.size() == 0) {
-            throw new AbsentInformationException();
-        }
-
-        return Collections.unmodifiableList(
-          sourceNameFilter(lineLocations, stratum, sourceName));
-    }
-
-    public List locationsOfLine(SDE.Stratum stratum, String sourceName,
-                         int lineNumber) throws AbsentInformationException {
-        SoftLocationXRefs info = getLocations(stratum);
-
-        if (info.lineLocations.size() == 0) {
-            throw new AbsentInformationException();
-        }
-
-        /*
-         * Find the locations which match the line number
-         * passed in.
-         */
-        List list = (List)info.lineMapper.get(
-                                  new Integer(lineNumber));
-
-        if (list == null) {
-            list = new ArrayList(0);
-        }
-        return Collections.unmodifiableList(
-          sourceNameFilter(list, stratum, sourceName));
-    }
-
-    LineInfo codeIndexToLineInfo(SDE.Stratum stratum,
-                                 long codeIndex) {
-        if (firstIndex == -1) {
-            getBaseLocations();
-        }
-
-        /*
-         * Check for invalid code index.
-         */
-        if (codeIndex < firstIndex || codeIndex > lastIndex) {
-            throw new InternalError(
-                    "Location with invalid code index");
-        }
-
-        List lineLocations = getLocations(stratum).lineLocations;
-
-        /*
-         * Check for absent line numbers.
-         */
-        if (lineLocations.size() == 0) {
-            return super.codeIndexToLineInfo(stratum, codeIndex);
-        }
-
-        Iterator iter = lineLocations.iterator();
-        /*
-         * Treat code before the beginning of the first line table
-         * entry as part of the first line.  javac will generate
-         * code like this for some local classes. This "prolog"
-         * code contains assignments from locals in the enclosing
-         * scope to synthetic fields in the local class.  Same for
-         * other language prolog code.
-         */
-        LocationImpl bestMatch = (LocationImpl)iter.next();
-        while (iter.hasNext()) {
-            LocationImpl current = (LocationImpl)iter.next();
-            if (current.codeIndex() > codeIndex) {
-                break;
-            }
-            bestMatch = current;
-        }
-        return bestMatch.getLineInfo(stratum);
-    }
-
-    public Location locationOfCodeIndex(long codeIndex) {
-        if (firstIndex == -1) {
-            getBaseLocations();
-        }
-
-        /*
-         * Check for invalid code index.
-         */
-        if (codeIndex < firstIndex || codeIndex > lastIndex) {
-            return null;
-        }
-
-        return new LocationImpl(virtualMachine(), this, codeIndex);
-    }
-
-    public List variables() throws AbsentInformationException {
-        return getVariables();
-    }
-
-    public List variablesByName(String name) throws AbsentInformationException {
-        List variables = getVariables();
-
-        List retList = new ArrayList(2);
-        Iterator iter = variables.iterator();
-        while(iter.hasNext()) {
-            LocalVariable variable = (LocalVariable)iter.next();
-            if (variable.name().equals(name)) {
-                retList.add(variable);
-            }
-        }
-        return retList;
-    }
-
-    public List arguments() throws AbsentInformationException {
-        if (argumentTypeNames().size() == 0) {
-            return new ArrayList(0);
-        }
-        List variables = getVariables();
-        List retList = new ArrayList(variables.size());
-        Iterator iter = variables.iterator();
-        while(iter.hasNext()) {
-            LocalVariable variable = (LocalVariable)iter.next();
-            if (variable.isArgument()) {
-                retList.add(variable);
-            }
-        }
-        return retList;
-    }
-
-    public byte[] bytecodes() {
-        byte[] bytecodes = (bytecodesRef == null) ? null :
-                                     (byte[])bytecodesRef.get();
-        if (bytecodes == null) {
-            bytecodes = saMethod.getByteCode();
-            bytecodesRef = new SoftReference(bytecodes);
-        }
-        /*
-         * Arrays are always modifiable, so it is a little unsafe
-         * to return the cached bytecodes directly; instead, we
-         * make a clone at the cost of using more memory.
-         */
-        return (byte[])bytecodes.clone();
-    }
-
-    public Location location() {
-        if (location == null) {
-            getBaseLocations();
-        }
-        return location;
-    }
-
-    private List getVariables() throws AbsentInformationException {
-        List variables = (variablesRef == null) ? null :
-                                     (List)variablesRef.get();
-        if (variables != null) {
-            return variables;
-        }
-
-        // if there are no locals, there won't be a LVT
-        if (saMethod.getMaxLocals() == 0) {
-           variables = Collections.unmodifiableList(new ArrayList(0));
-           variablesRef = new SoftReference(variables);
-           return variables;
-        }
-
-        if (! saMethod.hasLocalVariableTable()) {
-            throw new AbsentInformationException();
-        }
-        //Build up the JDI view of local variable table.
-        LocalVariableTableElement[] locals = saMethod.getLocalVariableTable();
-        int localCount = locals.length;
-        variables = new ArrayList(localCount);
-        for (int ii = 0; ii < localCount; ii++) {
-            String name =
-                saMethod.getConstants().getSymbolAt(locals[ii].getNameCPIndex()).asString();
-            /*
-             * Skip "this$*", "this+*", "this" entries because they are never real
-             * variables from the JLS perspective. "this+*" is new with 1.5.
-             * Instead of using '+', we check for java letter or digit to avoid
-             * depending on javac's current choice of '+'.
-             */
-            boolean isInternalName = name.startsWith("this") &&
-                  (name.length() == 4 || name.charAt(4)=='$' || !Character.isJavaIdentifierPart(name.charAt(4)));
-            if (! isInternalName) {
-                int slot = locals[ii].getSlot();
-                long codeIndex = locals[ii].getStartBCI();
-                int length = locals[ii].getLength();
-                Location scopeStart = new LocationImpl(virtualMachine(),
-                                                       this, codeIndex);
-                Location scopeEnd =
-                    new LocationImpl(virtualMachine(), this,
-                                     codeIndex + length - 1);
-                String signature =
-                    saMethod.getConstants().getSymbolAt(locals[ii].getDescriptorCPIndex()).asString();
-
-                int genericSigIndex = locals[ii].getSignatureCPIndex();
-                String genericSignature = null;
-                if (genericSigIndex != 0) {
-                    genericSignature = saMethod.getConstants().getSymbolAt(genericSigIndex).asString();
-                }
-
-                LocalVariable variable =
-                    new LocalVariableImpl(virtualMachine(), this,
-                                          slot, scopeStart, scopeEnd,
-                                          name, signature, genericSignature);
-                // Add to the variable list
-                variables.add(variable);
-            }
-        }
-
-        variables = Collections.unmodifiableList(variables);
-        variablesRef = new SoftReference(variables);
-        return variables;
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,631 +0,0 @@
-/*
- * Copyright (c) 2002, 2012, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.connect.*;
-import com.sun.jdi.InternalException;
-
-import java.io.*;
-import java.lang.ref.*;
-import java.lang.reflect.*;
-import java.util.*;
-
-abstract class ConnectorImpl implements Connector {
-    Map defaultArguments = new LinkedHashMap();
-
-    // Used by BooleanArgument
-    static String trueString = null;
-    static String falseString;
-
-
-    /**  This is not public in VirtualMachineManagerImpl
-    ThreadGroup mainGroupForJDI() {
-        return ((VirtualMachineManagerImpl)manager).mainGroupForJDI();
-    }
-    ***/
-
-    // multiple debuggee support for SA/JDI
-    private static List freeVMClasses; // List<SoftReference<Class>>
-    private static ClassLoader myLoader;
-    // debug mode for SA/JDI connectors
-    static final protected boolean DEBUG;
-    static {
-        myLoader = ConnectorImpl.class.getClassLoader();
-        freeVMClasses = new ArrayList(0);
-        DEBUG = System.getProperty("sun.jvm.hotspot.jdi.ConnectorImpl.DEBUG") != null;
-    }
-
-    // add a new free VirtualMachineImpl class
-    private static synchronized void addFreeVMImplClass(Class clazz) {
-        if (DEBUG) {
-            System.out.println("adding free VirtualMachineImpl class");
-        }
-        freeVMClasses.add(new SoftReference(clazz));
-    }
-
-    // returns null if we don't have anything free
-    private static synchronized Class getFreeVMImplClass() {
-        while (!freeVMClasses.isEmpty()) {
-              SoftReference ref = (SoftReference) freeVMClasses.remove(0);
-              Object o = ref.get();
-              if (o != null) {
-                  if (DEBUG) {
-                      System.out.println("re-using loaded VirtualMachineImpl");
-                  }
-                  return (Class) o;
-              }
-        }
-        return null;
-    }
-
-    private static Class getVMImplClassFrom(ClassLoader cl)
-                               throws ClassNotFoundException {
-        return Class.forName("sun.jvm.hotspot.jdi.VirtualMachineImpl", true, cl);
-    }
-
-    /* SA has not been designed to support multiple debuggee VMs
-     * at-a-time.  But, JDI supports multiple debuggee VMs.  We
-     * support multiple debuggee VMs in SA/JDI, by creating a new
-     * class loader instance (refer to comment in SAJDIClassLoader
-     * for details). But, to avoid excessive class loading (and
-     * thereby resulting in larger footprint), we re-use 'dispose'd
-     * VirtualMachineImpl classes.
-     */
-    protected static Class loadVirtualMachineImplClass()
-                               throws ClassNotFoundException {
-        Class vmImplClass = getFreeVMImplClass();
-        if (vmImplClass == null) {
-            ClassLoader cl = new SAJDIClassLoader(myLoader);
-            vmImplClass = getVMImplClassFrom(cl);
-        }
-        return vmImplClass;
-    }
-
-    /* We look for System property sun.jvm.hotspot.jdi.<vm version>.
-     * This property should have the value of JDK HOME directory for
-     * the given <vm version>.
-     */
-    private static String getSAClassPathForVM(String vmVersion) {
-        final String prefix = "sun.jvm.hotspot.jdi.";
-        // look for exact match of VM version
-        String jvmHome = System.getProperty(prefix + vmVersion);
-        if (DEBUG) {
-            System.out.println("looking for System property " + prefix + vmVersion);
-        }
-
-        if (jvmHome == null) {
-            // omit chars after first '-' in VM version and try
-            // for example, in '1.5.0-b55' we take '1.5.0'
-            int index = vmVersion.indexOf('-');
-            if (index != -1) {
-                vmVersion = vmVersion.substring(0, index);
-                if (DEBUG) {
-                    System.out.println("looking for System property " + prefix + vmVersion);
-                }
-                jvmHome = System.getProperty(prefix + vmVersion);
-            }
-
-            if (jvmHome == null) {
-                // System property is not set
-                if (DEBUG) {
-                    System.out.println("can't locate JDK home for " + vmVersion);
-                }
-                return null;
-            }
-        }
-
-        if (DEBUG) {
-            System.out.println("JDK home for " + vmVersion + " is " + jvmHome);
-        }
-
-        // sa-jdi is in $JDK_HOME/lib directory
-        StringBuffer buf = new StringBuffer();
-        buf.append(jvmHome);
-        buf.append(File.separatorChar);
-        buf.append("lib");
-        buf.append(File.separatorChar);
-        buf.append("sa-jdi.jar");
-        return buf.toString();
-    }
-
-    /* This method loads VirtualMachineImpl class by a ClassLoader
-     * configured with sa-jdi.jar path of given 'vmVersion'. This is
-     * used for cross VM version debugging. Refer to comments in
-     * SAJDIClassLoader as well.
-     */
-    protected static Class loadVirtualMachineImplClass(String vmVersion)
-            throws ClassNotFoundException {
-        if (DEBUG) {
-            System.out.println("attemping to load sa-jdi.jar for version " + vmVersion);
-        }
-        String classPath = getSAClassPathForVM(vmVersion);
-        if (classPath != null) {
-            ClassLoader cl = new SAJDIClassLoader(myLoader, classPath);
-            return getVMImplClassFrom(cl);
-        } else {
-            return null;
-        }
-    }
-
-    /* Is the given throwable an instanceof VMVersionMismatchException?
-     * Note that we can't do instanceof check because the exception
-     * class might have been loaded by a different class loader.
-     */
-    private static boolean isVMVersionMismatch(Throwable throwable) {
-        String className = throwable.getClass().getName();
-        return className.equals("sun.jvm.hotspot.runtime.VMVersionMismatchException");
-    }
-
-    /* gets target VM version from the given VMVersionMismatchException.
-     * Note that we need to reflectively call the method because of we may
-     * have got this from different classloader's namespace */
-    private static String getVMVersion(Throwable throwable)
-        throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
-        // assert isVMVersionMismatch(throwable), "not a VMVersionMismatch"
-        Class expClass = throwable.getClass();
-        Method targetVersionMethod = expClass.getMethod("getTargetVersion", new Class[0]);
-        return (String) targetVersionMethod.invoke(throwable);
-    }
-
-    /** If the causal chain has a sun.jvm.hotspot.runtime.VMVersionMismatchException,
-        attempt to load VirtualMachineImpl class for target VM version. */
-    protected static Class handleVMVersionMismatch(InvocationTargetException ite) {
-        Throwable cause = ite.getCause();
-        if (DEBUG) {
-            System.out.println("checking for version mismatch...");
-        }
-        while (cause != null) {
-            try {
-                if (isVMVersionMismatch(cause)) {
-                    if (DEBUG) {
-                        System.out.println("Triggering cross VM version support...");
-                    }
-                    return loadVirtualMachineImplClass(getVMVersion(cause));
-                }
-            } catch (Exception exp) {
-                if (DEBUG) {
-                    System.out.println("failed to load VirtualMachineImpl class");
-                    exp.printStackTrace();
-                }
-                return null;
-            }
-            cause = cause.getCause();
-        }
-        return null;
-    }
-
-    protected void checkNativeLink(SecurityManager sm, String os) {
-        if (os.equals("SunOS") || os.equals("Linux") || os.contains("OS X")) {
-            // link "saproc" - SA native library on SunOS, Linux, and Mac OS X
-            sm.checkLink("saproc");
-        } else if (os.startsWith("Windows")) {
-            // link "sawindbg" - SA native library on Windows.
-            sm.checkLink("sawindbg");
-        } else {
-           throw new RuntimeException(os + " is not yet supported");
-        }
-    }
-
-    // we set an observer to detect VirtualMachineImpl.dispose call
-    // and on dispose we add corresponding VirtualMachineImpl.class to
-    // free VirtualMachimeImpl Class list.
-    protected static void setVMDisposeObserver(final Object vm) {
-        try {
-            Method setDisposeObserverMethod = vm.getClass().getDeclaredMethod("setDisposeObserver",
-                                                         new Class[] { java.util.Observer.class });
-            setDisposeObserverMethod.setAccessible(true);
-            setDisposeObserverMethod.invoke(vm,
-                                         new Object[] {
-                                             new Observer() {
-                                                 public void update(Observable o, Object data) {
-                                                     if (DEBUG) {
-                                                         System.out.println("got VM.dispose notification");
-                                                     }
-                                                     addFreeVMImplClass(vm.getClass());
-                                                 }
-                                             }
-                                         });
-        } catch (Exception exp) {
-            if (DEBUG) {
-               System.out.println("setVMDisposeObserver() got an exception:");
-               exp.printStackTrace();
-            }
-        }
-    }
-
-    public Map defaultArguments() {
-        Map defaults = new LinkedHashMap();
-        Collection values = defaultArguments.values();
-
-        Iterator iter = values.iterator();
-        while (iter.hasNext()) {
-            ArgumentImpl argument = (ArgumentImpl)iter.next();
-            defaults.put(argument.name(), argument.clone());
-        }
-        return defaults;
-    }
-
-    void addStringArgument(String name, String label, String description,
-                           String defaultValue, boolean mustSpecify) {
-        defaultArguments.put(name,
-                             new StringArgumentImpl(name, label,
-                                                    description,
-                                                    defaultValue,
-                                                    mustSpecify));
-    }
-
-    void addBooleanArgument(String name, String label, String description,
-                            boolean defaultValue, boolean mustSpecify) {
-        defaultArguments.put(name,
-                             new BooleanArgumentImpl(name, label,
-                                                     description,
-                                                     defaultValue,
-                                                     mustSpecify));
-    }
-
-    void addIntegerArgument(String name, String label, String description,
-                            String defaultValue, boolean mustSpecify,
-                            int min, int max) {
-        defaultArguments.put(name,
-                             new IntegerArgumentImpl(name, label,
-                                                     description,
-                                                     defaultValue,
-                                                     mustSpecify,
-                                                     min, max));
-    }
-
-    void addSelectedArgument(String name, String label, String description,
-                             String defaultValue, boolean mustSpecify,
-                             List list) {
-        defaultArguments.put(name,
-                             new SelectedArgumentImpl(name, label,
-                                                      description,
-                                                      defaultValue,
-                                                      mustSpecify, list));
-    }
-
-    ArgumentImpl argument(String name, Map arguments)
-                throws IllegalConnectorArgumentsException {
-
-        ArgumentImpl argument = (ArgumentImpl)arguments.get(name);
-        if (argument == null) {
-            throw new IllegalConnectorArgumentsException(
-                         "Argument missing", name);
-        }
-        String value = argument.value();
-        if (value == null || value.length() == 0) {
-            if (argument.mustSpecify()) {
-            throw new IllegalConnectorArgumentsException(
-                         "Argument unspecified", name);
-            }
-        } else if(!argument.isValid(value)) {
-            throw new IllegalConnectorArgumentsException(
-                         "Argument invalid", name);
-        }
-
-        return argument;
-    }
-
-    String getString(String key) {
-        //fixme jjh; needs i18n
-        // this is not public return ((VirtualMachineManagerImpl)manager).getString(key);
-        return key;
-    }
-
-    public String toString() {
-        String string = name() + " (defaults: ";
-        Iterator iter = defaultArguments().values().iterator();
-        boolean first = true;
-        while (iter.hasNext()) {
-            ArgumentImpl argument = (ArgumentImpl)iter.next();
-            if (!first) {
-                string += ", ";
-            }
-            string += argument.toString();
-            first = false;
-        }
-        return string  + ")";
-    }
-
-    abstract class ArgumentImpl implements Connector.Argument, Cloneable, Serializable {
-        private String name;
-        private String label;
-        private String description;
-        private String value;
-        private boolean mustSpecify;
-
-        ArgumentImpl(String name, String label, String description,
-                     String value,
-                     boolean mustSpecify) {
-            this.name = name;
-            this.label = label;
-            this.description = description;
-            this.value = value;
-            this.mustSpecify = mustSpecify;
-        }
-
-        public abstract boolean isValid(String value);
-
-        public String name() {
-            return name;
-        }
-
-        public String label() {
-            return label;
-        }
-
-        public String description() {
-            return description;
-        }
-
-        public String value() {
-            return value;
-        }
-
-        public void setValue(String value) {
-            if (value == null) {
-                throw new NullPointerException("Can't set null value");
-            }
-            this.value = value;
-        }
-
-        public boolean mustSpecify() {
-            return mustSpecify;
-        }
-
-        public boolean equals(Object obj) {
-            if ((obj != null) && (obj instanceof Connector.Argument)) {
-                Connector.Argument other = (Connector.Argument)obj;
-                return (name().equals(other.name())) &&
-                       (description().equals(other.description())) &&
-                       (mustSpecify() == other.mustSpecify()) &&
-                       (value().equals(other.value()));
-            } else {
-                return false;
-            }
-        }
-
-        public int hashCode() {
-            return description().hashCode();
-        }
-
-        public Object clone() {
-            try {
-                return super.clone();
-            } catch (CloneNotSupportedException e) {
-                // Object should always support clone
-                throw (InternalException) new InternalException().initCause(e);
-            }
-        }
-
-        public String toString() {
-            return name() + "=" + value();
-        }
-    }
-
-    class BooleanArgumentImpl extends ConnectorImpl.ArgumentImpl
-                              implements Connector.BooleanArgument {
-
-        BooleanArgumentImpl(String name, String label, String description,
-                            boolean value,
-                            boolean mustSpecify) {
-            super(name, label, description, null, mustSpecify);
-            if(trueString == null) {
-                trueString = getString("true");
-                falseString = getString("false");
-            }
-            setValue(value);
-        }
-
-        /**
-         * Sets the value of the argument.
-         */
-        public void setValue(boolean value) {
-            setValue(stringValueOf(value));
-        }
-
-        /**
-         * Performs basic sanity check of argument.
-         * @return <code>true</code> if value is a string
-         * representation of a boolean value.
-         * @see #stringValueOf(boolean)
-         */
-        public boolean isValid(String value) {
-            return value.equals(trueString) || value.equals(falseString);
-        }
-
-        /**
-         * Return the string representation of the <code>value</code>
-         * parameter.
-         * Does not set or examine the value or the argument.
-         * @return the localized String representation of the
-         * boolean value.
-         */
-        public String stringValueOf(boolean value) {
-            return value? trueString : falseString;
-        }
-
-        /**
-         * Return the value of the argument as a boolean.  Since
-         * the argument may not have been set or may have an invalid
-         * value {@link #isValid(String)} should be called on
-         * {@link #value()} to check its validity.  If it is invalid
-         * the boolean returned by this method is undefined.
-         * @return the value of the argument as a boolean.
-         */
-        public boolean booleanValue() {
-            return value().equals(trueString);
-        }
-    }
-
-    class IntegerArgumentImpl extends ConnectorImpl.ArgumentImpl
-                              implements Connector.IntegerArgument {
-
-        private final int min;
-        private final int max;
-
-        IntegerArgumentImpl(String name, String label, String description,
-                            String value,
-                            boolean mustSpecify, int min, int max) {
-            super(name, label, description, value, mustSpecify);
-            this.min = min;
-            this.max = max;
-        }
-
-        /**
-         * Sets the value of the argument.
-         * The value should be checked with {@link #isValid(int)}
-         * before setting it; invalid values will throw an exception
-         * when the connection is established - for example,
-         * on {@link LaunchingConnector#launch}
-         */
-        public void setValue(int value) {
-            setValue(stringValueOf(value));
-        }
-
-        /**
-         * Performs basic sanity check of argument.
-         * @return <code>true</code> if value represents an int that is
-         * <code>{@link #min()} &lt;= value &lt;= {@link #max()}</code>
-         */
-        public boolean isValid(String value) {
-            if (value == null) {
-                return false;
-            }
-            try {
-                return isValid(Integer.decode(value).intValue());
-            } catch(NumberFormatException exc) {
-                return false;
-            }
-        }
-
-        /**
-         * Performs basic sanity check of argument.
-         * @return <code>true</code> if
-         * <code>{@link #min()} &lt;= value  &lt;= {@link #max()}</code>
-         */
-        public boolean isValid(int value) {
-            return min <= value && value <= max;
-        }
-
-        /**
-         * Return the string representation of the <code>value</code>
-         * parameter.
-         * Does not set or examine the value or the argument.
-         * @return the String representation of the
-         * int value.
-         */
-        public String stringValueOf(int value) {
-            // *** Should this be internationalized????
-            // *** Even Brian Beck was unsure if an Arabic programmer
-            // *** would expect port numbers in Arabic numerals,
-            // *** so punt for now.
-            return ""+value;
-        }
-
-        /**
-         * Return the value of the argument as a int.  Since
-         * the argument may not have been set or may have an invalid
-         * value {@link #isValid(String)} should be called on
-         * {@link #value()} to check its validity.  If it is invalid
-         * the int returned by this method is undefined.
-         * @return the value of the argument as a int.
-         */
-        public int intValue() {
-            if (value() == null) {
-                return 0;
-            }
-            try {
-                return Integer.decode(value()).intValue();
-            } catch(NumberFormatException exc) {
-                return 0;
-            }
-        }
-
-        /**
-         * The upper bound for the value.
-         * @return the maximum allowed value for this argument.
-         */
-        public int max() {
-            return max;
-        }
-
-        /**
-         * The lower bound for the value.
-         * @return the minimum allowed value for this argument.
-         */
-        public int min() {
-            return min;
-        }
-    }
-
-    class StringArgumentImpl extends ConnectorImpl.ArgumentImpl
-                              implements Connector.StringArgument {
-
-        StringArgumentImpl(String name, String label, String description,
-                           String value,
-                           boolean mustSpecify) {
-            super(name, label, description, value, mustSpecify);
-        }
-
-        /**
-         * Performs basic sanity check of argument.
-         * @return <code>true</code> always
-         */
-        public boolean isValid(String value) {
-            return true;
-        }
-    }
-
-    class SelectedArgumentImpl extends ConnectorImpl.ArgumentImpl
-                              implements Connector.SelectedArgument {
-
-        private final List choices;
-
-        SelectedArgumentImpl(String name, String label, String description,
-                             String value,
-                             boolean mustSpecify, List choices) {
-            super(name, label, description, value, mustSpecify);
-            this.choices = Collections.unmodifiableList(
-                                           new ArrayList(choices));
-        }
-
-        /**
-         * Return the possible values for the argument
-         * @return {@link List} of {@link String}
-         */
-        public List choices() {
-            return choices;
-        }
-
-        /**
-         * Performs basic sanity check of argument.
-         * @return <code>true</code> if value is one of {@link #choices()}.
-         */
-        public boolean isValid(String value) {
-            return choices.contains(value);
-        }
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/DoubleTypeImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class DoubleTypeImpl extends PrimitiveTypeImpl implements DoubleType {
-    DoubleTypeImpl(VirtualMachine vm) {
-        super(vm);
-    }
-
-
-    public String signature() {
-        return "D";
-    }
-
-    PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
-        return vm.mirrorOf(((PrimitiveValueImpl)value).checkedDoubleValue());
-    }
-
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/DoubleValueImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2002, 2011, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class DoubleValueImpl extends PrimitiveValueImpl
-                             implements DoubleValue {
-    private double value;
-
-    DoubleValueImpl(VirtualMachine aVm,double aValue) {
-        super(aVm);
-
-        value = aValue;
-    }
-
-    public boolean equals(Object obj) {
-        if ((obj != null) && (obj instanceof DoubleValue)) {
-            return (value == ((DoubleValue)obj).value()) &&
-                   super.equals(obj);
-        } else {
-            return false;
-        }
-    }
-
-    public int compareTo(DoubleValue doubleVal) {
-        double other = doubleVal.value();
-        if (value() < other) {
-            return -1;
-        } else if (value() == other) {
-            return 0;
-        } else {
-            return 1;
-        }
-    }
-
-    public int hashCode() {
-        /*
-         * TO DO: Better hash code
-         */
-        return intValue();
-    }
-
-    public Type type() {
-        return vm.theDoubleType();
-    }
-
-    public double value() {
-        return value;
-    }
-
-    public boolean booleanValue() {
-        return(value == 0.0)?false:true;
-    }
-
-    public byte byteValue() {
-        return(byte)value;
-    }
-
-    public char charValue() {
-        return(char)value;
-    }
-
-    public short shortValue() {
-        return(short)value;
-    }
-
-    public int intValue() {
-        return(int)value;
-    }
-
-    public long longValue() {
-        return(long)value;
-    }
-
-    public float floatValue() {
-        return(float)value;
-    }
-
-    public double doubleValue() {
-        return(double)value;
-    }
-
-    byte checkedByteValue() throws InvalidTypeException {
-        if ((value > Byte.MAX_VALUE) || (value < Byte.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to byte");
-        } else {
-            return super.checkedByteValue();
-        }
-    }
-
-    char checkedCharValue() throws InvalidTypeException {
-        if ((value > Character.MAX_VALUE) || (value < Character.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to char");
-        } else {
-            return super.checkedCharValue();
-        }
-    }
-
-    short checkedShortValue() throws InvalidTypeException {
-        if ((value > Short.MAX_VALUE) || (value < Short.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to short");
-        } else {
-            return super.checkedShortValue();
-        }
-    }
-
-    int checkedIntValue() throws InvalidTypeException {
-        if ((value > Integer.MAX_VALUE) || (value < Integer.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to int");
-        } else {
-            return super.checkedIntValue();
-        }
-    }
-
-    long checkedLongValue() throws InvalidTypeException {
-        long longValue = (long)value;
-        if (longValue != value) {
-            throw new InvalidTypeException("Can't convert " + value + " to long");
-        } else {
-            return super.checkedLongValue();
-        }
-    }
-
-    float checkedFloatValue() throws InvalidTypeException {
-        float floatValue = (float)value;
-        if (floatValue != value) {
-            throw new InvalidTypeException("Can't convert " + value + " to float");
-        } else {
-            return super.checkedFloatValue();
-        }
-    }
-
-    public String toString() {
-        return "" + value;
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/FieldImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2002, 2011, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-import sun.jvm.hotspot.oops.Oop;
-import sun.jvm.hotspot.oops.Instance;
-import sun.jvm.hotspot.oops.Array;
-import sun.jvm.hotspot.oops.InstanceKlass;
-import sun.jvm.hotspot.oops.Symbol;
-import sun.jvm.hotspot.oops.FieldIdentifier;
-
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-import java.util.Comparator;
-
-public class FieldImpl extends TypeComponentImpl implements Field {
-    private JNITypeParser signatureParser;
-    private sun.jvm.hotspot.oops.Field saField;
-
-    FieldImpl( VirtualMachine vm, ReferenceTypeImpl declaringType,
-               sun.jvm.hotspot.oops.Field saField) {
-        super(vm, declaringType);
-        this.saField = saField;
-        getParser();
-    }
-
-    private void getParser() {
-        if (signatureParser == null) {
-            Symbol sig1 = saField.getSignature();
-            signature = sig1.asString();
-            signatureParser = new JNITypeParser(signature);
-        }
-    }
-
-    sun.jvm.hotspot.oops.Field ref() {
-        return saField;
-    }
-
-    // get the value of static field
-    ValueImpl getValue() {
-        return getValue(saField.getFieldHolder().getJavaMirror());
-    }
-
-    // get the value of this Field from a specific Oop
-    ValueImpl getValue(Oop target) {
-        ValueImpl valueImpl;
-        sun.jvm.hotspot.oops.Field saField = (sun.jvm.hotspot.oops.Field) ref();
-        sun.jvm.hotspot.oops.FieldType ft = saField.getFieldType();
-        if (ft.isArray()) {
-            sun.jvm.hotspot.oops.OopField of = (sun.jvm.hotspot.oops.OopField)saField;
-            valueImpl = (ArrayReferenceImpl) vm.arrayMirror((Array)of.getValue(target));
-        } else if (ft.isObject()) {
-            sun.jvm.hotspot.oops.OopField of = (sun.jvm.hotspot.oops.OopField)saField;
-            valueImpl = (ObjectReferenceImpl) vm.objectMirror(of.getValue(target));
-        } else if (ft.isByte()) {
-            sun.jvm.hotspot.oops.ByteField bf = (sun.jvm.hotspot.oops.ByteField)saField;
-            valueImpl = (ByteValueImpl) vm.mirrorOf(bf.getValue(target));
-        } else if (ft.isChar()) {
-            sun.jvm.hotspot.oops.CharField cf = (sun.jvm.hotspot.oops.CharField)saField;
-            valueImpl = (CharValueImpl) vm.mirrorOf(cf.getValue(target));
-        } else if (ft.isDouble()) {
-            sun.jvm.hotspot.oops.DoubleField df = (sun.jvm.hotspot.oops.DoubleField)saField;
-            valueImpl = (DoubleValueImpl) vm.mirrorOf(df.getValue(target));
-        } else if (ft.isFloat()) {
-            sun.jvm.hotspot.oops.FloatField ff = (sun.jvm.hotspot.oops.FloatField)saField;
-            valueImpl = (FloatValueImpl) vm.mirrorOf(ff.getValue(target));
-        } else if (ft.isInt()) {
-            sun.jvm.hotspot.oops.IntField iif = (sun.jvm.hotspot.oops.IntField)saField;
-            valueImpl = (IntegerValueImpl) vm.mirrorOf(iif.getValue(target));
-        } else if (ft.isLong()) {
-            sun.jvm.hotspot.oops.LongField lf = (sun.jvm.hotspot.oops.LongField)saField;
-            valueImpl = (LongValueImpl) vm.mirrorOf(lf.getValue(target));
-        } else if (ft.isShort()) {
-            sun.jvm.hotspot.oops.ShortField sf = (sun.jvm.hotspot.oops.ShortField)saField;
-            valueImpl = (ShortValueImpl) vm.mirrorOf(sf.getValue(target));
-        } else if (ft.isBoolean()) {
-            sun.jvm.hotspot.oops.BooleanField bf = (sun.jvm.hotspot.oops.BooleanField)saField;
-            valueImpl = (BooleanValueImpl) vm.mirrorOf(bf.getValue(target));
-        } else {
-            throw new RuntimeException("Should not reach here");
-        }
-        return valueImpl;
-    }
-
-    public boolean equals(Object obj) {
-        if ((obj != null) && (obj instanceof FieldImpl)) {
-            FieldImpl other = (FieldImpl)obj;
-            return (declaringType().equals(other.declaringType())) &&
-                (ref().equals(other.ref())) &&
-                super.equals(obj);
-        } else {
-            return false;
-        }
-    }
-
-    public boolean isTransient() {
-        return saField.isTransient();
-    }
-
-    public boolean isVolatile() {
-        return saField.isVolatile();
-    }
-
-    public boolean isEnumConstant() {
-        return saField.isEnumConstant();
-    }
-
-    public Type type() throws ClassNotLoadedException {
-        // So, we do it just like JDI does by searching the enclosing type.
-        return findType(signature());
-    }
-
-    public String typeName() { //fixme jjh: jpda version creates redundant JNITypeParsers
-        getParser();
-        return signatureParser.typeName();
-    }
-
-    public String genericSignature() {
-        Symbol genSig = saField.getGenericSignature();
-        return (genSig != null)? genSig.asString() : null;
-    }
-
-    // From interface Comparable
-    public int compareTo(Field field) {
-        ReferenceTypeImpl declaringType = (ReferenceTypeImpl)declaringType();
-        int rc = declaringType.compareTo(field.declaringType());
-        if (rc == 0) {
-            rc = declaringType.indexOf(this) -
-                declaringType.indexOf(field);
-        }
-        return rc;
-    }
-
-    // from interface Mirror
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-
-        buf.append(declaringType().name());
-        buf.append('.');
-        buf.append(name());
-        return buf.toString();
-    }
-
-    public String name() {
-        FieldIdentifier myName =  saField.getID();
-        return myName.getName();
-    }
-
-    // From interface Accessible
-    public int modifiers() {
-        return saField.getAccessFlagsObj().getStandardFlags();
-    }
-
-    public boolean isPackagePrivate() {
-        return saField.isPackagePrivate();
-    }
-
-    public boolean isPrivate() {
-        return saField.isPrivate();
-    }
-
-    public boolean isProtected() {
-        return saField.isProtected();
-    }
-
-    public boolean isPublic() {
-        return saField.isPublic();
-    }
-
-    public boolean isStatic() {
-        return saField.isStatic();
-    }
-
-    public boolean isFinal() {
-        return saField.isFinal();
-    }
-
-    public boolean isSynthetic() {
-        return saField.isSynthetic();
-    }
-
-    public int hashCode() {
-        return saField.hashCode();
-    }
-
-
-    private Type findType(String signature) throws ClassNotLoadedException {
-        ReferenceTypeImpl enclosing = (ReferenceTypeImpl)declaringType();
-        return enclosing.findType(signature);
-    }
-
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/FloatTypeImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class FloatTypeImpl extends PrimitiveTypeImpl implements FloatType {
-    FloatTypeImpl(VirtualMachine vm) {
-        super(vm);
-    }
-
-
-    public String signature() {
-        return "F";
-    }
-
-    PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
-        return vm.mirrorOf(((PrimitiveValueImpl)value).checkedFloatValue());
-    }
-
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/FloatValueImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2002, 2011, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class FloatValueImpl extends PrimitiveValueImpl
-                            implements FloatValue {
-    private float value;
-
-    FloatValueImpl(VirtualMachine aVm,float aValue) {
-        super(aVm);
-
-        value = aValue;
-    }
-
-    public boolean equals(Object obj) {
-        if ((obj != null) && (obj instanceof FloatValue)) {
-            return (value == ((FloatValue)obj).value()) &&
-                   super.equals(obj);
-        } else {
-            return false;
-        }
-    }
-
-    public int hashCode() {
-        /*
-         * TO DO: Better hash code
-         */
-        return intValue();
-    }
-
-    public int compareTo(FloatValue floatVal) {
-        float other = floatVal.value();
-        if (value() < other) {
-            return -1;
-        } else if (value() == other) {
-            return 0;
-        } else {
-            return 1;
-        }
-    }
-
-    public Type type() {
-        return vm.theFloatType();
-    }
-
-    public float value() {
-        return value;
-    }
-
-    public boolean booleanValue() {
-        return(value == 0.0)?false:true;
-    }
-
-    public byte byteValue() {
-        return(byte)value;
-    }
-
-    public char charValue() {
-        return(char)value;
-    }
-
-    public short shortValue() {
-        return(short)value;
-    }
-
-    public int intValue() {
-        return(int)value;
-    }
-
-    public long longValue() {
-        return(long)value;
-    }
-
-    public float floatValue() {
-        return(float)value;
-    }
-
-    public double doubleValue() {
-        return(double)value;
-    }
-
-    byte checkedByteValue() throws InvalidTypeException {
-        if ((value > Byte.MAX_VALUE) || (value < Byte.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to byte");
-        } else {
-            return super.checkedByteValue();
-        }
-    }
-
-    char checkedCharValue() throws InvalidTypeException {
-        if ((value > Character.MAX_VALUE) || (value < Character.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to char");
-        } else {
-            return super.checkedCharValue();
-        }
-    }
-
-    short checkedShortValue() throws InvalidTypeException {
-        if ((value > Short.MAX_VALUE) || (value < Short.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to short");
-        } else {
-            return super.checkedShortValue();
-        }
-    }
-
-    int checkedIntValue() throws InvalidTypeException {
-        int intValue = (int)value;
-        if (intValue != value) {
-            throw new InvalidTypeException("Can't convert " + value + " to int");
-        } else {
-            return super.checkedIntValue();
-        }
-    }
-
-    long checkedLongValue() throws InvalidTypeException {
-        long longValue = (long)value;
-        if (longValue != value) {
-            throw new InvalidTypeException("Can't convert " + value + " to long");
-        } else {
-            return super.checkedLongValue();
-        }
-    }
-
-    public String toString() {
-        return "" + value;
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/IntegerTypeImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class IntegerTypeImpl extends PrimitiveTypeImpl implements IntegerType {
-    IntegerTypeImpl(VirtualMachine vm) {
-        super(vm);
-    }
-
-    public String signature() {
-        return "I";
-    }
-
-    PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
-        return vm.mirrorOf(((PrimitiveValueImpl)value).checkedIntValue());
-    }
-
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/IntegerValueImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2002, 2011, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-public class IntegerValueImpl extends PrimitiveValueImpl
-                              implements IntegerValue {
-    private int value;
-
-    IntegerValueImpl(VirtualMachine aVm,int aValue) {
-        super(aVm);
-
-        value = aValue;
-    }
-
-    public boolean equals(Object obj) {
-        if ((obj != null) && (obj instanceof IntegerValue)) {
-            return (value == ((IntegerValue)obj).value()) &&
-                   super.equals(obj);
-        } else {
-            return false;
-        }
-    }
-
-    public int hashCode() {
-        /*
-         * TO DO: Better hash code
-         */
-        return intValue();
-    }
-
-    public int compareTo(IntegerValue integerVal) {
-        return value() - integerVal.value();
-    }
-
-    public Type type() {
-        return vm.theIntegerType();
-    }
-
-    public int value() {
-        return value;
-    }
-
-    public boolean booleanValue() {
-        return(value == 0)?false:true;
-    }
-
-    public byte byteValue() {
-        return(byte)value;
-    }
-
-    public char charValue() {
-        return(char)value;
-    }
-
-    public short shortValue() {
-        return(short)value;
-    }
-
-    public int intValue() {
-        return(int)value;
-    }
-
-    public long longValue() {
-        return(long)value;
-    }
-
-    public float floatValue() {
-        return(float)value;
-    }
-
-    public double doubleValue() {
-        return(double)value;
-    }
-
-    byte checkedByteValue() throws InvalidTypeException {
-        if ((value > Byte.MAX_VALUE) || (value < Byte.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to byte");
-        } else {
-            return super.checkedByteValue();
-        }
-    }
-
-    char checkedCharValue() throws InvalidTypeException {
-        if ((value > Character.MAX_VALUE) || (value < Character.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to char");
-        } else {
-            return super.checkedCharValue();
-        }
-    }
-
-    short checkedShortValue() throws InvalidTypeException {
-        if ((value > Short.MAX_VALUE) || (value < Short.MIN_VALUE)) {
-            throw new InvalidTypeException("Can't convert " + value + " to short");
-        } else {
-            return super.checkedShortValue();
-        }
-    }
-
-    public String toString() {
-        return "" + value;
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/InterfaceTypeImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
- * Copyright (c) 2002, 2004, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import java.lang.ref.SoftReference;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import sun.jvm.hotspot.oops.InstanceKlass;
-
-import com.sun.jdi.ClassNotPreparedException;
-import com.sun.jdi.ClassType;
-import com.sun.jdi.InterfaceType;
-import com.sun.jdi.Method;
-import com.sun.jdi.ReferenceType;
-import com.sun.jdi.VirtualMachine;
-
-public class InterfaceTypeImpl extends ReferenceTypeImpl
-                               implements InterfaceType {
-    private SoftReference superInterfacesCache = null;
-    private SoftReference subInterfacesCache = null;
-    private SoftReference implementorsCache = null;
-
-    protected InterfaceTypeImpl(VirtualMachine aVm, InstanceKlass aRef) {
-        super(aVm, aRef);
-    }
-
-    public List superinterfaces() throws ClassNotPreparedException {
-        List superinterfaces = (superInterfacesCache != null)? (List) superInterfacesCache.get() : null;
-        if (superinterfaces == null) {
-            checkPrepared();
-            superinterfaces = Collections.unmodifiableList(getInterfaces());
-            superInterfacesCache = new SoftReference(superinterfaces);
-        }
-        return superinterfaces;
-    }
-
-    public List subinterfaces() {
-        List subinterfaces = (subInterfacesCache != null)? (List) subInterfacesCache.get() : null;
-        if (subinterfaces == null) {
-            List all = vm.allClasses();
-            subinterfaces = new ArrayList();
-            Iterator iter = all.iterator();
-            while (iter.hasNext()) {
-                ReferenceType refType = (ReferenceType)iter.next();
-                if (refType instanceof InterfaceType) {
-                    InterfaceType interfaze = (InterfaceType)refType;
-                    if (interfaze.isPrepared() && interfaze.superinterfaces().contains(this)) {
-                        subinterfaces.add(interfaze);
-                    }
-               }
-            }
-            subinterfaces = Collections.unmodifiableList(subinterfaces);
-            subInterfacesCache = new SoftReference(subinterfaces);
-        }
-        return subinterfaces;
-    }
-
-    public List implementors() {
-        List implementors = (implementorsCache != null)? (List) implementorsCache.get() : null;
-        if (implementors == null) {
-            List all = vm.allClasses();
-            implementors = new ArrayList();
-            Iterator iter = all.iterator();
-            while (iter.hasNext()) {
-                ReferenceType refType = (ReferenceType)iter.next();
-                if (refType instanceof ClassType) {
-                    ClassType clazz = (ClassType)refType;
-                    if (clazz.isPrepared() && clazz.interfaces().contains(this)) {
-                        implementors.add(clazz);
-                    }
-                }
-            }
-            implementors = Collections.unmodifiableList(implementors);
-            implementorsCache = new SoftReference(implementors);
-        }
-        return implementors;
-    }
-
-    @Override
-    void addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> seenInterfaces) {
-        /*
-         * Add methods from
-         * parent types first, so that the methods in this class will
-         * overwrite them in the hash table
-         */
-        Iterator<InterfaceType> iter = superinterfaces().iterator();
-        while (iter.hasNext()) {
-            InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-            if (!seenInterfaces.contains(interfaze)) {
-                interfaze.addVisibleMethods(methodMap, seenInterfaces);
-                seenInterfaces.add(interfaze);
-            }
-        }
-
-        addToMethodMap(methodMap, methods());
-    }
-
-    List getAllMethods() {
-        ArrayList list = new ArrayList(methods());
-        /*
-         * It's more efficient if don't do this
-         * recursively.
-         */
-        List interfaces = allSuperinterfaces();
-        Iterator iter = interfaces.iterator();
-        while (iter.hasNext()) {
-            InterfaceType interfaze = (InterfaceType)iter.next();
-            list.addAll(interfaze.methods());
-        }
-
-        return list;
-    }
-
-    List allSuperinterfaces() {
-        ArrayList list = new ArrayList();
-        addSuperinterfaces(list);
-        return list;
-    }
-
-    void addSuperinterfaces(List list) {
-        /*
-         * This code is a little strange because it
-         * builds the list with a more suitable order than the
-         * depth-first approach a normal recursive solution would
-         * take. Instead, all direct superinterfaces precede all
-         * indirect ones.
-         */
-
-        /*
-         * Get a list of direct superinterfaces that's not already in the
-         * list being built.
-         */
-        List immediate = new ArrayList(superinterfaces());
-        Iterator iter = immediate.iterator();
-        while (iter.hasNext()) {
-            InterfaceType interfaze = (InterfaceType)iter.next();
-            if (list.contains(interfaze)) {
-                iter.remove();
-            }
-        }
-
-        /*
-         * Add all new direct superinterfaces
-         */
-        list.addAll(immediate);
-
-        /*
-         * Recurse for all new direct superinterfaces.
-         */
-        iter = immediate.iterator();
-        while (iter.hasNext()) {
-            InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-            interfaze.addSuperinterfaces(list);
-        }
-    }
-
-    boolean isAssignableTo(ReferenceType type) {
-
-        // Exact match?
-        if (this.equals(type)) {
-            return true;
-        } else {
-            // Try superinterfaces.
-            List supers = superinterfaces();
-            Iterator iter = supers.iterator();
-            while (iter.hasNext()) {
-                InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-                if (interfaze.isAssignableTo(type)) {
-                    return true;
-                }
-            }
-
-            return false;
-        }
-    }
-
-    List inheritedTypes() {
-        return superinterfaces();
-    }
-
-    public boolean isInitialized() {
-        return isPrepared();
-    }
-
-    public String toString() {
-       return "interface " + name() + " (" + loaderString() + ")";
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/JNITypeParser.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import java.util.List;
-import java.util.ArrayList;
-
-public class JNITypeParser {
-
-    static final char SIGNATURE_ENDCLASS = ';';
-    static final char SIGNATURE_FUNC = '(';
-    static final char SIGNATURE_ENDFUNC = ')';
-
-    private String signature;
-    private List typeNameList;
-    private List signatureList;
-    private int currentIndex;
-
-    JNITypeParser(String signature) {
-        this.signature = signature;
-    }
-
-    static String typeNameToSignature(String signature) {
-        StringBuffer buffer = new StringBuffer();
-        int firstIndex = signature.indexOf('[');
-        int index = firstIndex;
-        while (index != -1) {
-            buffer.append('[');
-            index = signature.indexOf('[', index + 1);
-        }
-
-        if (firstIndex != -1) {
-            signature = signature.substring(0, firstIndex);
-        }
-
-        if (signature.equals("boolean")) {
-            buffer.append('Z');
-        } else if (signature.equals("byte")) {
-            buffer.append('B');
-        } else if (signature.equals("char")) {
-            buffer.append('C');
-        } else if (signature.equals("short")) {
-            buffer.append('S');
-        } else if (signature.equals("int")) {
-            buffer.append('I');
-        } else if (signature.equals("long")) {
-            buffer.append('J');
-        } else if (signature.equals("float")) {
-            buffer.append('F');
-        } else if (signature.equals("double")) {
-            buffer.append('D');
-        } else {
-            buffer.append('L');
-            buffer.append(signature.replace('.', '/'));
-            buffer.append(';');
-        }
-
-        return buffer.toString();
-    }
-
-    String typeName() {
-        return (String)typeNameList().get(typeNameList().size()-1);
-    }
-
-    List argumentTypeNames() {
-        return typeNameList().subList(0, typeNameList().size() - 1);
-    }
-
-    String signature() {
-        return (String)signatureList().get(signatureList().size()-1);
-    }
-
-    List argumentSignatures() {
-        return signatureList().subList(0, signatureList().size() - 1);
-    }
-
-    int dimensionCount() {
-        int count = 0;
-        String signature = signature();
-        while (signature.charAt(count) == '[') {
-            count++;
-        }
-        return count;
-    }
-
-    String componentSignature(int level) {
-        return signature().substring(level);
-    }
-
-    private synchronized List signatureList() {
-        if (signatureList == null) {
-            signatureList = new ArrayList(10);
-            String elem;
-
-            currentIndex = 0;
-
-            while(currentIndex < signature.length()) {
-                elem = nextSignature();
-                signatureList.add(elem);
-            }
-            if (signatureList.size() == 0) {
-                throw new IllegalArgumentException("Invalid JNI signature '" +
-                                                   signature + "'");
-            }
-        }
-        return signatureList;
-    }
-
-    private synchronized List typeNameList() {
-        if (typeNameList == null) {
-            typeNameList = new ArrayList(10);
-            String elem;
-
-            currentIndex = 0;
-
-            while(currentIndex < signature.length()) {
-                elem = nextTypeName();
-                typeNameList.add(elem);
-            }
-            if (typeNameList.size() == 0) {
-                throw new IllegalArgumentException("Invalid JNI signature '" +
-                                                   signature + "'");
-            }
-        }
-        return typeNameList;
-    }
-
-    private String nextSignature() {
-        char key = signature.charAt(currentIndex++);
-
-        switch(key) {
-            case '[':
-                return  key + nextSignature();
-
-            case 'L':
-                int endClass = signature.indexOf(SIGNATURE_ENDCLASS,
-                                                 currentIndex);
-                String retVal = signature.substring(currentIndex - 1,
-                                                    endClass + 1);
-                currentIndex = endClass + 1;
-                return retVal;
-
-            case 'V':
-            case 'Z':
-            case 'B':
-            case 'C':
-            case 'S':
-            case 'I':
-            case 'J':
-            case 'F':
-            case 'D':
-                return String.valueOf(key);
-
-            case SIGNATURE_FUNC:
-            case SIGNATURE_ENDFUNC:
-                return nextSignature();
-
-            default:
-                throw new IllegalArgumentException(
-                    "Invalid JNI signature character '" + key + "'");
-
-        }
-    }
-
-    private String nextTypeName() {
-        char key = signature.charAt(currentIndex++);
-
-        switch(key) {
-            case '[':
-                return  nextTypeName() + "[]";
-
-            case 'B':
-                return "byte";
-
-            case 'C':
-                return "char";
-
-            case 'L':
-                int endClass = signature.indexOf(SIGNATURE_ENDCLASS,
-                                                 currentIndex);
-                String retVal = signature.substring(currentIndex,
-                                                    endClass);
-                retVal = retVal.replace('/','.');
-                currentIndex = endClass + 1;
-                return retVal;
-
-            case 'F':
-                return "float";
-
-            case 'D':
-                return "double";
-
-            case 'I':
-                return "int";
-
-            case 'J':
-                return "long";
-
-            case 'S':
-                return "short";
-
-            case 'V':
-                return "void";
-
-            case 'Z':
-                return "boolean";
-
-            case SIGNATURE_ENDFUNC:
-            case SIGNATURE_FUNC:
-                return nextTypeName();
-
-            default:
-                throw new IllegalArgumentException(
-                    "Invalid JNI signature character '" + key + "'");
-
-        }
-    }
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/JVMTIThreadState.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2004, 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.
- *
- * 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-// from JVMTI specification - refer to jvmti.xml
-public interface JVMTIThreadState {
-    public static final int JVMTI_THREAD_STATE_ALIVE = 0x0001;
-    public static final int JVMTI_THREAD_STATE_TERMINATED = 0x0002;
-    public static final int JVMTI_THREAD_STATE_RUNNABLE = 0x0004;
-    public static final int JVMTI_THREAD_STATE_WAITING = 0x0080;
-    public static final int JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010;
-    public static final int JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020;
-    public static final int JVMTI_THREAD_STATE_SLEEPING = 0x0040;
-    public static final int JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100;
-    public static final int JVMTI_THREAD_STATE_PARKED = 0x0200;
-    public static final int JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400;
-    public static final int JVMTI_THREAD_STATE_SUSPENDED = 0x100000;
-    public static final int JVMTI_THREAD_STATE_INTERRUPTED = 0x200000;
-    public static final int JVMTI_THREAD_STATE_IN_NATIVE = 0x400000;
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/LineInfo.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-
-import com.sun.jdi.*;
-
-interface LineInfo {
-
-    String liStratum();
-
-    int liLineNumber();
-
-    String liSourceName() throws AbsentInformationException;
-
-    String liSourcePath() throws AbsentInformationException;
-}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/LocalVariableImpl.java	Fri Jul 29 17:41:14 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2002, 2011, 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.
- *
- */
-
-package sun.jvm.hotspot.jdi;
-import com.sun.jdi.*;
-
-public class LocalVariableImpl extends MirrorImpl
-                               implements LocalVariable, ValueContainer
-{
-    private final Method method;
-    private final int slot;
-    private final Location scopeStart;
-    private final Location scopeEnd;
-    private final String name;
-    private final String signature;
-    private final String genericSignature;
-
-    LocalVariableImpl(VirtualMachine vm, Method method,
-                      int slot, Location scopeStart, Location scopeEnd,
-                      String name, String signature, String genericSignature) {
-        super(vm);
-        this.method = method;
-        this.slot = slot;
-        this.scopeStart = scopeStart;
-        this.scopeEnd = scopeEnd;
-        this.name = name;
-        this.signature = signature;
-        this.genericSignature = genericSignature;
-    }
-
-    public boolean equals(Object obj) {
-        if ((obj != null) && (obj instanceof LocalVariableImpl)) {
-            LocalVariableImpl other = (LocalVariableImpl)obj;
-            return (method.equals(other.method) &&
-                    slot() == other.slot() &&
-                    super.equals(obj));
-        } else {
-            return false;
-        }
-    }
-
-    public int hashCode() {
-        /*
-         * TO DO: Better hash code
-         */
-        return (int)method.hashCode() + slot();
-    }
-
-    public int compareTo(LocalVariable localVar) {
-        LocalVariableImpl other = (LocalVariableImpl) localVar;
-        int rc = method.compareTo(other.method);
-        if (rc == 0) {
-            rc = slot() - other.slot();
-        }
-        return rc;
-    }
-
-    public String name() {
-        return name;
-    }
-
-    /**
-     * @return a text representation of the declared type
-     * of this variable.
-     */
-    public String typeName() {
-        JNITypeParser parser = new JNITypeParser(signature);
-        return parser.typeName();
-    }
-
-    public Type type() throws ClassNotLoadedException {
-        return findType(signature());
-    }
-
-    public Type findType(String signature) throws ClassNotLoadedException {
-        ReferenceTypeImpl enclosing = (ReferenceTypeImpl)method.declaringType();
-        return enclosing.findType(signature);
-    }
-
-    public String signature() {
-        return signature;
-    }
-
-    public String genericSignature() {
-        return genericSignature;
-    }
-
-    public boolean isVisible(StackFrame frame) {
-        //validateMirror(frame);
-        Method frameMethod = frame.location().method();
-
-        if (!frameMethod.equals(method)) {
-            throw new IllegalArgumentException(
-                       "frame method different than variable's method");
-        }
-
-        // this is here to cover the possibility that we will
-        // allow LocalVariables for native methods.  If we do
-        // so we will have to re-examinine this.
-        if (frameMethod.isNative()) {
-            return false;
-        }
-
-        return ((scopeStart.compareTo(frame.location()) <= 0)
-             && (scopeEnd.compareTo(frame.location()) >= 0));
-    }
-
-    public boolean isArgument() {
-        try {
-            MethodImpl method = (MethodImpl)scopeStart.method();
-            return (slot < method.argSlotCount());
-        } catch (AbsentInformationException e) {
-            // If this variable object exists, there shouldn't be absent info
-            throw (InternalException) new InternalException().initCause(e);
-        }
-    }
-
-    int slot() {
-        return slot;
-    }
-
-    /*
-     * Compilers/VMs can have byte code ranges for variables of the
-     * same names that overlap. This is because the byte code ranges
-     * aren't necessarily scopes; they may have more to do with the
-     * lifetime of the variable's slot, depending on implementation.
-     *
-     * This method determines whether this variable hides an
-     * identically named variable; ie, their byte code ranges overlap
-     * this one starts after the given one. If it returns true this
-     * variable should be preferred when looking for a single variable
-     * with its name when both variables are visible.
-     */
-    boolean hides(LocalVariable other) {
-        LocalVariableImpl other