Merge
authordcubed
Thu, 16 Oct 2014 17:36:47 +0000
changeset 27170 d9327404f387
parent 27156 c35391bc4c57 (current diff)
parent 27169 59d46464ef22 (diff)
child 27171 5ee40c966315
child 27245 6d08a994e466
Merge
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/src/share/vm/runtime/globals.hpp
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ObjectMonitor.java	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ObjectMonitor.java	Thu Oct 16 17:36:47 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,8 +50,8 @@
     ownerFieldOffset = f.getOffset();
     f = type.getField("FreeNext");
     FreeNextFieldOffset = f.getOffset();
-    countField  = type.getCIntegerField("_count");
-    waitersField = type.getCIntegerField("_waiters");
+    countField  = type.getJIntField("_count");
+    waitersField = type.getJIntField("_waiters");
     recursionsField = type.getCIntegerField("_recursions");
   }
 
@@ -81,15 +81,15 @@
   // FIXME
   //  void      set_owner(void* owner);
 
-  public long    waiters() { return waitersField.getValue(addr); }
+  public int    waiters() { return waitersField.getValue(addr); }
 
   public Address freeNext() { return addr.getAddressAt(FreeNextFieldOffset); }
   // FIXME
   //  void      set_queue(void* owner);
 
-  public long count() { return countField.getValue(addr); }
+  public int count() { return countField.getValue(addr); }
   // FIXME
-  //  void      set_count(intptr_t count);
+  //  void      set_count(int count);
 
   public long recursions() { return recursionsField.getValue(addr); }
 
@@ -97,18 +97,9 @@
     return addr.getOopHandleAt(objectFieldOffset);
   }
 
-  public long contentions() {
-      // refer to objectMonitor_xxx.inline.hpp - contentions definition.
-      // for Solaris and Linux, contentions is same as count. for Windows
-      // it is different (objectMonitor_win32.inline.hpp)
-      long count = count();
-      if (VM.getVM().getOS().equals("win32")) {
-          // don't count the owner of the monitor
-          return count > 0? count - 1 : 0;
-      } else {
-          // Solaris and Linux
-          return count;
-      }
+  // contentions is always equal to count
+  public int contentions() {
+      return count();
   }
 
   // FIXME
@@ -123,8 +114,8 @@
   private static long          objectFieldOffset;
   private static long          ownerFieldOffset;
   private static long          FreeNextFieldOffset;
-  private static CIntegerField countField;
-  private static CIntegerField waitersField;
+  private static JIntField     countField;
+  private static JIntField     waitersField;
   private static CIntegerField recursionsField;
   // FIXME: expose platform-dependent stuff
 }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ObjectSynchronizer.java	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ObjectSynchronizer.java	Thu Oct 16 17:36:47 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,9 +48,17 @@
       blockListField = type.getAddressField("gBlockList");
       gBlockListAddr = blockListField.getValue();
       blockSize = db.lookupIntConstant("ObjectSynchronizer::_BLOCKSIZE").intValue();
+      defaultCacheLineSize = db.lookupIntConstant("DEFAULT_CACHE_LINE_SIZE").intValue();
     } catch (RuntimeException e) { }
     type = db.lookupType("ObjectMonitor");
     objectMonitorTypeSize = type.getSize();
+    if ((objectMonitorTypeSize % defaultCacheLineSize) != 0) {
+      // sizeof(ObjectMonitor) is not already a multiple of a cache line.
+      // The ObjectMonitor allocation code in ObjectSynchronizer pads each
+      // ObjectMonitor in a block to the next cache line boundary.
+      int needLines = ((int)objectMonitorTypeSize / defaultCacheLineSize) + 1;
+      objectMonitorTypeSize = needLines * defaultCacheLineSize;
+    }
   }
 
   public long identityHashValueFor(Oop obj) {
@@ -122,6 +130,7 @@
 
   private static Address gBlockListAddr;
   private static int blockSize;
+  private static int defaultCacheLineSize;
   private static long objectMonitorTypeSize;
 
 }
--- a/hotspot/make/aix/makefiles/mapfile-vers-debug	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/aix/makefiles/mapfile-vers-debug	Thu Oct 16 17:36:47 2014 +0000
@@ -32,23 +32,12 @@
                 JNI_GetDefaultJavaVMInitArgs;
 
                 # JVM
-                JVM_Accept;
                 JVM_ActiveProcessorCount;
-                JVM_AllocateNewArray;
-                JVM_AllocateNewObject;
                 JVM_ArrayCopy;
                 JVM_AssertionStatusDirectives;
-                JVM_Available;
-                JVM_Bind;
                 JVM_ClassDepth;
                 JVM_ClassLoaderDepth;
                 JVM_Clone;
-                JVM_Close;
-                JVM_CX8Field;
-                JVM_CompileClass;
-                JVM_CompileClasses;
-                JVM_CompilerCommand;
-                JVM_Connect;
                 JVM_ConstantPoolGetClassAt;
                 JVM_ConstantPoolGetClassAtIfLoaded;
                 JVM_ConstantPoolGetDoubleAt;
@@ -72,7 +61,6 @@
                 JVM_DefineClassWithSource;
                 JVM_DefineClassWithSourceCond;
                 JVM_DesiredAssertionStatus;
-                JVM_DisableCompiler;
                 JVM_DoPrivileged;
                 JVM_DTraceGetVersion;
                 JVM_DTraceActivate;
@@ -81,8 +69,6 @@
                 JVM_DTraceDispose;
                 JVM_DumpAllStacks;
                 JVM_DumpThreads;
-                JVM_EnableCompiler;
-                JVM_Exit;
                 JVM_FillInStackTrace;
                 JVM_FindClassFromClass;
                 JVM_FindClassFromClassLoader;
@@ -127,16 +113,11 @@
                 JVM_GetDeclaredClasses;
                 JVM_GetDeclaringClass;
                 JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldAnnotations;
                 JVM_GetFieldIxModifiers;
                 JVM_GetFieldTypeAnnotations;
-                JVM_GetHostName;
                 JVM_GetInheritedAccessControlContext;
                 JVM_GetInterfaceVersion;
-                JVM_GetLastErrorString;
                 JVM_GetManagement;
-                JVM_GetMethodAnnotations;
-                JVM_GetMethodDefaultAnnotationValue;
                 JVM_GetMethodIxArgsSize;
                 JVM_GetMethodIxByteCode;
                 JVM_GetMethodIxByteCodeLength;
@@ -149,29 +130,22 @@
                 JVM_GetMethodIxModifiers;
                 JVM_GetMethodIxNameUTF;
                 JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameterAnnotations;
                 JVM_GetMethodParameters;
                 JVM_GetMethodTypeAnnotations;
                 JVM_GetPrimitiveArrayElement;
                 JVM_GetProtectionDomain;
-                JVM_GetSockName;
-                JVM_GetSockOpt;
                 JVM_GetStackAccessControlContext;
                 JVM_GetStackTraceDepth;
                 JVM_GetStackTraceElement;
                 JVM_GetSystemPackage;
                 JVM_GetSystemPackages;
                 JVM_GetTemporaryDirectory;
-                JVM_GetThreadStateNames;
-                JVM_GetThreadStateValues;
                 JVM_GetVersionInfo;
                 JVM_Halt;
                 JVM_HoldsLock;
                 JVM_IHashCode;
                 JVM_InitAgentProperties;
                 JVM_InitProperties;
-                JVM_InitializeCompiler;
-                JVM_InitializeSocketLibrary;
                 JVM_InternString;
                 JVM_Interrupt;
                 JVM_InvokeMethod;
@@ -179,18 +153,13 @@
                 JVM_IsConstructorIx;
                 JVM_IsInterface;
                 JVM_IsInterrupted;
-                JVM_IsNaN;
                 JVM_IsPrimitiveClass;
                 JVM_IsSameClassPackage;
-                JVM_IsSilentCompiler;
                 JVM_IsSupportedJNIVersion;
                 JVM_IsThreadAlive;
                 JVM_IsVMGeneratedMethodIx;
                 JVM_LatestUserDefinedLoader;
-                JVM_Listen;
-                JVM_LoadClass0;
                 JVM_LoadLibrary;
-                JVM_Lseek;
                 JVM_MaxObjectInspectionAge;
                 JVM_MaxMemory;
                 JVM_MonitorNotify;
@@ -201,46 +170,27 @@
                 JVM_NewArray;
                 JVM_NewInstanceFromConstructor;
                 JVM_NewMultiArray;
-                JVM_OnExit;
-                JVM_Open;
                 JVM_RaiseSignal;
                 JVM_RawMonitorCreate;
                 JVM_RawMonitorDestroy;
                 JVM_RawMonitorEnter;
                 JVM_RawMonitorExit;
-                JVM_Read;
-                JVM_Recv;
-                JVM_RecvFrom;
                 JVM_RegisterSignal;
                 JVM_ReleaseUTF;
-                JVM_ResolveClass;
                 JVM_ResumeThread;
-                JVM_Send;
-                JVM_SendTo;
                 JVM_SetArrayElement;
                 JVM_SetClassSigners;
-                JVM_SetLength;
                 JVM_SetNativeThreadName;
                 JVM_SetPrimitiveArrayElement;
                 JVM_SetProtectionDomain;
-                JVM_SetSockOpt;
                 JVM_SetThreadPriority;
                 JVM_Sleep;
-                JVM_Socket;
-                JVM_SocketAvailable;
-                JVM_SocketClose;
-                JVM_SocketShutdown;
                 JVM_StartThread;
                 JVM_StopThread;
                 JVM_SuspendThread;
                 JVM_SupportsCX8;
-                JVM_Sync;
-                JVM_Timeout;
                 JVM_TotalMemory;
-                JVM_TraceInstructions;
-                JVM_TraceMethodCalls;
                 JVM_UnloadLibrary;
-                JVM_Write;
                 JVM_Yield;
                 JVM_handle_linux_signal;
 
--- a/hotspot/make/aix/makefiles/mapfile-vers-product	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/aix/makefiles/mapfile-vers-product	Thu Oct 16 17:36:47 2014 +0000
@@ -32,23 +32,12 @@
                 JNI_GetDefaultJavaVMInitArgs;
 
                 # JVM
-                JVM_Accept;
                 JVM_ActiveProcessorCount;
-                JVM_AllocateNewArray;
-                JVM_AllocateNewObject;
                 JVM_ArrayCopy;
                 JVM_AssertionStatusDirectives;
-                JVM_Available;
-                JVM_Bind;
                 JVM_ClassDepth;
                 JVM_ClassLoaderDepth;
                 JVM_Clone;
-                JVM_Close;
-                JVM_CX8Field;
-                JVM_CompileClass;
-                JVM_CompileClasses;
-                JVM_CompilerCommand;
-                JVM_Connect;
                 JVM_ConstantPoolGetClassAt;
                 JVM_ConstantPoolGetClassAtIfLoaded;
                 JVM_ConstantPoolGetDoubleAt;
@@ -72,7 +61,6 @@
                 JVM_DefineClassWithSource;
                 JVM_DefineClassWithSourceCond;
                 JVM_DesiredAssertionStatus;
-                JVM_DisableCompiler;
                 JVM_DoPrivileged;
                 JVM_DTraceGetVersion;
                 JVM_DTraceActivate;
@@ -81,8 +69,6 @@
                 JVM_DTraceDispose;
                 JVM_DumpAllStacks;
                 JVM_DumpThreads;
-                JVM_EnableCompiler;
-                JVM_Exit;
                 JVM_FillInStackTrace;
                 JVM_FindClassFromClass;
                 JVM_FindClassFromClassLoader;
@@ -127,15 +113,10 @@
                 JVM_GetDeclaredClasses;
                 JVM_GetDeclaringClass;
                 JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldAnnotations;
                 JVM_GetFieldIxModifiers;
-                JVM_GetHostName;
                 JVM_GetInheritedAccessControlContext;
                 JVM_GetInterfaceVersion;
-                JVM_GetLastErrorString;
                 JVM_GetManagement;
-                JVM_GetMethodAnnotations;
-                JVM_GetMethodDefaultAnnotationValue;
                 JVM_GetMethodIxArgsSize;
                 JVM_GetMethodIxByteCode;
                 JVM_GetMethodIxByteCodeLength;
@@ -148,28 +129,21 @@
                 JVM_GetMethodIxModifiers;
                 JVM_GetMethodIxNameUTF;
                 JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameterAnnotations;
                 JVM_GetMethodParameters;
                 JVM_GetPrimitiveArrayElement;
                 JVM_GetProtectionDomain;
-                JVM_GetSockName;
-                JVM_GetSockOpt;
                 JVM_GetStackAccessControlContext;
                 JVM_GetStackTraceDepth;
                 JVM_GetStackTraceElement;
                 JVM_GetSystemPackage;
                 JVM_GetSystemPackages;
                 JVM_GetTemporaryDirectory;
-                JVM_GetThreadStateNames;
-                JVM_GetThreadStateValues;
                 JVM_GetVersionInfo;
                 JVM_Halt;
                 JVM_HoldsLock;
                 JVM_IHashCode;
                 JVM_InitAgentProperties;
                 JVM_InitProperties;
-                JVM_InitializeCompiler;
-                JVM_InitializeSocketLibrary;
                 JVM_InternString;
                 JVM_Interrupt;
                 JVM_InvokeMethod;
@@ -177,18 +151,13 @@
                 JVM_IsConstructorIx;
                 JVM_IsInterface;
                 JVM_IsInterrupted;
-                JVM_IsNaN;
                 JVM_IsPrimitiveClass;
                 JVM_IsSameClassPackage;
-                JVM_IsSilentCompiler;
                 JVM_IsSupportedJNIVersion;
                 JVM_IsThreadAlive;
                 JVM_IsVMGeneratedMethodIx;
                 JVM_LatestUserDefinedLoader;
-                JVM_Listen;
-                JVM_LoadClass0;
                 JVM_LoadLibrary;
-                JVM_Lseek;
                 JVM_MaxObjectInspectionAge;
                 JVM_MaxMemory;
                 JVM_MonitorNotify;
@@ -199,46 +168,27 @@
                 JVM_NewArray;
                 JVM_NewInstanceFromConstructor;
                 JVM_NewMultiArray;
-                JVM_OnExit;
-                JVM_Open;
                 JVM_RaiseSignal;
                 JVM_RawMonitorCreate;
                 JVM_RawMonitorDestroy;
                 JVM_RawMonitorEnter;
                 JVM_RawMonitorExit;
-                JVM_Read;
-                JVM_Recv;
-                JVM_RecvFrom;
                 JVM_RegisterSignal;
                 JVM_ReleaseUTF;
-                JVM_ResolveClass;
                 JVM_ResumeThread;
-                JVM_Send;
-                JVM_SendTo;
                 JVM_SetArrayElement;
                 JVM_SetClassSigners;
-                JVM_SetLength;
                 JVM_SetNativeThreadName;
                 JVM_SetPrimitiveArrayElement;
                 JVM_SetProtectionDomain;
-                JVM_SetSockOpt;
                 JVM_SetThreadPriority;
                 JVM_Sleep;
-                JVM_Socket;
-                JVM_SocketAvailable;
-                JVM_SocketClose;
-                JVM_SocketShutdown;
                 JVM_StartThread;
                 JVM_StopThread;
                 JVM_SuspendThread;
                 JVM_SupportsCX8;
-                JVM_Sync;
-                JVM_Timeout;
                 JVM_TotalMemory;
-                JVM_TraceInstructions;
-                JVM_TraceMethodCalls;
                 JVM_UnloadLibrary;
-                JVM_Write;
                 JVM_Yield;
                 JVM_handle_linux_signal;
 
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug	Thu Oct 16 17:36:47 2014 +0000
@@ -30,23 +30,12 @@
                 _JNI_GetDefaultJavaVMInitArgs
 
                 # _JVM
-                _JVM_Accept
                 _JVM_ActiveProcessorCount
-                _JVM_AllocateNewArray
-                _JVM_AllocateNewObject
                 _JVM_ArrayCopy
                 _JVM_AssertionStatusDirectives
-                _JVM_Available
-                _JVM_Bind
                 _JVM_ClassDepth
                 _JVM_ClassLoaderDepth
                 _JVM_Clone
-                _JVM_Close
-                _JVM_CX8Field
-                _JVM_CompileClass
-                _JVM_CompileClasses
-                _JVM_CompilerCommand
-                _JVM_Connect
                 _JVM_ConstantPoolGetClassAt
                 _JVM_ConstantPoolGetClassAtIfLoaded
                 _JVM_ConstantPoolGetDoubleAt
@@ -70,7 +59,6 @@
                 _JVM_DefineClassWithSource
                 _JVM_DefineClassWithSourceCond
                 _JVM_DesiredAssertionStatus
-                _JVM_DisableCompiler
                 _JVM_DoPrivileged
                 _JVM_DTraceGetVersion
                 _JVM_DTraceActivate
@@ -79,8 +67,6 @@
                 _JVM_DTraceDispose
                 _JVM_DumpAllStacks
                 _JVM_DumpThreads
-                _JVM_EnableCompiler
-                _JVM_Exit
                 _JVM_FillInStackTrace
                 _JVM_FindClassFromClass
                 _JVM_FindClassFromClassLoader
@@ -125,16 +111,11 @@
                 _JVM_GetDeclaredClasses
                 _JVM_GetDeclaringClass
                 _JVM_GetEnclosingMethodInfo
-                _JVM_GetFieldAnnotations
                 _JVM_GetFieldIxModifiers
                 _JVM_GetFieldTypeAnnotations
-                _JVM_GetHostName
                 _JVM_GetInheritedAccessControlContext
                 _JVM_GetInterfaceVersion
-                _JVM_GetLastErrorString
                 _JVM_GetManagement
-                _JVM_GetMethodAnnotations
-                _JVM_GetMethodDefaultAnnotationValue
                 _JVM_GetMethodIxArgsSize
                 _JVM_GetMethodIxByteCode
                 _JVM_GetMethodIxByteCodeLength
@@ -147,29 +128,22 @@
                 _JVM_GetMethodIxModifiers
                 _JVM_GetMethodIxNameUTF
                 _JVM_GetMethodIxSignatureUTF
-                _JVM_GetMethodParameterAnnotations
                 _JVM_GetMethodParameters
                 _JVM_GetMethodTypeAnnotations
                 _JVM_GetPrimitiveArrayElement
                 _JVM_GetProtectionDomain
-                _JVM_GetSockName
-                _JVM_GetSockOpt
                 _JVM_GetStackAccessControlContext
                 _JVM_GetStackTraceDepth
                 _JVM_GetStackTraceElement
                 _JVM_GetSystemPackage
                 _JVM_GetSystemPackages
                 _JVM_GetTemporaryDirectory
-                _JVM_GetThreadStateNames
-                _JVM_GetThreadStateValues
                 _JVM_GetVersionInfo
                 _JVM_Halt
                 _JVM_HoldsLock
                 _JVM_IHashCode
                 _JVM_InitAgentProperties
                 _JVM_InitProperties
-                _JVM_InitializeCompiler
-                _JVM_InitializeSocketLibrary
                 _JVM_InternString
                 _JVM_Interrupt
                 _JVM_InvokeMethod
@@ -177,18 +151,13 @@
                 _JVM_IsConstructorIx
                 _JVM_IsInterface
                 _JVM_IsInterrupted
-                _JVM_IsNaN
                 _JVM_IsPrimitiveClass
                 _JVM_IsSameClassPackage
-                _JVM_IsSilentCompiler
                 _JVM_IsSupportedJNIVersion
                 _JVM_IsThreadAlive
                 _JVM_IsVMGeneratedMethodIx
                 _JVM_LatestUserDefinedLoader
-                _JVM_Listen
-                _JVM_LoadClass0
                 _JVM_LoadLibrary
-                _JVM_Lseek
                 _JVM_MaxObjectInspectionAge
                 _JVM_MaxMemory
                 _JVM_MonitorNotify
@@ -199,45 +168,26 @@
                 _JVM_NewArray
                 _JVM_NewInstanceFromConstructor
                 _JVM_NewMultiArray
-                _JVM_OnExit
-                _JVM_Open
                 _JVM_RaiseSignal
                 _JVM_RawMonitorCreate
                 _JVM_RawMonitorDestroy
                 _JVM_RawMonitorEnter
                 _JVM_RawMonitorExit
-                _JVM_Read
-                _JVM_Recv
-                _JVM_RecvFrom
                 _JVM_RegisterSignal
                 _JVM_ReleaseUTF
-                _JVM_ResolveClass
                 _JVM_ResumeThread
-                _JVM_Send
-                _JVM_SendTo
                 _JVM_SetArrayElement
                 _JVM_SetClassSigners
-                _JVM_SetLength
                 _JVM_SetNativeThreadName
                 _JVM_SetPrimitiveArrayElement
-                _JVM_SetSockOpt
                 _JVM_SetThreadPriority
                 _JVM_Sleep
-                _JVM_Socket
-                _JVM_SocketAvailable
-                _JVM_SocketClose
-                _JVM_SocketShutdown
                 _JVM_StartThread
                 _JVM_StopThread
                 _JVM_SuspendThread
                 _JVM_SupportsCX8
-                _JVM_Sync
-                _JVM_Timeout
                 _JVM_TotalMemory
-                _JVM_TraceInstructions
-                _JVM_TraceMethodCalls
                 _JVM_UnloadLibrary
-                _JVM_Write
                 _JVM_Yield
                 _JVM_handle_bsd_signal
 
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product	Thu Oct 16 17:36:47 2014 +0000
@@ -30,23 +30,12 @@
                 _JNI_GetDefaultJavaVMInitArgs
 
                 # _JVM
-                _JVM_Accept
                 _JVM_ActiveProcessorCount
-                _JVM_AllocateNewArray
-                _JVM_AllocateNewObject
                 _JVM_ArrayCopy
                 _JVM_AssertionStatusDirectives
-                _JVM_Available
-                _JVM_Bind
                 _JVM_ClassDepth
                 _JVM_ClassLoaderDepth
                 _JVM_Clone
-                _JVM_Close
-                _JVM_CX8Field
-                _JVM_CompileClass
-                _JVM_CompileClasses
-                _JVM_CompilerCommand
-                _JVM_Connect
                 _JVM_ConstantPoolGetClassAt
                 _JVM_ConstantPoolGetClassAtIfLoaded
                 _JVM_ConstantPoolGetDoubleAt
@@ -70,7 +59,6 @@
                 _JVM_DefineClassWithSource
                 _JVM_DefineClassWithSourceCond
                 _JVM_DesiredAssertionStatus
-                _JVM_DisableCompiler
                 _JVM_DoPrivileged
                 _JVM_DTraceGetVersion
                 _JVM_DTraceActivate
@@ -79,8 +67,6 @@
                 _JVM_DTraceDispose
                 _JVM_DumpAllStacks
                 _JVM_DumpThreads
-                _JVM_EnableCompiler
-                _JVM_Exit
                 _JVM_FillInStackTrace
                 _JVM_FindClassFromClass
                 _JVM_FindClassFromClassLoader
@@ -125,16 +111,11 @@
                 _JVM_GetDeclaredClasses
                 _JVM_GetDeclaringClass
                 _JVM_GetEnclosingMethodInfo
-                _JVM_GetFieldAnnotations
                 _JVM_GetFieldIxModifiers
                 _JVM_GetFieldTypeAnnotations
-                _JVM_GetHostName
                 _JVM_GetInheritedAccessControlContext
                 _JVM_GetInterfaceVersion
-                _JVM_GetLastErrorString
                 _JVM_GetManagement
-                _JVM_GetMethodAnnotations
-                _JVM_GetMethodDefaultAnnotationValue
                 _JVM_GetMethodIxArgsSize
                 _JVM_GetMethodIxByteCode
                 _JVM_GetMethodIxByteCodeLength
@@ -147,29 +128,22 @@
                 _JVM_GetMethodIxModifiers
                 _JVM_GetMethodIxNameUTF
                 _JVM_GetMethodIxSignatureUTF
-                _JVM_GetMethodParameterAnnotations
                 _JVM_GetMethodParameters
                 _JVM_GetMethodTypeAnnotations
                 _JVM_GetPrimitiveArrayElement
                 _JVM_GetProtectionDomain
-                _JVM_GetSockName
-                _JVM_GetSockOpt
                 _JVM_GetStackAccessControlContext
                 _JVM_GetStackTraceDepth
                 _JVM_GetStackTraceElement
                 _JVM_GetSystemPackage
                 _JVM_GetSystemPackages
                 _JVM_GetTemporaryDirectory
-                _JVM_GetThreadStateNames
-                _JVM_GetThreadStateValues
                 _JVM_GetVersionInfo
                 _JVM_Halt
                 _JVM_HoldsLock
                 _JVM_IHashCode
                 _JVM_InitAgentProperties
                 _JVM_InitProperties
-                _JVM_InitializeCompiler
-                _JVM_InitializeSocketLibrary
                 _JVM_InternString
                 _JVM_Interrupt
                 _JVM_InvokeMethod
@@ -177,18 +151,13 @@
                 _JVM_IsConstructorIx
                 _JVM_IsInterface
                 _JVM_IsInterrupted
-                _JVM_IsNaN
                 _JVM_IsPrimitiveClass
                 _JVM_IsSameClassPackage
-                _JVM_IsSilentCompiler
                 _JVM_IsSupportedJNIVersion
                 _JVM_IsThreadAlive
                 _JVM_IsVMGeneratedMethodIx
                 _JVM_LatestUserDefinedLoader
-                _JVM_Listen
-                _JVM_LoadClass0
                 _JVM_LoadLibrary
-                _JVM_Lseek
                 _JVM_MaxObjectInspectionAge
                 _JVM_MaxMemory
                 _JVM_MonitorNotify
@@ -199,45 +168,26 @@
                 _JVM_NewArray
                 _JVM_NewInstanceFromConstructor
                 _JVM_NewMultiArray
-                _JVM_OnExit
-                _JVM_Open
                 _JVM_RaiseSignal
                 _JVM_RawMonitorCreate
                 _JVM_RawMonitorDestroy
                 _JVM_RawMonitorEnter
                 _JVM_RawMonitorExit
-                _JVM_Read
-                _JVM_Recv
-                _JVM_RecvFrom
                 _JVM_RegisterSignal
                 _JVM_ReleaseUTF
-                _JVM_ResolveClass
                 _JVM_ResumeThread
-                _JVM_Send
-                _JVM_SendTo
                 _JVM_SetArrayElement
                 _JVM_SetClassSigners
-                _JVM_SetLength
                 _JVM_SetNativeThreadName
                 _JVM_SetPrimitiveArrayElement
-                _JVM_SetSockOpt
                 _JVM_SetThreadPriority
                 _JVM_Sleep
-                _JVM_Socket
-                _JVM_SocketAvailable
-                _JVM_SocketClose
-                _JVM_SocketShutdown
                 _JVM_StartThread
                 _JVM_StopThread
                 _JVM_SuspendThread
                 _JVM_SupportsCX8
-                _JVM_Sync
-                _JVM_Timeout
                 _JVM_TotalMemory
-                _JVM_TraceInstructions
-                _JVM_TraceMethodCalls
                 _JVM_UnloadLibrary
-                _JVM_Write
                 _JVM_Yield
                 _JVM_handle_bsd_signal
 
--- a/hotspot/make/bsd/makefiles/mapfile-vers-debug	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-debug	Thu Oct 16 17:36:47 2014 +0000
@@ -32,23 +32,12 @@
                 JNI_GetDefaultJavaVMInitArgs;
 
                 # JVM
-                JVM_Accept;
                 JVM_ActiveProcessorCount;
-                JVM_AllocateNewArray;
-                JVM_AllocateNewObject;
                 JVM_ArrayCopy;
                 JVM_AssertionStatusDirectives;
-                JVM_Available;
-                JVM_Bind;
                 JVM_ClassDepth;
                 JVM_ClassLoaderDepth;
                 JVM_Clone;
-                JVM_Close;
-                JVM_CX8Field;
-                JVM_CompileClass;
-                JVM_CompileClasses;
-                JVM_CompilerCommand;
-                JVM_Connect;
                 JVM_ConstantPoolGetClassAt;
                 JVM_ConstantPoolGetClassAtIfLoaded;
                 JVM_ConstantPoolGetDoubleAt;
@@ -72,7 +61,6 @@
                 JVM_DefineClassWithSource;
                 JVM_DefineClassWithSourceCond;
                 JVM_DesiredAssertionStatus;
-                JVM_DisableCompiler;
                 JVM_DoPrivileged;
                 JVM_DTraceGetVersion;
                 JVM_DTraceActivate;
@@ -81,8 +69,6 @@
                 JVM_DTraceDispose;
                 JVM_DumpAllStacks;
                 JVM_DumpThreads;
-                JVM_EnableCompiler;
-                JVM_Exit;
                 JVM_FillInStackTrace;
                 JVM_FindClassFromClass;
                 JVM_FindClassFromClassLoader;
@@ -127,16 +113,11 @@
                 JVM_GetDeclaredClasses;
                 JVM_GetDeclaringClass;
                 JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldAnnotations;
                 JVM_GetFieldIxModifiers;
                 JVM_GetFieldTypeAnnotations;
-                JVM_GetHostName;
                 JVM_GetInheritedAccessControlContext;
                 JVM_GetInterfaceVersion;
-                JVM_GetLastErrorString;
                 JVM_GetManagement;
-                JVM_GetMethodAnnotations;
-                JVM_GetMethodDefaultAnnotationValue;
                 JVM_GetMethodIxArgsSize;
                 JVM_GetMethodIxByteCode;
                 JVM_GetMethodIxByteCodeLength;
@@ -149,29 +130,22 @@
                 JVM_GetMethodIxModifiers;
                 JVM_GetMethodIxNameUTF;
                 JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameterAnnotations;
                 JVM_GetMethodParameters;
                 JVM_GetMethodTypeAnnotations;
                 JVM_GetPrimitiveArrayElement;
                 JVM_GetProtectionDomain;
-                JVM_GetSockName;
-                JVM_GetSockOpt;
                 JVM_GetStackAccessControlContext;
                 JVM_GetStackTraceDepth;
                 JVM_GetStackTraceElement;
                 JVM_GetSystemPackage;
                 JVM_GetSystemPackages;
                 JVM_GetTemporaryDirectory;
-                JVM_GetThreadStateNames;
-                JVM_GetThreadStateValues;
                 JVM_GetVersionInfo;
                 JVM_Halt;
                 JVM_HoldsLock;
                 JVM_IHashCode;
                 JVM_InitAgentProperties;
                 JVM_InitProperties;
-                JVM_InitializeCompiler;
-                JVM_InitializeSocketLibrary;
                 JVM_InternString;
                 JVM_Interrupt;
                 JVM_InvokeMethod;
@@ -179,18 +153,13 @@
                 JVM_IsConstructorIx;
                 JVM_IsInterface;
                 JVM_IsInterrupted;
-                JVM_IsNaN;
                 JVM_IsPrimitiveClass;
                 JVM_IsSameClassPackage;
-                JVM_IsSilentCompiler;
                 JVM_IsSupportedJNIVersion;
                 JVM_IsThreadAlive;
                 JVM_IsVMGeneratedMethodIx;
                 JVM_LatestUserDefinedLoader;
-                JVM_Listen;
-                JVM_LoadClass0;
                 JVM_LoadLibrary;
-                JVM_Lseek;
                 JVM_MaxObjectInspectionAge;
                 JVM_MaxMemory;
                 JVM_MonitorNotify;
@@ -201,45 +170,26 @@
                 JVM_NewArray;
                 JVM_NewInstanceFromConstructor;
                 JVM_NewMultiArray;
-                JVM_OnExit;
-                JVM_Open;
                 JVM_RaiseSignal;
                 JVM_RawMonitorCreate;
                 JVM_RawMonitorDestroy;
                 JVM_RawMonitorEnter;
                 JVM_RawMonitorExit;
-                JVM_Read;
-                JVM_Recv;
-                JVM_RecvFrom;
                 JVM_RegisterSignal;
                 JVM_ReleaseUTF;
-                JVM_ResolveClass;
                 JVM_ResumeThread;
-                JVM_Send;
-                JVM_SendTo;
                 JVM_SetArrayElement;
                 JVM_SetClassSigners;
-                JVM_SetLength;
                 JVM_SetNativeThreadName;
                 JVM_SetPrimitiveArrayElement;
-                JVM_SetSockOpt;
                 JVM_SetThreadPriority;
                 JVM_Sleep;
-                JVM_Socket;
-                JVM_SocketAvailable;
-                JVM_SocketClose;
-                JVM_SocketShutdown;
                 JVM_StartThread;
                 JVM_StopThread;
                 JVM_SuspendThread;
                 JVM_SupportsCX8;
-                JVM_Sync;
-                JVM_Timeout;
                 JVM_TotalMemory;
-                JVM_TraceInstructions;
-                JVM_TraceMethodCalls;
                 JVM_UnloadLibrary;
-                JVM_Write;
                 JVM_Yield;
                 JVM_handle_linux_signal;
 
--- a/hotspot/make/bsd/makefiles/mapfile-vers-product	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-product	Thu Oct 16 17:36:47 2014 +0000
@@ -32,23 +32,12 @@
                 JNI_GetDefaultJavaVMInitArgs;
 
                 # JVM
-                JVM_Accept;
                 JVM_ActiveProcessorCount;
-                JVM_AllocateNewArray;
-                JVM_AllocateNewObject;
                 JVM_ArrayCopy;
                 JVM_AssertionStatusDirectives;
-                JVM_Available;
-                JVM_Bind;
                 JVM_ClassDepth;
                 JVM_ClassLoaderDepth;
                 JVM_Clone;
-                JVM_Close;
-                JVM_CX8Field;
-                JVM_CompileClass;
-                JVM_CompileClasses;
-                JVM_CompilerCommand;
-                JVM_Connect;
                 JVM_ConstantPoolGetClassAt;
                 JVM_ConstantPoolGetClassAtIfLoaded;
                 JVM_ConstantPoolGetDoubleAt;
@@ -72,7 +61,6 @@
                 JVM_DefineClassWithSource;
                 JVM_DefineClassWithSourceCond;
                 JVM_DesiredAssertionStatus;
-                JVM_DisableCompiler;
                 JVM_DoPrivileged;
                 JVM_DTraceGetVersion;
                 JVM_DTraceActivate;
@@ -81,8 +69,6 @@
                 JVM_DTraceDispose;
                 JVM_DumpAllStacks;
                 JVM_DumpThreads;
-                JVM_EnableCompiler;
-                JVM_Exit;
                 JVM_FillInStackTrace;
                 JVM_FindClassFromClass;
                 JVM_FindClassFromClassLoader;
@@ -127,16 +113,11 @@
                 JVM_GetDeclaredClasses;
                 JVM_GetDeclaringClass;
                 JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldAnnotations;
                 JVM_GetFieldIxModifiers;
                 JVM_GetFieldTypeAnnotations;
-                JVM_GetHostName;
                 JVM_GetInheritedAccessControlContext;
                 JVM_GetInterfaceVersion;
-                JVM_GetLastErrorString;
                 JVM_GetManagement;
-                JVM_GetMethodAnnotations;
-                JVM_GetMethodDefaultAnnotationValue;
                 JVM_GetMethodIxArgsSize;
                 JVM_GetMethodIxByteCode;
                 JVM_GetMethodIxByteCodeLength;
@@ -149,29 +130,22 @@
                 JVM_GetMethodIxModifiers;
                 JVM_GetMethodIxNameUTF;
                 JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameterAnnotations;
                 JVM_GetMethodParameters;
                 JVM_GetMethodTypeAnnotations;
                 JVM_GetPrimitiveArrayElement;
                 JVM_GetProtectionDomain;
-                JVM_GetSockName;
-                JVM_GetSockOpt;
                 JVM_GetStackAccessControlContext;
                 JVM_GetStackTraceDepth;
                 JVM_GetStackTraceElement;
                 JVM_GetSystemPackage;
                 JVM_GetSystemPackages;
                 JVM_GetTemporaryDirectory;
-                JVM_GetThreadStateNames;
-                JVM_GetThreadStateValues;
                 JVM_GetVersionInfo;
                 JVM_Halt;
                 JVM_HoldsLock;
                 JVM_IHashCode;
                 JVM_InitAgentProperties;
                 JVM_InitProperties;
-                JVM_InitializeCompiler;
-                JVM_InitializeSocketLibrary;
                 JVM_InternString;
                 JVM_Interrupt;
                 JVM_InvokeMethod;
@@ -179,18 +153,13 @@
                 JVM_IsConstructorIx;
                 JVM_IsInterface;
                 JVM_IsInterrupted;
-                JVM_IsNaN;
                 JVM_IsPrimitiveClass;
                 JVM_IsSameClassPackage;
-                JVM_IsSilentCompiler;
                 JVM_IsSupportedJNIVersion;
                 JVM_IsThreadAlive;
                 JVM_IsVMGeneratedMethodIx;
                 JVM_LatestUserDefinedLoader;
-                JVM_Listen;
-                JVM_LoadClass0;
                 JVM_LoadLibrary;
-                JVM_Lseek;
                 JVM_MaxObjectInspectionAge;
                 JVM_MaxMemory;
                 JVM_MonitorNotify;
@@ -201,45 +170,26 @@
                 JVM_NewArray;
                 JVM_NewInstanceFromConstructor;
                 JVM_NewMultiArray;
-                JVM_OnExit;
-                JVM_Open;
                 JVM_RaiseSignal;
                 JVM_RawMonitorCreate;
                 JVM_RawMonitorDestroy;
                 JVM_RawMonitorEnter;
                 JVM_RawMonitorExit;
-                JVM_Read;
-                JVM_Recv;
-                JVM_RecvFrom;
                 JVM_RegisterSignal;
                 JVM_ReleaseUTF;
-                JVM_ResolveClass;
                 JVM_ResumeThread;
-                JVM_Send;
-                JVM_SendTo;
                 JVM_SetArrayElement;
                 JVM_SetClassSigners;
-                JVM_SetLength;
                 JVM_SetNativeThreadName;
                 JVM_SetPrimitiveArrayElement;
-                JVM_SetSockOpt;
                 JVM_SetThreadPriority;
                 JVM_Sleep;
-                JVM_Socket;
-                JVM_SocketAvailable;
-                JVM_SocketClose;
-                JVM_SocketShutdown;
                 JVM_StartThread;
                 JVM_StopThread;
                 JVM_SuspendThread;
                 JVM_SupportsCX8;
-                JVM_Sync;
-                JVM_Timeout;
                 JVM_TotalMemory;
-                JVM_TraceInstructions;
-                JVM_TraceMethodCalls;
                 JVM_UnloadLibrary;
-                JVM_Write;
                 JVM_Yield;
                 JVM_handle_linux_signal;
 
--- a/hotspot/make/linux/makefiles/mapfile-vers-debug	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/linux/makefiles/mapfile-vers-debug	Thu Oct 16 17:36:47 2014 +0000
@@ -32,23 +32,12 @@
                 JNI_GetDefaultJavaVMInitArgs;
 
                 # JVM
-                JVM_Accept;
                 JVM_ActiveProcessorCount;
-                JVM_AllocateNewArray;
-                JVM_AllocateNewObject;
                 JVM_ArrayCopy;
                 JVM_AssertionStatusDirectives;
-                JVM_Available;
-                JVM_Bind;
                 JVM_ClassDepth;
                 JVM_ClassLoaderDepth;
                 JVM_Clone;
-                JVM_Close;
-                JVM_CX8Field;
-                JVM_CompileClass;
-                JVM_CompileClasses;
-                JVM_CompilerCommand;
-                JVM_Connect;
                 JVM_ConstantPoolGetClassAt;
                 JVM_ConstantPoolGetClassAtIfLoaded;
                 JVM_ConstantPoolGetDoubleAt;
@@ -72,7 +61,6 @@
                 JVM_DefineClassWithSource;
                 JVM_DefineClassWithSourceCond;
                 JVM_DesiredAssertionStatus;
-                JVM_DisableCompiler;
                 JVM_DoPrivileged;
                 JVM_DTraceGetVersion;
                 JVM_DTraceActivate;
@@ -81,8 +69,6 @@
                 JVM_DTraceDispose;
                 JVM_DumpAllStacks;
                 JVM_DumpThreads;
-                JVM_EnableCompiler;
-                JVM_Exit;
                 JVM_FillInStackTrace;
                 JVM_FindClassFromClass;
                 JVM_FindClassFromClassLoader;
@@ -127,16 +113,11 @@
                 JVM_GetDeclaredClasses;
                 JVM_GetDeclaringClass;
                 JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldAnnotations;
                 JVM_GetFieldIxModifiers;
                 JVM_GetFieldTypeAnnotations;
-                JVM_GetHostName;
                 JVM_GetInheritedAccessControlContext;
                 JVM_GetInterfaceVersion;
-                JVM_GetLastErrorString;
                 JVM_GetManagement;
-                JVM_GetMethodAnnotations;
-                JVM_GetMethodDefaultAnnotationValue;
                 JVM_GetMethodIxArgsSize;
                 JVM_GetMethodIxByteCode;
                 JVM_GetMethodIxByteCodeLength;
@@ -149,29 +130,22 @@
                 JVM_GetMethodIxModifiers;
                 JVM_GetMethodIxNameUTF;
                 JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameterAnnotations;
                 JVM_GetMethodParameters;
                 JVM_GetMethodTypeAnnotations;
                 JVM_GetPrimitiveArrayElement;
                 JVM_GetProtectionDomain;
-                JVM_GetSockName;
-                JVM_GetSockOpt;
                 JVM_GetStackAccessControlContext;
                 JVM_GetStackTraceDepth;
                 JVM_GetStackTraceElement;
                 JVM_GetSystemPackage;
                 JVM_GetSystemPackages;
                 JVM_GetTemporaryDirectory;
-                JVM_GetThreadStateNames;
-                JVM_GetThreadStateValues;
                 JVM_GetVersionInfo;
                 JVM_Halt;
                 JVM_HoldsLock;
                 JVM_IHashCode;
                 JVM_InitAgentProperties;
                 JVM_InitProperties;
-                JVM_InitializeCompiler;
-                JVM_InitializeSocketLibrary;
                 JVM_InternString;
                 JVM_Interrupt;
                 JVM_InvokeMethod;
@@ -179,18 +153,13 @@
                 JVM_IsConstructorIx;
                 JVM_IsInterface;
                 JVM_IsInterrupted;
-                JVM_IsNaN;
                 JVM_IsPrimitiveClass;
                 JVM_IsSameClassPackage;
-                JVM_IsSilentCompiler;
                 JVM_IsSupportedJNIVersion;
                 JVM_IsThreadAlive;
                 JVM_IsVMGeneratedMethodIx;
                 JVM_LatestUserDefinedLoader;
-                JVM_Listen;
-                JVM_LoadClass0;
                 JVM_LoadLibrary;
-                JVM_Lseek;
                 JVM_MaxObjectInspectionAge;
                 JVM_MaxMemory;
                 JVM_MonitorNotify;
@@ -201,45 +170,26 @@
                 JVM_NewArray;
                 JVM_NewInstanceFromConstructor;
                 JVM_NewMultiArray;
-                JVM_OnExit;
-                JVM_Open;
                 JVM_RaiseSignal;
                 JVM_RawMonitorCreate;
                 JVM_RawMonitorDestroy;
                 JVM_RawMonitorEnter;
                 JVM_RawMonitorExit;
-                JVM_Read;
-                JVM_Recv;
-                JVM_RecvFrom;
                 JVM_RegisterSignal;
                 JVM_ReleaseUTF;
-                JVM_ResolveClass;
                 JVM_ResumeThread;
-                JVM_Send;
-                JVM_SendTo;
                 JVM_SetArrayElement;
                 JVM_SetClassSigners;
-                JVM_SetLength;
                 JVM_SetNativeThreadName;
                 JVM_SetPrimitiveArrayElement;
-                JVM_SetSockOpt;
                 JVM_SetThreadPriority;
                 JVM_Sleep;
-                JVM_Socket;
-                JVM_SocketAvailable;
-                JVM_SocketClose;
-                JVM_SocketShutdown;
                 JVM_StartThread;
                 JVM_StopThread;
                 JVM_SuspendThread;
                 JVM_SupportsCX8;
-                JVM_Sync;
-                JVM_Timeout;
                 JVM_TotalMemory;
-                JVM_TraceInstructions;
-                JVM_TraceMethodCalls;
                 JVM_UnloadLibrary;
-                JVM_Write;
                 JVM_Yield;
                 JVM_handle_linux_signal;
 
--- a/hotspot/make/linux/makefiles/mapfile-vers-product	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/linux/makefiles/mapfile-vers-product	Thu Oct 16 17:36:47 2014 +0000
@@ -32,23 +32,12 @@
                 JNI_GetDefaultJavaVMInitArgs;
 
                 # JVM
-                JVM_Accept;
                 JVM_ActiveProcessorCount;
-                JVM_AllocateNewArray;
-                JVM_AllocateNewObject;
                 JVM_ArrayCopy;
                 JVM_AssertionStatusDirectives;
-                JVM_Available;
-                JVM_Bind;
                 JVM_ClassDepth;
                 JVM_ClassLoaderDepth;
                 JVM_Clone;
-                JVM_Close;
-                JVM_CX8Field;
-                JVM_CompileClass;
-                JVM_CompileClasses;
-                JVM_CompilerCommand;
-                JVM_Connect;
                 JVM_ConstantPoolGetClassAt;
                 JVM_ConstantPoolGetClassAtIfLoaded;
                 JVM_ConstantPoolGetDoubleAt;
@@ -72,7 +61,6 @@
                 JVM_DefineClassWithSource;
                 JVM_DefineClassWithSourceCond;
                 JVM_DesiredAssertionStatus;
-                JVM_DisableCompiler;
                 JVM_DoPrivileged;
                 JVM_DTraceGetVersion;
                 JVM_DTraceActivate;
@@ -81,8 +69,6 @@
                 JVM_DTraceDispose;
                 JVM_DumpAllStacks;
                 JVM_DumpThreads;
-                JVM_EnableCompiler;
-                JVM_Exit;
                 JVM_FillInStackTrace;
                 JVM_FindClassFromClass;
                 JVM_FindClassFromClassLoader;
@@ -127,16 +113,11 @@
                 JVM_GetDeclaredClasses;
                 JVM_GetDeclaringClass;
                 JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldAnnotations;
                 JVM_GetFieldIxModifiers;
                 JVM_GetFieldTypeAnnotations;
-                JVM_GetHostName;
                 JVM_GetInheritedAccessControlContext;
                 JVM_GetInterfaceVersion;
-                JVM_GetLastErrorString;
                 JVM_GetManagement;
-                JVM_GetMethodAnnotations;
-                JVM_GetMethodDefaultAnnotationValue;
                 JVM_GetMethodIxArgsSize;
                 JVM_GetMethodIxByteCode;
                 JVM_GetMethodIxByteCodeLength;
@@ -149,29 +130,22 @@
                 JVM_GetMethodIxModifiers;
                 JVM_GetMethodIxNameUTF;
                 JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameterAnnotations;
                 JVM_GetMethodParameters;
                 JVM_GetMethodTypeAnnotations;
                 JVM_GetPrimitiveArrayElement;
                 JVM_GetProtectionDomain;
-                JVM_GetSockName;
-                JVM_GetSockOpt;
                 JVM_GetStackAccessControlContext;
                 JVM_GetStackTraceDepth;
                 JVM_GetStackTraceElement;
                 JVM_GetSystemPackage;
                 JVM_GetSystemPackages;
                 JVM_GetTemporaryDirectory;
-                JVM_GetThreadStateNames;
-                JVM_GetThreadStateValues;
                 JVM_GetVersionInfo;
                 JVM_Halt;
                 JVM_HoldsLock;
                 JVM_IHashCode;
                 JVM_InitAgentProperties;
                 JVM_InitProperties;
-                JVM_InitializeCompiler;
-                JVM_InitializeSocketLibrary;
                 JVM_InternString;
                 JVM_Interrupt;
                 JVM_InvokeMethod;
@@ -179,18 +153,13 @@
                 JVM_IsConstructorIx;
                 JVM_IsInterface;
                 JVM_IsInterrupted;
-                JVM_IsNaN;
                 JVM_IsPrimitiveClass;
                 JVM_IsSameClassPackage;
-                JVM_IsSilentCompiler;
                 JVM_IsSupportedJNIVersion;
                 JVM_IsThreadAlive;
                 JVM_IsVMGeneratedMethodIx;
                 JVM_LatestUserDefinedLoader;
-                JVM_Listen;
-                JVM_LoadClass0;
                 JVM_LoadLibrary;
-                JVM_Lseek;
                 JVM_MaxObjectInspectionAge;
                 JVM_MaxMemory;
                 JVM_MonitorNotify;
@@ -201,45 +170,26 @@
                 JVM_NewArray;
                 JVM_NewInstanceFromConstructor;
                 JVM_NewMultiArray;
-                JVM_OnExit;
-                JVM_Open;
                 JVM_RaiseSignal;
                 JVM_RawMonitorCreate;
                 JVM_RawMonitorDestroy;
                 JVM_RawMonitorEnter;
                 JVM_RawMonitorExit;
-                JVM_Read;
-                JVM_Recv;
-                JVM_RecvFrom;
                 JVM_RegisterSignal;
                 JVM_ReleaseUTF;
-                JVM_ResolveClass;
                 JVM_ResumeThread;
-                JVM_Send;
-                JVM_SendTo;
                 JVM_SetArrayElement;
                 JVM_SetClassSigners;
-                JVM_SetLength;
                 JVM_SetNativeThreadName;
                 JVM_SetPrimitiveArrayElement;
-                JVM_SetSockOpt;
                 JVM_SetThreadPriority;
                 JVM_Sleep;
-                JVM_Socket;
-                JVM_SocketAvailable;
-                JVM_SocketClose;
-                JVM_SocketShutdown;
                 JVM_StartThread;
                 JVM_StopThread;
                 JVM_SuspendThread;
                 JVM_SupportsCX8;
-                JVM_Sync;
-                JVM_Timeout;
                 JVM_TotalMemory;
-                JVM_TraceInstructions;
-                JVM_TraceMethodCalls;
                 JVM_UnloadLibrary;
-                JVM_Write;
                 JVM_Yield;
                 JVM_handle_linux_signal;
 
--- a/hotspot/make/solaris/makefiles/mapfile-vers	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/solaris/makefiles/mapfile-vers	Thu Oct 16 17:36:47 2014 +0000
@@ -32,23 +32,12 @@
                 JNI_GetDefaultJavaVMInitArgs;
         
                 # JVM
-                JVM_Accept;
                 JVM_ActiveProcessorCount;
-                JVM_AllocateNewArray;
-                JVM_AllocateNewObject;
                 JVM_ArrayCopy;
                 JVM_AssertionStatusDirectives;
-                JVM_Available;
-                JVM_Bind;
                 JVM_ClassDepth;
                 JVM_ClassLoaderDepth;
                 JVM_Clone;
-                JVM_Close;
-                JVM_CX8Field;
-                JVM_CompileClass;
-                JVM_CompileClasses;
-                JVM_CompilerCommand;
-                JVM_Connect;
                 JVM_ConstantPoolGetClassAt;
                 JVM_ConstantPoolGetClassAtIfLoaded;
                 JVM_ConstantPoolGetDoubleAt;
@@ -72,7 +61,6 @@
                 JVM_DefineClassWithSource;
                 JVM_DefineClassWithSourceCond;
                 JVM_DesiredAssertionStatus;
-                JVM_DisableCompiler;
                 JVM_DoPrivileged;
                 JVM_DTraceGetVersion;
                 JVM_DTraceActivate;
@@ -81,8 +69,6 @@
                 JVM_DTraceDispose;
                 JVM_DumpAllStacks;
                 JVM_DumpThreads;
-                JVM_EnableCompiler;
-                JVM_Exit;
                 JVM_FillInStackTrace;
                 JVM_FindClassFromClass;
                 JVM_FindClassFromClassLoader;
@@ -127,16 +113,11 @@
                 JVM_GetDeclaredClasses;
                 JVM_GetDeclaringClass;
                 JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldAnnotations;
                 JVM_GetFieldIxModifiers;
                 JVM_GetFieldTypeAnnotations;
-                JVM_GetHostName;
                 JVM_GetInheritedAccessControlContext;
                 JVM_GetInterfaceVersion;
-                JVM_GetLastErrorString;
                 JVM_GetManagement;
-                JVM_GetMethodAnnotations;
-                JVM_GetMethodDefaultAnnotationValue;
                 JVM_GetMethodIxArgsSize;
                 JVM_GetMethodIxByteCode;
                 JVM_GetMethodIxByteCodeLength;
@@ -149,29 +130,22 @@
                 JVM_GetMethodIxModifiers;
                 JVM_GetMethodIxNameUTF;
                 JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameterAnnotations;
                 JVM_GetMethodParameters;
                 JVM_GetMethodTypeAnnotations;
                 JVM_GetPrimitiveArrayElement;
                 JVM_GetProtectionDomain;
-                JVM_GetSockName;
-                JVM_GetSockOpt;
                 JVM_GetStackAccessControlContext;
                 JVM_GetStackTraceDepth;
                 JVM_GetStackTraceElement;
                 JVM_GetSystemPackage;
                 JVM_GetSystemPackages;
                 JVM_GetTemporaryDirectory;
-                JVM_GetThreadStateNames;
-                JVM_GetThreadStateValues;
                 JVM_GetVersionInfo;
                 JVM_Halt;
                 JVM_HoldsLock;
                 JVM_IHashCode;
                 JVM_InitAgentProperties;
                 JVM_InitProperties;
-                JVM_InitializeCompiler;
-                JVM_InitializeSocketLibrary;
                 JVM_InternString;
                 JVM_Interrupt;
                 JVM_InvokeMethod;
@@ -179,18 +153,13 @@
                 JVM_IsConstructorIx;
                 JVM_IsInterface;
                 JVM_IsInterrupted;
-                JVM_IsNaN;
                 JVM_IsPrimitiveClass;
                 JVM_IsSameClassPackage;
-                JVM_IsSilentCompiler;
                 JVM_IsSupportedJNIVersion;
                 JVM_IsThreadAlive;
                 JVM_IsVMGeneratedMethodIx;
                 JVM_LatestUserDefinedLoader;
-                JVM_Listen;
-                JVM_LoadClass0;
                 JVM_LoadLibrary;
-                JVM_Lseek;
                 JVM_MaxObjectInspectionAge;
                 JVM_MaxMemory;
                 JVM_MonitorNotify;
@@ -201,45 +170,26 @@
                 JVM_NewArray;
                 JVM_NewInstanceFromConstructor;
                 JVM_NewMultiArray;
-                JVM_OnExit;
-                JVM_Open;
                 JVM_RaiseSignal;
                 JVM_RawMonitorCreate;
                 JVM_RawMonitorDestroy;
                 JVM_RawMonitorEnter;
                 JVM_RawMonitorExit;
-                JVM_Read;
-                JVM_Recv;
-                JVM_RecvFrom;
                 JVM_RegisterSignal;
                 JVM_ReleaseUTF;
-                JVM_ResolveClass;
                 JVM_ResumeThread;
-                JVM_Send;
-                JVM_SendTo;
                 JVM_SetArrayElement;
                 JVM_SetClassSigners;
-                JVM_SetLength;
                 JVM_SetNativeThreadName;
                 JVM_SetPrimitiveArrayElement;
-                JVM_SetSockOpt;
                 JVM_SetThreadPriority;
                 JVM_Sleep;
-                JVM_Socket;
-                JVM_SocketAvailable;
-                JVM_SocketClose;
-                JVM_SocketShutdown;
                 JVM_StartThread;
                 JVM_StopThread;
                 JVM_SuspendThread;
                 JVM_SupportsCX8;
-                JVM_Sync;
-                JVM_Timeout;
                 JVM_TotalMemory;
-                JVM_TraceInstructions;
-                JVM_TraceMethodCalls;
                 JVM_UnloadLibrary;
-                JVM_Write;
                 JVM_Yield;
                 JVM_handle_solaris_signal;
 
--- a/hotspot/make/windows/makefiles/vm.make	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/make/windows/makefiles/vm.make	Thu Oct 16 17:36:47 2014 +0000
@@ -101,8 +101,6 @@
   /export:jio_vsnprintf                      \
   $(AGCT_EXPORT)                             \
   /export:JVM_GetVersionInfo                 \
-  /export:JVM_GetThreadStateNames            \
-  /export:JVM_GetThreadStateValues           \
   /export:JVM_InitAgentProperties
 
 CXX_INCLUDE_DIRS=/I "..\generated"
--- a/hotspot/src/cpu/sparc/vm/globalDefinitions_sparc.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/cpu/sparc/vm/globalDefinitions_sparc.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,4 +38,26 @@
 
 #define SUPPORTS_NATIVE_CX8
 
+// The expected size in bytes of a cache line, used to pad data structures.
+#if defined(TIERED)
+  #ifdef _LP64
+    // tiered, 64-bit, large machine
+    #define DEFAULT_CACHE_LINE_SIZE 128
+  #else
+    // tiered, 32-bit, medium machine
+    #define DEFAULT_CACHE_LINE_SIZE 64
+  #endif
+#elif defined(COMPILER1)
+  // pure C1, 32-bit, small machine
+  #define DEFAULT_CACHE_LINE_SIZE 16
+#elif defined(COMPILER2) || defined(SHARK)
+  #ifdef _LP64
+    // pure C2, 64-bit, large machine
+    #define DEFAULT_CACHE_LINE_SIZE 128
+  #else
+    // pure C2, 32-bit, medium machine
+    #define DEFAULT_CACHE_LINE_SIZE 64
+  #endif
+#endif
+
 #endif // CPU_SPARC_VM_GLOBALDEFINITIONS_SPARC_HPP
--- a/hotspot/src/cpu/x86/vm/globalDefinitions_x86.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/cpu/x86/vm/globalDefinitions_x86.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,4 +35,27 @@
 
 #define SUPPORTS_NATIVE_CX8
 
+// The expected size in bytes of a cache line, used to pad data structures.
+#if defined(TIERED)
+  #ifdef _LP64
+    // tiered, 64-bit, large machine
+    #define DEFAULT_CACHE_LINE_SIZE 128
+  #else
+    // tiered, 32-bit, medium machine
+    #define DEFAULT_CACHE_LINE_SIZE 64
+  #endif
+#elif defined(COMPILER1)
+  // pure C1, 32-bit, small machine
+  // i486 was the last Intel chip with 16-byte cache line size
+  #define DEFAULT_CACHE_LINE_SIZE 32
+#elif defined(COMPILER2) || defined(SHARK)
+  #ifdef _LP64
+    // pure C2, 64-bit, large machine
+    #define DEFAULT_CACHE_LINE_SIZE 128
+  #else
+    // pure C2, 32-bit, medium machine
+    #define DEFAULT_CACHE_LINE_SIZE 64
+  #endif
+#endif
+
 #endif // CPU_X86_VM_GLOBALDEFINITIONS_X86_HPP
--- a/hotspot/src/os/aix/vm/os_aix.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/os/aix/vm/os_aix.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -4025,14 +4025,6 @@
 // This code originates from JDK's sysOpen and open64_w
 // from src/solaris/hpi/src/system_md.c
 
-#ifndef O_DELETE
-#define O_DELETE 0x10000
-#endif
-
-// Open a file. Unlink the file immediately after open returns
-// if the specified oflag has the O_DELETE flag set.
-// O_DELETE is used only in j2se/src/share/native/java/util/zip/ZipFile.c
-
 int os::open(const char *path, int oflag, int mode) {
 
   if (strlen(path) > MAX_PATH - 1) {
@@ -4040,8 +4032,6 @@
     return -1;
   }
   int fd;
-  int o_delete = (oflag & O_DELETE);
-  oflag = oflag & ~O_DELETE;
 
   fd = ::open64(path, oflag, mode);
   if (fd == -1) return -1;
@@ -4092,9 +4082,6 @@
   }
 #endif
 
-  if (o_delete != 0) {
-    ::unlink(path);
-  }
   return fd;
 }
 
--- a/hotspot/src/os/bsd/dtrace/libjvm_db.c	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/os/bsd/dtrace/libjvm_db.c	Thu Oct 16 17:36:47 2014 +0000
@@ -347,10 +347,10 @@
                  &J->Number_of_heaps, sizeof(J->Number_of_heaps));
 
   /* Allocate memory for heap configurations */
-  J->Heap_low = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
-  J->Heap_high = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
-  J->Heap_segmap_low = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
-  J->Heap_segmap_high = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+  J->Heap_low         = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+  J->Heap_high        = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+  J->Heap_segmap_low  = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+  J->Heap_segmap_high = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
 
   /* Read code heap configurations */
   for (i = 0; i < J->Number_of_heaps; ++i) {
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -3845,22 +3845,12 @@
 // This code originates from JDK's sysOpen and open64_w
 // from src/solaris/hpi/src/system_md.c
 
-#ifndef O_DELETE
-  #define O_DELETE 0x10000
-#endif
-
-// Open a file. Unlink the file immediately after open returns
-// if the specified oflag has the O_DELETE flag set.
-// O_DELETE is used only in j2se/src/share/native/java/util/zip/ZipFile.c
-
 int os::open(const char *path, int oflag, int mode) {
   if (strlen(path) > MAX_PATH - 1) {
     errno = ENAMETOOLONG;
     return -1;
   }
   int fd;
-  int o_delete = (oflag & O_DELETE);
-  oflag = oflag & ~O_DELETE;
 
   fd = ::open(path, oflag, mode);
   if (fd == -1) return -1;
@@ -3913,9 +3903,6 @@
   }
 #endif
 
-  if (o_delete != 0) {
-    ::unlink(path);
-  }
   return fd;
 }
 
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -129,6 +129,7 @@
 
 int (*os::Linux::_clock_gettime)(clockid_t, struct timespec *) = NULL;
 int (*os::Linux::_pthread_getcpuclockid)(pthread_t, clockid_t *) = NULL;
+int (*os::Linux::_pthread_setname_np)(pthread_t, const char*) = NULL;
 Mutex* os::Linux::_createThread_lock = NULL;
 pthread_t os::Linux::_main_thread;
 int os::Linux::_page_size = -1;
@@ -4695,6 +4696,11 @@
     StackRedPages = 1;
     StackShadowPages = round_to((StackShadowPages*Linux::vm_default_page_size()), vm_page_size()) / vm_page_size();
   }
+
+  // retrieve entry point for pthread_setname_np
+  Linux::_pthread_setname_np =
+    (int(*)(pthread_t, const char*))dlsym(RTLD_DEFAULT, "pthread_setname_np");
+
 }
 
 // To install functions for atexit system call
@@ -4894,8 +4900,14 @@
 }
 
 void os::set_native_thread_name(const char *name) {
-  // Not yet implemented.
-  return;
+  if (Linux::_pthread_setname_np) {
+    char buf [16]; // according to glibc manpage, 16 chars incl. '/0'
+    snprintf(buf, sizeof(buf), "%s", name);
+    buf[sizeof(buf) - 1] = '\0';
+    const int rc = Linux::_pthread_setname_np(pthread_self(), buf);
+    // ERANGE should not happen; all other errors should just be ignored.
+    assert(rc != ERANGE, "pthread_setname_np failed");
+  }
 }
 
 bool os::distribute_processes(uint length, uint* distribution) {
@@ -5086,22 +5098,12 @@
 // This code originates from JDK's sysOpen and open64_w
 // from src/solaris/hpi/src/system_md.c
 
-#ifndef O_DELETE
-  #define O_DELETE 0x10000
-#endif
-
-// Open a file. Unlink the file immediately after open returns
-// if the specified oflag has the O_DELETE flag set.
-// O_DELETE is used only in j2se/src/share/native/java/util/zip/ZipFile.c
-
 int os::open(const char *path, int oflag, int mode) {
   if (strlen(path) > MAX_PATH - 1) {
     errno = ENAMETOOLONG;
     return -1;
   }
   int fd;
-  int o_delete = (oflag & O_DELETE);
-  oflag = oflag & ~O_DELETE;
 
   fd = ::open64(path, oflag, mode);
   if (fd == -1) return -1;
@@ -5154,9 +5156,6 @@
   }
 #endif
 
-  if (o_delete != 0) {
-    ::unlink(path);
-  }
   return fd;
 }
 
--- a/hotspot/src/os/linux/vm/os_linux.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/os/linux/vm/os_linux.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -55,6 +55,7 @@
 
   static int (*_clock_gettime)(clockid_t, struct timespec *);
   static int (*_pthread_getcpuclockid)(pthread_t, clockid_t *);
+  static int (*_pthread_setname_np)(pthread_t, const char*);
 
   static address   _initial_thread_stack_bottom;
   static uintptr_t _initial_thread_stack_size;
--- a/hotspot/src/os/solaris/dtrace/libjvm_db.c	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c	Thu Oct 16 17:36:47 2014 +0000
@@ -347,10 +347,10 @@
                  &J->Number_of_heaps, sizeof(J->Number_of_heaps));
 
   /* Allocate memory for heap configurations */
-  J->Heap_low = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
-  J->Heap_high = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
-  J->Heap_segmap_low = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
-  J->Heap_segmap_high = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+  J->Heap_low         = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+  J->Heap_high        = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+  J->Heap_segmap_low  = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+  J->Heap_segmap_high = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
 
   /* Read code heap configurations */
   for (i = 0; i < J->Number_of_heaps; ++i) {
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -4807,22 +4807,12 @@
 // This code originates from JDK's sysOpen and open64_w
 // from src/solaris/hpi/src/system_md.c
 
-#ifndef O_DELETE
-  #define O_DELETE 0x10000
-#endif
-
-// Open a file. Unlink the file immediately after open returns
-// if the specified oflag has the O_DELETE flag set.
-// O_DELETE is used only in j2se/src/share/native/java/util/zip/ZipFile.c
-
 int os::open(const char *path, int oflag, int mode) {
   if (strlen(path) > MAX_PATH - 1) {
     errno = ENAMETOOLONG;
     return -1;
   }
   int fd;
-  int o_delete = (oflag & O_DELETE);
-  oflag = oflag & ~O_DELETE;
 
   fd = ::open64(path, oflag, mode);
   if (fd == -1) return -1;
@@ -4918,9 +4908,6 @@
   }
 #endif
 
-  if (o_delete != 0) {
-    ::unlink(path);
-  }
   return fd;
 }
 
--- a/hotspot/src/os/windows/vm/jvm_windows.h	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/os/windows/vm/jvm_windows.h	Thu Oct 16 17:36:47 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,6 @@
 #define JVM_O_O_APPEND   O_APPEND
 #define JVM_O_EXCL       O_EXCL
 #define JVM_O_CREAT      O_CREAT
-#define JVM_O_DELETE     O_TEMPORARY
 
 /* Signals */
 
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -745,8 +745,29 @@
 }
 
 void os::set_native_thread_name(const char *name) {
-  // Not yet implemented.
-  return;
+
+  // See: http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx
+  //
+  // Note that unfortunately this only works if the process
+  // is already attached to a debugger; debugger must observe
+  // the exception below to show the correct name.
+
+  const DWORD MS_VC_EXCEPTION = 0x406D1388;
+  struct {
+    DWORD dwType;     // must be 0x1000
+    LPCSTR szName;    // pointer to name (in user addr space)
+    DWORD dwThreadID; // thread ID (-1=caller thread)
+    DWORD dwFlags;    // reserved for future use, must be zero
+  } info;
+
+  info.dwType = 0x1000;
+  info.szName = name;
+  info.dwThreadID = -1;
+  info.dwFlags = 0;
+
+  __try {
+    RaiseException (MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(DWORD), (const ULONG_PTR*)&info );
+  } __except(EXCEPTION_CONTINUE_EXECUTION) {}
 }
 
 bool os::distribute_processes(uint length, uint* distribution) {
--- a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java	Thu Oct 16 17:36:47 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -410,8 +410,6 @@
                 "/export:jio_fprintf /export:jio_vfprintf "+
                 "/export:jio_vsnprintf "+
                 "/export:JVM_GetVersionInfo "+
-                "/export:JVM_GetThreadStateNames "+
-                "/export:JVM_GetThreadStateValues "+
                 "/export:JVM_InitAgentProperties");
         addAttr(rv, "AdditionalDependencies", "kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;Wsock32.lib;winmm.lib;psapi.lib");
         addAttr(rv, "OutputFile", outDll);
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -98,6 +98,19 @@
   HandleMark hm;
   ResourceMark rm(THREAD);
 
+  // Eagerly allocate the identity hash code for a klass. This is a fallout
+  // from 6320749 and 8059924: hash code generator is not supposed to be called
+  // during the safepoint, but it allows to sneak the hashcode in during
+  // verification. Without this eager hashcode generation, we may end up
+  // installing the hashcode during some other operation, which may be at
+  // safepoint -- blowing up the checks. It was previously done as the side
+  // effect (sic!) for external_name(), but instead of doing that, we opt to
+  // explicitly push the hashcode in here. This is signify the following block
+  // is IMPORTANT:
+  if (klass->java_mirror() != NULL) {
+    klass->java_mirror()->identity_hash();
+  }
+
   if (!is_eligible_for_verification(klass, should_verify_class)) {
     return true;
   }
--- a/hotspot/src/share/vm/memory/padded.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/memory/padded.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -76,10 +76,16 @@
 // if the start address is a multiple of alignment.
 template <class T, size_t alignment = DEFAULT_CACHE_LINE_SIZE>
 class PaddedEnd : public PaddedEndImpl<T, PADDED_END_SIZE(T, alignment)> {
-  // C++ don't allow zero-length arrays. The padding is put in a
+  // C++ doesn't allow zero-length arrays. The padding is put in a
   // super class that is specialized for the pad_size == 0 case.
 };
 
+// Similar to PaddedEnd, this macro defines a _pad_buf#id field
+// that is (alignment - size) bytes in size. This macro is used
+// to add padding in between non-class fields in a class or struct.
+#define DEFINE_PAD_MINUS_SIZE(id, alignment, size) \
+          char _pad_buf##id[(alignment) - (size)]
+
 // Helper class to create an array of PaddedEnd<T> objects. All elements will
 // start at a multiple of alignment and the size will be aligned to alignment.
 template <class T, MEMFLAGS flags, size_t alignment = DEFAULT_CACHE_LINE_SIZE>
--- a/hotspot/src/share/vm/prims/jvm.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -415,27 +415,12 @@
 
 extern volatile jint vm_created;
 
-JVM_ENTRY_NO_ENV(void, JVM_Exit(jint code))
-  if (vm_created != 0 && (code == 0)) {
-    // The VM is about to exit. We call back into Java to check whether finalizers should be run
-    Universe::run_finalizers_on_exit();
-  }
-  before_exit(thread);
-  vm_exit(code);
-JVM_END
-
-
 JVM_ENTRY_NO_ENV(void, JVM_Halt(jint code))
   before_exit(thread);
   vm_exit(code);
 JVM_END
 
 
-JVM_LEAF(void, JVM_OnExit(void (*func)(void)))
-  register_on_exit_function(func);
-JVM_END
-
-
 JVM_ENTRY_NO_ENV(void, JVM_GC(void))
   JVMWrapper("JVM_GC");
   if (!DisableExplicitGC) {
@@ -450,15 +435,6 @@
 JVM_END
 
 
-JVM_LEAF(void, JVM_TraceInstructions(jboolean on))
-  if (PrintJVMWarnings) warning("JVM_TraceInstructions not supported");
-JVM_END
-
-
-JVM_LEAF(void, JVM_TraceMethodCalls(jboolean on))
-  if (PrintJVMWarnings) warning("JVM_TraceMethodCalls not supported");
-JVM_END
-
 static inline jlong convert_size_t_to_jlong(size_t val) {
   // In the 64-bit vm, a size_t can overflow a jlong (which is signed).
   NOT_LP64 (return (jlong)val;)
@@ -628,60 +604,6 @@
   return JNIHandles::make_local(env, oop(new_obj));
 JVM_END
 
-// java.lang.Compiler ////////////////////////////////////////////////////
-
-// The initial cuts of the HotSpot VM will not support JITs, and all existing
-// JITs would need extensive changes to work with HotSpot.  The JIT-related JVM
-// functions are all silently ignored unless JVM warnings are printed.
-
-JVM_LEAF(void, JVM_InitializeCompiler (JNIEnv *env, jclass compCls))
-  if (PrintJVMWarnings) warning("JVM_InitializeCompiler not supported");
-JVM_END
-
-
-JVM_LEAF(jboolean, JVM_IsSilentCompiler(JNIEnv *env, jclass compCls))
-  if (PrintJVMWarnings) warning("JVM_IsSilentCompiler not supported");
-  return JNI_FALSE;
-JVM_END
-
-
-JVM_LEAF(jboolean, JVM_CompileClass(JNIEnv *env, jclass compCls, jclass cls))
-  if (PrintJVMWarnings) warning("JVM_CompileClass not supported");
-  return JNI_FALSE;
-JVM_END
-
-
-JVM_LEAF(jboolean, JVM_CompileClasses(JNIEnv *env, jclass cls, jstring jname))
-  if (PrintJVMWarnings) warning("JVM_CompileClasses not supported");
-  return JNI_FALSE;
-JVM_END
-
-
-JVM_LEAF(jobject, JVM_CompilerCommand(JNIEnv *env, jclass compCls, jobject arg))
-  if (PrintJVMWarnings) warning("JVM_CompilerCommand not supported");
-  return NULL;
-JVM_END
-
-
-JVM_LEAF(void, JVM_EnableCompiler(JNIEnv *env, jclass compCls))
-  if (PrintJVMWarnings) warning("JVM_EnableCompiler not supported");
-JVM_END
-
-
-JVM_LEAF(void, JVM_DisableCompiler(JNIEnv *env, jclass compCls))
-  if (PrintJVMWarnings) warning("JVM_DisableCompiler not supported");
-JVM_END
-
-
-
-// Error message support //////////////////////////////////////////////////////
-
-JVM_LEAF(jint, JVM_GetLastErrorString(char *buf, int len))
-  JVMWrapper("JVM_GetLastErrorString");
-  return (jint)os::lasterror(buf, len);
-JVM_END
-
-
 // java.io.File ///////////////////////////////////////////////////////////////
 
 JVM_LEAF(char*, JVM_NativePath(char* path))
@@ -757,12 +679,6 @@
 JVM_END
 
 
-JVM_ENTRY(void, JVM_ResolveClass(JNIEnv* env, jclass cls))
-  JVMWrapper("JVM_ResolveClass");
-  if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented");
-JVM_END
-
-
 // Returns a class loaded by the bootstrap class loader; or null
 // if not found.  ClassNotFoundException is not thrown.
 //
@@ -1614,21 +1530,6 @@
   return true;
 }
 
-JVM_ENTRY(jbyteArray, JVM_GetFieldAnnotations(JNIEnv *env, jobject field))
-  // field is a handle to a java.lang.reflect.Field object
-  assert(field != NULL, "illegal field");
-  JVMWrapper("JVM_GetFieldAnnotations");
-
-  fieldDescriptor fd;
-  bool gotFd = jvm_get_field_common(field, fd, CHECK_NULL);
-  if (!gotFd) {
-    return NULL;
-  }
-
-  return (jbyteArray) JNIHandles::make_local(env, Annotations::make_java_array(fd.annotations(), THREAD));
-JVM_END
-
-
 static Method* jvm_get_method_common(jobject method) {
   // some of this code was adapted from from jni_FromReflectedMethod
 
@@ -1652,48 +1553,6 @@
   return m;  // caller has to deal with NULL in product mode
 }
 
-
-JVM_ENTRY(jbyteArray, JVM_GetMethodAnnotations(JNIEnv *env, jobject method))
-  JVMWrapper("JVM_GetMethodAnnotations");
-
-  // method is a handle to a java.lang.reflect.Method object
-  Method* m = jvm_get_method_common(method);
-  if (m == NULL) {
-    return NULL;
-  }
-
-  return (jbyteArray) JNIHandles::make_local(env,
-    Annotations::make_java_array(m->annotations(), THREAD));
-JVM_END
-
-
-JVM_ENTRY(jbyteArray, JVM_GetMethodDefaultAnnotationValue(JNIEnv *env, jobject method))
-  JVMWrapper("JVM_GetMethodDefaultAnnotationValue");
-
-  // method is a handle to a java.lang.reflect.Method object
-  Method* m = jvm_get_method_common(method);
-  if (m == NULL) {
-    return NULL;
-  }
-
-  return (jbyteArray) JNIHandles::make_local(env,
-    Annotations::make_java_array(m->annotation_default(), THREAD));
-JVM_END
-
-
-JVM_ENTRY(jbyteArray, JVM_GetMethodParameterAnnotations(JNIEnv *env, jobject method))
-  JVMWrapper("JVM_GetMethodParameterAnnotations");
-
-  // method is a handle to a java.lang.reflect.Method object
-  Method* m = jvm_get_method_common(method);
-  if (m == NULL) {
-    return NULL;
-  }
-
-  return (jbyteArray) JNIHandles::make_local(env,
-    Annotations::make_java_array(m->parameter_annotations(), THREAD));
-JVM_END
-
 /* Type use annotations support (JDK 1.8) */
 
 JVM_ENTRY(jbyteArray, JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls))
@@ -2680,77 +2539,6 @@
   return (jboolean) Reflection::is_same_class_package(klass1, klass2);
 JVM_END
 
-
-// IO functions ////////////////////////////////////////////////////////////////////////////////////////
-
-JVM_LEAF(jint, JVM_Open(const char *fname, jint flags, jint mode))
-  JVMWrapper2("JVM_Open (%s)", fname);
-
-  //%note jvm_r6
-  int result = os::open(fname, flags, mode);
-  if (result >= 0) {
-    return result;
-  } else {
-    switch(errno) {
-      case EEXIST:
-        return JVM_EEXIST;
-      default:
-        return -1;
-    }
-  }
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Close(jint fd))
-  JVMWrapper2("JVM_Close (0x%x)", fd);
-  //%note jvm_r6
-  return os::close(fd);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Read(jint fd, char *buf, jint nbytes))
-  JVMWrapper2("JVM_Read (0x%x)", fd);
-
-  //%note jvm_r6
-  return (jint)os::restartable_read(fd, buf, nbytes);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Write(jint fd, char *buf, jint nbytes))
-  JVMWrapper2("JVM_Write (0x%x)", fd);
-
-  //%note jvm_r6
-  return (jint)os::write(fd, buf, nbytes);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Available(jint fd, jlong *pbytes))
-  JVMWrapper2("JVM_Available (0x%x)", fd);
-  //%note jvm_r6
-  return os::available(fd, pbytes);
-JVM_END
-
-
-JVM_LEAF(jlong, JVM_Lseek(jint fd, jlong offset, jint whence))
-  JVMWrapper4("JVM_Lseek (0x%x, " INT64_FORMAT ", %d)", fd, (int64_t) offset, whence);
-  //%note jvm_r6
-  return os::lseek(fd, offset, whence);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_SetLength(jint fd, jlong length))
-  JVMWrapper3("JVM_SetLength (0x%x, " INT64_FORMAT ")", fd, (int64_t) length);
-  return os::ftruncate(fd, length);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Sync(jint fd))
-  JVMWrapper2("JVM_Sync (0x%x)", fd);
-  //%note jvm_r6
-  return os::fsync(fd);
-JVM_END
-
-
 // Printing support //////////////////////////////////////////////////
 extern "C" {
 
@@ -3422,96 +3210,6 @@
   return (!access.is_private() && InstanceKlass::cast(current_class)->is_same_class_package(field_class));
 }
 
-
-// JVM_AllocateNewObject and JVM_AllocateNewArray are unused as of 1.4
-JVM_ENTRY(jobject, JVM_AllocateNewObject(JNIEnv *env, jobject receiver, jclass currClass, jclass initClass))
-  JVMWrapper("JVM_AllocateNewObject");
-  JvmtiVMObjectAllocEventCollector oam;
-  // Receiver is not used
-  oop curr_mirror = JNIHandles::resolve_non_null(currClass);
-  oop init_mirror = JNIHandles::resolve_non_null(initClass);
-
-  // Cannot instantiate primitive types
-  if (java_lang_Class::is_primitive(curr_mirror) || java_lang_Class::is_primitive(init_mirror)) {
-    ResourceMark rm(THREAD);
-    THROW_0(vmSymbols::java_lang_InvalidClassException());
-  }
-
-  // Arrays not allowed here, must use JVM_AllocateNewArray
-  if (java_lang_Class::as_Klass(curr_mirror)->oop_is_array() ||
-      java_lang_Class::as_Klass(init_mirror)->oop_is_array()) {
-    ResourceMark rm(THREAD);
-    THROW_0(vmSymbols::java_lang_InvalidClassException());
-  }
-
-  instanceKlassHandle curr_klass (THREAD, java_lang_Class::as_Klass(curr_mirror));
-  instanceKlassHandle init_klass (THREAD, java_lang_Class::as_Klass(init_mirror));
-
-  assert(curr_klass->is_subclass_of(init_klass()), "just checking");
-
-  // Interfaces, abstract classes, and java.lang.Class classes cannot be instantiated directly.
-  curr_klass->check_valid_for_instantiation(false, CHECK_NULL);
-
-  // Make sure klass is initialized, since we are about to instantiate one of them.
-  curr_klass->initialize(CHECK_NULL);
-
- methodHandle m (THREAD,
-                 init_klass->find_method(vmSymbols::object_initializer_name(),
-                                         vmSymbols::void_method_signature()));
-  if (m.is_null()) {
-    ResourceMark rm(THREAD);
-    THROW_MSG_0(vmSymbols::java_lang_NoSuchMethodError(),
-                Method::name_and_sig_as_C_string(init_klass(),
-                                          vmSymbols::object_initializer_name(),
-                                          vmSymbols::void_method_signature()));
-  }
-
-  if (curr_klass ==  init_klass && !m->is_public()) {
-    // Calling the constructor for class 'curr_klass'.
-    // Only allow calls to a public no-arg constructor.
-    // This path corresponds to creating an Externalizable object.
-    THROW_0(vmSymbols::java_lang_IllegalAccessException());
-  }
-
-  if (!force_verify_field_access(curr_klass(), init_klass(), m->access_flags(), false)) {
-    // subclass 'curr_klass' does not have access to no-arg constructor of 'initcb'
-    THROW_0(vmSymbols::java_lang_IllegalAccessException());
-  }
-
-  Handle obj = curr_klass->allocate_instance_handle(CHECK_NULL);
-  // Call constructor m. This might call a constructor higher up in the hierachy
-  JavaCalls::call_default_constructor(thread, m, obj, CHECK_NULL);
-
-  return JNIHandles::make_local(obj());
-JVM_END
-
-
-JVM_ENTRY(jobject, JVM_AllocateNewArray(JNIEnv *env, jobject obj, jclass currClass, jint length))
-  JVMWrapper("JVM_AllocateNewArray");
-  JvmtiVMObjectAllocEventCollector oam;
-  oop mirror = JNIHandles::resolve_non_null(currClass);
-
-  if (java_lang_Class::is_primitive(mirror)) {
-    THROW_0(vmSymbols::java_lang_InvalidClassException());
-  }
-  Klass* k = java_lang_Class::as_Klass(mirror);
-  oop result;
-
-  if (k->oop_is_typeArray()) {
-    // typeArray
-    result = TypeArrayKlass::cast(k)->allocate(length, CHECK_NULL);
-  } else if (k->oop_is_objArray()) {
-    // objArray
-    ObjArrayKlass* oak = ObjArrayKlass::cast(k);
-    oak->initialize(CHECK_NULL); // make sure class is initialized (matches Classic VM behavior)
-    result = oak->allocate(length, CHECK_NULL);
-  } else {
-    THROW_0(vmSymbols::java_lang_InvalidClassException());
-  }
-  return JNIHandles::make_local(env, result);
-JVM_END
-
-
 // Return the first non-null class loader up the execution stack, or null
 // if only code from the null class loader is on the stack.
 
@@ -3527,60 +3225,6 @@
 JVM_END
 
 
-// Load a class relative to the most recent class on the stack  with a non-null
-// classloader.
-// This function has been deprecated and should not be considered part of the
-// specified JVM interface.
-
-JVM_ENTRY(jclass, JVM_LoadClass0(JNIEnv *env, jobject receiver,
-                                 jclass currClass, jstring currClassName))
-  JVMWrapper("JVM_LoadClass0");
-  // Receiver is not used
-  ResourceMark rm(THREAD);
-
-  // Class name argument is not guaranteed to be in internal format
-  Handle classname (THREAD, JNIHandles::resolve_non_null(currClassName));
-  Handle string = java_lang_String::internalize_classname(classname, CHECK_NULL);
-
-  const char* str = java_lang_String::as_utf8_string(string());
-
-  if (str == NULL || (int)strlen(str) > Symbol::max_length()) {
-    // It's impossible to create this class;  the name cannot fit
-    // into the constant pool.
-    THROW_MSG_0(vmSymbols::java_lang_NoClassDefFoundError(), str);
-  }
-
-  TempNewSymbol name = SymbolTable::new_symbol(str, CHECK_NULL);
-  Handle curr_klass (THREAD, JNIHandles::resolve(currClass));
-  // Find the most recent class on the stack with a non-null classloader
-  oop loader = NULL;
-  oop protection_domain = NULL;
-  if (curr_klass.is_null()) {
-    for (vframeStream vfst(thread);
-         !vfst.at_end() && loader == NULL;
-         vfst.next()) {
-      if (!vfst.method()->is_native()) {
-        InstanceKlass* holder = vfst.method()->method_holder();
-        loader             = holder->class_loader();
-        protection_domain  = holder->protection_domain();
-      }
-    }
-  } else {
-    Klass* curr_klass_oop = java_lang_Class::as_Klass(curr_klass());
-    loader            = InstanceKlass::cast(curr_klass_oop)->class_loader();
-    protection_domain = InstanceKlass::cast(curr_klass_oop)->protection_domain();
-  }
-  Handle h_loader(THREAD, loader);
-  Handle h_prot  (THREAD, protection_domain);
-  jclass result =  find_class_from_class_loader(env, name, true, h_loader, h_prot,
-                                                false, thread);
-  if (TraceClassResolution && result != NULL) {
-    trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
-  }
-  return result;
-JVM_END
-
-
 // Array ///////////////////////////////////////////////////////////////////////////////////////////
 
 
@@ -3676,143 +3320,6 @@
 JVM_END
 
 
-// Networking library support ////////////////////////////////////////////////////////////////////
-
-JVM_LEAF(jint, JVM_InitializeSocketLibrary())
-  JVMWrapper("JVM_InitializeSocketLibrary");
-  return 0;
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Socket(jint domain, jint type, jint protocol))
-  JVMWrapper("JVM_Socket");
-  return os::socket(domain, type, protocol);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_SocketClose(jint fd))
-  JVMWrapper2("JVM_SocketClose (0x%x)", fd);
-  //%note jvm_r6
-  return os::socket_close(fd);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_SocketShutdown(jint fd, jint howto))
-  JVMWrapper2("JVM_SocketShutdown (0x%x)", fd);
-  //%note jvm_r6
-  return os::socket_shutdown(fd, howto);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Recv(jint fd, char *buf, jint nBytes, jint flags))
-  JVMWrapper2("JVM_Recv (0x%x)", fd);
-  //%note jvm_r6
-  return os::recv(fd, buf, (size_t)nBytes, (uint)flags);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Send(jint fd, char *buf, jint nBytes, jint flags))
-  JVMWrapper2("JVM_Send (0x%x)", fd);
-  //%note jvm_r6
-  return os::send(fd, buf, (size_t)nBytes, (uint)flags);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Timeout(int fd, long timeout))
-  JVMWrapper2("JVM_Timeout (0x%x)", fd);
-  //%note jvm_r6
-  return os::timeout(fd, timeout);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Listen(jint fd, jint count))
-  JVMWrapper2("JVM_Listen (0x%x)", fd);
-  //%note jvm_r6
-  return os::listen(fd, count);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Connect(jint fd, struct sockaddr *him, jint len))
-  JVMWrapper2("JVM_Connect (0x%x)", fd);
-  //%note jvm_r6
-  return os::connect(fd, him, (socklen_t)len);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Bind(jint fd, struct sockaddr *him, jint len))
-  JVMWrapper2("JVM_Bind (0x%x)", fd);
-  //%note jvm_r6
-  return os::bind(fd, him, (socklen_t)len);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_Accept(jint fd, struct sockaddr *him, jint *len))
-  JVMWrapper2("JVM_Accept (0x%x)", fd);
-  //%note jvm_r6
-  socklen_t socklen = (socklen_t)(*len);
-  jint result = os::accept(fd, him, &socklen);
-  *len = (jint)socklen;
-  return result;
-JVM_END
-
-
-JVM_LEAF(jint, JVM_RecvFrom(jint fd, char *buf, int nBytes, int flags, struct sockaddr *from, int *fromlen))
-  JVMWrapper2("JVM_RecvFrom (0x%x)", fd);
-  //%note jvm_r6
-  socklen_t socklen = (socklen_t)(*fromlen);
-  jint result = os::recvfrom(fd, buf, (size_t)nBytes, (uint)flags, from, &socklen);
-  *fromlen = (int)socklen;
-  return result;
-JVM_END
-
-
-JVM_LEAF(jint, JVM_GetSockName(jint fd, struct sockaddr *him, int *len))
-  JVMWrapper2("JVM_GetSockName (0x%x)", fd);
-  //%note jvm_r6
-  socklen_t socklen = (socklen_t)(*len);
-  jint result = os::get_sock_name(fd, him, &socklen);
-  *len = (int)socklen;
-  return result;
-JVM_END
-
-
-JVM_LEAF(jint, JVM_SendTo(jint fd, char *buf, int len, int flags, struct sockaddr *to, int tolen))
-  JVMWrapper2("JVM_SendTo (0x%x)", fd);
-  //%note jvm_r6
-  return os::sendto(fd, buf, (size_t)len, (uint)flags, to, (socklen_t)tolen);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_SocketAvailable(jint fd, jint *pbytes))
-  JVMWrapper2("JVM_SocketAvailable (0x%x)", fd);
-  //%note jvm_r6
-  return os::socket_available(fd, pbytes);
-JVM_END
-
-
-JVM_LEAF(jint, JVM_GetSockOpt(jint fd, int level, int optname, char *optval, int *optlen))
-  JVMWrapper2("JVM_GetSockOpt (0x%x)", fd);
-  //%note jvm_r6
-  socklen_t socklen = (socklen_t)(*optlen);
-  jint result = os::get_sock_opt(fd, level, optname, optval, &socklen);
-  *optlen = (int)socklen;
-  return result;
-JVM_END
-
-
-JVM_LEAF(jint, JVM_SetSockOpt(jint fd, int level, int optname, const char *optval, int optlen))
-  JVMWrapper2("JVM_GetSockOpt (0x%x)", fd);
-  //%note jvm_r6
-  return os::set_sock_opt(fd, level, optname, optval, (socklen_t)optlen);
-JVM_END
-
-
-JVM_LEAF(int, JVM_GetHostName(char* name, int namelen))
-  JVMWrapper("JVM_GetHostName");
-  return os::get_host_name(name, namelen);
-JVM_END
-
-
 // Library support ///////////////////////////////////////////////////////////////////////////
 
 JVM_ENTRY_NO_ENV(void*, JVM_LoadLibrary(const char* name))
@@ -3854,14 +3361,6 @@
 JVM_END
 
 
-// Floating point support ////////////////////////////////////////////////////////////////////
-
-JVM_LEAF(jboolean, JVM_IsNaN(jdouble a))
-  JVMWrapper("JVM_IsNaN");
-  return g_isnan(a);
-JVM_END
-
-
 // JNI version ///////////////////////////////////////////////////////////////////////////////
 
 JVM_LEAF(jboolean, JVM_IsSupportedJNIVersion(jint version))
@@ -3982,20 +3481,6 @@
   return VM_Version::supports_cx8();
 JVM_END
 
-
-JVM_ENTRY(jboolean, JVM_CX8Field(JNIEnv *env, jobject obj, jfieldID fid, jlong oldVal, jlong newVal))
-  JVMWrapper("JVM_CX8Field");
-  jlong res;
-  oop             o       = JNIHandles::resolve(obj);
-  intptr_t        fldOffs = jfieldIDWorkaround::from_instance_jfieldID(o->klass(), fid);
-  volatile jlong* addr    = (volatile jlong*)((address)o + fldOffs);
-
-  assert(VM_Version::supports_cx8(), "cx8 not supported");
-  res = Atomic::cmpxchg(newVal, addr, oldVal);
-
-  return res == oldVal;
-JVM_END
-
 // DTrace ///////////////////////////////////////////////////////////////////
 
 JVM_ENTRY(jint, JVM_DTraceGetVersion(JNIEnv* env))
@@ -4150,189 +3635,6 @@
 }
 JVM_END
 
-JVM_ENTRY(jintArray, JVM_GetThreadStateValues(JNIEnv* env,
-                                              jint javaThreadState))
-{
-  // If new thread states are added in future JDK and VM versions,
-  // this should check if the JDK version is compatible with thread
-  // states supported by the VM.  Return NULL if not compatible.
-  //
-  // This function must map the VM java_lang_Thread::ThreadStatus
-  // to the Java thread state that the JDK supports.
-  //
-
-  typeArrayHandle values_h;
-  switch (javaThreadState) {
-    case JAVA_THREAD_STATE_NEW : {
-      typeArrayOop r = oopFactory::new_typeArray(T_INT, 1, CHECK_NULL);
-      values_h = typeArrayHandle(THREAD, r);
-      values_h->int_at_put(0, java_lang_Thread::NEW);
-      break;
-    }
-    case JAVA_THREAD_STATE_RUNNABLE : {
-      typeArrayOop r = oopFactory::new_typeArray(T_INT, 1, CHECK_NULL);
-      values_h = typeArrayHandle(THREAD, r);
-      values_h->int_at_put(0, java_lang_Thread::RUNNABLE);
-      break;
-    }
-    case JAVA_THREAD_STATE_BLOCKED : {
-      typeArrayOop r = oopFactory::new_typeArray(T_INT, 1, CHECK_NULL);
-      values_h = typeArrayHandle(THREAD, r);
-      values_h->int_at_put(0, java_lang_Thread::BLOCKED_ON_MONITOR_ENTER);
-      break;
-    }
-    case JAVA_THREAD_STATE_WAITING : {
-      typeArrayOop r = oopFactory::new_typeArray(T_INT, 2, CHECK_NULL);
-      values_h = typeArrayHandle(THREAD, r);
-      values_h->int_at_put(0, java_lang_Thread::IN_OBJECT_WAIT);
-      values_h->int_at_put(1, java_lang_Thread::PARKED);
-      break;
-    }
-    case JAVA_THREAD_STATE_TIMED_WAITING : {
-      typeArrayOop r = oopFactory::new_typeArray(T_INT, 3, CHECK_NULL);
-      values_h = typeArrayHandle(THREAD, r);
-      values_h->int_at_put(0, java_lang_Thread::SLEEPING);
-      values_h->int_at_put(1, java_lang_Thread::IN_OBJECT_WAIT_TIMED);
-      values_h->int_at_put(2, java_lang_Thread::PARKED_TIMED);
-      break;
-    }
-    case JAVA_THREAD_STATE_TERMINATED : {
-      typeArrayOop r = oopFactory::new_typeArray(T_INT, 1, CHECK_NULL);
-      values_h = typeArrayHandle(THREAD, r);
-      values_h->int_at_put(0, java_lang_Thread::TERMINATED);
-      break;
-    }
-    default:
-      // Unknown state - probably incompatible JDK version
-      return NULL;
-  }
-
-  return (jintArray) JNIHandles::make_local(env, values_h());
-}
-JVM_END
-
-
-JVM_ENTRY(jobjectArray, JVM_GetThreadStateNames(JNIEnv* env,
-                                                jint javaThreadState,
-                                                jintArray values))
-{
-  // If new thread states are added in future JDK and VM versions,
-  // this should check if the JDK version is compatible with thread
-  // states supported by the VM.  Return NULL if not compatible.
-  //
-  // This function must map the VM java_lang_Thread::ThreadStatus
-  // to the Java thread state that the JDK supports.
-  //
-
-  ResourceMark rm;
-
-  // Check if threads is null
-  if (values == NULL) {
-    THROW_(vmSymbols::java_lang_NullPointerException(), 0);
-  }
-
-  typeArrayOop v = typeArrayOop(JNIHandles::resolve_non_null(values));
-  typeArrayHandle values_h(THREAD, v);
-
-  objArrayHandle names_h;
-  switch (javaThreadState) {
-    case JAVA_THREAD_STATE_NEW : {
-      assert(values_h->length() == 1 &&
-               values_h->int_at(0) == java_lang_Thread::NEW,
-             "Invalid threadStatus value");
-
-      objArrayOop r = oopFactory::new_objArray(SystemDictionary::String_klass(),
-                                               1, /* only 1 substate */
-                                               CHECK_NULL);
-      names_h = objArrayHandle(THREAD, r);
-      Handle name = java_lang_String::create_from_str("NEW", CHECK_NULL);
-      names_h->obj_at_put(0, name());
-      break;
-    }
-    case JAVA_THREAD_STATE_RUNNABLE : {
-      assert(values_h->length() == 1 &&
-               values_h->int_at(0) == java_lang_Thread::RUNNABLE,
-             "Invalid threadStatus value");
-
-      objArrayOop r = oopFactory::new_objArray(SystemDictionary::String_klass(),
-                                               1, /* only 1 substate */
-                                               CHECK_NULL);
-      names_h = objArrayHandle(THREAD, r);
-      Handle name = java_lang_String::create_from_str("RUNNABLE", CHECK_NULL);
-      names_h->obj_at_put(0, name());
-      break;
-    }
-    case JAVA_THREAD_STATE_BLOCKED : {
-      assert(values_h->length() == 1 &&
-               values_h->int_at(0) == java_lang_Thread::BLOCKED_ON_MONITOR_ENTER,
-             "Invalid threadStatus value");
-
-      objArrayOop r = oopFactory::new_objArray(SystemDictionary::String_klass(),
-                                               1, /* only 1 substate */
-                                               CHECK_NULL);
-      names_h = objArrayHandle(THREAD, r);
-      Handle name = java_lang_String::create_from_str("BLOCKED", CHECK_NULL);
-      names_h->obj_at_put(0, name());
-      break;
-    }
-    case JAVA_THREAD_STATE_WAITING : {
-      assert(values_h->length() == 2 &&
-               values_h->int_at(0) == java_lang_Thread::IN_OBJECT_WAIT &&
-               values_h->int_at(1) == java_lang_Thread::PARKED,
-             "Invalid threadStatus value");
-      objArrayOop r = oopFactory::new_objArray(SystemDictionary::String_klass(),
-                                               2, /* number of substates */
-                                               CHECK_NULL);
-      names_h = objArrayHandle(THREAD, r);
-      Handle name0 = java_lang_String::create_from_str("WAITING.OBJECT_WAIT",
-                                                       CHECK_NULL);
-      Handle name1 = java_lang_String::create_from_str("WAITING.PARKED",
-                                                       CHECK_NULL);
-      names_h->obj_at_put(0, name0());
-      names_h->obj_at_put(1, name1());
-      break;
-    }
-    case JAVA_THREAD_STATE_TIMED_WAITING : {
-      assert(values_h->length() == 3 &&
-               values_h->int_at(0) == java_lang_Thread::SLEEPING &&
-               values_h->int_at(1) == java_lang_Thread::IN_OBJECT_WAIT_TIMED &&
-               values_h->int_at(2) == java_lang_Thread::PARKED_TIMED,
-             "Invalid threadStatus value");
-      objArrayOop r = oopFactory::new_objArray(SystemDictionary::String_klass(),
-                                               3, /* number of substates */
-                                               CHECK_NULL);
-      names_h = objArrayHandle(THREAD, r);
-      Handle name0 = java_lang_String::create_from_str("TIMED_WAITING.SLEEPING",
-                                                       CHECK_NULL);
-      Handle name1 = java_lang_String::create_from_str("TIMED_WAITING.OBJECT_WAIT",
-                                                       CHECK_NULL);
-      Handle name2 = java_lang_String::create_from_str("TIMED_WAITING.PARKED",
-                                                       CHECK_NULL);
-      names_h->obj_at_put(0, name0());
-      names_h->obj_at_put(1, name1());
-      names_h->obj_at_put(2, name2());
-      break;
-    }
-    case JAVA_THREAD_STATE_TERMINATED : {
-      assert(values_h->length() == 1 &&
-               values_h->int_at(0) == java_lang_Thread::TERMINATED,
-             "Invalid threadStatus value");
-      objArrayOop r = oopFactory::new_objArray(SystemDictionary::String_klass(),
-                                               1, /* only 1 substate */
-                                               CHECK_NULL);
-      names_h = objArrayHandle(THREAD, r);
-      Handle name = java_lang_String::create_from_str("TERMINATED", CHECK_NULL);
-      names_h->obj_at_put(0, name());
-      break;
-    }
-    default:
-      // Unknown state - probably incompatible JDK version
-      return NULL;
-  }
-  return (jobjectArray) JNIHandles::make_local(env, names_h());
-}
-JVM_END
-
 JVM_ENTRY(void, JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size))
 {
   memset(info, 0, info_size);
--- a/hotspot/src/share/vm/prims/jvm.h	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/prims/jvm.h	Thu Oct 16 17:36:47 2014 +0000
@@ -138,18 +138,6 @@
 JNIEXPORT jobject JNICALL
 JVM_InitProperties(JNIEnv *env, jobject p);
 
-/*
- * java.io.File
- */
-JNIEXPORT void JNICALL
-JVM_OnExit(void (*func)(void));
-
-/*
- * java.lang.Runtime
- */
-JNIEXPORT void JNICALL
-JVM_Exit(jint code);
-
 JNIEXPORT void JNICALL
 JVM_Halt(jint code);
 
@@ -173,12 +161,6 @@
 JNIEXPORT jlong JNICALL
 JVM_MaxObjectInspectionAge(void);
 
-JNIEXPORT void JNICALL
-JVM_TraceInstructions(jboolean on);
-
-JNIEXPORT void JNICALL
-JVM_TraceMethodCalls(jboolean on);
-
 JNIEXPORT jlong JNICALL
 JVM_TotalMemory(void);
 
@@ -204,12 +186,6 @@
 JVM_IsSupportedJNIVersion(jint version);
 
 /*
- * java.lang.Float and java.lang.Double
- */
-JNIEXPORT jboolean JNICALL
-JVM_IsNaN(jdouble d);
-
-/*
  * java.lang.Throwable
  */
 JNIEXPORT void JNICALL
@@ -222,30 +198,6 @@
 JVM_GetStackTraceElement(JNIEnv *env, jobject throwable, jint index);
 
 /*
- * java.lang.Compiler
- */
-JNIEXPORT void JNICALL
-JVM_InitializeCompiler (JNIEnv *env, jclass compCls);
-
-JNIEXPORT jboolean JNICALL
-JVM_IsSilentCompiler(JNIEnv *env, jclass compCls);
-
-JNIEXPORT jboolean JNICALL
-JVM_CompileClass(JNIEnv *env, jclass compCls, jclass cls);
-
-JNIEXPORT jboolean JNICALL
-JVM_CompileClasses(JNIEnv *env, jclass cls, jstring jname);
-
-JNIEXPORT jobject JNICALL
-JVM_CompilerCommand(JNIEnv *env, jclass compCls, jobject arg);
-
-JNIEXPORT void JNICALL
-JVM_EnableCompiler(JNIEnv *env, jclass compCls);
-
-JNIEXPORT void JNICALL
-JVM_DisableCompiler(JNIEnv *env, jclass compCls);
-
-/*
  * java.lang.Thread
  */
 JNIEXPORT void JNICALL
@@ -331,25 +283,9 @@
  * java.io.ObjectInputStream
  */
 JNIEXPORT jobject JNICALL
-JVM_AllocateNewObject(JNIEnv *env, jobject obj, jclass currClass,
-                      jclass initClass);
-
-JNIEXPORT jobject JNICALL
-JVM_AllocateNewArray(JNIEnv *env, jobject obj, jclass currClass,
-                     jint length);
-
-JNIEXPORT jobject JNICALL
 JVM_LatestUserDefinedLoader(JNIEnv *env);
 
 /*
- * This function has been deprecated and should not be considered
- * part of the specified JVM interface.
- */
-JNIEXPORT jclass JNICALL
-JVM_LoadClass0(JNIEnv *env, jobject obj, jclass currClass,
-               jstring currClassName);
-
-/*
  * java.lang.reflect.Array
  */
 JNIEXPORT jint JNICALL
@@ -399,12 +335,6 @@
 JVM_FindPrimitiveClass(JNIEnv *env, const char *utf);
 
 /*
- * Link the class
- */
-JNIEXPORT void JNICALL
-JVM_ResolveClass(JNIEnv *env, jclass cls);
-
-/*
  * Find a class from a given class loader. Throw ClassNotFoundException
  * or NoClassDefFoundError depending on the value of the last
  * argument.
@@ -499,22 +429,6 @@
 
 /* Annotations support (JDK 1.6) */
 
-// field is a handle to a java.lang.reflect.Field object
-JNIEXPORT jbyteArray JNICALL
-JVM_GetFieldAnnotations(JNIEnv *env, jobject field);
-
-// method is a handle to a java.lang.reflect.Method object
-JNIEXPORT jbyteArray JNICALL
-JVM_GetMethodAnnotations(JNIEnv *env, jobject method);
-
-// method is a handle to a java.lang.reflect.Method object
-JNIEXPORT jbyteArray JNICALL
-JVM_GetMethodDefaultAnnotationValue(JNIEnv *env, jobject method);
-
-// method is a handle to a java.lang.reflect.Method object
-JNIEXPORT jbyteArray JNICALL
-JVM_GetMethodParameterAnnotations(JNIEnv *env, jobject method);
-
 /* Type use annotations support (JDK 1.8) */
 
 JNIEXPORT jbyteArray JNICALL
@@ -647,9 +561,6 @@
 JNIEXPORT jboolean JNICALL
 JVM_SupportsCX8(void);
 
-JNIEXPORT jboolean JNICALL
-JVM_CX8Field(JNIEnv *env, jobject obj, jfieldID fldID, jlong oldVal, jlong newVal);
-
 /*
  * com.sun.dtrace.jsdt support
  */
@@ -1230,43 +1141,6 @@
  PART 3: I/O and Network Support
  ************************************************************************/
 
-/* Note that the JVM IO functions are expected to return JVM_IO_ERR
- * when there is any kind of error. The caller can then use the
- * platform specific support (e.g., errno) to get the detailed
- * error info.  The JVM_GetLastErrorString procedure may also be used
- * to obtain a descriptive error string.
- */
-#define JVM_IO_ERR  (-1)
-
-/* For interruptible IO. Returning JVM_IO_INTR indicates that an IO
- * operation has been disrupted by Thread.interrupt. There are a
- * number of technical difficulties related to interruptible IO that
- * need to be solved. For example, most existing programs do not handle
- * InterruptedIOExceptions specially, they simply treat those as any
- * IOExceptions, which typically indicate fatal errors.
- *
- * There are also two modes of operation for interruptible IO. In the
- * resumption mode, an interrupted IO operation is guaranteed not to
- * have any side-effects, and can be restarted. In the termination mode,
- * an interrupted IO operation corrupts the underlying IO stream, so
- * that the only reasonable operation on an interrupted stream is to
- * close that stream. The resumption mode seems to be impossible to
- * implement on Win32 and Solaris. Implementing the termination mode is
- * easier, but it's not clear that's the right semantics.
- *
- * Interruptible IO is not supported on Win32.It can be enabled/disabled
- * using a compile-time flag on Solaris. Third-party JVM ports do not
- * need to implement interruptible IO.
- */
-#define JVM_IO_INTR (-2)
-
-/* Write a string into the given buffer, in the platform's local encoding,
- * that describes the most recent system-level error to occur in this thread.
- * Return the length of the string or zero if no error occurred.
- */
-JNIEXPORT jint JNICALL
-JVM_GetLastErrorString(char *buf, int len);
-
 /*
  * Convert a pathname into native format.  This function does syntactic
  * cleanup, such as removing redundant separator characters.  It modifies
@@ -1276,150 +1150,6 @@
 JVM_NativePath(char *);
 
 /*
- * JVM I/O error codes
- */
-#define JVM_EEXIST       -100
-
-/*
- * Open a file descriptor. This function returns a negative error code
- * on error, and a non-negative integer that is the file descriptor on
- * success.
- */
-JNIEXPORT jint JNICALL
-JVM_Open(const char *fname, jint flags, jint mode);
-
-/*
- * Close a file descriptor. This function returns -1 on error, and 0
- * on success.
- *
- * fd        the file descriptor to close.
- */
-JNIEXPORT jint JNICALL
-JVM_Close(jint fd);
-
-/*
- * Read data from a file decriptor into a char array.
- *
- * fd        the file descriptor to read from.
- * buf       the buffer where to put the read data.
- * nbytes    the number of bytes to read.
- *
- * This function returns -1 on error, and 0 on success.
- */
-JNIEXPORT jint JNICALL
-JVM_Read(jint fd, char *buf, jint nbytes);
-
-/*
- * Write data from a char array to a file decriptor.
- *
- * fd        the file descriptor to read from.
- * buf       the buffer from which to fetch the data.
- * nbytes    the number of bytes to write.
- *
- * This function returns -1 on error, and 0 on success.
- */
-JNIEXPORT jint JNICALL
-JVM_Write(jint fd, char *buf, jint nbytes);
-
-/*
- * Returns the number of bytes available for reading from a given file
- * descriptor
- */
-JNIEXPORT jint JNICALL
-JVM_Available(jint fd, jlong *pbytes);
-
-/*
- * Move the file descriptor pointer from whence by offset.
- *
- * fd        the file descriptor to move.
- * offset    the number of bytes to move it by.
- * whence    the start from where to move it.
- *
- * This function returns the resulting pointer location.
- */
-JNIEXPORT jlong JNICALL
-JVM_Lseek(jint fd, jlong offset, jint whence);
-
-/*
- * Set the length of the file associated with the given descriptor to the given
- * length.  If the new length is longer than the current length then the file
- * is extended; the contents of the extended portion are not defined.  The
- * value of the file pointer is undefined after this procedure returns.
- */
-JNIEXPORT jint JNICALL
-JVM_SetLength(jint fd, jlong length);
-
-/*
- * Synchronize the file descriptor's in memory state with that of the
- * physical device.  Return of -1 is an error, 0 is OK.
- */
-JNIEXPORT jint JNICALL
-JVM_Sync(jint fd);
-
-/*
- * Networking library support
- */
-
-JNIEXPORT jint JNICALL
-JVM_InitializeSocketLibrary(void);
-
-struct sockaddr;
-
-JNIEXPORT jint JNICALL
-JVM_Socket(jint domain, jint type, jint protocol);
-
-JNIEXPORT jint JNICALL
-JVM_SocketClose(jint fd);
-
-JNIEXPORT jint JNICALL
-JVM_SocketShutdown(jint fd, jint howto);
-
-JNIEXPORT jint JNICALL
-JVM_Recv(jint fd, char *buf, jint nBytes, jint flags);
-
-JNIEXPORT jint JNICALL
-JVM_Send(jint fd, char *buf, jint nBytes, jint flags);
-
-JNIEXPORT jint JNICALL
-JVM_Timeout(int fd, long timeout);
-
-JNIEXPORT jint JNICALL
-JVM_Listen(jint fd, jint count);
-
-JNIEXPORT jint JNICALL
-JVM_Connect(jint fd, struct sockaddr *him, jint len);
-
-JNIEXPORT jint JNICALL
-JVM_Bind(jint fd, struct sockaddr *him, jint len);
-
-JNIEXPORT jint JNICALL
-JVM_Accept(jint fd, struct sockaddr *him, jint *len);
-
-JNIEXPORT jint JNICALL
-JVM_RecvFrom(jint fd, char *buf, int nBytes,
-                  int flags, struct sockaddr *from, int *fromlen);
-
-JNIEXPORT jint JNICALL
-JVM_SendTo(jint fd, char *buf, int len,
-                int flags, struct sockaddr *to, int tolen);
-
-JNIEXPORT jint JNICALL
-JVM_SocketAvailable(jint fd, jint *result);
-
-
-JNIEXPORT jint JNICALL
-JVM_GetSockName(jint fd, struct sockaddr *him, int *len);
-
-JNIEXPORT jint JNICALL
-JVM_GetSockOpt(jint fd, int level, int optname, char *optval, int *optlen);
-
-JNIEXPORT jint JNICALL
-JVM_SetSockOpt(jint fd, int level, int optname, const char *optval, int optlen);
-
-JNIEXPORT int JNICALL
-JVM_GetHostName(char* name, int namelen);
-
-/*
  * The standard printing functions supported by the Java VM. (Should they
  * be renamed to JVM_* in the future?
  */
@@ -1496,39 +1226,6 @@
 JNIEXPORT jobjectArray JNICALL
 JVM_GetEnclosingMethodInfo(JNIEnv* env, jclass ofClass);
 
-/*
- * Java thread state support
- */
-enum {
-    JAVA_THREAD_STATE_NEW           = 0,
-    JAVA_THREAD_STATE_RUNNABLE      = 1,
-    JAVA_THREAD_STATE_BLOCKED       = 2,
-    JAVA_THREAD_STATE_WAITING       = 3,
-    JAVA_THREAD_STATE_TIMED_WAITING = 4,
-    JAVA_THREAD_STATE_TERMINATED    = 5,
-    JAVA_THREAD_STATE_COUNT         = 6
-};
-
-/*
- * Returns an array of the threadStatus values representing the
- * given Java thread state.  Returns NULL if the VM version is
- * incompatible with the JDK or doesn't support the given
- * Java thread state.
- */
-JNIEXPORT jintArray JNICALL
-JVM_GetThreadStateValues(JNIEnv* env, jint javaThreadState);
-
-/*
- * Returns an array of the substate names representing the
- * given Java thread state.  Returns NULL if the VM version is
- * incompatible with the JDK or the VM doesn't support
- * the given Java thread state.
- * values must be the jintArray returned from JVM_GetThreadStateValues
- * and javaThreadState.
- */
-JNIEXPORT jobjectArray JNICALL
-JVM_GetThreadStateNames(JNIEnv* env, jint javaThreadState, jintArray values);
-
 /* =========================================================================
  * The following defines a private JVM interface that the JDK can query
  * for the JVM version and capabilities.  sun.misc.Version defines
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -1031,7 +1031,7 @@
     // implied else: entry_count == 0
   }
 
-  int nWant,nWait;
+  jint nWant, nWait;
   if (mon != NULL) {
     // this object has a heavyweight monitor
     nWant = mon->contentions(); // # of threads contending for monitor
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -335,7 +335,36 @@
   }
 WB_END
 
+WB_ENTRY(jboolean, WB_NMTChangeTrackingLevel(JNIEnv* env))
+  // Test that we can downgrade NMT levels but not upgrade them.
+  if (MemTracker::tracking_level() == NMT_off) {
+    MemTracker::transition_to(NMT_off);
+    return MemTracker::tracking_level() == NMT_off;
+  } else {
+    assert(MemTracker::tracking_level() == NMT_detail, "Should start out as detail tracking");
+    MemTracker::transition_to(NMT_summary);
+    assert(MemTracker::tracking_level() == NMT_summary, "Should be summary now");
 
+    // Can't go to detail once NMT is set to summary.
+    MemTracker::transition_to(NMT_detail);
+    assert(MemTracker::tracking_level() == NMT_summary, "Should still be summary now");
+
+    // Shutdown sets tracking level to minimal.
+    MemTracker::shutdown();
+    assert(MemTracker::tracking_level() == NMT_minimal, "Should be minimal now");
+
+    // Once the tracking level is minimal, we cannot increase to summary.
+    // The code ignores this request instead of asserting because if the malloc site
+    // table overflows in another thread, it tries to change the code to summary.
+    MemTracker::transition_to(NMT_summary);
+    assert(MemTracker::tracking_level() == NMT_minimal, "Should still be minimal now");
+
+    // Really can never go up to detail, verify that the code would never do this.
+    MemTracker::transition_to(NMT_detail);
+    assert(MemTracker::tracking_level() == NMT_minimal, "Should still be minimal now");
+    return MemTracker::tracking_level() == NMT_minimal;
+  }
+WB_END
 #endif // INCLUDE_NMT
 
 static jmethodID reflected_method_to_jmid(JavaThread* thread, JNIEnv* env, jobject method) {
@@ -962,6 +991,7 @@
   {CC"NMTReleaseMemory",    CC"(JJ)V",                (void*)&WB_NMTReleaseMemory   },
   {CC"NMTOverflowHashBucket", CC"(J)V",               (void*)&WB_NMTOverflowHashBucket},
   {CC"NMTIsDetailSupported",CC"()Z",                  (void*)&WB_NMTIsDetailSupported},
+  {CC"NMTChangeTrackingLevel", CC"()Z",               (void*)&WB_NMTChangeTrackingLevel},
 #endif // INCLUDE_NMT
   {CC"deoptimizeAll",      CC"()V",                   (void*)&WB_DeoptimizeAll     },
   {CC"deoptimizeMethod",   CC"(Ljava/lang/reflect/Executable;Z)I",
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -3782,6 +3782,8 @@
   bool settings_file_specified = false;
   bool needs_hotspotrc_warning = false;
 
+  ArgumentsExt::process_options(args);
+
   const char* flags_file;
   int index;
   for (index = 0; index < args->nOptions; index++) {
--- a/hotspot/src/share/vm/runtime/arguments_ext.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/arguments_ext.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -34,6 +34,7 @@
   static inline bool check_gc_consistency_user();
   static inline bool check_gc_consistency_ergo();
   static inline bool check_vm_args_consistency();
+  static        void process_options(const JavaVMInitArgs* args) {}
 };
 
 void ArgumentsExt::select_gc_ergonomically() {
--- a/hotspot/src/share/vm/runtime/globals.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/globals.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -256,6 +256,11 @@
   return is_unlocked_ext();
 }
 
+void Flag::unlock_diagnostic() {
+  assert(is_diagnostic(), "sanity");
+  _flags = Flags(_flags & ~KIND_DIAGNOSTIC);
+}
+
 // Get custom message for this locked flag, or return NULL if
 // none is available.
 void Flag::get_locked_message(char* buf, int buflen) const {
--- a/hotspot/src/share/vm/runtime/globals.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -320,6 +320,8 @@
   bool is_writeable_ext() const;
   bool is_external_ext() const;
 
+  void unlock_diagnostic();
+
   void get_locked_message(char*, int) const;
   void get_locked_message_ext(char*, int) const;
 
--- a/hotspot/src/share/vm/runtime/java.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/java.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -387,46 +387,6 @@
 
 #endif
 
-
-// Helper class for registering on_exit calls through JVM_OnExit
-
-extern "C" {
-    typedef void (*__exit_proc)(void);
-}
-
-class ExitProc : public CHeapObj<mtInternal> {
- private:
-  __exit_proc _proc;
-  // void (*_proc)(void);
-  ExitProc* _next;
- public:
-  // ExitProc(void (*proc)(void)) {
-  ExitProc(__exit_proc proc) {
-    _proc = proc;
-    _next = NULL;
-  }
-  void evaluate()               { _proc(); }
-  ExitProc* next() const        { return _next; }
-  void set_next(ExitProc* next) { _next = next; }
-};
-
-
-// Linked list of registered on_exit procedures
-
-static ExitProc* exit_procs = NULL;
-
-
-extern "C" {
-  void register_on_exit_function(void (*func)(void)) {
-    ExitProc *entry = new ExitProc(func);
-    // Classic vm does not throw an exception in case the allocation failed,
-    if (entry != NULL) {
-      entry->set_next(exit_procs);
-      exit_procs = entry;
-    }
-  }
-}
-
 // Note: before_exit() can be executed only once, if more than one threads
 //       are trying to shutdown the VM at the same time, only one thread
 //       can run before_exit() and all other threads must wait.
@@ -457,16 +417,6 @@
     }
   }
 
-  // The only difference between this and Win32's _onexit procs is that
-  // this version is invoked before any threads get killed.
-  ExitProc* current = exit_procs;
-  while (current != NULL) {
-    ExitProc* next = current->next();
-    current->evaluate();
-    delete current;
-    current = next;
-  }
-
   // Hang forever on exit if we're reporting an error.
   if (ShowMessageBoxOnError && is_error_reported()) {
     os::infinite_sleep();
--- a/hotspot/src/share/vm/runtime/java.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/java.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -27,9 +27,6 @@
 
 #include "runtime/os.hpp"
 
-// Register function to be called by before_exit
-extern "C" { void register_on_exit_function(void (*func)(void)) ;}
-
 // Execute code before all handles are released and thread is killed; prologue to vm_exit
 extern void before_exit(JavaThread * thread);
 
--- a/hotspot/src/share/vm/runtime/javaCalls.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/javaCalls.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -173,22 +173,6 @@
   return T_ILLEGAL;
 }
 
-// ===== object constructor calls =====
-
-void JavaCalls::call_default_constructor(JavaThread* thread, methodHandle method, Handle receiver, TRAPS) {
-  assert(method->name() == vmSymbols::object_initializer_name(),    "Should only be called for default constructor");
-  assert(method->signature() == vmSymbols::void_method_signature(), "Should only be called for default constructor");
-
-  InstanceKlass* ik = method->method_holder();
-  if (ik->is_initialized() && ik->has_vanilla_constructor()) {
-    // safe to skip constructor call
-  } else {
-    static JavaValue result(T_VOID);
-    JavaCallArguments args(receiver);
-    call(&result, method, &args, CHECK);
-  }
-}
-
 // ============ Virtual calls ============
 
 void JavaCalls::call_virtual(JavaValue* result, KlassHandle spec_klass, Symbol* name, Symbol* signature, JavaCallArguments* args, TRAPS) {
--- a/hotspot/src/share/vm/runtime/javaCalls.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/javaCalls.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -183,9 +183,6 @@
 class JavaCalls: AllStatic {
   static void call_helper(JavaValue* result, methodHandle* method, JavaCallArguments* args, TRAPS);
  public:
-  // Optimized Constuctor call
-  static void call_default_constructor(JavaThread* thread, methodHandle method, Handle receiver, TRAPS);
-
   // call_special
   // ------------
   // The receiver must be first oop in argument list
--- a/hotspot/src/share/vm/runtime/objectMonitor.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -257,7 +257,6 @@
       assert(_recursions == 0, "internal state error");
       _owner = THREAD;
       _recursions = 1;
-      OwnerIsThread = 1;
       return true;
     }
     if (Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) != NULL) {
@@ -280,7 +279,6 @@
     // Either ASSERT _recursions == 0 or explicitly set _recursions = 0.
     assert(_recursions == 0, "invariant");
     assert(_owner == Self, "invariant");
-    // CONSIDER: set or assert OwnerIsThread == 1
     return;
   }
 
@@ -296,7 +294,6 @@
     // Commute owner from a thread-specific on-stack BasicLockObject address to
     // a full-fledged "Thread *".
     _owner = Self;
-    OwnerIsThread = 1;
     return;
   }
 
@@ -328,7 +325,7 @@
 
   // Prevent deflation at STW-time.  See deflate_idle_monitors() and is_busy().
   // Ensure the object-monitor relationship remains stable while there's contention.
-  Atomic::inc_ptr(&_count);
+  Atomic::inc(&_count);
 
   EventJavaMonitorEnter event;
 
@@ -384,7 +381,7 @@
     // acquire it.
   }
 
-  Atomic::dec_ptr(&_count);
+  Atomic::dec(&_count);
   assert(_count >= 0, "invariant");
   Self->_Stalled = 0;
 
@@ -440,7 +437,6 @@
     // Either guarantee _recursions == 0 or set _recursions = 0.
     assert(_recursions == 0, "invariant");
     assert(_owner == Self, "invariant");
-    // CONSIDER: set or assert that OwnerIsThread == 1
     return 1;
   }
   // The lock had been free momentarily, but we lost the race to the lock.
@@ -922,7 +918,6 @@
       assert(_recursions == 0, "invariant");
       _owner = THREAD;
       _recursions = 0;
-      OwnerIsThread = 1;
     } else {
       // Apparent unbalanced locking ...
       // Naively we'd like to throw IllegalMonitorStateException.
@@ -1346,7 +1341,6 @@
       assert(_recursions == 0, "internal state error");
       _owner = THREAD;   // Convert from basiclock addr to Thread addr
       _recursions = 0;
-      OwnerIsThread = 1;
     }
   }
 
@@ -1385,7 +1379,6 @@
       if (THREAD->is_lock_owned((address) _owner)) {                        \
         _owner = THREAD;  /* Convert from basiclock addr to Thread addr */  \
         _recursions = 0;                                                    \
-        OwnerIsThread = 1;                                                  \
       } else {                                                              \
         TEVENT(Throw IMSX);                                                 \
         THROW(vmSymbols::java_lang_IllegalMonitorStateException());         \
@@ -1906,8 +1899,8 @@
 // a contending thread could enqueue itself on the cxq and then spin locally
 // on a thread-specific variable such as its ParkEvent._Event flag.
 // That's left as an exercise for the reader.  Note that global spinning is
-// not problematic on Niagara, as the L2$ serves the interconnect and has both
-// low latency and massive bandwidth.
+// not problematic on Niagara, as the L2 cache serves the interconnect and
+// has both low latency and massive bandwidth.
 //
 // Broadly, we can fix the spin frequency -- that is, the % of contended lock
 // acquisition attempts where we opt to spin --  at 100% and vary the spin count
@@ -2208,7 +2201,7 @@
 // as advisory.
 //
 // Beware too, that _owner is sometimes a BasicLock address and sometimes
-// a thread pointer.  We differentiate the two cases with OwnerIsThread.
+// a thread pointer.
 // Alternately, we might tag the type (thread pointer vs basiclock pointer)
 // with the LSB of _owner.  Another option would be to probablistically probe
 // the putative _owner->TypeTag value.
@@ -2230,9 +2223,7 @@
 
 
 int ObjectMonitor::NotRunnable(Thread * Self, Thread * ox) {
-  // Check either OwnerIsThread or ox->TypeTag == 2BAD.
-  if (!OwnerIsThread) return 0;
-
+  // Check ox->TypeTag == 2BAD.
   if (ox == NULL) return 0;
 
   // Avoid transitive spinning ...
@@ -2399,20 +2390,6 @@
   }
 }
 
-
-// Compile-time asserts
-// When possible, it's better to catch errors deterministically at
-// compile-time than at runtime.  The down-side to using compile-time
-// asserts is that error message -- often something about negative array
-// indices -- is opaque.
-
-#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @" INTPTR_FORMAT "\n", (intptr_t)tag); }
-
-void ObjectMonitor::ctAsserts() {
-  CTASSERT(offset_of (ObjectMonitor, _header) == 0);
-}
-
-
 static char * kvGet(char * kvList, const char * Key) {
   if (kvList == NULL) return NULL;
   size_t n = strlen(Key);
@@ -2526,6 +2503,8 @@
   if (verbose) {
     tty->print_cr("INFO: sizeof(ObjectMonitor)=" SIZE_FORMAT,
                   sizeof(ObjectMonitor));
+    tty->print_cr("INFO: sizeof(PaddedEnd<ObjectMonitor>)=" SIZE_FORMAT,
+                  sizeof(PaddedEnd<ObjectMonitor>));
   }
 
   uint cache_line_size = VM_Version::L1_data_cache_line_size();
@@ -2559,9 +2538,9 @@
       warning_cnt++;
     }
 
-    if ((sizeof(ObjectMonitor) % cache_line_size) != 0) {
-      tty->print_cr("WARNING: ObjectMonitor size is not a multiple of "
-                    "a cache line which permits false sharing.");
+    if ((sizeof(PaddedEnd<ObjectMonitor>) % cache_line_size) != 0) {
+      tty->print_cr("WARNING: PaddedEnd<ObjectMonitor> size is not a "
+                    "multiple of a cache line which permits false sharing.");
       warning_cnt++;
     }
   }
--- a/hotspot/src/share/vm/runtime/objectMonitor.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/objectMonitor.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -25,6 +25,7 @@
 #ifndef SHARE_VM_RUNTIME_OBJECTMONITOR_HPP
 #define SHARE_VM_RUNTIME_OBJECTMONITOR_HPP
 
+#include "memory/padded.hpp"
 #include "runtime/os.hpp"
 #include "runtime/park.hpp"
 #include "runtime/perfData.hpp"
@@ -58,21 +59,71 @@
 // forward declaration to avoid include tracing.hpp
 class EventJavaMonitorWait;
 
-// WARNING:
-//   This is a very sensitive and fragile class. DO NOT make any
-// change unless you are fully aware of the underlying semantics.
-
-//   This class can not inherit from any other class, because I have
-// to let the displaced header be the very first word. Otherwise I
-// have to let markOop include this file, which would export the
-// monitor data structure to everywhere.
+// The ObjectMonitor class implements the heavyweight version of a
+// JavaMonitor. The lightweight BasicLock/stack lock version has been
+// inflated into an ObjectMonitor. This inflation is typically due to
+// contention or use of Object.wait().
+//
+// WARNING: This is a very sensitive and fragile class. DO NOT make any
+// changes unless you are fully aware of the underlying semantics.
+//
+// Class JvmtiRawMonitor currently inherits from ObjectMonitor so
+// changes in this class must be careful to not break JvmtiRawMonitor.
+// These two subsystems should be separated.
+//
+// ObjectMonitor Layout Overview/Highlights/Restrictions:
 //
-// The ObjectMonitor class is used to implement JavaMonitors which have
-// transformed from the lightweight structure of the thread stack to a
-// heavy weight lock due to contention
-
-// It is also used as RawMonitor by the JVMTI
-
+// - The _header field must be at offset 0 because the displaced header
+//   from markOop is stored there. We do not want markOop.hpp to include
+//   ObjectMonitor.hpp to avoid exposing ObjectMonitor everywhere. This
+//   means that ObjectMonitor cannot inherit from any other class nor can
+//   it use any virtual member functions. This restriction is critical to
+//   the proper functioning of the VM.
+// - The _header and _owner fields should be separated by enough space
+//   to avoid false sharing due to parallel access by different threads.
+//   This is an advisory recommendation.
+// - The general layout of the fields in ObjectMonitor is:
+//     _header
+//     <lightly_used_fields>
+//     <optional padding>
+//     _owner
+//     <remaining_fields>
+// - The VM assumes write ordering and machine word alignment with
+//   respect to the _owner field and the <remaining_fields> that can
+//   be read in parallel by other threads.
+// - Generally fields that are accessed closely together in time should
+//   be placed proximally in space to promote data cache locality. That
+//   is, temporal locality should condition spatial locality.
+// - We have to balance avoiding false sharing with excessive invalidation
+//   from coherence traffic. As such, we try to cluster fields that tend
+//   to be _written_ at approximately the same time onto the same data
+//   cache line.
+// - We also have to balance the natural tension between minimizing
+//   single threaded capacity misses with excessive multi-threaded
+//   coherency misses. There is no single optimal layout for both
+//   single-threaded and multi-threaded environments.
+//
+// - See ObjectMonitor::sanity_checks() for how critical restrictions are
+//   enforced and advisory recommendations are reported.
+// - Adjacent ObjectMonitors should be separated by enough space to avoid
+//   false sharing. This is handled by the ObjectMonitor allocation code
+//   in synchronizer.cpp. Also see ObjectSynchronizer::sanity_checks().
+//
+// Futures notes:
+//   - Separating _owner from the <remaining_fields> by enough space to
+//     avoid false sharing might be profitable. Given
+//     http://blogs.oracle.com/dave/entry/cas_and_cache_trivia_invalidate
+//     we know that the CAS in monitorenter will invalidate the line
+//     underlying _owner. We want to avoid an L1 data cache miss on that
+//     same line for monitorexit. Putting these <remaining_fields>:
+//     _recursions, _EntryList, _cxq, and _succ, all of which may be
+//     fetched in the inflated unlock path, on a different cache line
+//     would make them immune to CAS-based invalidation from the _owner
+//     field.
+//
+//   - The _recursions field should be of type int, or int32_t but not
+//     intptr_t. There's no reason to use a 64-bit type for this field
+//     in a 64-bit JVM.
 
 class ObjectMonitor {
  public:
@@ -84,7 +135,84 @@
     OM_TIMED_OUT              // Object.wait() timed out
   };
 
+ private:
+  friend class ObjectSynchronizer;
+  friend class ObjectWaiter;
+  friend class VMStructs;
+
+  volatile markOop   _header;       // displaced object header word - mark
+  void*     volatile _object;       // backward object pointer - strong root
  public:
+  ObjectMonitor *    FreeNext;      // Free list linkage
+ private:
+  DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE,
+                        sizeof(volatile markOop) + sizeof(void * volatile) +
+                        sizeof(ObjectMonitor *));
+ protected:                         // protected for JvmtiRawMonitor
+  void *  volatile _owner;          // pointer to owning thread OR BasicLock
+  volatile jlong _previous_owner_tid;  // thread id of the previous owner of the monitor
+  volatile intptr_t  _recursions;   // recursion count, 0 for first entry
+  ObjectWaiter * volatile _EntryList; // Threads blocked on entry or reentry.
+                                      // The list is actually composed of WaitNodes,
+                                      // acting as proxies for Threads.
+ private:
+  ObjectWaiter * volatile _cxq;     // LL of recently-arrived threads blocked on entry.
+  Thread * volatile _succ;          // Heir presumptive thread - used for futile wakeup throttling
+  Thread * volatile _Responsible;
+
+  volatile int _Spinner;            // for exit->spinner handoff optimization
+  volatile int _SpinFreq;           // Spin 1-out-of-N attempts: success rate
+  volatile int _SpinClock;
+  volatile intptr_t _SpinState;     // MCS/CLH list of spinners
+  volatile int _SpinDuration;
+
+  volatile jint  _count;            // reference count to prevent reclamation/deflation
+                                    // at stop-the-world time.  See deflate_idle_monitors().
+                                    // _count is approximately |_WaitSet| + |_EntryList|
+ protected:
+  ObjectWaiter * volatile _WaitSet; // LL of threads wait()ing on the monitor
+  volatile jint  _waiters;          // number of waiting threads
+ private:
+  volatile int _WaitSetLock;        // protects Wait Queue - simple spinlock
+
+ public:
+  static void Initialize();
+  static PerfCounter * _sync_ContendedLockAttempts;
+  static PerfCounter * _sync_FutileWakeups;
+  static PerfCounter * _sync_Parks;
+  static PerfCounter * _sync_EmptyNotifications;
+  static PerfCounter * _sync_Notifications;
+  static PerfCounter * _sync_SlowEnter;
+  static PerfCounter * _sync_SlowExit;
+  static PerfCounter * _sync_SlowNotify;
+  static PerfCounter * _sync_SlowNotifyAll;
+  static PerfCounter * _sync_FailedSpins;
+  static PerfCounter * _sync_SuccessfulSpins;
+  static PerfCounter * _sync_PrivateA;
+  static PerfCounter * _sync_PrivateB;
+  static PerfCounter * _sync_MonInCirculation;
+  static PerfCounter * _sync_MonScavenged;
+  static PerfCounter * _sync_Inflations;
+  static PerfCounter * _sync_Deflations;
+  static PerfLongVariable * _sync_MonExtant;
+
+  static int Knob_Verbose;
+  static int Knob_VerifyInUse;
+  static int Knob_SpinLimit;
+
+  void* operator new (size_t size) throw() {
+    return AllocateHeap(size, mtInternal);
+  }
+  void* operator new[] (size_t size) throw() {
+    return operator new (size);
+  }
+  void operator delete(void* p) {
+    FreeHeap(p, mtInternal);
+  }
+  void operator delete[] (void *p) {
+    operator delete(p);
+  }
+
   // TODO-FIXME: the "offset" routines should return a type of off_t instead of int ...
   // ByteSize would also be an appropriate type.
   static int header_offset_in_bytes()      { return offset_of(ObjectMonitor, _header); }
@@ -100,14 +228,11 @@
   static int Responsible_offset_in_bytes() { return offset_of(ObjectMonitor, _Responsible); }
   static int Spinner_offset_in_bytes()     { return offset_of(ObjectMonitor, _Spinner); }
 
- public:
   // Eventually we'll make provisions for multiple callbacks, but
   // now one will suffice.
   static int (*SpinCallbackFunction)(intptr_t, int);
   static intptr_t SpinCallbackArgument;
 
-
- public:
   markOop   header() const;
   void      set_header(markOop hdr);
 
@@ -123,39 +248,22 @@
   void*     owner() const;
   void      set_owner(void* owner);
 
-  intptr_t  waiters() const;
+  jint      waiters() const;
 
-  intptr_t  count() const;
-  void      set_count(intptr_t count);
-  intptr_t  contentions() const;
+  jint      count() const;
+  void      set_count(jint count);
+  jint      contentions() const;
   intptr_t  recursions() const                                         { return _recursions; }
 
-  // JVM/DI GetMonitorInfo() needs this
+  // JVM/TI GetObjectMonitorUsage() needs this:
   ObjectWaiter* first_waiter()                                         { return _WaitSet; }
   ObjectWaiter* next_waiter(ObjectWaiter* o)                           { return o->_next; }
   Thread* thread_of_waiter(ObjectWaiter* o)                            { return o->_thread; }
 
-  // initialize the monitor, exception the semaphore, all other fields
-  // are simple integers or pointers
-  ObjectMonitor() {
-    _header       = NULL;
-    _count        = 0;
-    _waiters      = 0;
-    _recursions   = 0;
-    _object       = NULL;
-    _owner        = NULL;
-    _WaitSet      = NULL;
-    _WaitSetLock  = 0;
-    _Responsible  = NULL;
-    _succ         = NULL;
-    _cxq          = NULL;
-    FreeNext      = NULL;
-    _EntryList    = NULL;
-    _SpinFreq     = 0;
-    _SpinClock    = 0;
-    OwnerIsThread = 0;
-    _previous_owner_tid = 0;
-  }
+ protected:
+  // We don't typically expect or want the ctors or dtors to run.
+  // normal ObjectMonitors are type-stable and immortal.
+  ObjectMonitor() { ::memset((void *)this, 0, sizeof(*this)); }
 
   ~ObjectMonitor() {
     // TODO: Add asserts ...
@@ -169,7 +277,7 @@
     // _cxq == 0 _succ == NULL _owner == NULL _waiters == 0
     // _count == 0 EntryList  == NULL
     // _recursions == 0 _WaitSet == NULL
-    // TODO: assert (is_busy()|_recursions) == 0
+    assert(((is_busy()|_recursions) == 0), "freeing inuse monitor");
     _succ          = NULL;
     _EntryList     = NULL;
     _cxq           = NULL;
@@ -177,7 +285,6 @@
     _recursions    = 0;
     _SpinFreq      = 0;
     _SpinClock     = 0;
-    OwnerIsThread  = 0;
   }
 
  public:
@@ -221,7 +328,6 @@
   int       TrySpin_Fixed(Thread * Self);
   int       TrySpin_VaryFrequency(Thread * Self);
   int       TrySpin_VaryDuration(Thread * Self);
-  void      ctAsserts();
   void      ExitEpilog(Thread * Self, ObjectWaiter * Wakee);
   bool      ExitSuspendEquivalent(JavaThread * Self);
   void      post_monitor_wait_event(EventJavaMonitorWait * event,
@@ -229,102 +335,6 @@
                                     jlong timeout,
                                     bool timedout);
 
- private:
-  friend class ObjectSynchronizer;
-  friend class ObjectWaiter;
-  friend class VMStructs;
-
-  // WARNING: this must be the very first word of ObjectMonitor
-  // This means this class can't use any virtual member functions.
-
-  volatile markOop   _header;       // displaced object header word - mark
-  void*     volatile _object;       // backward object pointer - strong root
-
-  double SharingPad[1];             // temp to reduce false sharing
-
-  // All the following fields must be machine word aligned
-  // The VM assumes write ordering wrt these fields, which can be
-  // read from other threads.
-
- protected:                         // protected for jvmtiRawMonitor
-  void *  volatile _owner;          // pointer to owning thread OR BasicLock
-  volatile jlong _previous_owner_tid;  // thread id of the previous owner of the monitor
-  volatile intptr_t  _recursions;   // recursion count, 0 for first entry
- private:
-  int OwnerIsThread;                // _owner is (Thread *) vs SP/BasicLock
-  ObjectWaiter * volatile _cxq;     // LL of recently-arrived threads blocked on entry.
-                                    // The list is actually composed of WaitNodes, acting
-                                    // as proxies for Threads.
- protected:
-  ObjectWaiter * volatile _EntryList;  // Threads blocked on entry or reentry.
- private:
-  Thread * volatile _succ;          // Heir presumptive thread - used for futile wakeup throttling
-  Thread * volatile _Responsible;
-  int _PromptDrain;                 // rqst to drain cxq into EntryList ASAP
-
-  volatile int _Spinner;            // for exit->spinner handoff optimization
-  volatile int _SpinFreq;           // Spin 1-out-of-N attempts: success rate
-  volatile int _SpinClock;
-  volatile int _SpinDuration;
-  volatile intptr_t _SpinState;     // MCS/CLH list of spinners
-
-  // TODO-FIXME: _count, _waiters and _recursions should be of
-  // type int, or int32_t but not intptr_t.  There's no reason
-  // to use 64-bit fields for these variables on a 64-bit JVM.
-
-  volatile intptr_t  _count;        // reference count to prevent reclamation/deflation
-                                    // at stop-the-world time.  See deflate_idle_monitors().
-                                    // _count is approximately |_WaitSet| + |_EntryList|
- protected:
-  volatile intptr_t  _waiters;      // number of waiting threads
- private:
- protected:
-  ObjectWaiter * volatile _WaitSet; // LL of threads wait()ing on the monitor
- private:
-  volatile int _WaitSetLock;        // protects Wait Queue - simple spinlock
-
- public:
-  int _QMix;                        // Mixed prepend queue discipline
-  ObjectMonitor * FreeNext;         // Free list linkage
-  intptr_t StatA, StatsB;
-
- public:
-  static void Initialize();
-  static PerfCounter * _sync_ContendedLockAttempts;
-  static PerfCounter * _sync_FutileWakeups;
-  static PerfCounter * _sync_Parks;
-  static PerfCounter * _sync_EmptyNotifications;
-  static PerfCounter * _sync_Notifications;
-  static PerfCounter * _sync_SlowEnter;
-  static PerfCounter * _sync_SlowExit;
-  static PerfCounter * _sync_SlowNotify;
-  static PerfCounter * _sync_SlowNotifyAll;
-  static PerfCounter * _sync_FailedSpins;
-  static PerfCounter * _sync_SuccessfulSpins;
-  static PerfCounter * _sync_PrivateA;
-  static PerfCounter * _sync_PrivateB;
-  static PerfCounter * _sync_MonInCirculation;
-  static PerfCounter * _sync_MonScavenged;
-  static PerfCounter * _sync_Inflations;
-  static PerfCounter * _sync_Deflations;
-  static PerfLongVariable * _sync_MonExtant;
-
- public:
-  static int Knob_Verbose;
-  static int Knob_VerifyInUse;
-  static int Knob_SpinLimit;
-  void* operator new (size_t size) throw() {
-    return AllocateHeap(size, mtInternal);
-  }
-  void* operator new[] (size_t size) throw() {
-    return operator new (size);
-  }
-  void operator delete(void* p) {
-    FreeHeap(p, mtInternal);
-  }
-  void operator delete[] (void *p) {
-    operator delete(p);
-  }
 };
 
 #undef TEVENT
--- a/hotspot/src/share/vm/runtime/objectMonitor.inline.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/objectMonitor.inline.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,15 +40,11 @@
   _header = hdr;
 }
 
-inline intptr_t ObjectMonitor::count() const {
+inline jint ObjectMonitor::count() const {
   return _count;
 }
 
-inline void ObjectMonitor::set_count(intptr_t count) {
-  _count= count;
-}
-
-inline intptr_t ObjectMonitor::waiters() const {
+inline jint ObjectMonitor::waiters() const {
   return _waiters;
 }
 
@@ -61,7 +57,7 @@
   assert(_count == 0, "Fatal logic error in ObjectMonitor count!");
   assert(_waiters == 0, "Fatal logic error in ObjectMonitor waiters!");
   assert(_recursions == 0, "Fatal logic error in ObjectMonitor recursions!");
-  assert(_object, "Fatal logic error in ObjectMonitor object!");
+  assert(_object != NULL, "Fatal logic error in ObjectMonitor object!");
   assert(_owner == 0, "Fatal logic error in ObjectMonitor owner!");
 
   _header = NULL;
@@ -85,7 +81,6 @@
   if (THREAD != _owner) {
     if (THREAD->is_lock_owned((address) _owner)) {
       _owner = THREAD;  // regain ownership of inflated monitor
-      OwnerIsThread = 1 ;
       assert (_recursions == 0, "invariant") ;
     } else {
       check_slow(THREAD);
@@ -97,7 +92,7 @@
 
 
 // return number of threads contending for this monitor
-inline intptr_t ObjectMonitor::contentions() const {
+inline jint ObjectMonitor::contentions() const {
   return _count;
 }
 
--- a/hotspot/src/share/vm/runtime/synchronizer.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/synchronizer.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "memory/padded.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/markOop.hpp"
 #include "oops/oop.inline.hpp"
@@ -110,6 +111,8 @@
 #define NINFLATIONLOCKS 256
 static volatile intptr_t InflationLocks[NINFLATIONLOCKS];
 
+// gBlockList is really PaddedEnd<ObjectMonitor> *, but we don't
+// want to expose the PaddedEnd template more than necessary.
 ObjectMonitor * ObjectSynchronizer::gBlockList = NULL;
 ObjectMonitor * volatile ObjectSynchronizer::gFreeList  = NULL;
 ObjectMonitor * volatile ObjectSynchronizer::gOmInUseList  = NULL;
@@ -410,16 +413,15 @@
 // performed by the CPU(s) or platform.
 
 struct SharedGlobals {
+  char         _pad_prefix[DEFAULT_CACHE_LINE_SIZE];
   // These are highly shared mostly-read variables.
-  // To avoid false-sharing they need to be the sole occupants of a $ line.
-  double padPrefix[8];
+  // To avoid false-sharing they need to be the sole occupants of a cache line.
   volatile int stwRandom;
   volatile int stwCycle;
-
-  // Hot RW variables -- Sequester to avoid false-sharing
-  double padSuffix[16];
+  DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile int) * 2);
+  // Hot RW variable -- Sequester to avoid false-sharing
   volatile int hcSequence;
-  double padFinal[8];
+  DEFINE_PAD_MINUS_SIZE(2, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile int));
 };
 
 static SharedGlobals GVars;
@@ -780,18 +782,18 @@
 // Visitors ...
 
 void ObjectSynchronizer::monitors_iterate(MonitorClosure* closure) {
-  ObjectMonitor* block = gBlockList;
+  PaddedEnd<ObjectMonitor> * block = (PaddedEnd<ObjectMonitor> *)gBlockList;
   ObjectMonitor* mid;
   while (block) {
     assert(block->object() == CHAINMARKER, "must be a block header");
     for (int i = _BLOCKSIZE - 1; i > 0; i--) {
-      mid = block + i;
+      mid = (ObjectMonitor *)(block + i);
       oop object = (oop) mid->object();
       if (object != NULL) {
         closure->do_monitor(mid);
       }
     }
-    block = (ObjectMonitor*) block->FreeNext;
+    block = (PaddedEnd<ObjectMonitor> *) block->FreeNext;
   }
 }
 
@@ -806,10 +808,12 @@
 
 void ObjectSynchronizer::oops_do(OopClosure* f) {
   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
-  for (ObjectMonitor* block = gBlockList; block != NULL; block = next(block)) {
+  for (PaddedEnd<ObjectMonitor> * block =
+       (PaddedEnd<ObjectMonitor> *)gBlockList; block != NULL;
+       block = (PaddedEnd<ObjectMonitor> *)next(block)) {
     assert(block->object() == CHAINMARKER, "must be a block header");
     for (int i = 1; i < _BLOCKSIZE; i++) {
-      ObjectMonitor* mid = &block[i];
+      ObjectMonitor* mid = (ObjectMonitor *)&block[i];
       if (mid->object() != NULL) {
         f->do_oop((oop*)mid->object_addr());
       }
@@ -966,16 +970,29 @@
     // 3: allocate a block of new ObjectMonitors
     // Both the local and global free lists are empty -- resort to malloc().
     // In the current implementation objectMonitors are TSM - immortal.
+    // Ideally, we'd write "new ObjectMonitor[_BLOCKSIZE], but we want
+    // each ObjectMonitor to start at the beginning of a cache line,
+    // so we use align_size_up().
+    // A better solution would be to use C++ placement-new.
+    // BEWARE: As it stands currently, we don't run the ctors!
     assert(_BLOCKSIZE > 1, "invariant");
-    ObjectMonitor * temp = new ObjectMonitor[_BLOCKSIZE];
+    size_t neededsize = sizeof(PaddedEnd<ObjectMonitor>) * _BLOCKSIZE;
+    PaddedEnd<ObjectMonitor> * temp;
+    size_t aligned_size = neededsize + (DEFAULT_CACHE_LINE_SIZE - 1);
+    void* real_malloc_addr = (void *)NEW_C_HEAP_ARRAY(char, aligned_size,
+                                                      mtInternal);
+    temp = (PaddedEnd<ObjectMonitor> *)
+             align_size_up((intptr_t)real_malloc_addr,
+                           DEFAULT_CACHE_LINE_SIZE);
 
     // NOTE: (almost) no way to recover if allocation failed.
     // We might be able to induce a STW safepoint and scavenge enough
     // objectMonitors to permit progress.
     if (temp == NULL) {
-      vm_exit_out_of_memory(sizeof (ObjectMonitor[_BLOCKSIZE]), OOM_MALLOC_ERROR,
+      vm_exit_out_of_memory(neededsize, OOM_MALLOC_ERROR,
                             "Allocate ObjectMonitors");
     }
+    (void)memset((void *) temp, 0, neededsize);
 
     // Format the block.
     // initialize the linked list, each monitor points to its next
@@ -986,7 +1003,7 @@
     // look like: class Block { Block * next; int N; ObjectMonitor Body [N] ; }
 
     for (int i = 1; i < _BLOCKSIZE; i++) {
-      temp[i].FreeNext = &temp[i+1];
+      temp[i].FreeNext = (ObjectMonitor *)&temp[i+1];
     }
 
     // terminate the last monitor as the end of list
@@ -1141,10 +1158,6 @@
 }
 
 
-// Note that we could encounter some performance loss through false-sharing as
-// multiple locks occupy the same $ line.  Padding might be appropriate.
-
-
 ObjectMonitor * NOINLINE ObjectSynchronizer::inflate(Thread * Self,
                                                      oop object) {
   // Inflate mutates the heap ...
@@ -1210,7 +1223,6 @@
       // in which INFLATING appears in the mark.
       m->Recycle();
       m->_Responsible  = NULL;
-      m->OwnerIsThread = 0;
       m->_recursions   = 0;
       m->_SpinDuration = ObjectMonitor::Knob_SpinLimit;   // Consider: maintain by type/class
 
@@ -1257,8 +1269,8 @@
       m->set_header(dmw);
 
       // Optimization: if the mark->locker stack address is associated
-      // with this thread we could simply set m->_owner = Self and
-      // m->OwnerIsThread = 1. Note that a thread can inflate an object
+      // with this thread we could simply set m->_owner = Self.
+      // Note that a thread can inflate an object
       // that it has stack-locked -- as might happen in wait() -- directly
       // with CAS.  That is, we can avoid the xchg-NULL .... ST idiom.
       m->set_owner(mark->locker());
@@ -1302,7 +1314,6 @@
     m->set_header(mark);
     m->set_owner(NULL);
     m->set_object(object);
-    m->OwnerIsThread = 1;
     m->_recursions   = 0;
     m->_Responsible  = NULL;
     m->_SpinDuration = ObjectMonitor::Knob_SpinLimit;       // consider: keep metastats by type/class
@@ -1310,7 +1321,6 @@
     if (Atomic::cmpxchg_ptr (markOopDesc::encode(m), object->mark_addr(), mark) != mark) {
       m->set_object(NULL);
       m->set_owner(NULL);
-      m->OwnerIsThread = 0;
       m->Recycle();
       omRelease(Self, m, true);
       m = NULL;
@@ -1336,9 +1346,6 @@
   }
 }
 
-// Note that we could encounter some performance loss through false-sharing as
-// multiple locks occupy the same $ line.  Padding might be appropriate.
-
 
 // Deflate_idle_monitors() is called at all safepoints, immediately
 // after all mutators are stopped, but before any objects have moved.
@@ -1491,12 +1498,14 @@
       nInuse += gOmInUseCount;
     }
 
-  } else for (ObjectMonitor* block = gBlockList; block != NULL; block = next(block)) {
+  } else for (PaddedEnd<ObjectMonitor> * block =
+              (PaddedEnd<ObjectMonitor> *)gBlockList; block != NULL;
+              block = (PaddedEnd<ObjectMonitor> *)next(block)) {
     // Iterate over all extant monitors - Scavenge all idle monitors.
     assert(block->object() == CHAINMARKER, "must be a block header");
     nInCirculation += _BLOCKSIZE;
     for (int i = 1; i < _BLOCKSIZE; i++) {
-      ObjectMonitor* mid = &block[i];
+      ObjectMonitor* mid = (ObjectMonitor*)&block[i];
       oop obj = (oop) mid->object();
 
       if (obj == NULL) {
@@ -1648,18 +1657,18 @@
 
 // Verify all monitors in the monitor cache, the verification is weak.
 void ObjectSynchronizer::verify() {
-  ObjectMonitor* block = gBlockList;
+  PaddedEnd<ObjectMonitor> * block = (PaddedEnd<ObjectMonitor> *)gBlockList;
   ObjectMonitor* mid;
   while (block) {
     assert(block->object() == CHAINMARKER, "must be a block header");
     for (int i = 1; i < _BLOCKSIZE; i++) {
-      mid = block + i;
+      mid = (ObjectMonitor *)(block + i);
       oop object = (oop) mid->object();
       if (object != NULL) {
         mid->verify();
       }
     }
-    block = (ObjectMonitor*) block->FreeNext;
+    block = (PaddedEnd<ObjectMonitor> *) block->FreeNext;
   }
 }
 
@@ -1668,18 +1677,19 @@
 // the list of extant blocks without taking a lock.
 
 int ObjectSynchronizer::verify_objmon_isinpool(ObjectMonitor *monitor) {
-  ObjectMonitor* block = gBlockList;
+  PaddedEnd<ObjectMonitor> * block = (PaddedEnd<ObjectMonitor> *)gBlockList;
 
   while (block) {
     assert(block->object() == CHAINMARKER, "must be a block header");
-    if (monitor > &block[0] && monitor < &block[_BLOCKSIZE]) {
+    if (monitor > (ObjectMonitor *)&block[0] &&
+        monitor < (ObjectMonitor *)&block[_BLOCKSIZE]) {
       address mon = (address) monitor;
       address blk = (address) block;
       size_t diff = mon - blk;
-      assert((diff % sizeof(ObjectMonitor)) == 0, "check");
+      assert((diff % sizeof(PaddedEnd<ObjectMonitor>)) == 0, "check");
       return 1;
     }
-    block = (ObjectMonitor*) block->FreeNext;
+    block = (PaddedEnd<ObjectMonitor> *) block->FreeNext;
   }
   return 0;
 }
--- a/hotspot/src/share/vm/runtime/synchronizer.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/synchronizer.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -134,6 +134,8 @@
 
  private:
   enum { _BLOCKSIZE = 128 };
+  // gBlockList is really PaddedEnd<ObjectMonitor> *, but we don't
+  // want to expose the PaddedEnd template more than necessary.
   static ObjectMonitor* gBlockList;
   static ObjectMonitor * volatile gFreeList;
   // global monitor in use list, for moribund threads,
--- a/hotspot/src/share/vm/runtime/thread.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -1287,6 +1287,7 @@
 
   this->record_stack_base_and_size();
   this->initialize_thread_local_storage();
+  this->set_native_thread_name(this->name());
   this->set_active_handles(JNIHandleBlock::allocate_block());
   while (!_should_terminate) {
     assert(watcher_thread() == Thread::current(), "thread consistency check");
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -1070,8 +1070,8 @@
   volatile_nonstatic_field(ObjectMonitor,      _header,                                       markOop)                               \
   unchecked_nonstatic_field(ObjectMonitor,     _object,                                       sizeof(void *)) /* NOTE: no type */    \
   unchecked_nonstatic_field(ObjectMonitor,     _owner,                                        sizeof(void *)) /* NOTE: no type */    \
-  volatile_nonstatic_field(ObjectMonitor,      _count,                                        intptr_t)                              \
-  volatile_nonstatic_field(ObjectMonitor,      _waiters,                                      intptr_t)                              \
+  volatile_nonstatic_field(ObjectMonitor,      _count,                                        jint)                                  \
+  volatile_nonstatic_field(ObjectMonitor,      _waiters,                                      jint)                                  \
   volatile_nonstatic_field(ObjectMonitor,      _recursions,                                   intptr_t)                              \
   nonstatic_field(ObjectMonitor,               FreeNext,                                      ObjectMonitor*)                        \
   volatile_nonstatic_field(BasicLock,          _displaced_header,                             markOop)                               \
@@ -2507,6 +2507,12 @@
   declare_constant(Deoptimization::Action_make_not_compilable)            \
   declare_constant(Deoptimization::Action_LIMIT)                          \
                                                                           \
+  /***************************************************/                   \
+  /* DEFAULT_CACHE_LINE_SIZE (globalDefinitions.hpp) */                   \
+  /***************************************************/                   \
+                                                                          \
+  declare_constant(DEFAULT_CACHE_LINE_SIZE)                               \
+                                                                          \
   /*********************/                                                 \
   /* Matcher (C2 only) */                                                 \
   /*********************/                                                 \
--- a/hotspot/src/share/vm/runtime/vmThread.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/runtime/vmThread.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -241,6 +241,7 @@
   assert(this == vm_thread(), "check");
 
   this->initialize_thread_local_storage();
+  this->set_native_thread_name(this->name());
   this->record_stack_base_and_size();
   // Notify_lock wait checks on active_handles() to rewait in
   // case of spurious wakeup, it should wait on the last
--- a/hotspot/src/share/vm/services/mallocTracker.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/services/mallocTracker.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -51,14 +51,6 @@
   return amount;
 }
 
-
-void MallocMemorySnapshot::reset() {
-  _tracking_header.reset();
-  for (int index = 0; index < mt_number_of_types; index ++) {
-    _malloc[index].reset();
-  }
-}
-
 // Make adjustment by subtracting chunks used by arenas
 // from total chunks to get total free chunck size
 void MallocMemorySnapshot::make_adjustment() {
@@ -116,14 +108,9 @@
 bool MallocTracker::transition(NMT_TrackingLevel from, NMT_TrackingLevel to) {
   assert(from != NMT_off, "Can not transition from off state");
   assert(to != NMT_off, "Can not transition to off state");
-  if (from == NMT_minimal) {
-    MallocMemorySummary::reset();
-  }
+  assert (from != NMT_minimal, "cannot transition from minimal state");
 
-  if (to == NMT_detail) {
-    assert(from == NMT_minimal || from == NMT_summary, "Just check");
-    return MallocSiteTable::initialize();
-  } else if (from == NMT_detail) {
+  if (from == NMT_detail) {
     assert(to == NMT_minimal || to == NMT_summary, "Just check");
     MallocSiteTable::shutdown();
   }
--- a/hotspot/src/share/vm/services/mallocTracker.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/services/mallocTracker.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -51,14 +51,6 @@
     DEBUG_ONLY(_peak_size  = 0;)
   }
 
-  // Reset counters
-  void reset() {
-    _size  = 0;
-    _count = 0;
-    DEBUG_ONLY(_peak_size = 0;)
-    DEBUG_ONLY(_peak_count = 0;)
-  }
-
   inline void allocate(size_t sz) {
     Atomic::add(1, (volatile MemoryCounterType*)&_count);
     if (sz > 0) {
@@ -124,11 +116,6 @@
     _arena.resize(sz);
   }
 
-  void reset() {
-    _malloc.reset();
-    _arena.reset();
-  }
-
   inline size_t malloc_size()  const { return _malloc.size(); }
   inline size_t malloc_count() const { return _malloc.count();}
   inline size_t arena_size()   const { return _arena.size();  }
@@ -176,8 +163,6 @@
     return s->by_type(mtThreadStack)->malloc_count();
   }
 
-  void reset();
-
   void copy_to(MallocMemorySnapshot* s) {
     s->_tracking_header = _tracking_header;
     for (int index = 0; index < mt_number_of_types; index ++) {
@@ -240,11 +225,6 @@
      return as_snapshot()->malloc_overhead()->size();
    }
 
-   // Reset all counters to zero
-   static void reset() {
-     as_snapshot()->reset();
-   }
-
   static MallocMemorySnapshot* as_snapshot() {
     return (MallocMemorySnapshot*)_snapshot;
   }
--- a/hotspot/src/share/vm/services/memBaseline.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/services/memBaseline.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -90,10 +90,6 @@
     _class_count(0) {
   }
 
-  ~MemBaseline() {
-    reset();
-  }
-
   bool baseline(bool summaryOnly = true);
 
   BaselineType baseline_type() const { return _baseline_type; }
@@ -169,8 +165,7 @@
   // reset the baseline for reuse
   void reset() {
     _baseline_type = Not_baselined;
-    _malloc_memory_snapshot.reset();
-    _virtual_memory_snapshot.reset();
+    // _malloc_memory_snapshot and _virtual_memory_snapshot are copied over.
     _class_count  = 0;
 
     _malloc_sites.clear();
--- a/hotspot/src/share/vm/services/memReporter.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/services/memReporter.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -96,20 +96,6 @@
   size_t                  _class_count;
 
  public:
-  // Report summary tracking data from global snapshots directly.
-  // This constructor is used for final reporting and hs_err reporting.
-  MemSummaryReporter(MallocMemorySnapshot* malloc_snapshot,
-    VirtualMemorySnapshot* vm_snapshot, outputStream* output,
-    size_t class_count = 0, size_t scale = K) :
-    MemReporterBase(output, scale),
-    _malloc_snapshot(malloc_snapshot),
-    _vm_snapshot(vm_snapshot) {
-    if (class_count == 0) {
-      _class_count = InstanceKlass::number_of_instance_classes();
-    } else {
-      _class_count = class_count;
-    }
-  }
   // This constructor is for normal reporting from a recent baseline.
   MemSummaryReporter(MemBaseline& baseline, outputStream* output,
     size_t scale = K) : MemReporterBase(output, scale),
--- a/hotspot/src/share/vm/services/memTracker.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/services/memTracker.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -144,11 +144,9 @@
 }
 
 
-// Shutdown can only be issued via JCmd, and NMT JCmd is serialized
-// by lock
+// Shutdown can only be issued via JCmd, and NMT JCmd is serialized by lock
 void MemTracker::shutdown() {
-  // We can only shutdown NMT to minimal tracking level if it is
-  // ever on.
+  // We can only shutdown NMT to minimal tracking level if it is ever on.
   if (tracking_level () > NMT_minimal) {
     transition_to(NMT_minimal);
   }
@@ -157,45 +155,36 @@
 bool MemTracker::transition_to(NMT_TrackingLevel level) {
   NMT_TrackingLevel current_level = tracking_level();
 
+  assert(level != NMT_off || current_level == NMT_off, "Cannot transition NMT to off");
+
   if (current_level == level) {
     return true;
   } else if (current_level > level) {
-    // Downgrade tracking level, we want to lower the tracking
-    // level first
+    // Downgrade tracking level, we want to lower the tracking level first
     _tracking_level = level;
     // Make _tracking_level visible immediately.
     OrderAccess::fence();
     VirtualMemoryTracker::transition(current_level, level);
     MallocTracker::transition(current_level, level);
-
-    if (level == NMT_minimal) _baseline.reset();
   } else {
-    VirtualMemoryTracker::transition(current_level, level);
-    MallocTracker::transition(current_level, level);
-
-    _tracking_level = level;
-    // Make _tracking_level visible immediately.
-    OrderAccess::fence();
+    // Upgrading tracking level is not supported and has never been supported.
+    // Allocating and deallocating malloc tracking structures is not thread safe and
+    // leads to inconsistencies unless a lot coarser locks are added.
   }
-
   return true;
 }
 
-void MemTracker::final_report(outputStream* output) {
-  assert(output != NULL, "No output stream");
-  if (tracking_level() >= NMT_summary) {
-    MallocMemorySnapshot* malloc_memory_snapshot =
-      MallocMemorySummary::as_snapshot();
-    malloc_memory_snapshot->make_adjustment();
-
-    VirtualMemorySnapshot* virtual_memory_snapshot =
-      VirtualMemorySummary::as_snapshot();
-
-    MemSummaryReporter rptr(malloc_memory_snapshot,
-      virtual_memory_snapshot, output);
-    rptr.report();
-    // shutdown NMT, the data no longer accurate
-    shutdown();
+void MemTracker::report(bool summary_only, outputStream* output) {
+ assert(output != NULL, "No output stream");
+  MemBaseline baseline;
+  if (baseline.baseline(summary_only)) {
+    if (summary_only) {
+      MemSummaryReporter rpt(baseline, output);
+      rpt.report();
+    } else {
+      MemDetailReporter rpt(baseline, output);
+      rpt.report();
+    }
   }
 }
 
--- a/hotspot/src/share/vm/services/memTracker.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/services/memTracker.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -70,6 +70,7 @@
   static inline void release_thread_stack(void* addr, size_t size) { }
 
   static void final_report(outputStream*) { }
+  static void error_report(outputStream*) { }
 };
 
 #else
@@ -270,13 +271,20 @@
   // other tools.
   static inline Mutex* query_lock() { return _query_lock; }
 
-  // Make a final report and shutdown.
-  // This function generates summary report without creating snapshots,
-  // to avoid additional memory allocation. It uses native memory summary
-  // counters, and makes adjustment to them, once the adjustment is made,
-  // the counters are no longer accurate. As the result, this function
-  // should only be used for final reporting before shutting down.
-  static void final_report(outputStream*);
+  // Make a final report or report for hs_err file.
+  static void error_report(outputStream* output) {
+    if (tracking_level() >= NMT_summary) {
+      report(true, output);  // just print summary for error case.
+    }
+   }
+
+  static void final_report(outputStream* output) {
+    NMT_TrackingLevel level = tracking_level();
+    if (level >= NMT_summary) {
+      report(level == NMT_summary, output);
+    }
+  }
+
 
   // Stored baseline
   static inline MemBaseline& get_baseline() {
@@ -291,6 +299,7 @@
 
  private:
   static NMT_TrackingLevel init_tracking_level();
+  static void report(bool summary_only, outputStream* output);
 
  private:
   // Tracking level
--- a/hotspot/src/share/vm/services/virtualMemoryTracker.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/services/virtualMemoryTracker.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -443,26 +443,28 @@
 bool VirtualMemoryTracker::walk_virtual_memory(VirtualMemoryWalker* walker) {
   assert(_reserved_regions != NULL, "Sanity check");
   ThreadCritical tc;
-  LinkedListNode<ReservedMemoryRegion>* head = _reserved_regions->head();
-  while (head != NULL) {
-    const ReservedMemoryRegion* rgn = head->peek();
-    if (!walker->do_allocation_site(rgn)) {
-      return false;
+  // Check that the _reserved_regions haven't been deleted.
+  if (_reserved_regions != NULL) {
+    LinkedListNode<ReservedMemoryRegion>* head = _reserved_regions->head();
+    while (head != NULL) {
+      const ReservedMemoryRegion* rgn = head->peek();
+      if (!walker->do_allocation_site(rgn)) {
+        return false;
+      }
+      head = head->next();
     }
-    head = head->next();
-  }
+   }
   return true;
 }
 
 // Transition virtual memory tracking level.
 bool VirtualMemoryTracker::transition(NMT_TrackingLevel from, NMT_TrackingLevel to) {
-  if (from == NMT_minimal) {
-    assert(to == NMT_summary || to == NMT_detail, "Just check");
-    VirtualMemorySummary::reset();
-  } else if (to == NMT_minimal) {
+  assert (from != NMT_minimal, "cannot convert from the lowest tracking level to anything");
+  if (to == NMT_minimal) {
     assert(from == NMT_summary || from == NMT_detail, "Just check");
     // Clean up virtual memory tracking data structures.
     ThreadCritical tc;
+    // Check for potential race with other thread calling transition
     if (_reserved_regions != NULL) {
       delete _reserved_regions;
       _reserved_regions = NULL;
--- a/hotspot/src/share/vm/services/virtualMemoryTracker.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/services/virtualMemoryTracker.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -62,11 +62,6 @@
     _committed -= sz;
   }
 
-  void reset() {
-    _reserved  = 0;
-    _committed = 0;
-  }
-
   inline size_t reserved()  const { return _reserved;  }
   inline size_t committed() const { return _committed; }
 };
@@ -123,12 +118,6 @@
     return amount;
   }
 
-  inline void reset() {
-    for (int index = 0; index < mt_number_of_types; index ++) {
-      _virtual_memory[index].reset();
-    }
-  }
-
   void copy_to(VirtualMemorySnapshot* s) {
     for (int index = 0; index < mt_number_of_types; index ++) {
       s->_virtual_memory[index] = _virtual_memory[index];
@@ -174,10 +163,6 @@
     as_snapshot()->copy_to(s);
   }
 
-  static inline void reset() {
-    as_snapshot()->reset();
-  }
-
   static VirtualMemorySnapshot* as_snapshot() {
     return (VirtualMemorySnapshot*)_snapshot;
   }
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Thu Oct 16 17:36:47 2014 +0000
@@ -540,7 +540,9 @@
 
 
 // The expected size in bytes of a cache line, used to pad data structures.
-#define DEFAULT_CACHE_LINE_SIZE 64
+#ifndef DEFAULT_CACHE_LINE_SIZE
+  #define DEFAULT_CACHE_LINE_SIZE 64
+#endif
 
 
 //----------------------------------------------------------------------------------------------------
--- a/hotspot/src/share/vm/utilities/vmError.cpp	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/src/share/vm/utilities/vmError.cpp	Thu Oct 16 17:36:47 2014 +0000
@@ -740,7 +740,7 @@
 
   STEP(228, "(Native Memory Tracking)" )
      if (_verbose) {
-       MemTracker::final_report(st);
+       MemTracker::error_report(st);
      }
 
   STEP(230, "" )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/NMT/ChangeTrackingLevel.java	Thu Oct 16 17:36:47 2014 +0000
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8059100
+ * @summary Test that you can decrease NMT tracking level but not increase it.
+ * @key nmt
+ * @library /testlibrary /testlibrary/whitebox
+ * @build ChangeTrackingLevel
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail ChangeTrackingLevel
+ */
+
+import com.oracle.java.testlibrary.*;
+import sun.hotspot.WhiteBox;
+
+public class ChangeTrackingLevel {
+
+    public static WhiteBox wb = WhiteBox.getWhiteBox();
+    public static void main(String args[]) throws Exception {
+        boolean testChangeLevel = wb.NMTChangeTrackingLevel();
+        if (testChangeLevel) {
+            System.out.println("NMT level change test passed.");
+        } else {
+            // it also fails if the VM asserts.
+            throw new RuntimeException("NMT level change test failed");
+        }
+    }
+};
--- a/hotspot/test/runtime/NMT/PrintNMTStatistics.java	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/test/runtime/NMT/PrintNMTStatistics.java	Thu Oct 16 17:36:47 2014 +0000
@@ -24,43 +24,40 @@
 /*
  * @test
  * @key nmt regression
- * @bug 8005936
- * @summary Make sure PrintNMTStatistics works on normal JVM exit
- * @library /testlibrary /testlibrary/whitebox
- * @build PrintNMTStatistics
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
- *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main PrintNMTStatistics
+ * @bug 8005936 8058606
+ * @summary Verify PrintNMTStatistics on normal JVM exit for detail and summary tracking level
+ * @library /testlibrary
  */
 
 import com.oracle.java.testlibrary.*;
 
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import sun.hotspot.WhiteBox;
-
 public class PrintNMTStatistics {
 
-  public static void main(String args[]) throws Exception {
-
-    // We start a new java process running with an argument and use WB API to ensure
-    // we have data for NMT on VM exit
-    if (args.length > 0) {
-      return;
-    }
+    public static void main(String args[]) throws Exception {
 
     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-        "-XX:+UnlockDiagnosticVMOptions",
-        "-Xbootclasspath/a:.",
-        "-XX:+WhiteBoxAPI",
-        "-XX:NativeMemoryTracking=summary",
-        "-XX:+PrintNMTStatistics",
-        "PrintNMTStatistics",
-        "test");
+      "-XX:+UnlockDiagnosticVMOptions",
+      "-XX:+PrintNMTStatistics",
+      "-XX:NativeMemoryTracking=detail",
+      "-version");
+
+    OutputAnalyzer output_detail = new OutputAnalyzer(pb.start());
+    output_detail.shouldContain("Virtual memory map:");
+    output_detail.shouldContain("Details:");
+    output_detail.shouldNotContain("error");
+    output_detail.shouldHaveExitValue(0);
 
-    OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    output.shouldContain("Java Heap (reserved=");
-    output.shouldNotContain("error");
-    output.shouldHaveExitValue(0);
-  }
+    ProcessBuilder pb1 = ProcessTools.createJavaProcessBuilder(
+      "-XX:+UnlockDiagnosticVMOptions",
+      "-XX:+PrintNMTStatistics",
+      "-XX:NativeMemoryTracking=summary",
+      "-version");
+
+    OutputAnalyzer output_summary = new OutputAnalyzer(pb1.start());
+    output_summary.shouldContain("Java Heap (reserved=");
+    output_summary.shouldNotContain("Virtual memory map:");
+    output_summary.shouldNotContain("Details:");
+    output_summary.shouldNotContain("error");
+    output_summary.shouldHaveExitValue(0);
+    }
 }
--- a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Thu Oct 16 15:59:39 2014 +0000
+++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Thu Oct 16 17:36:47 2014 +0000
@@ -101,6 +101,7 @@
   public native void NMTOverflowHashBucket(long num);
   public native long NMTMallocWithPseudoStack(long size, int index);
   public native boolean NMTIsDetailSupported();
+  public native boolean NMTChangeTrackingLevel();
 
   // Compiler
   public native void    deoptimizeAll();