changeset 17609:c7601cc83d0f

Merge
author lana
date Fri, 02 Sep 2016 02:41:37 +0000
parents ffd7ba8f2bf8 e2d28c613133
children 04b6837b1be5
files test/sun/security/krb5/auto/unreachable.krb5.conf
diffstat 327 files changed, 25627 insertions(+), 3616 deletions(-) [+]
line wrap: on
line diff
--- a/make/GenerateClasslist.gmk	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/GenerateClasslist.gmk	Fri Sep 02 02:41:37 2016 +0000
@@ -50,6 +50,8 @@
 
 CLASSLIST_FILE := $(SUPPORT_OUTPUTDIR)/classlist/classlist
 
+JLI_TRACE_FILE := $(SUPPORT_OUTPUTDIR)/classlist/jli_trace.out
+
 # If an external buildjdk has been supplied, we don't build a separate interim
 # image, so just use the external build jdk instead.
 ifeq ($(EXTERNAL_BUILDJDK), true)
@@ -59,13 +61,11 @@
 $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
 	$(call MakeDir, $(@D))
 	$(call LogInfo, Generating lib/classlist)
-	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.tmp \
+	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \
+	    -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
 	    -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
-	    build.tools.classlist.HelloClasslist $(LOG_DEBUG) 2>&1
-        # Filter out generated classes, remove after JDK-8149977
-	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \
-	    -Xshare:dump -XX:SharedClassListFile=$@.tmp $(LOG_DEBUG) 2>&1
-	$(RM) $@.tmp
+	    build.tools.classlist.HelloClasslist \
+	    $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE)
 
 TARGETS += $(CLASSLIST_FILE)
 
--- a/make/gensrc/GensrcVarHandles.gmk	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/gensrc/GensrcVarHandles.gmk	Fri Sep 02 02:41:37 2016 +0000
@@ -44,6 +44,10 @@
     $1_ARGS += -KAtomicAdd
   endif
 
+  ifneq ($$(findstring $$($1_Type), Boolean Byte Short Char Int Long), )
+    $1_ARGS += -KBitwise
+  endif
+
   ifneq ($$(findstring $$($1_Type), Byte Short Char), )
     $1_ARGS += -KShorterThanInt
   endif
@@ -101,6 +105,7 @@
 
     $1_ARGS += -KCAS
     $1_ARGS += -KAtomicAdd
+    $1_ARGS += -KBitwise
   endif
 
   ifeq ($$($1_Type), Long)
@@ -113,6 +118,7 @@
 
     $1_ARGS += -KCAS
     $1_ARGS += -KAtomicAdd
+    $1_ARGS += -KBitwise
   endif
 
   ifeq ($$($1_Type), Float)
--- a/make/mapfiles/libawt/mapfile-mawt-vers	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libawt/mapfile-mawt-vers	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -22,259 +22,261 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-#		Java_java_awt_KeyboardFocusManager_getGlobalHeavyweightFocusOwner;
 
 # Define public interface.
 # These are the libmawt exports. See mapfile-vers for the libawt exports
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
-		Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
-		Java_java_awt_AWTEvent_nativeSetSource;
-		Java_java_awt_Checkbox_initIDs;
-		Java_java_awt_Component_initIDs;
-		Java_java_awt_Dialog_initIDs;
-		Java_java_awt_Font_initIDs;
-                Java_java_awt_KeyboardFocusManager_initIDs;
-		Java_java_awt_Menu_initIDs;
-		Java_java_awt_MenuComponent_initIDs;
-		Java_java_awt_MenuItem_initIDs;
-		Java_java_awt_Scrollbar_initIDs;
-		Java_java_awt_ScrollPane_initIDs;
-		Java_java_awt_TextArea_initIDs;
-		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
-                Java_sun_awt_UNIXToolkit_check_1gtk;
-                Java_sun_awt_UNIXToolkit_load_1gtk;
-                Java_sun_awt_UNIXToolkit_unload_1gtk;
-                Java_sun_awt_UNIXToolkit_load_1stock_1icon;
-                Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
-		Java_sun_awt_UNIXToolkit_nativeSync;
-		Java_sun_awt_X11InputMethod_disposeXIC;
-		Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_resetXIC;
-		Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-		Java_sun_awt_SunToolkit_closeSplashScreen;
-		Java_sun_awt_PlatformFont_initIDs;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_dispose;
-		Java_sun_awt_X11GraphicsConfig_pGetBounds;
-		Java_sun_awt_X11GraphicsConfig_getNumColors;
-		Java_sun_awt_X11GraphicsConfig_getXResolution;
-		Java_sun_awt_X11GraphicsConfig_getYResolution;
-		Java_sun_awt_X11GraphicsConfig_createBackBuffer;
-		Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
-		Java_sun_awt_X11GraphicsConfig_swapBuffers;
-                Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
-		Java_sun_awt_X11GraphicsDevice_isDBESupported;
-		Java_sun_awt_X11GraphicsDevice_getDisplay;
-		Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
-		Java_sun_awt_X11GraphicsDevice_getNumConfigs;
-		Java_sun_awt_X11GraphicsDevice_initIDs;
-                Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
-                Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
-                Java_sun_awt_X11GraphicsDevice_configDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_resetNativeData;
-		Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
-		Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
-		Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-		Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
-		Java_sun_awt_X11GraphicsEnvironment_initDisplay;
-                Java_sun_awt_X11GraphicsEnvironment_initGLX;
-		Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
-		Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-		Java_sun_awt_X11GraphicsEnvironment_initXRender;
-		Java_java_awt_AWTEvent_initIDs;
-		Java_java_awt_Button_initIDs;
-		Java_java_awt_Container_initIDs;
-		Java_java_awt_Cursor_finalizeImpl;
-		Java_java_awt_Cursor_initIDs;
-		Java_java_awt_Event_initIDs;
-		Java_java_awt_event_InputEvent_initIDs;
-		Java_java_awt_event_KeyEvent_initIDs;
-		Java_java_awt_FileDialog_initIDs;
-		Java_java_awt_Frame_initIDs;
-		Java_java_awt_Insets_initIDs;
-		Java_java_awt_TextField_initIDs;
-		Java_java_awt_Window_initIDs;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_initIDs;
-		Java_sun_awt_X11GraphicsConfig_makeColorModel;
-		Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
-                Java_sun_awt_X11GraphicsDevice_getConfigColormap;
-                Java_sun_awt_X11GraphicsDevice_getConfigDepth;
+        Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
+        Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
+        Java_java_awt_AWTEvent_nativeSetSource;
+        Java_java_awt_Checkbox_initIDs;
+        Java_java_awt_Component_initIDs;
+        Java_java_awt_Dialog_initIDs;
+        Java_java_awt_Font_initIDs;
+        Java_java_awt_KeyboardFocusManager_initIDs;
+        Java_java_awt_Menu_initIDs;
+        Java_java_awt_MenuComponent_initIDs;
+        Java_java_awt_MenuItem_initIDs;
+        Java_java_awt_Scrollbar_initIDs;
+        Java_java_awt_ScrollPane_initIDs;
+        Java_java_awt_TextArea_initIDs;
+        Java_sun_awt_FontDescriptor_initIDs;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
+        Java_sun_awt_UNIXToolkit_check_1gtk;
+        Java_sun_awt_UNIXToolkit_load_1gtk;
+        Java_sun_awt_UNIXToolkit_unload_1gtk;
+        Java_sun_awt_UNIXToolkit_load_1stock_1icon;
+        Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
+        Java_sun_awt_UNIXToolkit_nativeSync;
+        Java_sun_awt_X11InputMethod_disposeXIC;
+        Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_resetXIC;
+        Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_turnoffStatusWindow;
+        Java_sun_awt_SunToolkit_closeSplashScreen;
+        Java_sun_awt_PlatformFont_initIDs;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_dispose;
+        Java_sun_awt_X11GraphicsConfig_pGetBounds;
+        Java_sun_awt_X11GraphicsConfig_getNumColors;
+        Java_sun_awt_X11GraphicsConfig_getXResolution;
+        Java_sun_awt_X11GraphicsConfig_getYResolution;
+        Java_sun_awt_X11GraphicsConfig_createBackBuffer;
+        Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
+        Java_sun_awt_X11GraphicsConfig_swapBuffers;
+        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+        Java_sun_awt_X11GraphicsDevice_isDBESupported;
+        Java_sun_awt_X11GraphicsDevice_getDisplay;
+        Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
+        Java_sun_awt_X11GraphicsDevice_getNumConfigs;
+        Java_sun_awt_X11GraphicsDevice_initIDs;
+        Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
+        Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
+        Java_sun_awt_X11GraphicsDevice_configDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_resetNativeData;
+        Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
+        Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
+        Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
+        Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
+        Java_sun_awt_X11GraphicsEnvironment_initDisplay;
+        Java_sun_awt_X11GraphicsEnvironment_initGLX;
+        Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
+        Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
+        Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        Java_java_awt_AWTEvent_initIDs;
+        Java_java_awt_Button_initIDs;
+        Java_java_awt_Container_initIDs;
+        Java_java_awt_Cursor_finalizeImpl;
+        Java_java_awt_Cursor_initIDs;
+        Java_java_awt_Event_initIDs;
+        Java_java_awt_event_InputEvent_initIDs;
+        Java_java_awt_event_KeyEvent_initIDs;
+        Java_java_awt_FileDialog_initIDs;
+        Java_java_awt_Frame_initIDs;
+        Java_java_awt_Insets_initIDs;
+        Java_java_awt_TextField_initIDs;
+        Java_java_awt_Window_initIDs;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_initIDs;
+        Java_sun_awt_X11GraphicsConfig_makeColorModel;
+        Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
+        Java_sun_awt_X11GraphicsDevice_getConfigColormap;
+        Java_sun_awt_X11GraphicsDevice_getConfigDepth;
 
-                Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
-                Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
-		Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
-		Java_sun_java2d_x11_X11Renderer_XFillSpans;
-		Java_sun_java2d_x11_X11Renderer_XDrawArc;
-		Java_sun_java2d_x11_X11Renderer_XDrawLine;
-		Java_sun_java2d_x11_X11Renderer_XDrawOval;
-		Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-		Java_sun_java2d_x11_X11Renderer_XDrawRect;
-		Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
-                Java_sun_java2d_x11_X11Renderer_XDoPath;
-		Java_sun_java2d_x11_X11Renderer_XFillArc;
-		Java_sun_java2d_x11_X11Renderer_XFillOval;
-		Java_sun_java2d_x11_X11Renderer_XFillPoly;
-		Java_sun_java2d_x11_X11Renderer_XFillRect;
-		Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
-		Java_sun_java2d_x11_X11Renderer_devCopyArea;
-		Java_sun_java2d_x11_X11SurfaceData_initIDs;
-		Java_sun_java2d_x11_X11SurfaceData_initOps;
-		Java_sun_java2d_x11_X11SurfaceData_initSurface;
-		Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
-		Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
-                Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
+        Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
+        Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
+        Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
+        Java_sun_java2d_x11_X11Renderer_XFillSpans;
+        Java_sun_java2d_x11_X11Renderer_XDrawArc;
+        Java_sun_java2d_x11_X11Renderer_XDrawLine;
+        Java_sun_java2d_x11_X11Renderer_XDrawOval;
+        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
+        Java_sun_java2d_x11_X11Renderer_XDrawRect;
+        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XDoPath;
+        Java_sun_java2d_x11_X11Renderer_XFillArc;
+        Java_sun_java2d_x11_X11Renderer_XFillOval;
+        Java_sun_java2d_x11_X11Renderer_XFillPoly;
+        Java_sun_java2d_x11_X11Renderer_XFillRect;
+        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
+        Java_sun_java2d_x11_X11Renderer_devCopyArea;
+        Java_sun_java2d_x11_X11SurfaceData_initIDs;
+        Java_sun_java2d_x11_X11SurfaceData_initOps;
+        Java_sun_java2d_x11_X11SurfaceData_initSurface;
+        Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
+        Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
+        Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
 
-		Java_sun_java2d_x11_XSurfaceData_initOps;
-		Java_sun_java2d_x11_XSurfaceData_XCreateGC;
-		Java_sun_java2d_x11_XSurfaceData_XResetClip;
-		Java_sun_java2d_x11_XSurfaceData_XSetClip;
-		Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-		Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
-		Java_sun_java2d_x11_XSurfaceData_setInvalid;
-		Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
-		Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
-		Java_sun_java2d_xr_XRSurfaceData_initIDs;
-		Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
-		Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
-		Java_sun_java2d_xr_XRBackendNative_initIDs;
-		Java_sun_java2d_xr_XIDGenerator_bufferXIDs;
-		Java_sun_java2d_xr_XRBackendNative_freeGC;
-		Java_sun_java2d_xr_XRBackendNative_createGC;
-		Java_sun_java2d_xr_XRBackendNative_createPixmap;
-		Java_sun_java2d_xr_XRBackendNative_createPictureNative;
-		Java_sun_java2d_xr_XRBackendNative_freePicture;
-		Java_sun_java2d_xr_XRBackendNative_freePixmap;
-		Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
-		Java_sun_java2d_xr_XRBackendNative_setGCExposures;
-		Java_sun_java2d_xr_XRBackendNative_setGCForeground;
-		Java_sun_java2d_xr_XRBackendNative_copyArea;
-		Java_sun_java2d_xr_XRBackendNative_renderComposite;
-		Java_sun_java2d_xr_XRBackendNative_renderRectangle;
-		Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
-		Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
-		Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
-		Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
-		Java_sun_java2d_xr_XRBackendNative_setFilter;
-		Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
-		Java_sun_java2d_xr_XRBackendNative_putMaskNative;
-		Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
-		Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
-		Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
-		Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
-		Java_sun_java2d_xr_XRBackendNative_setGCMode;
-		Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
-		Java_sun_java2d_xr_XRUtils_initFormatPtrs;
-		Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
-		XRT_DrawGlyphList;
+        Java_sun_java2d_x11_XSurfaceData_initOps;
+        Java_sun_java2d_x11_XSurfaceData_XCreateGC;
+        Java_sun_java2d_x11_XSurfaceData_XResetClip;
+        Java_sun_java2d_x11_XSurfaceData_XSetClip;
+        Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
+        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
+        Java_sun_java2d_x11_XSurfaceData_setInvalid;
+        Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
+        Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
+        Java_sun_java2d_xr_XRSurfaceData_initIDs;
+        Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
+        Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
+        Java_sun_java2d_xr_XRBackendNative_initIDs;
+        Java_sun_java2d_xr_XIDGenerator_bufferXIDs;
+        Java_sun_java2d_xr_XRBackendNative_freeGC;
+        Java_sun_java2d_xr_XRBackendNative_createGC;
+        Java_sun_java2d_xr_XRBackendNative_createPixmap;
+        Java_sun_java2d_xr_XRBackendNative_createPictureNative;
+        Java_sun_java2d_xr_XRBackendNative_freePicture;
+        Java_sun_java2d_xr_XRBackendNative_freePixmap;
+        Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
+        Java_sun_java2d_xr_XRBackendNative_setGCExposures;
+        Java_sun_java2d_xr_XRBackendNative_setGCForeground;
+        Java_sun_java2d_xr_XRBackendNative_copyArea;
+        Java_sun_java2d_xr_XRBackendNative_renderComposite;
+        Java_sun_java2d_xr_XRBackendNative_renderRectangle;
+        Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
+        Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_setFilter;
+        Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
+        Java_sun_java2d_xr_XRBackendNative_putMaskNative;
+        Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
+        Java_sun_java2d_xr_XRBackendNative_setGCMode;
+        Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
+        Java_sun_java2d_xr_XRUtils_initFormatPtrs;
+        Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
+        XRT_DrawGlyphList;
 
-                Java_sun_java2d_opengl_OGLContext_getOGLIdString;
-                Java_sun_java2d_opengl_OGLMaskFill_maskFill;
-                Java_sun_java2d_opengl_OGLRenderer_drawPoly;
-                Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer;
-                Java_sun_java2d_opengl_OGLSurfaceData_initTexture;
-                Java_sun_java2d_opengl_OGLSurfaceData_initFBObject;
-                Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer;
-                Java_sun_java2d_opengl_OGLSurfaceData_getTextureID;
-                Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget;
-                Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList;
-                Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo;
-                Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig;
-                Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities;
-                Java_sun_java2d_opengl_GLXSurfaceData_initOps;
+        Java_sun_java2d_opengl_OGLContext_getOGLIdString;
+        Java_sun_java2d_opengl_OGLMaskFill_maskFill;
+        Java_sun_java2d_opengl_OGLRenderer_drawPoly;
+        Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer;
+        Java_sun_java2d_opengl_OGLSurfaceData_initTexture;
+        Java_sun_java2d_opengl_OGLSurfaceData_initFBObject;
+        Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer;
+        Java_sun_java2d_opengl_OGLSurfaceData_getTextureID;
+        Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget;
+        Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList;
+        Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo;
+        Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig;
+        Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities;
+        Java_sun_java2d_opengl_GLXSurfaceData_initOps;
 
-                Java_sun_print_CUPSPrinter_initIDs;
-                Java_sun_print_CUPSPrinter_getCupsServer;
-                Java_sun_print_CUPSPrinter_getCupsPort;
-                Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-                Java_sun_print_CUPSPrinter_canConnect;
-                Java_sun_print_CUPSPrinter_getMedia;
-                Java_sun_print_CUPSPrinter_getPageSizes;
-                Java_sun_print_CUPSPrinter_getResolutions;
+        Java_sun_print_CUPSPrinter_initIDs;
+        Java_sun_print_CUPSPrinter_getCupsServer;
+        Java_sun_print_CUPSPrinter_getCupsPort;
+        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
+        Java_sun_print_CUPSPrinter_canConnect;
+        Java_sun_print_CUPSPrinter_getMedia;
+        Java_sun_print_CUPSPrinter_getPageSizes;
+        Java_sun_print_CUPSPrinter_getResolutions;
 
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
 
-		awt_display;
-		awt_Lock;
-		awt_Unlock;
-	        awt_GetDrawingSurface;
-	        awt_FreeDrawingSurface;
-	        awt_GetComponent;
+        awt_display;
+        awt_Lock;
+        awt_Unlock;
+        awt_GetDrawingSurface;
+        awt_FreeDrawingSurface;
+        awt_GetComponent;
+        awt_CreateEmbeddedFrame;
+        awt_SetBounds;
+        awt_SynthesizeWindowActivation;
 
-		X11SurfaceData_GetOps;
-		getDefaultConfig;
-                Java_sun_font_FontConfigManager_getFontConfig;
-                Java_sun_font_FontConfigManager_getFontConfigAASettings;
-		Java_sun_awt_FcFontManager_getFontPathNative;
-		Java_sun_font_SunFontManager_populateFontFileNameMap;
+        X11SurfaceData_GetOps;
+        getDefaultConfig;
+            Java_sun_font_FontConfigManager_getFontConfig;
+            Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_awt_FcFontManager_getFontPathNative;
+        Java_sun_font_SunFontManager_populateFontFileNameMap;
 
-		# CDE private entry point
-		Java_sun_awt_motif_XsessionWMcommand;
-		Java_sun_awt_motif_XsessionWMcommand_New;
+        # CDE private entry point
+        Java_sun_awt_motif_XsessionWMcommand;
+        Java_sun_awt_motif_XsessionWMcommand_New;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		AWTCountFonts;
-                AWTLoadFont;
-                AWTFreeFont;
-                AWTFontAscent;
-                AWTFontDescent;
-                AWTFontMinByte1;
-                AWTFontMaxByte1;
-                AWTFontMinCharOrByte2;
-                AWTFontMaxCharOrByte2;
-                AWTFontDefaultChar;
-                AWTFontPerChar;
-                AWTFontMaxBounds;
-                AWTFontTextExtents16;
-                AWTFreeChar;
-                AWTFontGenerateImage;
-                AWTCharAdvance;
-                AWTCharLBearing;
-                AWTCharRBearing;
-                AWTCharAscent;
-                AWTCharDescent;
-                AWTDrawGlyphList;
-                AccelGlyphCache_RemoveAllCellInfos;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        AWTCountFonts;
+        AWTLoadFont;
+        AWTFreeFont;
+        AWTFontAscent;
+        AWTFontDescent;
+        AWTFontMinByte1;
+        AWTFontMaxByte1;
+        AWTFontMinCharOrByte2;
+        AWTFontMaxCharOrByte2;
+        AWTFontDefaultChar;
+        AWTFontPerChar;
+        AWTFontMaxBounds;
+        AWTFontTextExtents16;
+        AWTFreeChar;
+        AWTFontGenerateImage;
+        AWTCharAdvance;
+        AWTCharLBearing;
+        AWTCharRBearing;
+        AWTCharAscent;
+        AWTCharDescent;
+        AWTDrawGlyphList;
+        AccelGlyphCache_RemoveAllCellInfos;
 
-	local:
-		*;
+    local:
+        *;
 };
--- a/make/mapfiles/libawt/mapfile-vers	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libawt/mapfile-vers	Fri Sep 02 02:41:37 2016 +0000
@@ -27,163 +27,163 @@
 # These are the libawt exports, mapfile-mawt-vers contains the libmawt exports.
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_java_awt_CheckboxMenuItem_initIDs;
-		Java_java_awt_Color_initIDs;
-		Java_java_awt_FontMetrics_initIDs;
-		Java_java_awt_image_BufferedImage_initIDs;
-		Java_sun_awt_image_DataBufferNative_getElem;
-		Java_sun_awt_image_DataBufferNative_setElem;
-		Java_java_awt_image_ColorModel_initIDs;
-		Java_java_awt_image_IndexColorModel_initIDs;
-		Java_java_awt_image_Kernel_initIDs;
-		Java_java_awt_image_Raster_initIDs;
-		Java_java_awt_image_SampleModel_initIDs;
-		Java_java_awt_Label_initIDs;
-		Java_java_awt_MenuBar_initIDs;
-		Java_java_awt_ScrollPaneAdjustable_initIDs;
-		Java_java_awt_Toolkit_initIDs;
-                Java_sun_awt_DebugSettings_setCTracingOn__Z;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
-		Java_sun_awt_image_ByteComponentRaster_initIDs;
-		Java_sun_awt_image_GifImageDecoder_initIDs;
-		Java_sun_awt_image_GifImageDecoder_parseImage;
-		Java_sun_awt_image_ImageRepresentation_initIDs;
-		Java_sun_awt_image_ImageRepresentation_setDiffICM;
-		Java_sun_awt_image_ImageRepresentation_setICMpixels;
-		Java_sun_awt_image_ImagingLib_convolveBI;
-		Java_sun_awt_image_ImagingLib_convolveRaster;
-		Java_sun_awt_image_ImagingLib_init;
-		Java_sun_awt_image_ImagingLib_transformBI;
-		Java_sun_awt_image_ImagingLib_transformRaster;
-		Java_sun_awt_image_IntegerComponentRaster_initIDs;
-		Java_sun_awt_image_ShortComponentRaster_initIDs;
-                Java_sun_java2d_pipe_BufferedMaskBlit_enqueueTile;
-                Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
-		Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
-		Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
-                Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
-                Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
-                Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
-                Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
-                Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
-                Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
-                Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
+        Java_java_awt_CheckboxMenuItem_initIDs;
+        Java_java_awt_Color_initIDs;
+        Java_java_awt_FontMetrics_initIDs;
+        Java_java_awt_image_BufferedImage_initIDs;
+        Java_sun_awt_image_DataBufferNative_getElem;
+        Java_sun_awt_image_DataBufferNative_setElem;
+        Java_java_awt_image_ColorModel_initIDs;
+        Java_java_awt_image_IndexColorModel_initIDs;
+        Java_java_awt_image_Kernel_initIDs;
+        Java_java_awt_image_Raster_initIDs;
+        Java_java_awt_image_SampleModel_initIDs;
+        Java_java_awt_Label_initIDs;
+        Java_java_awt_MenuBar_initIDs;
+        Java_java_awt_ScrollPaneAdjustable_initIDs;
+        Java_java_awt_Toolkit_initIDs;
+        Java_sun_awt_DebugSettings_setCTracingOn__Z;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
+        Java_sun_awt_image_ByteComponentRaster_initIDs;
+        Java_sun_awt_image_GifImageDecoder_initIDs;
+        Java_sun_awt_image_GifImageDecoder_parseImage;
+        Java_sun_awt_image_ImageRepresentation_initIDs;
+        Java_sun_awt_image_ImageRepresentation_setDiffICM;
+        Java_sun_awt_image_ImageRepresentation_setICMpixels;
+        Java_sun_awt_image_ImagingLib_convolveBI;
+        Java_sun_awt_image_ImagingLib_convolveRaster;
+        Java_sun_awt_image_ImagingLib_init;
+        Java_sun_awt_image_ImagingLib_transformBI;
+        Java_sun_awt_image_ImagingLib_transformRaster;
+        Java_sun_awt_image_IntegerComponentRaster_initIDs;
+        Java_sun_awt_image_ShortComponentRaster_initIDs;
+        Java_sun_java2d_pipe_BufferedMaskBlit_enqueueTile;
+        Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
+        Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
+        Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
+        Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
+        Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
+        Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
+        Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
+        Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
+        Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
+        Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
 
-		Java_java_awt_Choice_initIDs;
-		Java_java_awt_Dimension_initIDs;
-		Java_java_awt_event_MouseEvent_initIDs;
-		Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
-		Java_java_awt_Rectangle_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_initRaster;
-                Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
-		Java_sun_awt_image_BytePackedRaster_initIDs;
-		Java_sun_awt_image_ImagingLib_lookupByteBI;
-		Java_sun_awt_image_ImagingLib_lookupByteRaster;
-		Java_sun_java2d_SurfaceData_initIDs;
-		Java_sun_java2d_SurfaceData_isOpaqueGray;
-		Java_sun_java2d_Disposer_initIDs;
-		Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
-		Java_sun_java2d_loops_BlitBg_BlitBg;
-		Java_sun_java2d_loops_Blit_Blit;
-		Java_sun_java2d_loops_ScaledBlit_Scale;
-		Java_sun_java2d_loops_DrawLine_DrawLine;
-		Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
-                Java_sun_java2d_loops_DrawPath_DrawPath;
-                Java_sun_java2d_loops_FillPath_FillPath;
+        Java_java_awt_Choice_initIDs;
+        Java_java_awt_Dimension_initIDs;
+        Java_java_awt_event_MouseEvent_initIDs;
+        Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
+        Java_java_awt_Rectangle_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_initRaster;
+        Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
+        Java_sun_awt_image_BytePackedRaster_initIDs;
+        Java_sun_awt_image_ImagingLib_lookupByteBI;
+        Java_sun_awt_image_ImagingLib_lookupByteRaster;
+        Java_sun_java2d_SurfaceData_initIDs;
+        Java_sun_java2d_SurfaceData_isOpaqueGray;
+        Java_sun_java2d_Disposer_initIDs;
+        Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
+        Java_sun_java2d_loops_BlitBg_BlitBg;
+        Java_sun_java2d_loops_Blit_Blit;
+        Java_sun_java2d_loops_ScaledBlit_Scale;
+        Java_sun_java2d_loops_DrawLine_DrawLine;
+        Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
+        Java_sun_java2d_loops_DrawPath_DrawPath;
+        Java_sun_java2d_loops_FillPath_FillPath;
 
-		Java_sun_java2d_loops_DrawRect_DrawRect;
-		Java_sun_java2d_loops_FillRect_FillRect;
-		Java_sun_java2d_loops_FillSpans_FillSpans;
-		Java_sun_java2d_loops_FillParallelogram_FillParallelogram;
-		Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
-		Java_sun_java2d_loops_MaskBlit_MaskBlit;
-		Java_sun_java2d_loops_MaskFill_MaskFill;
-		Java_sun_java2d_loops_MaskFill_FillAAPgram;
-		Java_sun_java2d_loops_MaskFill_DrawAAPgram;
-		Java_sun_java2d_loops_TransformHelper_Transform;
-		Java_sun_java2d_pipe_Region_initIDs;
-		Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
-		sun_awt_image_GifImageDecoder_initIDs;
+        Java_sun_java2d_loops_DrawRect_DrawRect;
+        Java_sun_java2d_loops_FillRect_FillRect;
+        Java_sun_java2d_loops_FillSpans_FillSpans;
+        Java_sun_java2d_loops_FillParallelogram_FillParallelogram;
+        Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
+        Java_sun_java2d_loops_MaskBlit_MaskBlit;
+        Java_sun_java2d_loops_MaskFill_MaskFill;
+        Java_sun_java2d_loops_MaskFill_FillAAPgram;
+        Java_sun_java2d_loops_MaskFill_DrawAAPgram;
+        Java_sun_java2d_loops_TransformHelper_Transform;
+        Java_sun_java2d_pipe_Region_initIDs;
+        Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
+        sun_awt_image_GifImageDecoder_initIDs;
 
-		# libmawt entry points
-		SurfaceData_InitOps;
-		SurfaceData_ThrowInvalidPipeException;
-                SurfaceData_IntersectBlitBounds;
-                SurfaceData_IntersectBoundsXYXY;
-		Region_GetBounds;
-		Region_GetInfo;
-		Region_StartIteration;
-		Region_CountIterationRects;
-		Region_NextIteration;
-		Region_EndIteration;
-		RegionToYXBandedRectangles;
-		GrPrim_CompGetXorInfo;
-		GrPrim_CompGetAlphaInfo;
-                J2dTraceImpl;
-                J2dTraceInit;
-		img_makePalette;
-		initInverseGrayLut;
-		make_dither_arrays;
-		make_uns_ordered_dither_array;
+        # libmawt entry points
+        SurfaceData_InitOps;
+        SurfaceData_ThrowInvalidPipeException;
+        SurfaceData_IntersectBlitBounds;
+        SurfaceData_IntersectBoundsXYXY;
+        Region_GetBounds;
+        Region_GetInfo;
+        Region_StartIteration;
+        Region_CountIterationRects;
+        Region_NextIteration;
+        Region_EndIteration;
+        RegionToYXBandedRectangles;
+        GrPrim_CompGetXorInfo;
+        GrPrim_CompGetAlphaInfo;
+        J2dTraceImpl;
+        J2dTraceInit;
+        img_makePalette;
+        initInverseGrayLut;
+        make_dither_arrays;
+        make_uns_ordered_dither_array;
 
-		# variables exported to libmawt
-		std_img_oda_red;
-		std_img_oda_blue;
-		std_img_oda_green;
-		std_odas_computed;
-		g_CMpDataID;
-		colorValueID;
-                mul8table;
-                div8table;
-                jvm;
+        # variables exported to libmawt
+        std_img_oda_red;
+        std_img_oda_blue;
+        std_img_oda_green;
+        std_odas_computed;
+        g_CMpDataID;
+        colorValueID;
+        mul8table;
+        div8table;
+        jvm;
 
-                # ProcessPath entry points and data
-                doDrawPath;
-                doFillPath;
-                path2DNumTypesID;
-                path2DTypesID;
-                path2DWindingRuleID;
-                path2DFloatCoordsID;
-                sg2dStrokeHintID;
-                sunHints_INTVAL_STROKE_PURE;
+        # ProcessPath entry points and data
+        doDrawPath;
+        doFillPath;
+        path2DNumTypesID;
+        path2DTypesID;
+        path2DWindingRuleID;
+        path2DFloatCoordsID;
+        sg2dStrokeHintID;
+        sunHints_INTVAL_STROKE_PURE;
 
-		# CDE private entry points
-                # These are in awt_LoadLibrary.c and falls through to libmawt.
-                # Evidently CDE needs this for backward compatability.
-		Java_sun_awt_motif_XsessionWMcommand;
-		Java_sun_awt_motif_XsessionWMcommand_New;
+        # CDE private entry points
+        # These are in awt_LoadLibrary.c and falls through to libmawt.
+        # Evidently CDE needs this for backward compatability.
+        Java_sun_awt_motif_XsessionWMcommand;
+        Java_sun_awt_motif_XsessionWMcommand_New;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		GrPrim_Sg2dGetCompInfo;
-		GrPrim_Sg2dGetClip;
-		GetNativePrim;
-		SurfaceData_IntersectBounds;
-		SurfaceData_GetOps;
-		Disposer_AddRecord;
-		GrPrim_Sg2dGetEaRGB;
-		GrPrim_Sg2dGetPixel;
-		GrPrim_Sg2dGetLCDTextContrast;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        GrPrim_Sg2dGetCompInfo;
+        GrPrim_Sg2dGetClip;
+        GetNativePrim;
+        SurfaceData_IntersectBounds;
+        SurfaceData_GetOps;
+        Disposer_AddRecord;
+        GrPrim_Sg2dGetEaRGB;
+        GrPrim_Sg2dGetPixel;
+        GrPrim_Sg2dGetLCDTextContrast;
 
-	local:
-		*;
+    local:
+        *;
 };
--- a/make/mapfiles/libawt/mapfile-vers-linux	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libawt/mapfile-vers-linux	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,277 +27,278 @@
 # Linux port does not use mawt, all public symbols are in libawt.so
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_java_awt_CheckboxMenuItem_initIDs;
-		Java_java_awt_Color_initIDs;
-		Java_java_awt_FontMetrics_initIDs;
-		Java_java_awt_image_BufferedImage_initIDs;
-		Java_sun_awt_image_DataBufferNative_getElem;
-		Java_sun_awt_image_DataBufferNative_setElem;
-		Java_java_awt_image_ColorModel_initIDs;
-		Java_java_awt_image_IndexColorModel_initIDs;
-		Java_java_awt_image_Kernel_initIDs;
-		Java_java_awt_image_Raster_initIDs;
-		Java_java_awt_image_SampleModel_initIDs;
-		Java_java_awt_Label_initIDs;
-		Java_java_awt_MenuBar_initIDs;
-		Java_java_awt_ScrollPaneAdjustable_initIDs;
-		Java_java_awt_Toolkit_initIDs;
-		Java_java_awt_TrayIcon_initIDs;
-                Java_sun_awt_DebugSettings_setCTracingOn__Z;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
-		Java_sun_awt_image_ByteComponentRaster_initIDs;
-		Java_sun_awt_image_GifImageDecoder_initIDs;
-		Java_sun_awt_image_GifImageDecoder_parseImage;
-		Java_sun_awt_image_Image_initIDs;
-		Java_sun_awt_image_ImageRepresentation_initIDs;
-		Java_sun_awt_image_ImageRepresentation_setDiffICM;
-		Java_sun_awt_image_ImageRepresentation_setICMpixels;
-		Java_sun_awt_image_ImagingLib_convolveBI;
-		Java_sun_awt_image_ImagingLib_convolveRaster;
-		Java_sun_awt_image_ImagingLib_init;
-		Java_sun_awt_image_ImagingLib_transformBI;
-		Java_sun_awt_image_ImagingLib_transformRaster;
-		Java_sun_awt_image_IntegerComponentRaster_initIDs;
-		Java_sun_awt_image_ShortComponentRaster_initIDs;
-		Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
-		Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
-                Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
-                Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
-                Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
-                Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
-                Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
-                Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
-                Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
+        Java_java_awt_CheckboxMenuItem_initIDs;
+        Java_java_awt_Color_initIDs;
+        Java_java_awt_FontMetrics_initIDs;
+        Java_java_awt_image_BufferedImage_initIDs;
+        Java_sun_awt_image_DataBufferNative_getElem;
+        Java_sun_awt_image_DataBufferNative_setElem;
+        Java_java_awt_image_ColorModel_initIDs;
+        Java_java_awt_image_IndexColorModel_initIDs;
+        Java_java_awt_image_Kernel_initIDs;
+        Java_java_awt_image_Raster_initIDs;
+        Java_java_awt_image_SampleModel_initIDs;
+        Java_java_awt_Label_initIDs;
+        Java_java_awt_MenuBar_initIDs;
+        Java_java_awt_ScrollPaneAdjustable_initIDs;
+        Java_java_awt_Toolkit_initIDs;
+        Java_java_awt_TrayIcon_initIDs;
+        Java_sun_awt_DebugSettings_setCTracingOn__Z;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
+        Java_sun_awt_image_ByteComponentRaster_initIDs;
+        Java_sun_awt_image_GifImageDecoder_initIDs;
+        Java_sun_awt_image_GifImageDecoder_parseImage;
+        Java_sun_awt_image_Image_initIDs;
+        Java_sun_awt_image_ImageRepresentation_initIDs;
+        Java_sun_awt_image_ImageRepresentation_setDiffICM;
+        Java_sun_awt_image_ImageRepresentation_setICMpixels;
+        Java_sun_awt_image_ImagingLib_convolveBI;
+        Java_sun_awt_image_ImagingLib_convolveRaster;
+        Java_sun_awt_image_ImagingLib_init;
+        Java_sun_awt_image_ImagingLib_transformBI;
+        Java_sun_awt_image_ImagingLib_transformRaster;
+        Java_sun_awt_image_IntegerComponentRaster_initIDs;
+        Java_sun_awt_image_ShortComponentRaster_initIDs;
+        Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
+        Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
+        Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
+        Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
+        Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
+        Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
+        Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
+        Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
+        Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
 
-		Java_java_awt_Choice_initIDs;
-		Java_java_awt_Dimension_initIDs;
-		Java_java_awt_event_MouseEvent_initIDs;
-		Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
-		Java_java_awt_Rectangle_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_getSurfaceData;
-		Java_sun_awt_image_BufImgSurfaceData_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_initRaster;
-		Java_sun_awt_image_BufImgSurfaceData_setSurfaceData;
-                Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
-		Java_sun_awt_image_BytePackedRaster_initIDs;
-		Java_sun_awt_image_ImagingLib_lookupByteBI;
-		Java_sun_awt_image_ImagingLib_lookupByteRaster;
-		Java_sun_java2d_SurfaceData_initIDs;
-		Java_sun_java2d_SurfaceData_isOpaqueGray;
-		Java_sun_java2d_Disposer_initIDs;
-		Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
-		Java_sun_java2d_loops_BlitBg_BlitBg;
-		Java_sun_java2d_loops_Blit_Blit;
-		Java_sun_java2d_loops_ScaledBlit_Scale;
-		Java_sun_java2d_loops_DrawLine_DrawLine;
-		Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
-		Java_sun_java2d_loops_DrawRect_DrawRect;
-		Java_sun_java2d_loops_FillRect_FillRect;
-		Java_sun_java2d_loops_FillSpans_FillSpans;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
-		Java_sun_java2d_loops_MaskBlit_MaskBlit;
-		Java_sun_java2d_loops_MaskFill_MaskFill;
-		Java_sun_java2d_loops_MaskFill_FillAAPgram;
-		Java_sun_java2d_loops_MaskFill_DrawAAPgram;
-                Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
-		Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
-		sun_awt_image_GifImageDecoder_initIDs;
+        Java_java_awt_Choice_initIDs;
+        Java_java_awt_Dimension_initIDs;
+        Java_java_awt_event_MouseEvent_initIDs;
+        Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
+        Java_java_awt_Rectangle_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_getSurfaceData;
+        Java_sun_awt_image_BufImgSurfaceData_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_initRaster;
+        Java_sun_awt_image_BufImgSurfaceData_setSurfaceData;
+        Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
+        Java_sun_awt_image_BytePackedRaster_initIDs;
+        Java_sun_awt_image_ImagingLib_lookupByteBI;
+        Java_sun_awt_image_ImagingLib_lookupByteRaster;
+        Java_sun_java2d_SurfaceData_initIDs;
+        Java_sun_java2d_SurfaceData_isOpaqueGray;
+        Java_sun_java2d_Disposer_initIDs;
+        Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
+        Java_sun_java2d_loops_BlitBg_BlitBg;
+        Java_sun_java2d_loops_Blit_Blit;
+        Java_sun_java2d_loops_ScaledBlit_Scale;
+        Java_sun_java2d_loops_DrawLine_DrawLine;
+        Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
+        Java_sun_java2d_loops_DrawRect_DrawRect;
+        Java_sun_java2d_loops_FillRect_FillRect;
+        Java_sun_java2d_loops_FillSpans_FillSpans;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
+        Java_sun_java2d_loops_MaskBlit_MaskBlit;
+        Java_sun_java2d_loops_MaskFill_MaskFill;
+        Java_sun_java2d_loops_MaskFill_FillAAPgram;
+        Java_sun_java2d_loops_MaskFill_DrawAAPgram;
+        Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
+        Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
+        sun_awt_image_GifImageDecoder_initIDs;
 
-		# libmawt entry points
-		SurfaceData_InitOps;
-		SurfaceData_ThrowInvalidPipeException;
-                Region_GetBounds;
-                Region_GetInfo;
-                Region_StartIteration;
-                Region_CountIterationRects;
-                Region_NextIteration;
-                Region_EndIteration;
-                GrPrim_CompGetXorInfo;
-                GrPrim_CompGetAlphaInfo;
-		img_makePalette;
-		initInverseGrayLut;
-		make_dither_arrays;
-		make_uns_ordered_dither_array;
+        # libmawt entry points
+        SurfaceData_InitOps;
+        SurfaceData_ThrowInvalidPipeException;
+        Region_GetBounds;
+        Region_GetInfo;
+        Region_StartIteration;
+        Region_CountIterationRects;
+        Region_NextIteration;
+        Region_EndIteration;
+        GrPrim_CompGetXorInfo;
+        GrPrim_CompGetAlphaInfo;
+        img_makePalette;
+        initInverseGrayLut;
+        make_dither_arrays;
+        make_uns_ordered_dither_array;
 
-		# variables exported to libmawt
-		std_img_oda_red;
-		std_img_oda_blue;
-		std_img_oda_green;
-		std_odas_computed;
-		g_CMpDataID;
-		colorValueID;
-                jvm;
+        # variables exported to libmawt
+        std_img_oda_red;
+        std_img_oda_blue;
+        std_img_oda_green;
+        std_odas_computed;
+        g_CMpDataID;
+        colorValueID;
+        jvm;
 
-		# CDE private entry point
-                # This is in awt_LoadLibrary.c and falls through to libmawt.
-                # Evidently CDE needs this for backward compatability.
-		Java_sun_awt_motif_XsessionWMcommand;
+        # CDE private entry point
+        # This is in awt_LoadLibrary.c and falls through to libmawt.
+        # Evidently CDE needs this for backward compatability.
+        Java_sun_awt_motif_XsessionWMcommand;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		GrPrim_Sg2dGetCompInfo;
-		GrPrim_Sg2dGetClip;
-		GetNativePrim;
-		SurfaceData_IntersectBounds;
-		SurfaceData_GetOps;
-		Disposer_AddRecord;
-		GrPrim_Sg2dGetEaRGB;
-		GrPrim_Sg2dGetPixel;
-		GrPrim_Sg2dGetLCDTextContrast;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        GrPrim_Sg2dGetCompInfo;
+        GrPrim_Sg2dGetClip;
+        GetNativePrim;
+        SurfaceData_IntersectBounds;
+        SurfaceData_GetOps;
+        Disposer_AddRecord;
+        GrPrim_Sg2dGetEaRGB;
+        GrPrim_Sg2dGetPixel;
+        GrPrim_Sg2dGetLCDTextContrast;
 
-		Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
-		Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
-		Java_java_awt_AWTEvent_nativeSetSource;
-		Java_java_awt_Checkbox_initIDs;
-		Java_java_awt_Component_initIDs;
-		Java_java_awt_Dialog_initIDs;
-		Java_java_awt_Font_initIDs;
-		Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
-                Java_java_awt_KeyboardFocusManager_initIDs;
-		Java_java_awt_Menu_initIDs;
-		Java_java_awt_MenuComponent_initIDs;
-		Java_java_awt_MenuItem_initIDs;
-		Java_java_awt_Scrollbar_initIDs;
-		Java_java_awt_ScrollPane_initIDs;
-		Java_java_awt_TextArea_initIDs;
-		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_X11InputMethod_disposeXIC;
-		Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_resetXIC;
-		Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-		Java_sun_awt_SunToolkit_closeSplashScreen;
-		Java_sun_awt_PlatformFont_initIDs;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_dispose;
-		Java_sun_awt_X11GraphicsConfig_pGetBounds;
-		Java_sun_awt_X11GraphicsConfig_getNumColors;
-		Java_sun_awt_X11GraphicsConfig_getXResolution;
-		Java_sun_awt_X11GraphicsConfig_getYResolution;
-                Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
-		Java_sun_awt_X11GraphicsDevice_isDBESupported;
-		Java_sun_awt_X11GraphicsDevice_getDisplay;
-		Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
-		Java_sun_awt_X11GraphicsDevice_getNumConfigs;
-		Java_sun_awt_X11GraphicsDevice_initIDs;
-                Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
-                Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
-                Java_sun_awt_X11GraphicsDevice_configDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_resetNativeData;
-                Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor;
-		Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
-		Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
-		Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-		Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
-		Java_sun_awt_X11GraphicsEnvironment_initDisplay;
-		Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
-		Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-		Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
+        Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
+        Java_java_awt_AWTEvent_nativeSetSource;
+        Java_java_awt_Checkbox_initIDs;
+        Java_java_awt_Component_initIDs;
+        Java_java_awt_Dialog_initIDs;
+        Java_java_awt_Font_initIDs;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
+        Java_java_awt_KeyboardFocusManager_initIDs;
+        Java_java_awt_Menu_initIDs;
+        Java_java_awt_MenuComponent_initIDs;
+        Java_java_awt_MenuItem_initIDs;
+        Java_java_awt_Scrollbar_initIDs;
+        Java_java_awt_ScrollPane_initIDs;
+        Java_java_awt_TextArea_initIDs;
+        Java_sun_awt_FontDescriptor_initIDs;
+        Java_sun_awt_X11InputMethod_disposeXIC;
+        Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_resetXIC;
+        Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_turnoffStatusWindow;
+        Java_sun_awt_SunToolkit_closeSplashScreen;
+        Java_sun_awt_PlatformFont_initIDs;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_dispose;
+        Java_sun_awt_X11GraphicsConfig_pGetBounds;
+        Java_sun_awt_X11GraphicsConfig_getNumColors;
+        Java_sun_awt_X11GraphicsConfig_getXResolution;
+        Java_sun_awt_X11GraphicsConfig_getYResolution;
+        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+        Java_sun_awt_X11GraphicsDevice_isDBESupported;
+        Java_sun_awt_X11GraphicsDevice_getDisplay;
+        Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
+        Java_sun_awt_X11GraphicsDevice_getNumConfigs;
+        Java_sun_awt_X11GraphicsDevice_initIDs;
+        Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
+        Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
+        Java_sun_awt_X11GraphicsDevice_configDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_resetNativeData;
+        Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor;
+        Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
+        Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
+        Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
+        Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
+        Java_sun_awt_X11GraphicsEnvironment_initDisplay;
+        Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
+        Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
+        Java_sun_awt_X11GraphicsEnvironment_initXRender;
 
+        Java_java_awt_AWTEvent_initIDs;
+        Java_java_awt_Button_initIDs;
+        Java_java_awt_Container_initIDs;
+        Java_java_awt_Cursor_finalizeImpl;
+        Java_java_awt_Cursor_initIDs;
+        Java_java_awt_Event_initIDs;
+        Java_java_awt_event_InputEvent_initIDs;
+        Java_java_awt_event_KeyEvent_initIDs;
+        Java_java_awt_FileDialog_initIDs;
+        Java_java_awt_Frame_initIDs;
+        Java_java_awt_Insets_initIDs;
+        Java_java_awt_TextField_initIDs;
+        Java_java_awt_Window_initIDs;
+        Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_initIDs;
+        Java_sun_awt_X11GraphicsConfig_makeColorModel;
+        Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
+        Java_sun_awt_X11PMBlitLoops_Blit;
+        Java_sun_awt_X11PMBlitBgLoops_nativeBlitBg;
+        Java_sun_awt_X11Renderer_devFillSpans;
+        Java_sun_awt_X11Renderer_doDrawArc;
+        Java_sun_awt_X11Renderer_doDrawLine;
+        Java_sun_awt_X11Renderer_doDrawOval;
+        Java_sun_awt_X11Renderer_doDrawPoly;
+        Java_sun_awt_X11Renderer_doDrawRect;
+        Java_sun_awt_X11Renderer_doDrawRoundRect;
+        Java_sun_awt_X11Renderer_doFillArc;
+        Java_sun_awt_X11Renderer_doFillOval;
+        Java_sun_awt_X11Renderer_doFillPoly;
+        Java_sun_awt_X11Renderer_doFillRect;
+        Java_sun_awt_X11Renderer_doFillRoundRect;
+        Java_sun_awt_X11Renderer_devCopyArea;
+        Java_sun_awt_X11SurfaceData_initIDs;
+        Java_sun_awt_X11SurfaceData_initOps;
+        Java_sun_awt_X11SurfaceData_initSurface;
+        Java_sun_awt_X11SurfaceData_isDgaAvailable;
+        Java_sun_awt_X11SurfaceData_setInvalid;
+        Java_sun_awt_X11SurfaceData_flushNativeSurface;
+        awt_display;
+        awt_lock;
+        awt_Lock;
+        awt_Unlock;
+        awt_GetDrawingSurface;
+        awt_FreeDrawingSurface;
+        awt_GetComponent;
+        awt_CreateEmbeddedFrame;
+        awt_SetBounds;
+        awt_SynthesizeWindowActivation;
 
+        X11SurfaceData_GetOps;
+        getDefaultConfig;
+        Java_sun_font_FontConfigManager_getFontConfig;
+        Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_awt_FcFontManager_getFontPathNative;
+        Java_sun_font_SunFontManager_populateFontFileNameMap;
 
-		Java_java_awt_AWTEvent_initIDs;
-		Java_java_awt_Button_initIDs;
-		Java_java_awt_Container_initIDs;
-		Java_java_awt_Cursor_finalizeImpl;
-		Java_java_awt_Cursor_initIDs;
-		Java_java_awt_Event_initIDs;
-		Java_java_awt_event_InputEvent_initIDs;
-		Java_java_awt_event_KeyEvent_initIDs;
-		Java_java_awt_FileDialog_initIDs;
-		Java_java_awt_Frame_initIDs;
-		Java_java_awt_Insets_initIDs;
-		Java_java_awt_TextField_initIDs;
-		Java_java_awt_Window_initIDs;
-		Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_initIDs;
-		Java_sun_awt_X11GraphicsConfig_makeColorModel;
-		Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
-		Java_sun_awt_X11PMBlitLoops_Blit;
-		Java_sun_awt_X11PMBlitBgLoops_nativeBlitBg;
-		Java_sun_awt_X11Renderer_devFillSpans;
-		Java_sun_awt_X11Renderer_doDrawArc;
-		Java_sun_awt_X11Renderer_doDrawLine;
-		Java_sun_awt_X11Renderer_doDrawOval;
-		Java_sun_awt_X11Renderer_doDrawPoly;
-		Java_sun_awt_X11Renderer_doDrawRect;
-		Java_sun_awt_X11Renderer_doDrawRoundRect;
-		Java_sun_awt_X11Renderer_doFillArc;
-		Java_sun_awt_X11Renderer_doFillOval;
-		Java_sun_awt_X11Renderer_doFillPoly;
-		Java_sun_awt_X11Renderer_doFillRect;
-		Java_sun_awt_X11Renderer_doFillRoundRect;
-		Java_sun_awt_X11Renderer_devCopyArea;
-		Java_sun_awt_X11SurfaceData_initIDs;
-		Java_sun_awt_X11SurfaceData_initOps;
-		Java_sun_awt_X11SurfaceData_initSurface;
-		Java_sun_awt_X11SurfaceData_isDgaAvailable;
-		Java_sun_awt_X11SurfaceData_setInvalid;
-		Java_sun_awt_X11SurfaceData_flushNativeSurface;
-		awt_display;
-		awt_lock;
-		awt_Lock;
-		awt_Unlock;
-	        awt_GetDrawingSurface;
-	        awt_FreeDrawingSurface;
-	        awt_GetComponent;
+        # CDE private entry point
+        Java_sun_awt_motif_XsessionWMcommand;
 
-		X11SurfaceData_GetOps;
-		getDefaultConfig;
-                Java_sun_font_FontConfigManager_getFontConfig;
-                Java_sun_font_FontConfigManager_getFontConfigAASettings;
-		Java_sun_awt_FcFontManager_getFontPathNative;
-		Java_sun_font_SunFontManager_populateFontFileNameMap;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        AWTCountFonts;
+        AWTLoadFont;
+        AWTFreeFont;
+        AWTFontMinByte1;
+        AWTFontMaxByte1;
+        AWTFontMinCharOrByte2;
+        AWTFontMaxCharOrByte2;
+        AWTFontDefaultChar;
+        AWTFontPerChar;
+        AWTFontMaxBounds;
+        AWTFontTextExtents16;
+        AWTFreeChar;
+        AWTFontGenerateImage;
+        AWTCharAdvance;
+        AWTCharLBearing;
+        AWTCharRBearing;
+        AWTCharAscent;
+        AWTCharDescent;
+        AWTDrawGlyphList;
+        AccelGlyphCache_RemoveAllCellInfos;
 
-		# CDE private entry point
-		Java_sun_awt_motif_XsessionWMcommand;
-
-		# libfontmanager entry points
-		AWTIsHeadless;
-		AWTCountFonts;
-                AWTLoadFont;
-                AWTFreeFont;
-                AWTFontMinByte1;
-                AWTFontMaxByte1;
-                AWTFontMinCharOrByte2;
-                AWTFontMaxCharOrByte2;
-                AWTFontDefaultChar;
-                AWTFontPerChar;
-                AWTFontMaxBounds;
-                AWTFontTextExtents16;
-                AWTFreeChar;
-                AWTFontGenerateImage;
-                AWTCharAdvance;
-                AWTCharLBearing;
-                AWTCharRBearing;
-                AWTCharAscent;
-                AWTCharDescent;
-                AWTDrawGlyphList;
-                AccelGlyphCache_RemoveAllCellInfos;
-
-	local:
-		*;
+    local:
+        *;
 };
--- a/make/mapfiles/libawt_headless/mapfile-vers	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libawt_headless/mapfile-vers	Fri Sep 02 02:41:37 2016 +0000
@@ -26,85 +26,84 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-                Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
-		Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
-		Java_sun_java2d_x11_X11Renderer_XFillSpans;
-		Java_sun_java2d_x11_X11Renderer_XDrawArc;
-		Java_sun_java2d_x11_X11Renderer_XDrawLine;
-		Java_sun_java2d_x11_X11Renderer_XDrawOval;
-		Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-		Java_sun_java2d_x11_X11Renderer_XDrawRect;
-		Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
-                Java_sun_java2d_x11_X11Renderer_XDoPath;
-		Java_sun_java2d_x11_X11Renderer_XFillArc;
-		Java_sun_java2d_x11_X11Renderer_XFillOval;
-		Java_sun_java2d_x11_X11Renderer_XFillPoly;
-		Java_sun_java2d_x11_X11Renderer_XFillRect;
-		Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
-		Java_sun_java2d_x11_X11Renderer_devCopyArea;
-		Java_sun_java2d_x11_X11SurfaceData_initIDs;
-		Java_sun_java2d_x11_X11SurfaceData_initSurface;
-                Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
+        Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
+        Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
+        Java_sun_java2d_x11_X11Renderer_XFillSpans;
+        Java_sun_java2d_x11_X11Renderer_XDrawArc;
+        Java_sun_java2d_x11_X11Renderer_XDrawLine;
+        Java_sun_java2d_x11_X11Renderer_XDrawOval;
+        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
+        Java_sun_java2d_x11_X11Renderer_XDrawRect;
+        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XDoPath;
+        Java_sun_java2d_x11_X11Renderer_XFillArc;
+        Java_sun_java2d_x11_X11Renderer_XFillOval;
+        Java_sun_java2d_x11_X11Renderer_XFillPoly;
+        Java_sun_java2d_x11_X11Renderer_XFillRect;
+        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
+        Java_sun_java2d_x11_X11Renderer_devCopyArea;
+        Java_sun_java2d_x11_X11SurfaceData_initIDs;
+        Java_sun_java2d_x11_X11SurfaceData_initSurface;
+        Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
 
-		Java_sun_java2d_x11_XSurfaceData_initOps;
-                Java_sun_java2d_x11_XSurfaceData_XCreateGC;
-                Java_sun_java2d_x11_XSurfaceData_XResetClip;
-                Java_sun_java2d_x11_XSurfaceData_XSetClip;
-                Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-		Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
-		Java_sun_java2d_x11_XSurfaceData_setInvalid;
-		Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
+        Java_sun_java2d_x11_XSurfaceData_initOps;
+        Java_sun_java2d_x11_XSurfaceData_XCreateGC;
+        Java_sun_java2d_x11_XSurfaceData_XResetClip;
+        Java_sun_java2d_x11_XSurfaceData_XSetClip;
+        Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
+        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
+        Java_sun_java2d_x11_XSurfaceData_setInvalid;
+        Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
 
-		X11SurfaceData_GetOps;
-		Java_java_awt_Font_initIDs;
-                Java_sun_font_FontConfigManager_getFontConfig;
-                Java_sun_font_FontConfigManager_getFontConfigAASettings;
-                Java_sun_font_FontConfigManager_getFontConfigVersion;
-                Java_sun_awt_FcFontManager_getFontPathNative;
+        X11SurfaceData_GetOps;
+        Java_java_awt_Font_initIDs;
+        Java_sun_font_FontConfigManager_getFontConfig;
+        Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_font_FontConfigManager_getFontConfigVersion;
+        Java_sun_awt_FcFontManager_getFontPathNative;
 
-		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_PlatformFont_initIDs;
+        Java_sun_awt_FontDescriptor_initIDs;
+        Java_sun_awt_PlatformFont_initIDs;
 
-		Java_sun_print_CUPSPrinter_initIDs;
-		Java_sun_print_CUPSPrinter_getCupsServer;
-		Java_sun_print_CUPSPrinter_getCupsPort;
-		Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-		Java_sun_print_CUPSPrinter_canConnect;
-		Java_sun_print_CUPSPrinter_getMedia;
-		Java_sun_print_CUPSPrinter_getPageSizes;
-		Java_sun_print_CUPSPrinter_getResolutions;
+        Java_sun_print_CUPSPrinter_initIDs;
+        Java_sun_print_CUPSPrinter_getCupsServer;
+        Java_sun_print_CUPSPrinter_getCupsPort;
+        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
+        Java_sun_print_CUPSPrinter_canConnect;
+        Java_sun_print_CUPSPrinter_getMedia;
+        Java_sun_print_CUPSPrinter_getPageSizes;
+        Java_sun_print_CUPSPrinter_getResolutions;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		AWTCountFonts;
-                AWTLoadFont;
-                AWTFreeFont;
-                AWTFontAscent;
-                AWTFontDescent;
-                AWTFontMinByte1;
-                AWTFontMaxByte1;
-                AWTFontMinCharOrByte2;
-                AWTFontMaxCharOrByte2;
-                AWTFontDefaultChar;
-                AWTFontPerChar;
-                AWTFontMaxBounds;
-                AWTFontTextExtents16;
-                AWTFreeChar;
-                AWTFontGenerateImage;
-                AWTCharAdvance;
-                AWTCharLBearing;
-                AWTCharRBearing;
-                AWTCharAscent;
-                AWTCharDescent;
-                AWTDrawGlyphList;
-                AccelGlyphCache_RemoveAllCellInfos;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        AWTCountFonts;
+        AWTLoadFont;
+        AWTFreeFont;
+        AWTFontAscent;
+        AWTFontDescent;
+        AWTFontMinByte1;
+        AWTFontMaxByte1;
+        AWTFontMinCharOrByte2;
+        AWTFontMaxCharOrByte2;
+        AWTFontDefaultChar;
+        AWTFontPerChar;
+        AWTFontMaxBounds;
+        AWTFontTextExtents16;
+        AWTFreeChar;
+        AWTFontGenerateImage;
+        AWTCharAdvance;
+        AWTCharLBearing;
+        AWTCharRBearing;
+        AWTCharAscent;
+        AWTCharDescent;
+        AWTDrawGlyphList;
+        AccelGlyphCache_RemoveAllCellInfos;
 
-
-	local:
-		*;
+    local:
+        *;
 };
--- a/make/mapfiles/libawt_xawt/mapfile-vers	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libawt_xawt/mapfile-vers	Fri Sep 02 02:41:37 2016 +0000
@@ -26,7 +26,7 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-        global:
+    global:
         JNI_OnLoad;
         Java_sun_awt_X11_XlibWrapper_copyIntArray;
         Java_sun_awt_X11_XlibWrapper_copyLongArray;
@@ -58,8 +58,8 @@
         Java_sun_awt_X11_XlibWrapper_XSetLocaleModifiers;
         Java_sun_awt_X11_XlibWrapper_XPeekEvent;
         Java_sun_awt_X11_XlibWrapper_DefaultScreen;
-	Java_sun_awt_X11_XlibWrapper_ScreenOfDisplay;
-	Java_sun_awt_X11_XlibWrapper_DoesBackingStore;
+        Java_sun_awt_X11_XlibWrapper_ScreenOfDisplay;
+        Java_sun_awt_X11_XlibWrapper_DoesBackingStore;
         Java_sun_awt_X11_XlibWrapper_RootWindow;
         Java_sun_awt_X11_XlibWrapper_DisplayHeight;
         Java_sun_awt_X11_XlibWrapper_DisplayWidthMM;
@@ -172,7 +172,7 @@
         Java_java_awt_Scrollbar_initIDs;
         Java_java_awt_Window_initIDs;
         Java_java_awt_Frame_initIDs;
-	Java_sun_awt_SunToolkit_closeSplashScreen;
+        Java_sun_awt_SunToolkit_closeSplashScreen;
         Java_sun_awt_UNIXToolkit_check_1gtk;
         Java_sun_awt_UNIXToolkit_load_1gtk;
         Java_sun_awt_UNIXToolkit_unload_1gtk;
@@ -196,17 +196,16 @@
         Java_sun_font_FontConfigManager_getFontConfig;
         Java_sun_font_FontConfigManager_getFontConfigAASettings;
         Java_sun_font_FontConfigManager_getFontConfigVersion;
-	Java_sun_awt_FcFontManager_getFontPathNative;
+        Java_sun_awt_FcFontManager_getFontPathNative;
         Java_sun_awt_X11GraphicsEnvironment_initDisplay;
         Java_sun_awt_X11GraphicsEnvironment_initGLX;
-	Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        Java_sun_awt_X11GraphicsEnvironment_initXRender;
         Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
         Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
         Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
         Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
         Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
         Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-#        Java_sun_awt_X11GraphicsEnvironment_getNativeFonts;
         Java_sun_awt_X11GraphicsDevice_initIDs;
         Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
         Java_sun_awt_X11GraphicsDevice_getConfigDepth;
@@ -231,16 +230,16 @@
         Java_sun_awt_X11GraphicsConfig_makeColorModel;
         Java_sun_awt_X11GraphicsConfig_pGetBounds;
         Java_sun_awt_X11GraphicsConfig_createBackBuffer;
-	Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
-	Java_sun_awt_X11GraphicsConfig_swapBuffers;
-	Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+        Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
+        Java_sun_awt_X11GraphicsConfig_swapBuffers;
+        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
         Java_sun_awt_X11_XToolkit_getTrayIconDisplayTimeout;
         Java_java_awt_Insets_initIDs;
         Java_java_awt_KeyboardFocusManager_initIDs;
         Java_java_awt_Font_initIDs;
         # libfontmanager entry points
         AWTIsHeadless;
-	AWTCountFonts;
+        AWTCountFonts;
         AWTLoadFont;
         AWTFreeFont;
         AWTFontAscent;
@@ -303,7 +302,7 @@
         Java_sun_awt_X11_XlibWrapper_XGetIconSizes;
         Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym;
         Java_sun_awt_X11_XlibWrapper_XKeysymToKeycode;
-	Java_sun_awt_X11_XlibWrapper_XQueryKeymap;
+        Java_sun_awt_X11_XlibWrapper_XQueryKeymap;
         Java_sun_awt_X11_XlibWrapper_XkbGetEffectiveGroup;
         Java_sun_awt_X11_XlibWrapper_XkbSelectEvents;
         Java_sun_awt_X11_XlibWrapper_XkbSelectEventDetails;
@@ -350,23 +349,23 @@
         Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
         Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
         Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
-	Java_sun_java2d_x11_X11Renderer_XFillSpans;
-	Java_sun_java2d_x11_X11Renderer_XDrawArc;
-	Java_sun_java2d_x11_X11Renderer_XDrawLine;
-	Java_sun_java2d_x11_X11Renderer_XDrawOval;
-	Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-	Java_sun_java2d_x11_X11Renderer_XDrawRect;
-	Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XFillSpans;
+        Java_sun_java2d_x11_X11Renderer_XDrawArc;
+        Java_sun_java2d_x11_X11Renderer_XDrawLine;
+        Java_sun_java2d_x11_X11Renderer_XDrawOval;
+        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
+        Java_sun_java2d_x11_X11Renderer_XDrawRect;
+        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
         Java_sun_java2d_x11_X11Renderer_XDoPath;
-	Java_sun_java2d_x11_X11Renderer_XFillArc;
-	Java_sun_java2d_x11_X11Renderer_XFillOval;
-	Java_sun_java2d_x11_X11Renderer_XFillPoly;
-	Java_sun_java2d_x11_X11Renderer_XFillRect;
-	Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XFillArc;
+        Java_sun_java2d_x11_X11Renderer_XFillOval;
+        Java_sun_java2d_x11_X11Renderer_XFillPoly;
+        Java_sun_java2d_x11_X11Renderer_XFillRect;
+        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
         Java_sun_java2d_x11_X11Renderer_devCopyArea;
         Java_sun_java2d_x11_X11SurfaceData_initIDs;
         Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
-	Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
+        Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
         Java_sun_java2d_x11_X11SurfaceData_initSurface;
         Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
         Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
@@ -377,40 +376,40 @@
         Java_sun_java2d_x11_XSurfaceData_XResetClip;
         Java_sun_java2d_x11_XSurfaceData_XSetClip;
         Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-	Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
+        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
         Java_sun_java2d_x11_XSurfaceData_setInvalid;
         Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
         Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
         Java_sun_java2d_xr_XRSurfaceData_initIDs;
         Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
-	Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
-	Java_sun_java2d_xr_XRBackendNative_initIDs;
-	Java_sun_java2d_xr_XRBackendNative_freeGC;
-	Java_sun_java2d_xr_XRBackendNative_createGC;
-	Java_sun_java2d_xr_XRBackendNative_createPixmap;
-	Java_sun_java2d_xr_XRBackendNative_createPictureNative;
-	Java_sun_java2d_xr_XRBackendNative_freePicture;
-	Java_sun_java2d_xr_XRBackendNative_freePixmap;
-	Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
-	Java_sun_java2d_xr_XRBackendNative_setGCExposures;
-	Java_sun_java2d_xr_XRBackendNative_setGCForeground;
-	Java_sun_java2d_xr_XRBackendNative_copyArea;
-	Java_sun_java2d_xr_XRBackendNative_renderComposite;
-	Java_sun_java2d_xr_XRBackendNative_renderRectangle;
-	Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
-	Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
-	Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
-	Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
-	Java_sun_java2d_xr_XRBackendNative_setFilter;
-	Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
-	Java_sun_java2d_xr_XRBackendNative_putMaskNative;
-	Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
-	Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
-	Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
-	Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
-	Java_sun_java2d_xr_XRBackendNative_setGCMode;
-	Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
-	Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
+        Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
+        Java_sun_java2d_xr_XRBackendNative_initIDs;
+        Java_sun_java2d_xr_XRBackendNative_freeGC;
+        Java_sun_java2d_xr_XRBackendNative_createGC;
+        Java_sun_java2d_xr_XRBackendNative_createPixmap;
+        Java_sun_java2d_xr_XRBackendNative_createPictureNative;
+        Java_sun_java2d_xr_XRBackendNative_freePicture;
+        Java_sun_java2d_xr_XRBackendNative_freePixmap;
+        Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
+        Java_sun_java2d_xr_XRBackendNative_setGCExposures;
+        Java_sun_java2d_xr_XRBackendNative_setGCForeground;
+        Java_sun_java2d_xr_XRBackendNative_copyArea;
+        Java_sun_java2d_xr_XRBackendNative_renderComposite;
+        Java_sun_java2d_xr_XRBackendNative_renderRectangle;
+        Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
+        Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_setFilter;
+        Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
+        Java_sun_java2d_xr_XRBackendNative_putMaskNative;
+        Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
+        Java_sun_java2d_xr_XRBackendNative_setGCMode;
+        Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
+        Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
 
         Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
         Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
@@ -444,25 +443,28 @@
         Java_sun_awt_X11_GtkFileDialogPeer_toFront;
         Java_sun_awt_X11_GtkFileDialogPeer_setBounds;
 
-	Java_sun_print_CUPSPrinter_initIDs;
-	Java_sun_print_CUPSPrinter_getCupsServer;
-	Java_sun_print_CUPSPrinter_getCupsPort;
-	Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-	Java_sun_print_CUPSPrinter_canConnect;
-	Java_sun_print_CUPSPrinter_getMedia;
-	Java_sun_print_CUPSPrinter_getPageSizes;
-	Java_sun_print_CUPSPrinter_getResolutions;
+        Java_sun_print_CUPSPrinter_initIDs;
+        Java_sun_print_CUPSPrinter_getCupsServer;
+        Java_sun_print_CUPSPrinter_getCupsPort;
+        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
+        Java_sun_print_CUPSPrinter_canConnect;
+        Java_sun_print_CUPSPrinter_getMedia;
+        Java_sun_print_CUPSPrinter_getPageSizes;
+        Java_sun_print_CUPSPrinter_getResolutions;
 
         awt_GetDrawingSurface;
         awt_FreeDrawingSurface;
         awt_Unlock;
         awt_Lock;
         awt_GetComponent;
+        awt_CreateEmbeddedFrame;
+        awt_SetBounds;
+        awt_SynthesizeWindowActivation;
 
         #XAWT entry point for CDE
         Java_sun_awt_motif_XsessionWMcommand;
         Java_sun_awt_motif_XsessionWMcommand_New;
 
-        local:
-                *;
+    local:
+        *;
 };
--- a/make/mapfiles/libjawt/mapfile-vers	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libjawt/mapfile-vers	Fri Sep 02 02:41:37 2016 +0000
@@ -26,8 +26,8 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-	    JAWT_GetAWT;
-	local:
-	    *;
+    global:
+        JAWT_GetAWT;
+    local:
+        *;
 };
--- a/make/mapfiles/libjpeg/mapfile-vers	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libjpeg/mapfile-vers	Fri Sep 02 02:41:37 2016 +0000
@@ -26,30 +26,30 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_sun_awt_image_JPEGImageDecoder_initIDs;
-		Java_sun_awt_image_JPEGImageDecoder_readImage;
+        Java_sun_awt_image_JPEGImageDecoder_initIDs;
+        Java_sun_awt_image_JPEGImageDecoder_readImage;
 
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setOutColorSpace;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_abortRead;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_disposeReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_abortWrite;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_resetWriter;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter;
-	local:
-		*;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setOutColorSpace;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_abortRead;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetReader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_disposeReader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_abortWrite;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_resetWriter;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter;
+    local:
+        *;
 };
--- a/make/mapfiles/libjsound/mapfile-vers	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libjsound/mapfile-vers	Fri Sep 02 02:41:37 2016 +0000
@@ -26,60 +26,60 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-            Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
-            Java_com_sun_media_sound_DirectAudioDevice_nClose;
-            Java_com_sun_media_sound_DirectAudioDevice_nFlush;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
-            Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
-            Java_com_sun_media_sound_DirectAudioDevice_nOpen;
-            Java_com_sun_media_sound_DirectAudioDevice_nRead;
-            Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
-            Java_com_sun_media_sound_DirectAudioDevice_nService;
-            Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nStart;
-            Java_com_sun_media_sound_DirectAudioDevice_nStop;
-            Java_com_sun_media_sound_DirectAudioDevice_nWrite;
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
-            Java_com_sun_media_sound_MidiInDevice_nClose;
-            Java_com_sun_media_sound_MidiInDevice_nGetMessages;
-            Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiInDevice_nOpen;
-            Java_com_sun_media_sound_MidiInDevice_nStart;
-            Java_com_sun_media_sound_MidiInDevice_nStop;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_MidiOutDevice_nClose;
-            Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiOutDevice_nOpen;
-            Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
-            Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_Platform_nGetExtraLibraries;
-            Java_com_sun_media_sound_Platform_nGetLibraryForFeature;
-            Java_com_sun_media_sound_Platform_nIsBigEndian;
-            Java_com_sun_media_sound_PortMixer_nClose;
-            Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
-            Java_com_sun_media_sound_PortMixer_nGetControls;
-            Java_com_sun_media_sound_PortMixer_nGetPortCount;
-            Java_com_sun_media_sound_PortMixer_nGetPortName;
-            Java_com_sun_media_sound_PortMixer_nGetPortType;
-            Java_com_sun_media_sound_PortMixer_nOpen;
-            Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
-            Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
-	local:
-	    *;
+    global:
+		Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
+		Java_com_sun_media_sound_DirectAudioDevice_nClose;
+		Java_com_sun_media_sound_DirectAudioDevice_nFlush;
+		Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
+		Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
+		Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
+		Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
+		Java_com_sun_media_sound_DirectAudioDevice_nOpen;
+		Java_com_sun_media_sound_DirectAudioDevice_nRead;
+		Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
+		Java_com_sun_media_sound_DirectAudioDevice_nService;
+		Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
+		Java_com_sun_media_sound_DirectAudioDevice_nStart;
+		Java_com_sun_media_sound_DirectAudioDevice_nStop;
+		Java_com_sun_media_sound_DirectAudioDevice_nWrite;
+		Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
+		Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
+		Java_com_sun_media_sound_MidiInDevice_nClose;
+		Java_com_sun_media_sound_MidiInDevice_nGetMessages;
+		Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
+		Java_com_sun_media_sound_MidiInDevice_nOpen;
+		Java_com_sun_media_sound_MidiInDevice_nStart;
+		Java_com_sun_media_sound_MidiInDevice_nStop;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
+		Java_com_sun_media_sound_MidiOutDevice_nClose;
+		Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
+		Java_com_sun_media_sound_MidiOutDevice_nOpen;
+		Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
+		Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
+		Java_com_sun_media_sound_Platform_nGetExtraLibraries;
+		Java_com_sun_media_sound_Platform_nGetLibraryForFeature;
+		Java_com_sun_media_sound_Platform_nIsBigEndian;
+		Java_com_sun_media_sound_PortMixer_nClose;
+		Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
+		Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
+		Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
+		Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
+		Java_com_sun_media_sound_PortMixer_nGetControls;
+		Java_com_sun_media_sound_PortMixer_nGetPortCount;
+		Java_com_sun_media_sound_PortMixer_nGetPortName;
+		Java_com_sun_media_sound_PortMixer_nGetPortType;
+		Java_com_sun_media_sound_PortMixer_nOpen;
+		Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
+		Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
+    local:
+        *;
 };
--- a/make/mapfiles/libjsoundalsa/mapfile-vers	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libjsoundalsa/mapfile-vers	Fri Sep 02 02:41:37 2016 +0000
@@ -26,57 +26,57 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
-            Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
-            Java_com_sun_media_sound_DirectAudioDevice_nClose;
-            Java_com_sun_media_sound_DirectAudioDevice_nFlush;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
-            Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
-            Java_com_sun_media_sound_DirectAudioDevice_nOpen;
-            Java_com_sun_media_sound_DirectAudioDevice_nRead;
-            Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
-            Java_com_sun_media_sound_DirectAudioDevice_nService;
-            Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nStart;
-            Java_com_sun_media_sound_DirectAudioDevice_nStop;
-            Java_com_sun_media_sound_DirectAudioDevice_nWrite;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_MidiInDevice_nClose;
-            Java_com_sun_media_sound_MidiInDevice_nGetMessages;
-            Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiInDevice_nOpen;
-            Java_com_sun_media_sound_MidiInDevice_nStart;
-            Java_com_sun_media_sound_MidiInDevice_nStop;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_MidiOutDevice_nClose;
-            Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiOutDevice_nOpen;
-            Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
-            Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
-            Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
-            Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
-            Java_com_sun_media_sound_PortMixer_nClose;
-            Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
-            Java_com_sun_media_sound_PortMixer_nGetControls;
-            Java_com_sun_media_sound_PortMixer_nGetPortCount;
-            Java_com_sun_media_sound_PortMixer_nGetPortName;
-            Java_com_sun_media_sound_PortMixer_nGetPortType;
-            Java_com_sun_media_sound_PortMixer_nOpen;
-	local:
-	    *;
+    global:
+        Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
+        Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
+        Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
+        Java_com_sun_media_sound_DirectAudioDevice_nClose;
+        Java_com_sun_media_sound_DirectAudioDevice_nFlush;
+        Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
+        Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
+        Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
+        Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
+        Java_com_sun_media_sound_DirectAudioDevice_nOpen;
+        Java_com_sun_media_sound_DirectAudioDevice_nRead;
+        Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
+        Java_com_sun_media_sound_DirectAudioDevice_nService;
+        Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
+        Java_com_sun_media_sound_DirectAudioDevice_nStart;
+        Java_com_sun_media_sound_DirectAudioDevice_nStop;
+        Java_com_sun_media_sound_DirectAudioDevice_nWrite;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
+        Java_com_sun_media_sound_MidiInDevice_nClose;
+        Java_com_sun_media_sound_MidiInDevice_nGetMessages;
+        Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
+        Java_com_sun_media_sound_MidiInDevice_nOpen;
+        Java_com_sun_media_sound_MidiInDevice_nStart;
+        Java_com_sun_media_sound_MidiInDevice_nStop;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
+        Java_com_sun_media_sound_MidiOutDevice_nClose;
+        Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
+        Java_com_sun_media_sound_MidiOutDevice_nOpen;
+        Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
+        Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
+        Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
+        Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
+        Java_com_sun_media_sound_PortMixer_nClose;
+        Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
+        Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
+        Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
+        Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
+        Java_com_sun_media_sound_PortMixer_nGetControls;
+        Java_com_sun_media_sound_PortMixer_nGetPortCount;
+        Java_com_sun_media_sound_PortMixer_nGetPortName;
+        Java_com_sun_media_sound_PortMixer_nGetPortType;
+        Java_com_sun_media_sound_PortMixer_nOpen;
+    local:
+        *;
 };
--- a/make/mapfiles/libsplashscreen/mapfile-vers	Thu Sep 01 23:20:11 2016 +0000
+++ b/make/mapfiles/libsplashscreen/mapfile-vers	Fri Sep 02 02:41:37 2016 +0000
@@ -26,24 +26,24 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-	global:
-		Java_java_awt_SplashScreen__1update;
-		Java_java_awt_SplashScreen__1isVisible;
-		Java_java_awt_SplashScreen__1getBounds;
-		Java_java_awt_SplashScreen__1getInstance;
-		Java_java_awt_SplashScreen__1close;
-                Java_java_awt_SplashScreen__1getImageFileName;
-                Java_java_awt_SplashScreen__1getImageJarName;
-                Java_java_awt_SplashScreen__1setImageData;
-                Java_java_awt_SplashScreen__1getScaleFactor;
+    global:
+        Java_java_awt_SplashScreen__1update;
+        Java_java_awt_SplashScreen__1isVisible;
+        Java_java_awt_SplashScreen__1getBounds;
+        Java_java_awt_SplashScreen__1getInstance;
+        Java_java_awt_SplashScreen__1close;
+        Java_java_awt_SplashScreen__1getImageFileName;
+        Java_java_awt_SplashScreen__1getImageJarName;
+        Java_java_awt_SplashScreen__1setImageData;
+        Java_java_awt_SplashScreen__1getScaleFactor;
 
-		SplashLoadMemory;
-		SplashLoadFile;
-		SplashInit;
-		SplashClose;
-                SplashSetFileJarName;
-                SplashSetScaleFactor;
-                SplashGetScaledImageName;
-	local:
-		*;
+        SplashLoadMemory;
+        SplashLoadFile;
+        SplashInit;
+        SplashClose;
+        SplashSetFileJarName;
+        SplashSetScaleFactor;
+        SplashGetScaledImageName;
+    local:
+        *;
 };
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Fri Sep 02 02:41:37 2016 +0000
@@ -1207,11 +1207,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double} then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -1326,11 +1331,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double}, then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -1631,11 +1641,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double} then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -2353,9 +2368,13 @@
      * the following conditions:
      * <ul>
      * <li>if the component type is anything other than {@code byte},
-     *     {@code short}, {@code char}, {@code int} or {@code long},
+     *     {@code short}, {@code char}, {@code int}, {@code long},
      *     {@code float}, or {@code double} then numeric atomic update access
      *     modes are unsupported.
+     * <li>if the field type is anything other than {@code boolean},
+     *     {@code byte}, {@code short}, {@code char}, {@code int} or
+     *     {@code long} then bitwise atomic update access modes are
+     *     unsupported.
      * </ul>
      * <p>
      * If the component type is {@code float} or {@code double} then numeric
@@ -2426,7 +2445,9 @@
      * If access is aligned then following access modes are supported and are
      * guaranteed to support atomic access:
      * <ul>
-     * <li>read write access modes for all {@code T};
+     * <li>read write access modes for all {@code T}, with the exception of
+     *     access modes {@code get} and {@code set} for {@code long} and
+     *     {@code double} on 32-bit platforms.
      * <li>atomic update access modes for {@code int}, {@code long},
      *     {@code float} or {@code double}.
      *     (Future major platform releases of the JDK may support additional
@@ -2434,6 +2455,9 @@
      * <li>numeric atomic update access modes for {@code int} and {@code long}.
      *     (Future major platform releases of the JDK may support additional
      *     numeric types for certain currently unsupported access modes.)
+     * <li>bitwise atomic update access modes for {@code int} and {@code long}.
+     *     (Future major platform releases of the JDK may support additional
+     *     numeric types for certain currently unsupported access modes.)
      * </ul>
      * <p>
      * Misaligned access, and therefore atomicity guarantees, may be determined
@@ -2508,7 +2532,9 @@
      * If access is aligned then following access modes are supported and are
      * guaranteed to support atomic access:
      * <ul>
-     * <li>read write access modes for all {@code T};
+     * <li>read write access modes for all {@code T}, with the exception of
+     *     access modes {@code get} and {@code set} for {@code long} and
+     *     {@code double} on 32-bit platforms.
      * <li>atomic update access modes for {@code int}, {@code long},
      *     {@code float} or {@code double}.
      *     (Future major platform releases of the JDK may support additional
@@ -2516,6 +2542,9 @@
      * <li>numeric atomic update access modes for {@code int} and {@code long}.
      *     (Future major platform releases of the JDK may support additional
      *     numeric types for certain currently unsupported access modes.)
+     * <li>bitwise atomic update access modes for {@code int} and {@code long}.
+     *     (Future major platform releases of the JDK may support additional
+     *     numeric types for certain currently unsupported access modes.)
      * </ul>
      * <p>
      * Misaligned access, and therefore atomicity guarantees, may be determined
--- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Fri Sep 02 02:41:37 2016 +0000
@@ -134,21 +134,39 @@
  * The set of corresponding access mode methods belonging to this group
  * consists of the methods
  * {@link #compareAndSet compareAndSet},
+ * {@link #weakCompareAndSetPlain weakCompareAndSetPlain},
  * {@link #weakCompareAndSet weakCompareAndSet},
- * {@link #weakCompareAndSetVolatile weakCompareAndSetVolatile},
  * {@link #weakCompareAndSetAcquire weakCompareAndSetAcquire},
  * {@link #weakCompareAndSetRelease weakCompareAndSetRelease},
  * {@link #compareAndExchangeAcquire compareAndExchangeAcquire},
  * {@link #compareAndExchange compareAndExchange},
  * {@link #compareAndExchangeRelease compareAndExchangeRelease},
- * {@link #getAndSet getAndSet}.
+ * {@link #getAndSet getAndSet},
+ * {@link #getAndSetAcquire getAndSetAcquire},
+ * {@link #getAndSetRelease getAndSetRelease}.
  * <li>numeric atomic update access modes that, for example, atomically get and
  * set with addition the value of a variable under specified memory ordering
  * effects.
  * The set of corresponding access mode methods belonging to this group
  * consists of the methods
  * {@link #getAndAdd getAndAdd},
+ * {@link #getAndAddAcquire getAndAddAcquire},
+ * {@link #getAndAddRelease getAndAddRelease},
  * {@link #addAndGet addAndGet}.
+ * <li>bitwise atomic update access modes that, for example, atomically get and
+ * bitwise OR the value of a variable under specified memory ordering
+ * effects.
+ * The set of corresponding access mode methods belonging to this group
+ * consists of the methods
+ * {@link #getAndBitwiseOr getAndBitwiseOr},
+ * {@link #getAndBitwiseOrAcquire getAndBitwiseOrAcquire},
+ * {@link #getAndBitwiseOrRelease getAndBitwiseOrRelease},
+ * {@link #getAndBitwiseAnd getAndBitwiseAnd},
+ * {@link #getAndBitwiseAndAcquire getAndBitwiseAndAcquire},
+ * {@link #getAndBitwiseAndRelease getAndBitwiseAndRelease},
+ * {@link #getAndBitwiseXor getAndBitwiseXor},
+ * {@link #getAndBitwiseXorAcquire getAndBitwiseXorAcquire},
+ * {@link #getAndBitwiseXorRelease getAndBitwiseXorRelease}.
  * </ul>
  *
  * <p>Factory methods that produce or {@link java.lang.invoke.MethodHandles.Lookup
@@ -163,8 +181,8 @@
  * VarHandle instances and the corresponding method never throws
  * {@code UnsupportedOperationException}.
  * If a VarHandle references a read-only variable (for example a {@code final}
- * field) then write, atomic update and numeric atomic update access modes are
- * not supported and corresponding methods throw
+ * field) then write, atomic update, numeric atomic update, and bitwise atomic
+ * update access modes are not supported and corresponding methods throw
  * {@code UnsupportedOperationException}.
  * Read/write access modes (if supported), with the exception of
  * {@code get} and {@code set}, provide atomic access for
@@ -816,8 +834,8 @@
      * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
-     * weakCompareAndSet} must match the access mode type that is the result of
-     * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
+     * weakCompareAndSetPlain} must match the access mode type that is the result of
+     * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN)}
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
@@ -838,7 +856,7 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    boolean weakCompareAndSet(Object... args);
+    boolean weakCompareAndSetPlain(Object... args);
 
     /**
      * Possibly atomically sets the value of a variable to the {@code newValue}
@@ -853,8 +871,8 @@
      * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
-     * weakCompareAndSetVolatile} must match the access mode type that is the
-     * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE)}
+     * weakCompareAndSet} must match the access mode type that is the
+     * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
@@ -875,7 +893,7 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    boolean weakCompareAndSetVolatile(Object... args);
+    boolean weakCompareAndSet(Object... args);
 
     /**
      * Possibly atomically sets the value of a variable to the {@code newValue}
@@ -986,6 +1004,71 @@
     @HotSpotIntrinsicCandidate
     Object getAndSet(Object... args);
 
+    /**
+     * Atomically sets the value of a variable to the {@code newValue} with the
+     * memory semantics of {@link #set} and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndSetAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T newValue)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndSetAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the {@code newValue} with the
+     * memory semantics of {@link #setRelease} and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndSetRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T newValue)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndSetRelease(Object... args);
 
     // Primitive adders
     // Throw UnsupportedOperationException for refs
@@ -1025,21 +1108,21 @@
 
     /**
      * Atomically adds the {@code value} to the current value of a variable with
-     * the memory semantics of {@link #setVolatile}, and returns the variable's
-     * current (updated) value, as accessed with the memory semantics of
-     * {@link #getVolatile}.
+     * the memory semantics of {@link #set}, and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
      *
      * <p>The method signature is of the form {@code (CT, T value)T}.
      *
-     * <p>The symbolic type descriptor at the call site of {@code addAndGet}
+     * <p>The symbolic type descriptor at the call site of {@code getAndAddAcquire}
      * must match the access mode type that is the result of calling
-     * {@code accessModeType(VarHandle.AccessMode.ADD_AND_GET)} on this
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE)} on this
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
      * {@code (CT, T value)}
      * , statically represented using varargs.
-     * @return the signature-polymorphic result that is the current value of
+     * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
@@ -1054,7 +1137,378 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    Object addAndGet(Object... args);
+    Object getAndAddAcquire(Object... args);
+
+    /**
+     * Atomically adds the {@code value} to the current value of a variable with
+     * the memory semantics of {@link #setRelease}, and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>The method signature is of the form {@code (CT, T value)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndAddRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T value)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndAddRelease(Object... args);
+
+
+    // Bitwise operations
+    // Throw UnsupportedOperationException for refs
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOr}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOr(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOrAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOrRelease(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAnd}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAnd(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAndAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAndRelease(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXor}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXor(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXorAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXorRelease(Object... args);
+
 
     enum AccessType {
         GET(Object.class),
@@ -1204,18 +1658,18 @@
         /**
          * The access mode whose access is specified by the corresponding
          * method
+         * {@link VarHandle#weakCompareAndSetPlain VarHandle.weakCompareAndSetPlain}
+         */
+        WEAK_COMPARE_AND_SET_PLAIN("weakCompareAndSetPlain", AccessType.COMPARE_AND_SWAP),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
          * {@link VarHandle#weakCompareAndSet VarHandle.weakCompareAndSet}
          */
         WEAK_COMPARE_AND_SET("weakCompareAndSet", AccessType.COMPARE_AND_SWAP),
         /**
          * The access mode whose access is specified by the corresponding
          * method
-         * {@link VarHandle#weakCompareAndSetVolatile VarHandle.weakCompareAndSetVolatile}
-         */
-        WEAK_COMPARE_AND_SET_VOLATILE("weakCompareAndSetVolatile", AccessType.COMPARE_AND_SWAP),
-        /**
-         * The access mode whose access is specified by the corresponding
-         * method
          * {@link VarHandle#weakCompareAndSetAcquire VarHandle.weakCompareAndSetAcquire}
          */
         WEAK_COMPARE_AND_SET_ACQUIRE("weakCompareAndSetAcquire", AccessType.COMPARE_AND_SWAP),
@@ -1234,15 +1688,87 @@
         /**
          * The access mode whose access is specified by the corresponding
          * method
+         * {@link VarHandle#getAndSetAcquire VarHandle.getAndSetAcquire}
+         */
+        GET_AND_SET_ACQUIRE("getAndSetAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndSetRelease VarHandle.getAndSetRelease}
+         */
+        GET_AND_SET_RELEASE("getAndSetRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
          * {@link VarHandle#getAndAdd VarHandle.getAndAdd}
          */
         GET_AND_ADD("getAndAdd", AccessType.GET_AND_UPDATE),
         /**
          * The access mode whose access is specified by the corresponding
          * method
-         * {@link VarHandle#addAndGet VarHandle.addAndGet}
+         * {@link VarHandle#getAndAddAcquire VarHandle.getAndAddAcquire}
          */
-        ADD_AND_GET("addAndGet", AccessType.GET_AND_UPDATE),
+        GET_AND_ADD_ACQUIRE("getAndAddAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndAddRelease VarHandle.getAndAddRelease}
+         */
+        GET_AND_ADD_RELEASE("getAndAddRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOr VarHandle.getAndBitwiseOr}
+         */
+        GET_AND_BITWISE_OR("getAndBitwiseOr", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOrRelease VarHandle.getAndBitwiseOrRelease}
+         */
+        GET_AND_BITWISE_OR_RELEASE("getAndBitwiseOrRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOrAcquire VarHandle.getAndBitwiseOrAcquire}
+         */
+        GET_AND_BITWISE_OR_ACQUIRE("getAndBitwiseOrAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAnd VarHandle.getAndBitwiseAnd}
+         */
+        GET_AND_BITWISE_AND("getAndBitwiseAnd", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAndRelease VarHandle.getAndBitwiseAndRelease}
+         */
+        GET_AND_BITWISE_AND_RELEASE("getAndBitwiseAndRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAndAcquire VarHandle.getAndBitwiseAndAcquire}
+         */
+        GET_AND_BITWISE_AND_ACQUIRE("getAndBitwiseAndAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXor VarHandle.getAndBitwiseXor}
+         */
+        GET_AND_BITWISE_XOR("getAndBitwiseXor", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXorRelease VarHandle.getAndBitwiseXorRelease}
+         */
+        GET_AND_BITWISE_XOR_RELEASE("getAndBitwiseXorRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXorAcquire VarHandle.getAndBitwiseXorAcquire}
+         */
+        GET_AND_BITWISE_XOR_ACQUIRE("getAndBitwiseXorAcquire", AccessType.GET_AND_UPDATE),
         ;
 
         static final Map<String, AccessMode> methodNameToAccessMode;
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Fri Sep 02 02:41:37 2016 +0000
@@ -156,7 +156,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -164,7 +164,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$Volatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -193,6 +193,20 @@
                                           handle.fieldOffset,
                                           {#if[Object]?handle.fieldType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndSet$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndSet$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -204,12 +218,85 @@
         }
 
         @ForceInline
-        static $type$ addAndGet(FieldInstanceReadWrite handle, Object holder, $type$ value) {
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+        static $type$ getAndAddAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                        handle.fieldOffset,
-                                       value) + value);
+                                       value);
         }
+
+        @ForceInline
+        static $type$ getAndAddRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(FieldInstanceReadWrite.class, Object.class, $type$.class);
     }
@@ -337,7 +424,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -345,7 +432,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$Volatile(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -374,6 +461,20 @@
                                           handle.fieldOffset,
                                           {#if[Object]?handle.fieldType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndSet$Type$Acquire(handle.base,
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndSet$Type$Release(handle.base,
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -385,12 +486,84 @@
         }
 
         @ForceInline
-        static $type$ addAndGet(FieldStaticReadWrite handle, $type$ value) {
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(handle.base,
+        static $type$ getAndAddAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Acquire(handle.base,
                                        handle.fieldOffset,
-                                       value) + value);
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
         }
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXor(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(FieldStaticReadWrite.class, null, $type$.class);
     }
@@ -562,7 +735,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
 #if[Object]
             Object[] array = (Object[]) handle.arrayType.cast(oarray);
 #else[Object]
@@ -575,7 +748,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
 #if[Object]
             Object[] array = (Object[]) handle.arrayType.cast(oarray);
 #else[Object]
@@ -624,33 +797,131 @@
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(Array handle, Object oarray, int index, $type$ value) {
+#if[Object]
+            Object[] array = (Object[]) handle.arrayType.cast(oarray);
+#else[Object]
+            $type$[] array = ($type$[]) oarray;
+#end[Object]
+            return UNSAFE.getAndSet$Type$Acquire(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    {#if[Object]?handle.componentType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(Array handle, Object oarray, int index, $type$ value) {
+#if[Object]
+            Object[] array = (Object[]) handle.arrayType.cast(oarray);
+#else[Object]
+            $type$[] array = ($type$[]) oarray;
+#end[Object]
+            return UNSAFE.getAndSet$Type$Release(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    {#if[Object]?handle.componentType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
         @ForceInline
         static $type$ getAndAdd(Array handle, Object oarray, int index, $type$ value) {
-#if[Object]
-            Object[] array = (Object[]) handle.arrayType.cast(oarray);
-#else[Object]
             $type$[] array = ($type$[]) oarray;
-#end[Object]
             return UNSAFE.getAndAdd$Type$(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     value);
         }
 
         @ForceInline
-        static $type$ addAndGet(Array handle, Object oarray, int index, $type$ value) {
-#if[Object]
-            Object[] array = (Object[]) handle.arrayType.cast(oarray);
-#else[Object]
+        static $type$ getAndAddAcquire(Array handle, Object oarray, int index, $type$ value) {
             $type$[] array = ($type$[]) oarray;
-#end[Object]
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(array,
+            return UNSAFE.getAndAdd$Type$Acquire(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
-                    value) + value);
+                    value);
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndAdd$Type$Release(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    value);
         }
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(Array.class, {#if[Object]?Object[].class:$type$[].class}, {#if[Object]?Object.class:$type$.class}, int.class);
     }
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Fri Sep 02 02:41:37 2016 +0000
@@ -223,7 +223,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
             return UNSAFE.weakCompareAndSwap$RawType$(
                     ba,
@@ -232,7 +232,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
             return UNSAFE.weakCompareAndSwap$RawType$Volatile(
                     ba,
@@ -267,6 +267,26 @@
                                       address(ba, index(ba, index)),
                                       convEndian(handle.be, value)));
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Acquire(
+                                      ba,
+                                      address(ba, index(ba, index)),
+                                      convEndian(handle.be, value)));
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Release(
+                                      ba,
+                                      address(ba, index(ba, index)),
+                                      convEndian(handle.be, value)));
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -284,6 +304,32 @@
         }
 
         @ForceInline
+        static $type$ getAndAddAcquire(ArrayHandle handle, Object oba, int index, $type$ delta) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(ba, index, delta);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(ArrayHandle handle, Object oba, int index, $type$ delta) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(ba, index, delta);
+            }
+        }
+
+        @ForceInline
         static $type$ getAndAddConvEndianWithCAS(byte[] ba, int index, $type$ delta) {
             $type$ nativeExpectedValue, expectedValue;
             long offset = address(ba, index(ba, index));
@@ -294,12 +340,162 @@
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
+#end[AtomicAdd]
+#if[Bitwise]
 
         @ForceInline
-        static $type$ addAndGet(ArrayHandle handle, Object oba, int index, $type$ delta) {
-            return getAndAdd(handle, oba, index, delta) + delta;
+        static $type$ getAndBitwiseOr(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
         }
-#end[AtomicAdd]
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXor(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
+            return expectedValue;
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(ArrayHandle.class, byte[].class, $type$.class, int.class);
     }
@@ -466,7 +662,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
             return UNSAFE.weakCompareAndSwap$RawType$(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
@@ -475,7 +671,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
             return UNSAFE.weakCompareAndSwap$RawType$Volatile(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
@@ -510,6 +706,26 @@
                                       address(bb, indexRO(bb, index)),
                                       convEndian(handle.be, value)));
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Acquire(
+                                      UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                                      address(bb, indexRO(bb, index)),
+                                      convEndian(handle.be, value)));
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Release(
+                                      UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                                      address(bb, indexRO(bb, index)),
+                                      convEndian(handle.be, value)));
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -527,6 +743,32 @@
         }
 
         @ForceInline
+        static $type$ getAndAddAcquire(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(bb, index, delta);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(bb, index, delta);
+            }
+        }
+
+        @ForceInline
         static $type$ getAndAddConvEndianWithCAS(ByteBuffer bb, int index, $type$ delta) {
             $type$ nativeExpectedValue, expectedValue;
             Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
@@ -538,12 +780,166 @@
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
+#end[AtomicAdd]
+#if[Bitwise]
 
         @ForceInline
-        static $type$ addAndGet(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
-            return getAndAdd(handle, obb, index, delta) + delta;
+        static $type$ getAndBitwiseOr(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
         }
-#end[AtomicAdd]
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
+            return expectedValue;
+        }
+        
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
+            return expectedValue;
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(ByteBufferHandle.class, ByteBuffer.class, $type$.class, int.class);
     }
--- a/src/java.base/share/classes/java/net/ServerSocket.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/net/ServerSocket.java	Fri Sep 02 02:41:37 2016 +0000
@@ -25,8 +25,13 @@
 
 package java.net;
 
+import jdk.internal.misc.JavaNetSocketAccess;
+import jdk.internal.misc.SharedSecrets;
+
 import java.io.FileDescriptor;
 import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.nio.channels.ServerSocketChannel;
 import java.security.AccessController;
 import java.security.PrivilegedExceptionAction;
@@ -1011,4 +1016,27 @@
             return options;
         }
     }
+
+    static {
+        SharedSecrets.setJavaNetSocketAccess(
+            new JavaNetSocketAccess() {
+                @Override
+                public ServerSocket newServerSocket(SocketImpl impl) {
+                    return new ServerSocket(impl);
+                }
+
+                @Override
+                public SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass) {
+                    try {
+                        Constructor<? extends SocketImpl> ctor =
+                            implClass.getDeclaredConstructor();
+                        return ctor.newInstance();
+                    } catch (NoSuchMethodException | InstantiationException |
+                             IllegalAccessException | InvocationTargetException e) {
+                        throw new AssertionError(e);
+                    }
+                }
+            }
+        );
+    }
 }
--- a/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Fri Sep 02 02:41:37 2016 +0000
@@ -521,7 +521,7 @@
                 else
                     break;
             }
-            else if (STACK.weakCompareAndSetVolatile(this, p, (p = p.next)))
+            else if (STACK.weakCompareAndSet(this, p, (p = p.next)))
                 unlinked = true;
             else
                 p = stack;
@@ -532,7 +532,7 @@
             if (q.isLive()) {
                 p = q;
                 q = s;
-            } else if (NEXT.weakCompareAndSetVolatile(p, q, s))
+            } else if (NEXT.weakCompareAndSet(p, q, s))
                 break;
             else
                 q = p.next;
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Fri Sep 02 02:41:37 2016 +0000
@@ -330,7 +330,7 @@
                         // for e to become an element of this deque,
                         // and for newNode to become "live".
                         if (p != h) // hop two nodes at a time; failure is OK
-                            HEAD.weakCompareAndSetVolatile(this, h, newNode);
+                            HEAD.weakCompareAndSet(this, h, newNode);
                         return;
                     }
                     // Lost CAS race to another thread; re-read prev
@@ -362,7 +362,7 @@
                         // for e to become an element of this deque,
                         // and for newNode to become "live".
                         if (p != t) // hop two nodes at a time; failure is OK
-                            TAIL.weakCompareAndSetVolatile(this, t, newNode);
+                            TAIL.weakCompareAndSet(this, t, newNode);
                         return;
                     }
                     // Lost CAS race to another thread; re-read next
@@ -1153,12 +1153,12 @@
                     if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
                         // Successful CAS is the linearization point
                         // for all elements to be added to this deque.
-                        if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+                        if (!TAIL.weakCompareAndSet(this, t, last)) {
                             // Try a little harder to update tail,
                             // since we may be adding many elements.
                             t = tail;
                             if (last.next == null)
-                                TAIL.weakCompareAndSetVolatile(this, t, last);
+                                TAIL.weakCompareAndSet(this, t, last);
                         }
                         return true;
                     }
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Fri Sep 02 02:41:37 2016 +0000
@@ -308,7 +308,7 @@
                     // for e to become an element of this queue,
                     // and for newNode to become "live".
                     if (p != t) // hop two nodes at a time; failure is OK
-                        TAIL.weakCompareAndSetVolatile(this, t, newNode);
+                        TAIL.weakCompareAndSet(this, t, newNode);
                     return true;
                 }
                 // Lost CAS race to another thread; re-read next
@@ -477,7 +477,7 @@
 
                 next = succ(p);
                 if (pred != null && next != null) // unlink
-                    NEXT.weakCompareAndSetVolatile(pred, p, next);
+                    NEXT.weakCompareAndSet(pred, p, next);
                 if (removed)
                     return true;
             }
@@ -524,12 +524,12 @@
                 if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
                     // Successful CAS is the linearization point
                     // for all elements to be added to this queue.
-                    if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+                    if (!TAIL.weakCompareAndSet(this, t, last)) {
                         // Try a little harder to update tail,
                         // since we may be adding many elements.
                         t = tail;
                         if (last.next == null)
-                            TAIL.weakCompareAndSetVolatile(this, t, last);
+                            TAIL.weakCompareAndSet(this, t, last);
                     }
                     return true;
                 }
--- a/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java	Fri Sep 02 02:41:37 2016 +0000
@@ -551,7 +551,7 @@
     public final int decrementPendingCountUnlessZero() {
         int c;
         do {} while ((c = pending) != 0 &&
-                     !PENDING.weakCompareAndSetVolatile(this, c, c - 1));
+                     !PENDING.weakCompareAndSet(this, c, c - 1));
         return c;
     }
 
@@ -584,7 +584,7 @@
                     return;
                 }
             }
-            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+            else if (PENDING.weakCompareAndSet(a, c, c - 1))
                 return;
         }
     }
@@ -607,7 +607,7 @@
                     return;
                 }
             }
-            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+            else if (PENDING.weakCompareAndSet(a, c, c - 1))
                 return;
         }
     }
@@ -652,7 +652,7 @@
         for (int c;;) {
             if ((c = pending) == 0)
                 return this;
-            else if (PENDING.weakCompareAndSetVolatile(this, c, c - 1))
+            else if (PENDING.weakCompareAndSet(this, c, c - 1))
                 return null;
         }
     }
--- a/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Fri Sep 02 02:41:37 2016 +0000
@@ -42,15 +42,10 @@
 import java.security.Permissions;
 import java.security.ProtectionDomain;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.function.Predicate;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.CountedCompleter;
-import java.util.concurrent.ForkJoinTask;
-import java.util.concurrent.ForkJoinWorkerThread;
 import java.util.concurrent.locks.LockSupport;
 
 /**
@@ -1413,7 +1408,7 @@
         }
         if (phase != QUIET) {                         // else pre-adjusted
             long c;                                   // decrement counts
-            do {} while (!CTL.weakCompareAndSetVolatile
+            do {} while (!CTL.weakCompareAndSet
                          (this, c = ctl, ((RC_MASK & (c - RC_UNIT)) |
                                           (TC_MASK & (c - TC_UNIT)) |
                                           (SP_MASK & c))));
@@ -1608,7 +1603,7 @@
                     do {
                         w.stackPred = (int)(c = ctl);
                         nc = ((c - RC_UNIT) & UC_MASK) | (SP_MASK & np);
-                    } while (!CTL.weakCompareAndSetVolatile(this, c, nc));
+                    } while (!CTL.weakCompareAndSet(this, c, nc));
                 }
                 else {                                  // already queued
                     int pred = w.stackPred;
--- a/src/java.base/share/classes/java/util/concurrent/FutureTask.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/FutureTask.java	Fri Sep 02 02:41:37 2016 +0000
@@ -361,7 +361,7 @@
     private void finishCompletion() {
         // assert state > COMPLETING;
         for (WaitNode q; (q = waiters) != null;) {
-            if (WAITERS.weakCompareAndSetVolatile(this, q, null)) {
+            if (WAITERS.weakCompareAndSet(this, q, null)) {
                 for (;;) {
                     Thread t = q.thread;
                     if (t != null) {
@@ -423,7 +423,7 @@
                 q = new WaitNode();
             }
             else if (!queued)
-                queued = WAITERS.weakCompareAndSetVolatile(this, q.next = waiters, q);
+                queued = WAITERS.weakCompareAndSet(this, q.next = waiters, q);
             else if (timed) {
                 final long parkNanos;
                 if (startTime == 0L) { // first time
--- a/src/java.base/share/classes/java/util/concurrent/Phaser.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/Phaser.java	Fri Sep 02 02:41:37 2016 +0000
@@ -456,7 +456,7 @@
                         // finish registration whenever parent registration
                         // succeeded, even when racing with termination,
                         // since these are part of the same "transaction".
-                        while (!STATE.weakCompareAndSetVolatile
+                        while (!STATE.weakCompareAndSet
                                (this, s,
                                 ((long)phase << PHASE_SHIFT) | adjust)) {
                             s = state;
@@ -488,7 +488,7 @@
             // CAS to root phase with current parties, tripping unarrived
             while ((phase = (int)(root.state >>> PHASE_SHIFT)) !=
                    (int)(s >>> PHASE_SHIFT) &&
-                   !STATE.weakCompareAndSetVolatile
+                   !STATE.weakCompareAndSet
                    (this, s,
                     s = (((long)phase << PHASE_SHIFT) |
                          ((phase < 0) ? (s & COUNTS_MASK) :
--- a/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Fri Sep 02 02:41:37 2016 +0000
@@ -1203,7 +1203,7 @@
                     } catch (RuntimeException | Error ex) { // back out
                         do {} while (((c = ctl) & DISABLED) == 0 &&
                                      (c & ACTIVE) != 0 &&
-                                     !CTL.weakCompareAndSetVolatile
+                                     !CTL.weakCompareAndSet
                                      (this, c, c & ~ACTIVE));
                         throw ex;
                     }
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Fri Sep 02 02:41:37 2016 +0000
@@ -106,16 +106,16 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
      */
     public boolean weakCompareAndSet(boolean expectedValue, boolean newValue) {
-        return VALUE.weakCompareAndSet(this,
-                                       (expectedValue ? 1 : 0),
-                                       (newValue ? 1 : 0));
+        return VALUE.weakCompareAndSetPlain(this,
+                                            (expectedValue ? 1 : 0),
+                                            (newValue ? 1 : 0));
     }
 
     /**
@@ -285,7 +285,7 @@
      * Possibly atomically sets the value to {@code newValue} if the current
      * value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -293,9 +293,9 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(boolean expectedValue, boolean newValue) {
-        return VALUE.weakCompareAndSetVolatile(this,
-                                               (expectedValue ? 1 : 0),
-                                               (newValue ? 1 : 0));
+        return VALUE.weakCompareAndSet(this,
+                                       (expectedValue ? 1 : 0),
+                                       (newValue ? 1 : 0));
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Fri Sep 02 02:41:37 2016 +0000
@@ -146,7 +146,7 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -217,7 +217,7 @@
 
     /**
      * Atomically adds the given value to the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param delta the value to add
      * @return the updated value
@@ -490,7 +490,7 @@
      * Possibly atomically sets the value to {@code newValue} if
      * the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Fri Sep 02 02:41:37 2016 +0000
@@ -149,7 +149,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -157,7 +157,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, int expectedValue, int newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -200,7 +200,7 @@
 
     /**
      * Atomically increments the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, 1)}.
      *
@@ -208,12 +208,12 @@
      * @return the updated value
      */
     public final int incrementAndGet(int i) {
-        return (int)AA.addAndGet(array, i, 1);
+        return (int)AA.getAndAdd(array, i, 1) + 1;
     }
 
     /**
      * Atomically decrements the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, -1)}.
      *
@@ -221,19 +221,19 @@
      * @return the updated value
      */
     public final int decrementAndGet(int i) {
-        return (int)AA.addAndGet(array, i, -1);
+        return (int)AA.getAndAdd(array, i, -1) - 1;
     }
 
     /**
      * Atomically adds the given value to the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param i the index
      * @param delta the value to add
      * @return the updated value
      */
     public final int addAndGet(int i, int delta) {
-        return (int)AA.addAndGet(array, i, delta);
+        return (int)AA.getAndAdd(array, i, delta) + delta;
     }
 
     /**
@@ -489,7 +489,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -498,7 +498,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, int expectedValue, int newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Fri Sep 02 02:41:37 2016 +0000
@@ -162,7 +162,7 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -209,7 +209,7 @@
 
     /**
      * Atomically increments the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(1)}.
      *
@@ -221,7 +221,7 @@
 
     /**
      * Atomically decrements the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(-1)}.
      *
@@ -233,7 +233,7 @@
 
     /**
      * Atomically adds the given value to the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param delta the value to add
      * @return the updated value
@@ -504,7 +504,7 @@
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Fri Sep 02 02:41:37 2016 +0000
@@ -149,7 +149,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -157,7 +157,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, long expectedValue, long newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -200,7 +200,7 @@
 
     /**
      * Atomically increments the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, 1)}.
      *
@@ -208,12 +208,12 @@
      * @return the updated value
      */
     public final long incrementAndGet(int i) {
-        return (long)AA.addAndGet(array, i, 1L);
+        return (long)AA.getAndAdd(array, i, 1L) + 1L;
     }
 
     /**
      * Atomically decrements the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, -1)}.
      *
@@ -221,19 +221,19 @@
      * @return the updated value
      */
     public final long decrementAndGet(int i) {
-        return (long)AA.addAndGet(array, i, -1L);
+        return (long)AA.getAndAdd(array, i, -1L) - 1L;
     }
 
     /**
      * Atomically adds the given value to the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param i the index
      * @param delta the value to add
      * @return the updated value
      */
     public long addAndGet(int i, long delta) {
-        return (long)AA.addAndGet(array, i, delta);
+        return (long)AA.getAndAdd(array, i, delta) + delta;
     }
 
     /**
@@ -489,7 +489,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -498,7 +498,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, long expectedValue, long newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Fri Sep 02 02:41:37 2016 +0000
@@ -125,14 +125,14 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(V expectedValue, V newValue) {
-        return VALUE.weakCompareAndSet(this, expectedValue, newValue);
+        return VALUE.weakCompareAndSetPlain(this, expectedValue, newValue);
     }
 
     /**
@@ -370,7 +370,7 @@
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -378,7 +378,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(V expectedValue, V newValue) {
-        return VALUE.weakCompareAndSetVolatile(this, expectedValue, newValue);
+        return VALUE.weakCompareAndSet(this, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Fri Sep 02 02:41:37 2016 +0000
@@ -155,7 +155,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -163,7 +163,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, E expectedValue, E newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -451,7 +451,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -460,7 +460,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, E expectedValue, E newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java	Fri Sep 02 02:41:37 2016 +0000
@@ -1123,14 +1123,14 @@
             }
             else if ((p = wtail) == null) { // initialize queue
                 WNode hd = new WNode(WMODE, null);
-                if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+                if (WHEAD.weakCompareAndSet(this, null, hd))
                     wtail = hd;
             }
             else if (node == null)
                 node = new WNode(WMODE, p);
             else if (node.prev != p)
                 node.prev = p;
-            else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+            else if (WTAIL.weakCompareAndSet(this, p, node)) {
                 p.next = node;
                 break;
             }
@@ -1162,7 +1162,7 @@
             else if (h != null) { // help release stale waiters
                 WNode c; Thread w;
                 while ((c = h.cowait) != null) {
-                    if (WCOWAIT.weakCompareAndSetVolatile(h, c, c.cowait) &&
+                    if (WCOWAIT.weakCompareAndSet(h, c, c.cowait) &&
                         (w = c.thread) != null)
                         LockSupport.unpark(w);
                 }
@@ -1247,7 +1247,7 @@
             }
             if (p == null) { // initialize queue
                 WNode hd = new WNode(WMODE, null);
-                if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+                if (WHEAD.weakCompareAndSet(this, null, hd))
                     wtail = hd;
             }
             else if (node == null)
@@ -1255,7 +1255,7 @@
             else if (h == p || p.mode != RMODE) {
                 if (node.prev != p)
                     node.prev = p;
-                else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+                else if (WTAIL.weakCompareAndSet(this, p, node)) {
                     p.next = node;
                     break;
                 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/misc/JavaNetSocketAccess.java	Fri Sep 02 02:41:37 2016 +0000
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.net.ServerSocket;
+import java.net.SocketImpl;
+
+public interface JavaNetSocketAccess {
+    /**
+     * Creates a ServerSocket associated with the given SocketImpl.
+     */
+    ServerSocket newServerSocket(SocketImpl impl);
+
+    /*
+     * Constructs a SocketImpl instance of the given class.
+     */
+    SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass);
+}
--- a/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Fri Sep 02 02:41:37 2016 +0000
@@ -55,6 +55,7 @@
     private static JavaNetAccess javaNetAccess;
     private static JavaNetInetAddressAccess javaNetInetAddressAccess;
     private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
+    private static JavaNetSocketAccess javaNetSocketAccess;
     private static JavaNioAccess javaNioAccess;
     private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
     private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
@@ -161,6 +162,16 @@
         return javaNetHttpCookieAccess;
     }
 
+    public static void setJavaNetSocketAccess(JavaNetSocketAccess jnsa) {
+        javaNetSocketAccess = jnsa;
+    }
+
+    public static JavaNetSocketAccess getJavaNetSocketAccess() {
+        if (javaNetSocketAccess == null)
+            unsafe.ensureClassInitialized(java.net.ServerSocket.class);
+        return javaNetSocketAccess;
+    }
+
     public static void setJavaNioAccess(JavaNioAccess jna) {
         javaNioAccess = jna;
     }
--- a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Fri Sep 02 02:41:37 2016 +0000
@@ -2278,6 +2278,24 @@
         return v;
     }
 
+    @ForceInline
+    public final int getAndAddIntRelease(Object o, long offset, int delta) {
+        int v;
+        do {
+            v = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset, v, v + delta));
+        return v;
+    }
+
+    @ForceInline
+    public final int getAndAddIntAcquire(Object o, long offset, int delta) {
+        int v;
+        do {
+            v = getIntAcquire(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset, v, v + delta));
+        return v;
+    }
+
     /**
      * Atomically adds the given value to the current value of a field
      * or array element within the given object {@code o}
@@ -2298,6 +2316,24 @@
         return v;
     }
 
+    @ForceInline
+    public final long getAndAddLongRelease(Object o, long offset, long delta) {
+        long v;
+        do {
+            v = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset, v, v + delta));
+        return v;
+    }
+
+    @ForceInline
+    public final long getAndAddLongAcquire(Object o, long offset, long delta) {
+        long v;
+        do {
+            v = getLongAcquire(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset, v, v + delta));
+        return v;
+    }
+
     @HotSpotIntrinsicCandidate
     public final byte getAndAddByte(Object o, long offset, byte delta) {
         byte v;
@@ -2307,6 +2343,24 @@
         return v;
     }
 
+    @ForceInline
+    public final byte getAndAddByteRelease(Object o, long offset, byte delta) {
+        byte v;
+        do {
+            v = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset, v, (byte) (v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final byte getAndAddByteAcquire(Object o, long offset, byte delta) {
+        byte v;
+        do {
+            v = getByteAcquire(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset, v, (byte) (v + delta)));
+        return v;
+    }
+
     @HotSpotIntrinsicCandidate
     public final short getAndAddShort(Object o, long offset, short delta) {
         short v;
@@ -2317,11 +2371,39 @@
     }
 
     @ForceInline
+    public final short getAndAddShortRelease(Object o, long offset, short delta) {
+        short v;
+        do {
+            v = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset, v, (short) (v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final short getAndAddShortAcquire(Object o, long offset, short delta) {
+        short v;
+        do {
+            v = getShortAcquire(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset, v, (short) (v + delta)));
+        return v;
+    }
+
+    @ForceInline
     public final char getAndAddChar(Object o, long offset, char delta) {
         return (char) getAndAddShort(o, offset, (short) delta);
     }
 
     @ForceInline
+    public final char getAndAddCharRelease(Object o, long offset, char delta) {
+        return (char) getAndAddShortRelease(o, offset, (short) delta);
+    }
+
+    @ForceInline
+    public final char getAndAddCharAcquire(Object o, long offset, char delta) {
+        return (char) getAndAddShortAcquire(o, offset, (short) delta);
+    }
+
+    @ForceInline
     public final float getAndAddFloat(Object o, long offset, float delta) {
         int expectedBits;
         float v;
@@ -2337,6 +2419,36 @@
     }
 
     @ForceInline
+    public final float getAndAddFloatRelease(Object o, long offset, float delta) {
+        int expectedBits;
+        float v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getInt(o, offset);
+            v = Float.intBitsToFloat(expectedBits);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               expectedBits, Float.floatToRawIntBits(v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final float getAndAddFloatAcquire(Object o, long offset, float delta) {
+        int expectedBits;
+        float v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getIntAcquire(o, offset);
+            v = Float.intBitsToFloat(expectedBits);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               expectedBits, Float.floatToRawIntBits(v + delta)));
+        return v;
+    }
+
+    @ForceInline
     public final double getAndAddDouble(Object o, long offset, double delta) {
         long expectedBits;
         double v;
@@ -2351,6 +2463,36 @@
         return v;
     }
 
+    @ForceInline
+    public final double getAndAddDoubleRelease(Object o, long offset, double delta) {
+        long expectedBits;
+        double v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getLong(o, offset);
+            v = Double.longBitsToDouble(expectedBits);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                                expectedBits, Double.doubleToRawLongBits(v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final double getAndAddDoubleAcquire(Object o, long offset, double delta) {
+        long expectedBits;
+        double v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getLongAcquire(o, offset);
+            v = Double.longBitsToDouble(expectedBits);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                                expectedBits, Double.doubleToRawLongBits(v + delta)));
+        return v;
+    }
+
     /**
      * Atomically exchanges the given value with the current value of
      * a field or array element within the given object {@code o}
@@ -2371,6 +2513,24 @@
         return v;
     }
 
+    @ForceInline
+    public final int getAndSetIntRelease(Object o, long offset, int newValue) {
+        int v;
+        do {
+            v = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final int getAndSetIntAcquire(Object o, long offset, int newValue) {
+        int v;
+        do {
+            v = getIntAcquire(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset, v, newValue));
+        return v;
+    }
+
     /**
      * Atomically exchanges the given value with the current value of
      * a field or array element within the given object {@code o}
@@ -2391,6 +2551,24 @@
         return v;
     }
 
+    @ForceInline
+    public final long getAndSetLongRelease(Object o, long offset, long newValue) {
+        long v;
+        do {
+            v = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final long getAndSetLongAcquire(Object o, long offset, long newValue) {
+        long v;
+        do {
+            v = getLongAcquire(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset, v, newValue));
+        return v;
+    }
+
     /**
      * Atomically exchanges the given reference value with the current
      * reference value of a field or array element within the given
@@ -2411,6 +2589,24 @@
         return v;
     }
 
+    @ForceInline
+    public final Object getAndSetObjectRelease(Object o, long offset, Object newValue) {
+        Object v;
+        do {
+            v = getObject(o, offset);
+        } while (!weakCompareAndSwapObjectRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final Object getAndSetObjectAcquire(Object o, long offset, Object newValue) {
+        Object v;
+        do {
+            v = getObjectAcquire(o, offset);
+        } while (!weakCompareAndSwapObjectAcquire(o, offset, v, newValue));
+        return v;
+    }
+
     @HotSpotIntrinsicCandidate
     public final byte getAndSetByte(Object o, long offset, byte newValue) {
         byte v;
@@ -2421,10 +2617,38 @@
     }
 
     @ForceInline
+    public final byte getAndSetByteRelease(Object o, long offset, byte newValue) {
+        byte v;
+        do {
+            v = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final byte getAndSetByteAcquire(Object o, long offset, byte newValue) {
+        byte v;
+        do {
+            v = getByteAcquire(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
     public final boolean getAndSetBoolean(Object o, long offset, boolean newValue) {
         return byte2bool(getAndSetByte(o, offset, bool2byte(newValue)));
     }
 
+    @ForceInline
+    public final boolean getAndSetBooleanRelease(Object o, long offset, boolean newValue) {
+        return byte2bool(getAndSetByteRelease(o, offset, bool2byte(newValue)));
+    }
+
+    @ForceInline
+    public final boolean getAndSetBooleanAcquire(Object o, long offset, boolean newValue) {
+        return byte2bool(getAndSetByteAcquire(o, offset, bool2byte(newValue)));
+    }
+
     @HotSpotIntrinsicCandidate
     public final short getAndSetShort(Object o, long offset, short newValue) {
         short v;
@@ -2435,22 +2659,558 @@
     }
 
     @ForceInline
+    public final short getAndSetShortRelease(Object o, long offset, short newValue) {
+        short v;
+        do {
+            v = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final short getAndSetShortAcquire(Object o, long offset, short newValue) {
+        short v;
+        do {
+            v = getShortAcquire(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
     public final char getAndSetChar(Object o, long offset, char newValue) {
         return s2c(getAndSetShort(o, offset, c2s(newValue)));
     }
 
     @ForceInline
+    public final char getAndSetCharRelease(Object o, long offset, char newValue) {
+        return s2c(getAndSetShortRelease(o, offset, c2s(newValue)));
+    }
+
+    @ForceInline
+    public final char getAndSetCharAcquire(Object o, long offset, char newValue) {
+        return s2c(getAndSetShortAcquire(o, offset, c2s(newValue)));
+    }
+
+    @ForceInline
     public final float getAndSetFloat(Object o, long offset, float newValue) {
         int v = getAndSetInt(o, offset, Float.floatToRawIntBits(newValue));
         return Float.intBitsToFloat(v);
     }
 
     @ForceInline
+    public final float getAndSetFloatRelease(Object o, long offset, float newValue) {
+        int v = getAndSetIntRelease(o, offset, Float.floatToRawIntBits(newValue));
+        return Float.intBitsToFloat(v);
+    }
+
+    @ForceInline
+    public final float getAndSetFloatAcquire(Object o, long offset, float newValue) {
+        int v = getAndSetIntAcquire(o, offset, Float.floatToRawIntBits(newValue));
+        return Float.intBitsToFloat(v);
+    }
+
+    @ForceInline
     public final double getAndSetDouble(Object o, long offset, double newValue) {
         long v = getAndSetLong(o, offset, Double.doubleToRawLongBits(newValue));
         return Double.longBitsToDouble(v);
     }
 
+    @ForceInline
+    public final double getAndSetDoubleRelease(Object o, long offset, double newValue) {
+        long v = getAndSetLongRelease(o, offset, Double.doubleToRawLongBits(newValue));
+        return Double.longBitsToDouble(v);
+    }
+
+    @ForceInline
+    public final double getAndSetDoubleAcquire(Object o, long offset, double newValue) {
+        long v = getAndSetLongAcquire(o, offset, Double.doubleToRawLongBits(newValue));
+        return Double.longBitsToDouble(v);
+    }
+
+
+    // The following contain CAS-based Java implementations used on
+    // platforms not supporting native instructions
+
+    @ForceInline
+    public final boolean getAndBitwiseOrBoolean(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseOrByte(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseOrBooleanRelease(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseOrByteRelease(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseOrBooleanAcquire(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseOrByteAcquire(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseAndBoolean(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseAndByte(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseAndBooleanRelease(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseAndByteRelease(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseAndBooleanAcquire(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseAndByteAcquire(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseXorBoolean(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseXorByte(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseXorBooleanRelease(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseXorByteRelease(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseXorBooleanAcquire(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseXorByteAcquire(o, offset, bool2byte(mask)));
+    }
+
+
+    @ForceInline
+    public final byte getAndBitwiseOrByte(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByteVolatile(o, offset);
+        } while (!weakCompareAndSwapByteVolatile(o, offset,
+                                                  current, (byte) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseOrByteRelease(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset,
+                                                 current, (byte) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseOrByteAcquire(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset,
+                                                 current, (byte) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseAndByte(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByteVolatile(o, offset);
+        } while (!weakCompareAndSwapByteVolatile(o, offset,
+                                                  current, (byte) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseAndByteRelease(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset,
+                                                 current, (byte) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseAndByteAcquire(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset,
+                                                 current, (byte) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseXorByte(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByteVolatile(o, offset);
+        } while (!weakCompareAndSwapByteVolatile(o, offset,
+                                                  current, (byte) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseXorByteRelease(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset,
+                                                 current, (byte) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseXorByteAcquire(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset,
+                                                 current, (byte) (current ^ mask)));
+        return current;
+    }
+
+
+    @ForceInline
+    public final char getAndBitwiseOrChar(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseOrShort(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseOrCharRelease(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseOrShortRelease(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseOrCharAcquire(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseOrShortAcquire(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseAndChar(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseAndShort(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseAndCharRelease(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseAndShortRelease(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseAndCharAcquire(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseAndShortAcquire(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseXorChar(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseXorShort(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseXorCharRelease(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseXorShortRelease(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseXorCharAcquire(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseXorShortAcquire(o, offset, c2s(mask)));
+    }
+
+
+    @ForceInline
+    public final short getAndBitwiseOrShort(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShortVolatile(o, offset);
+        } while (!weakCompareAndSwapShortVolatile(o, offset,
+                                                current, (short) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseOrShortRelease(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset,
+                                               current, (short) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseOrShortAcquire(Object o, long offset, short mask) {
+        short current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset,
+                                               current, (short) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseAndShort(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShortVolatile(o, offset);
+        } while (!weakCompareAndSwapShortVolatile(o, offset,
+                                                current, (short) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseAndShortRelease(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset,
+                                               current, (short) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseAndShortAcquire(Object o, long offset, short mask) {
+        short current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset,
+                                               current, (short) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseXorShort(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShortVolatile(o, offset);
+        } while (!weakCompareAndSwapShortVolatile(o, offset,
+                                                current, (short) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseXorShortRelease(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset,
+                                               current, (short) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseXorShortAcquire(Object o, long offset, short mask) {
+        short current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset,
+                                               current, (short) (current ^ mask)));
+        return current;
+    }
+
+
+    @ForceInline
+    public final int getAndBitwiseOrInt(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getIntVolatile(o, offset);
+        } while (!weakCompareAndSwapIntVolatile(o, offset,
+                                                current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseOrIntRelease(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseOrIntAcquire(Object o, long offset, int mask) {
+        int current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    /**
+     * Atomically replaces the current value of a field or array element within
+     * the given object with the result of bitwise AND between the current value
+     * and mask.
+     *
+     * @param o object/array to update the field/element in
+     * @param offset field/element offset
+     * @param mask the mask value
+     * @return the previous value
+     * @since 1.9
+     */
+    @ForceInline
+    public final int getAndBitwiseAndInt(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getIntVolatile(o, offset);
+        } while (!weakCompareAndSwapIntVolatile(o, offset,
+                                                current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseAndIntRelease(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseAndIntAcquire(Object o, long offset, int mask) {
+        int current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseXorInt(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getIntVolatile(o, offset);
+        } while (!weakCompareAndSwapIntVolatile(o, offset,
+                                                current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseXorIntRelease(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseXorIntAcquire(Object o, long offset, int mask) {
+        int current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+
+    @ForceInline
+    public final long getAndBitwiseOrLong(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLongVolatile(o, offset);
+        } while (!weakCompareAndSwapLongVolatile(o, offset,
+                                                current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseOrLongRelease(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseOrLongAcquire(Object o, long offset, long mask) {
+        long current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseAndLong(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLongVolatile(o, offset);
+        } while (!weakCompareAndSwapLongVolatile(o, offset,
+                                                current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseAndLongRelease(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseAndLongAcquire(Object o, long offset, long mask) {
+        long current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseXorLong(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLongVolatile(o, offset);
+        } while (!weakCompareAndSwapLongVolatile(o, offset,
+                                                current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseXorLongRelease(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseXorLongAcquire(Object o, long offset, long mask) {
+        long current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+
+
     /**
      * Ensures that loads before the fence will not be reordered with loads and
      * stores after the fence; a "LoadLoad plus LoadStore barrier".
--- a/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java	Fri Sep 02 02:41:37 2016 +0000
@@ -1496,7 +1496,7 @@
             }
         } catch (CertPathValidatorException cpve) {
             throw new CertificateException(
-                "Certificates does not conform to algorithm constraints");
+                "Certificates do not conform to algorithm constraints", cpve);
         }
     }
 }
--- a/src/java.base/share/native/libjli/java.c	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/native/libjli/java.c	Fri Sep 02 02:41:37 2016 +0000
@@ -556,20 +556,6 @@
            JLI_StrCmp(name, "--list-modules") == 0;
 }
 
-#ifndef OLD_MODULE_OPTIONS
-/*
- * Old module options for transition
- */
-static jboolean
-IsOldModuleOption(const char* name) {
-    return JLI_StrCmp(name, "-modulepath") == 0 ||
-    JLI_StrCmp(name, "-mp") == 0 ||
-    JLI_StrCmp(name, "-upgrademodulepath") == 0 ||
-    JLI_StrCmp(name, "-addmods") == 0 ||
-    JLI_StrCmp(name, "-limitmods") == 0;
-}
-#endif
-
 /*
  * Test if the given name is a module-system white-space option that
  * will be passed to the VM with its corresponding long-form option
@@ -584,8 +570,7 @@
            JLI_StrCmp(name, "--limit-modules") == 0 ||
            JLI_StrCmp(name, "--add-exports") == 0 ||
            JLI_StrCmp(name, "--add-reads") == 0 ||
-           JLI_StrCmp(name, "--patch-module") == 0 ||
-           IsOldModuleOption(name);
+           JLI_StrCmp(name, "--patch-module") == 0;
 }
 
 /*
@@ -1224,32 +1209,6 @@
         }
     }
 
-#ifndef OLD_MODULE_OPTIONS
-    // for transition to support both old and new syntax
-    if (JLI_StrCmp(arg, "-modulepath") == 0 ||
-        JLI_StrCmp(arg, "-mp") == 0) {
-        option = "--module-path";
-    } else if (JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
-        option = "--upgrade-module-path";
-    } else if (JLI_StrCmp(arg, "-addmods") == 0) {
-        option = "--add-modules";
-    } else if (JLI_StrCmp(arg, "-limitmods") == 0) {
-        option = "--limit-modules";
-    } else if (JLI_StrCCmp(arg, "-XaddExports:") == 0) {
-        option = "--add-exports";
-        value = arg + 13;
-        kind = VM_LONG_OPTION_WITH_ARGUMENT;
-    } else if (JLI_StrCCmp(arg, "-XaddReads:") == 0) {
-        option = "--add-reads";
-        value = arg + 11;
-        kind = VM_LONG_OPTION_WITH_ARGUMENT;
-    } else if (JLI_StrCCmp(arg, "-Xpatch:") == 0) {
-        option = "--patch-module";
-        value = arg + 8;
-        kind = VM_LONG_OPTION_WITH_ARGUMENT;
-    }
-#endif
-
     *pargc = argc;
     *pargv = argv;
     *poption = option;
@@ -1340,16 +1299,6 @@
                        JLI_StrCmp(arg, "--patch-module") == 0) {
                 REPORT_ERROR (has_arg, ARG_ERROR6, arg);
             }
-#ifndef OLD_MODULE_OPTIONS
-            else if (JLI_StrCmp(arg, "-modulepath") == 0 ||
-                     JLI_StrCmp(arg, "-mp") == 0 ||
-                     JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
-                REPORT_ERROR (has_arg, ARG_ERROR4, arg);
-            } else if (JLI_StrCmp(arg, "-addmods") == 0 ||
-                       JLI_StrCmp(arg, "-limitmods") == 0) {
-                REPORT_ERROR (has_arg, ARG_ERROR6, arg);
-            }
-#endif
 /*
  * The following cases will cause the argument parsing to stop
  */
@@ -1548,6 +1497,7 @@
 
     NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String"));
     NULL_CHECK0(ary = (*env)->NewObjectArray(env, strc, cls, 0));
+    CHECK_EXCEPTION_RETURN_VALUE(0);
     for (i = 0; i < strc; i++) {
         jstring str = NewPlatformString(env, *strv++);
         NULL_CHECK0(str);
--- a/src/java.base/share/native/libjli/java.h	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.base/share/native/libjli/java.h	Fri Sep 02 02:41:37 2016 +0000
@@ -253,6 +253,13 @@
 #define NULL_CHECK(NC_check_pointer) \
     NULL_CHECK_RETURN_VALUE(NC_check_pointer, )
 
+#define CHECK_EXCEPTION_RETURN_VALUE(CER_value) \
+    do { \
+        if ((*env)->ExceptionOccurred(env)) { \
+            return CER_value; \
+        } \
+    } while (JNI_FALSE)
+
 #define CHECK_EXCEPTION_RETURN() \
     do { \
         if ((*env)->ExceptionOccurred(env)) { \
--- a/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java	Fri Sep 02 02:41:37 2016 +0000
@@ -25,7 +25,6 @@
 
 package apple.laf;
 
-import java.lang.reflect.Field;
 import java.nio.ByteBuffer;
 
 import java.lang.annotation.Native;
@@ -70,6 +69,21 @@
             throw new RuntimeException("Constant not implemented in native: " + this);
         }
 
+        private String getConstantName(Key hit) {
+            if (hit == VALUE) {
+                return "VALUE";
+            } else if (hit == THUMB_PROPORTION) {
+                return "THUMB_PROPORTION";
+            } else if (hit == THUMB_START) {
+                return "THUMB_START";
+            } else if (hit == WINDOW_TITLE_BAR_HEIGHT) {
+                return "WINDOW_TITLE_BAR_HEIGHT";
+            } else if (hit == THUMB_START) {
+                return "ANIMATION_FRAME";
+            }
+            return getClass().getSimpleName();
+        }
+
         public String toString() {
             return getConstantName(this) + (ptr == 0 ? "(unlinked)" : "");
         }
@@ -138,7 +152,7 @@
         }
 
         public String toString() {
-            return getConstantName(this);
+            return getClass().getSimpleName();
         }
     }
 
@@ -779,6 +793,17 @@
             return hit > 0;
         }
 
+        private String getConstantName(Hit hit) {
+            if (hit == UNKNOWN) {
+                return "UNKNOWN";
+            } else if (hit == NONE) {
+                return "NONE";
+            } else if (hit == HIT) {
+                return "HIT";
+            }
+            return getClass().getSimpleName();
+        }
+
         public String toString() {
             return getConstantName(this);
         }
@@ -829,16 +854,4 @@
         }
         return Hit.UNKNOWN;
     }
-
-    static String getConstantName(final Object object) {
-        final Class<? extends Object> clazz = object.getClass();
-        try {
-            for (final Field field : clazz.getFields()) {
-                if (field.get(null) == object) {
-                    return field.getName();
-                }
-            }
-        } catch (final Exception e) {}
-        return clazz.getSimpleName();
-    }
 }
--- a/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java	Fri Sep 02 02:41:37 2016 +0000
@@ -72,7 +72,7 @@
 
     public void setDockIconImage(final Image image) {
         try {
-            final CImage cImage = getCImageCreator().createFromImage(image);
+            final CImage cImage = CImage.createFromImage(image);
             final long nsImagePtr = getNSImagePtrFrom(cImage);
             nativeSetDockIconImage(nsImagePtr);
         } catch (final Throwable e) {
@@ -84,7 +84,11 @@
         try {
             final long dockNSImage = nativeGetDockIconImage();
             if (dockNSImage == 0) return null;
-            return getCImageCreator().createImageUsingNativeSize(dockNSImage);
+            final Method getCreatorMethod = CImage.class.getDeclaredMethod(
+                    "getCreator", new Class<?>[]{});
+            getCreatorMethod.setAccessible(true);
+            Creator imageCreator = (Creator) getCreatorMethod.invoke(null, new Object[]{});
+            return imageCreator.createImageUsingNativeSize(dockNSImage);
         } catch (final Throwable e) {
             throw new RuntimeException(e);
         }
@@ -98,16 +102,6 @@
         nativeSetDockIconProgress(value);
     }
 
-    static Creator getCImageCreator() {
-        try {
-            final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class<?>[] {});
-            getCreatorMethod.setAccessible(true);
-            return (Creator)getCreatorMethod.invoke(null, new Object[] {});
-        } catch (final Throwable e) {
-            throw new RuntimeException(e);
-        }
-    }
-
     static long getNSImagePtrFrom(final CImage cImage) {
         if (cImage == null) return 0;
 
--- a/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java	Fri Sep 02 02:41:37 2016 +0000
@@ -171,7 +171,8 @@
         currentQuitResponse = null;
 
         try {
-            if (defaultQuitAction == QuitStrategy.NORMAL_EXIT) System.exit(0);
+            if (defaultQuitAction == QuitStrategy.NORMAL_EXIT
+                    || _AppMiscHandlers.isSuddenTerminationEnbaled()) System.exit(0);
 
             if (defaultQuitAction != QuitStrategy.CLOSE_ALL_WINDOWS) {
                 throw new RuntimeException("Unknown quit action");
@@ -422,6 +423,10 @@
         }
 
         void performUsing(final QuitHandler handler, final _NativeEvent event) {
+            if (_AppMiscHandlers.isSuddenTerminationEnbaled()) {
+                performDefaultAction(event);
+                return;
+            }
             final MacQuitResponse response = obtainQuitResponse(); // obtains the "current" quit response
             handler.handleQuitRequestWith(new QuitEvent(), response);
         }
--- a/src/java.desktop/macosx/classes/com/apple/eawt/_AppMiscHandlers.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/com/apple/eawt/_AppMiscHandlers.java	Fri Sep 02 02:41:37 2016 +0000
@@ -26,6 +26,8 @@
 package com.apple.eawt;
 
 class _AppMiscHandlers {
+    private static boolean isSuddenTerminationEnabled;
+
     private static native void nativeOpenHelpViewer();
 
     private static native void nativeRequestActivation(final boolean allWindows);
@@ -47,10 +49,16 @@
     }
 
     static void enableSuddenTermination() {
+        isSuddenTerminationEnabled = true;
         nativeEnableSuddenTermination();
     }
 
     static void disableSuddenTermination() {
+        isSuddenTerminationEnabled = false;
         nativeDisableSuddenTermination();
     }
+
+    public static boolean isSuddenTerminationEnbaled() {
+        return isSuddenTerminationEnabled;
+    }
 }
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java	Fri Sep 02 02:41:37 2016 +0000
@@ -37,6 +37,7 @@
 
 import com.apple.laf.AquaUtilControlSize.*;
 import com.apple.laf.AquaUtils.RecyclableSingleton;
+import sun.lwawt.macosx.CImage;
 
 public class AquaIcon {
     interface InvertableIcon extends Icon {
@@ -226,7 +227,7 @@
         }
 
         Image createImage() {
-            return AquaUtils.getCImageCreator().createImageOfFile(file.getAbsolutePath(), getIconWidth(), getIconHeight());
+            return CImage.createImageOfFile(file.getAbsolutePath(), getIconWidth(), getIconHeight());
         }
     }
 
@@ -299,7 +300,7 @@
         }
 
         Image createImage() {
-            return AquaUtils.getCImageCreator().createSystemImageFromSelector(
+            return CImage.createSystemImageFromSelector(
                     selector, getIconWidth(), getIconHeight());
         }
     }
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java	Fri Sep 02 02:41:37 2016 +0000
@@ -46,8 +46,8 @@
 import com.apple.laf.AquaIcon.SystemIcon;
 import com.apple.laf.AquaUtils.RecyclableObject;
 import com.apple.laf.AquaUtils.RecyclableSingleton;
-import java.awt.image.MultiResolutionImage;
 import sun.awt.image.MultiResolutionCachedImage;
+import sun.lwawt.macosx.CImage;
 
 public class AquaImageFactory {
     public static IconUIResource getConfirmImageIcon() {
@@ -73,7 +73,7 @@
     public static IconUIResource getLockImageIcon() {
         // public, because UIDefaults.ProxyLazyValue uses reflection to get this value
         if (JRSUIUtils.Images.shouldUseLegacySecurityUIPath()) {
-            final Image lockIcon = AquaUtils.getCImageCreator().createImageFromFile("/System/Library/CoreServices/SecurityAgent.app/Contents/Resources/Security.icns", kAlertIconSize, kAlertIconSize);
+            final Image lockIcon = CImage.createImageFromFile("/System/Library/CoreServices/SecurityAgent.app/Contents/Resources/Security.icns", kAlertIconSize, kAlertIconSize);
             return getAppIconCompositedOn(lockIcon);
         }
 
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaUtils.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaUtils.java	Fri Sep 02 02:41:37 2016 +0000
@@ -41,8 +41,6 @@
 
 import sun.awt.AppContext;
 
-import sun.lwawt.macosx.CImage;
-import sun.lwawt.macosx.CImage.Creator;
 import sun.lwawt.macosx.CPlatformWindow;
 import sun.reflect.misc.ReflectUtil;
 import sun.security.action.GetPropertyAction;
@@ -50,6 +48,7 @@
 
 import com.apple.laf.AquaImageFactory.SlicedImageControl;
 import sun.awt.image.MultiResolutionCachedImage;
+import sun.swing.SwingAccessor;
 
 final class AquaUtils {
 
@@ -78,65 +77,45 @@
         }
     }
 
-    private static Creator getCImageCreatorInternal() {
-        return AccessController.doPrivileged(new PrivilegedAction<Creator>() {
-            @Override
-            public Creator run() {
-                try {
-                    final Method getCreatorMethod = CImage.class.getDeclaredMethod(
-                                "getCreator", new Class<?>[] {});
-                    getCreatorMethod.setAccessible(true);
-                    return (Creator)getCreatorMethod.invoke(null, new Object[] {});
-                } catch (final Exception ignored) {
-                    return null;
-                }
-            }
-        });
-    }
-
-    private static final RecyclableSingleton<Creator> cImageCreator = new RecyclableSingleton<Creator>() {
-        @Override
-        protected Creator getInstance() {
-            return getCImageCreatorInternal();
-        }
-    };
-    static Creator getCImageCreator() {
-        return cImageCreator.get();
-    }
-
     static Image generateSelectedDarkImage(final Image image) {
-        final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
+        final ImageFilter filter =  new IconImageFilter() {
             @Override
             int getGreyFor(final int gray) {
                 return gray * 75 / 100;
             }
-        });
-        return Toolkit.getDefaultToolkit().createImage(prod);
+        };
+        return map(image, filter);
     }
 
     static Image generateDisabledImage(final Image image) {
-        final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
+        final ImageFilter filter = new IconImageFilter() {
             @Override
             int getGreyFor(final int gray) {
                 return 255 - ((255 - gray) * 65 / 100);
             }
-        });
-        return Toolkit.getDefaultToolkit().createImage(prod);
+        };
+        return map(image, filter);
     }
 
     static Image generateLightenedImage(final Image image, final int percent) {
         final GrayFilter filter = new GrayFilter(true, percent);
-        return (image instanceof MultiResolutionCachedImage)
-                ? ((MultiResolutionCachedImage) image).map(
-                        rv -> generateLightenedImage(rv, filter))
-                : generateLightenedImage(image, filter);
+        return map(image, filter);
     }
 
-    static Image generateLightenedImage(Image image, ImageFilter filter) {
+    static Image generateFilteredImage(Image image, ImageFilter filter) {
         final ImageProducer prod = new FilteredImageSource(image.getSource(), filter);
         return Toolkit.getDefaultToolkit().createImage(prod);
     }
 
+    private static Image map(Image image, ImageFilter filter) {
+        if (image instanceof MultiResolutionImage) {
+            return MultiResolutionCachedImage
+                    .map((MultiResolutionImage) image,
+                         (img) -> generateFilteredImage(img, filter));
+        }
+        return generateFilteredImage(image, filter);
+    }
+
     private abstract static class IconImageFilter extends RGBImageFilter {
         IconImageFilter() {
             super();
@@ -399,15 +378,9 @@
         }
     };
 
-    private static final Integer OPAQUE_SET_FLAG = 24; // private int JComponent.OPAQUE_SET
+    private static final int OPAQUE_SET_FLAG = 24; // private int JComponent.OPAQUE_SET
     static boolean hasOpaqueBeenExplicitlySet(final JComponent c) {
-        final Method method = getJComponentGetFlagMethod.get();
-        if (method == null) return false;
-        try {
-            return Boolean.TRUE.equals(method.invoke(c, OPAQUE_SET_FLAG));
-        } catch (final Throwable ignored) {
-            return false;
-        }
+        return SwingAccessor.getJComponentAccessor().getFlag(c, OPAQUE_SET_FLAG);
     }
 
     private static boolean isWindowTextured(final Component c) {
--- a/src/java.desktop/macosx/classes/sun/font/CFont.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/sun/font/CFont.java	Fri Sep 02 02:41:37 2016 +0000
@@ -278,6 +278,18 @@
         return getStrike(font, DEFAULT_FRC);
     }
 
+    public boolean equals(Object o) {
+         if (!super.equals(o)) {
+             return false;
+         }
+
+         return ((Font2D)o).getStyle() == this.getStyle();
+    }
+
+    public int hashCode() {
+        return super.hashCode() ^ this.getStyle();
+    }
+
     public String toString() {
         return "CFont { fullName: " + fullName +
             ",  familyName: " + familyName + ", style: " + style +
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java	Fri Sep 02 02:41:37 2016 +0000
@@ -37,6 +37,7 @@
 
 import javax.accessibility.*;
 import javax.swing.*;
+import sun.awt.AWTAccessor;
 
 class CAccessibility implements PropertyChangeListener {
     private static Set<String> ignoredRoles;
@@ -205,33 +206,12 @@
         }, c);
     }
 
-    static Field getAccessibleBundleKeyFieldWithReflection() {
-        try {
-            final Field fieldKey = AccessibleBundle.class.getDeclaredField("key");
-            fieldKey.setAccessible(true);
-            return fieldKey;
-        } catch (final SecurityException e) {
-            e.printStackTrace();
-        } catch (final NoSuchFieldException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-    private static final Field FIELD_KEY = getAccessibleBundleKeyFieldWithReflection();
-
     static String getAccessibleRoleFor(final Accessible a) {
         final AccessibleContext ac = a.getAccessibleContext();
         if (ac == null) return null;
 
         final AccessibleRole role = ac.getAccessibleRole();
-        try {
-            return (String)FIELD_KEY.get(role);
-        } catch (final IllegalArgumentException e) {
-            e.printStackTrace();
-        } catch (final IllegalAccessException e) {
-            e.printStackTrace();
-        }
-        return null;
+        return AWTAccessor.getAccessibleBundleAccessor().getKey(role);
     }
 
     public static String getAccessibleRole(final Accessible a, final Component c) {
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java	Fri Sep 02 02:41:37 2016 +0000
@@ -28,7 +28,6 @@
 import java.awt.Component;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
-import java.lang.reflect.Field;
 
 import javax.accessibility.Accessible;
 import javax.accessibility.AccessibleContext;
@@ -41,36 +40,23 @@
 import static javax.accessibility.AccessibleContext.ACCESSIBLE_CARET_PROPERTY;
 import static javax.accessibility.AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY;
 import static javax.accessibility.AccessibleContext.ACCESSIBLE_TEXT_PROPERTY;
+import sun.awt.AWTAccessor;
 
 
 class CAccessible extends CFRetainedResource implements Accessible {
-    static Field getNativeAXResourceField() {
-        try {
-            final Field field = AccessibleContext.class.getDeclaredField("nativeAXResource");
-            field.setAccessible(true);
-            return field;
-        } catch (final Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-
-    private static Field nativeAXResourceField = getNativeAXResourceField();
 
     public static CAccessible getCAccessible(final Accessible a) {
         if (a == null) return null;
         AccessibleContext context = a.getAccessibleContext();
-        try {
-            final CAccessible cachedCAX = (CAccessible) nativeAXResourceField.get(context);
-            if (cachedCAX != null) return cachedCAX;
-
-            final CAccessible newCAX = new CAccessible(a);
-            nativeAXResourceField.set(context, newCAX);
-            return newCAX;
-        }  catch (final Exception e) {
-            e.printStackTrace();
-            return null;
+        AWTAccessor.AccessibleContextAccessor accessor
+                = AWTAccessor.getAccessibleContextAccessor();
+        final CAccessible cachedCAX = (CAccessible) accessor.getNativeAXResource(context);
+        if (cachedCAX != null) {
+            return cachedCAX;
         }
+        final CAccessible newCAX = new CAccessible(a);
+        accessor.setNativeAXResource(context, newCAX);
+        return newCAX;
     }
 
     private static native void unregisterFromCocoaAXSystem(long ptr);
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Fri Sep 02 02:41:37 2016 +0000
@@ -36,7 +36,7 @@
 import java.text.Normalizer;
 import java.text.Normalizer.Form;
 import java.util.*;
-
+import java.util.regex.*;
 import java.awt.datatransfer.*;
 import sun.awt.datatransfer.*;
 
@@ -129,12 +129,21 @@
                                  long format, Transferable transferable) throws IOException {
 
         if (format == CF_URL && URL.class.equals(flavor.getRepresentationClass())) {
-            String[] strings = dragQueryFile(bytes);
-            if(strings == null || strings.length == 0) {
-                return null;
+            String charset = Charset.defaultCharset().name();
+            if (transferable != null && transferable.isDataFlavorSupported(javaTextEncodingFlavor)) {
+                try {
+                    charset = new String((byte[]) transferable.getTransferData(javaTextEncodingFlavor), "UTF-8");
+                } catch (UnsupportedFlavorException cannotHappen) {
+                }
             }
-            return new URL(strings[0]);
-        } else if(isUriListFlavor(flavor)) {
+
+            String xml = new String(bytes, charset);
+            // macosx pasteboard returns a property list that consists of one URL
+            // let's extract it.
+            return new URL(extractURL(xml));
+        }
+
+        if(isUriListFlavor(flavor) && format == CF_FILE) {
             // dragQueryFile works fine with files and url,
             // it parses and extracts values from property list.
             // maxosx always returns property list for
@@ -156,6 +165,16 @@
         return super.translateBytes(bytes, flavor, format, transferable);
     }
 
+    private String extractURL(String xml) {
+       Pattern urlExtractorPattern = Pattern.compile("<string>(.*)</string>");
+        Matcher matcher = urlExtractorPattern.matcher(xml);
+        if (matcher.find()) {
+            return matcher.group(1);
+        } else {
+            return null;
+        }
+    }
+
     @Override
     protected synchronized Long getFormatForNativeAsLong(String str) {
         Long format = predefinedClipboardNameMap.get(str);
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java	Fri Sep 02 02:41:37 2016 +0000
@@ -56,6 +56,25 @@
         return creator;
     }
 
+    // This is used to create a CImage that represents the icon of the given file.
+    public static Image createImageOfFile(String file, int width, int height) {
+        return getCreator().createImageOfFile(file, width, height);
+    }
+
+    public static Image createSystemImageFromSelector(String iconSelector,
+            int width, int height) {
+        return getCreator().createSystemImageFromSelector(iconSelector, width, height);
+    }
+
+    public static Image createImageFromFile(String file, double width, double height) {
+        return getCreator().createImageFromFile(file, width, height);
+    }
+
+    // This is used to create a CImage from a Image
+    public static CImage createFromImage(final Image image) {
+        return getCreator().createFromImage(image);
+    }
+
     public static class Creator {
         Creator() { }
 
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/awt_DrawingSurface.m	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/awt_DrawingSurface.m	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
 
 #import "AWTSurfaceLayers.h"
 
+#import "jni_util.h"
+
 JNIEXPORT JAWT_DrawingSurfaceInfo* JNICALL awt_DrawingSurface_GetDrawingSurfaceInfo
 (JAWT_DrawingSurface* ds)
 {
@@ -130,3 +132,47 @@
     // TODO: implement
     return NULL;
 }
+
+// EmbeddedFrame support
+
+static char *const embeddedClassName = "sun/lwawt/macosx/CViewEmbeddedFrame";
+
+JNIEXPORT jobject JNICALL awt_CreateEmbeddedFrame
+(JNIEnv* env, void* platformInfo)
+{
+    static jmethodID mid = NULL;
+    static jclass cls;
+    if (mid == NULL) {
+        cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL_RETURN(cls, NULL);
+        mid = (*env)->GetMethodID(env, cls, "<init>", "(J)V");
+        CHECK_NULL_RETURN(mid, NULL);
+    }
+    return (*env)->NewObject(env, cls, mid, platformInfo);
+}
+
+JNIEXPORT void JNICALL awt_SetBounds
+(JNIEnv *env, jobject embeddedFrame, jint x, jint y, jint w, jint h)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL(cls);
+        mid = (*env)->GetMethodID(env, cls, "setBoundsPrivate", "(IIII)V");
+        CHECK_NULL(mid);
+    }
+    (*env)->CallVoidMethod(env, embeddedFrame, mid, x, y, w, h);
+}
+
+JNIEXPORT void JNICALL awt_SynthesizeWindowActivation
+(JNIEnv *env, jobject embeddedFrame, jboolean doActivate)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL(cls);
+        mid = (*env)->GetMethodID(env, cls, "synthesizeWindowActivation", "(Z)V");
+        CHECK_NULL(mid);
+    }
+    (*env)->CallVoidMethod(env, embeddedFrame, mid, doActivate);
+}
--- a/src/java.desktop/macosx/native/libjawt/jawt.m	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/macosx/native/libjawt/jawt.m	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,8 +46,9 @@
         return JNI_FALSE;
     }
 
-    if (awt->version != (JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER) &&
-        awt->version != JAWT_VERSION_1_7)
+    if (awt->version != (JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER)
+        && awt->version != JAWT_VERSION_1_7
+        && awt->version != JAWT_VERSION_9)
     {
         return JNI_FALSE;
     }
@@ -58,6 +59,11 @@
         awt->Lock = awt_Lock;
         awt->Unlock = awt_Unlock;
         awt->GetComponent = awt_GetComponent;
+        if (awt->version >= JAWT_VERSION_9) {
+            awt->CreateEmbeddedFrame = awt_CreateEmbeddedFrame;
+            awt->SetBounds = awt_SetBounds;
+            awt->SynthesizeWindowActivation = awt_SynthesizeWindowActivation;
+        }
     }
 
     return JNI_TRUE;
--- a/src/java.desktop/share/classes/com/sun/media/sound/ModelByteBuffer.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/com/sun/media/sound/ModelByteBuffer.java	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -200,11 +200,13 @@
 
     public void writeTo(OutputStream out) throws IOException {
         if (root.file != null && root.buffer == null) {
-            InputStream is = getInputStream();
-            byte[] buff = new byte[1024];
-            int ret;
-            while ((ret = is.read(buff)) != -1)
-                out.write(buff, 0, ret);
+            try (InputStream is = getInputStream()) {
+                byte[] buff = new byte[1024];
+                int ret;
+                while ((ret = is.read(buff)) != -1) {
+                    out.write(buff, 0, ret);
+                }
+            }
         } else
             out.write(array(), (int) arrayOffset(), (int) capacity());
     }
--- a/src/java.desktop/share/classes/java/awt/AWTEvent.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/java/awt/AWTEvent.java	Fri Sep 02 02:41:37 2016 +0000
@@ -284,35 +284,6 @@
             });
     }
 
-    private static synchronized Field get_InputEvent_CanAccessSystemClipboard() {
-        if (inputEvent_CanAccessSystemClipboard_Field == null) {
-            inputEvent_CanAccessSystemClipboard_Field =
-                java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<Field>() {
-                            public Field run() {
-                                Field field = null;
-                                try {
-                                    field = InputEvent.class.
-                                        getDeclaredField("canAccessSystemClipboard");
-                                    field.setAccessible(true);
-                                    return field;
-                                } catch (SecurityException e) {
-                                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                                        log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e);
-                                    }
-                                } catch (NoSuchFieldException e) {
-                                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                                        log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e);
-                                    }
-                                }
-                                return null;
-                            }
-                        });
-        }
-
-        return inputEvent_CanAccessSystemClipboard_Field;
-    }
-
     /**
      * Initialize JNI field and method IDs for fields that may be
      * accessed from C.
@@ -593,33 +564,20 @@
         that.bdata = this.bdata;
         // Copy canAccessSystemClipboard value from this into that.
         if (this instanceof InputEvent && that instanceof InputEvent) {
-            Field field = get_InputEvent_CanAccessSystemClipboard();
-            if (field != null) {
-                try {
-                    boolean b = field.getBoolean(this);
-                    field.setBoolean(that, b);
-                } catch(IllegalAccessException e) {
-                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                        log.fine("AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e);
-                    }
-                }
-            }
+
+            AWTAccessor.InputEventAccessor accessor
+                    = AWTAccessor.getInputEventAccessor();
+
+            boolean b = accessor.canAccessSystemClipboard((InputEvent) this);
+            accessor.setCanAccessSystemClipboard((InputEvent) that, b);
         }
         that.isSystemGenerated = this.isSystemGenerated;
     }
 
     void dispatched() {
         if (this instanceof InputEvent) {
-            Field field = get_InputEvent_CanAccessSystemClipboard();
-            if (field != null) {
-                try {
-                    field.setBoolean(this, false);
-                } catch(IllegalAccessException e) {
-                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                        log.fine("AWTEvent.dispatched() got IllegalAccessException ", e);
-                    }
-                }
-            }
+            AWTAccessor.getInputEventAccessor().
+                    setCanAccessSystemClipboard((InputEvent) this, false);
         }
     }
 } // class AWTEvent
--- a/src/java.desktop/share/classes/java/awt/Component.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/java/awt/Component.java	Fri Sep 02 02:41:37 2016 +0000
@@ -53,13 +53,11 @@
 import java.awt.im.InputContext;
 import java.awt.im.InputMethodRequests;
 import java.awt.dnd.DropTarget;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.security.AccessControlContext;
 import javax.accessibility.*;
 import java.applet.Applet;
+import javax.swing.JComponent;
 
 import sun.awt.ComponentFactory;
 import sun.security.action.GetPropertyAction;
@@ -81,6 +79,7 @@
 import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.*;
 import sun.awt.RequestFocusController;
 import sun.java2d.SunGraphicsEnvironment;
+import sun.swing.SwingAccessor;
 import sun.util.logging.PlatformLogger;
 
 /**
@@ -8695,6 +8694,9 @@
      * the Swing package private method {@code compWriteObjectNotify}.
      */
     private void doSwingSerialization() {
+        if (!(this instanceof JComponent)) {
+            return;
+        }
         @SuppressWarnings("deprecation")
         Package swingPackage = Package.getPackage("javax.swing");
         // For Swing serialization to correctly work Swing needs to
@@ -8707,36 +8709,10 @@
                    klass = klass.getSuperclass()) {
             if (klass.getPackage() == swingPackage &&
                       klass.getClassLoader() == null) {
-                final Class<?> swingClass = klass;
-                // Find the first override of the compWriteObjectNotify method
-                Method[] methods = AccessController.doPrivileged(
-                                                                 new PrivilegedAction<Method[]>() {
-                                                                     public Method[] run() {
-                                                                         return swingClass.getDeclaredMethods();
-                                                                     }
-                                                                 });
-                for (int counter = methods.length - 1; counter >= 0;
-                     counter--) {
-                    final Method method = methods[counter];
-                    if (method.getName().equals("compWriteObjectNotify")){
-                        // We found it, use doPrivileged to make it accessible
-                        // to use.
-                        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                                public Void run() {
-                                    method.setAccessible(true);
-                                    return null;
-                                }
-                            });
-                        // Invoke the method
-                        try {
-                            method.invoke(this, (Object[]) null);
-                        } catch (IllegalAccessException iae) {
-                        } catch (InvocationTargetException ite) {
-                        }
-                        // We're done, bail.
-                        return;
-                    }
-                }
+
+                SwingAccessor.getJComponentAccessor()
+                        .compWriteObjectNotify((JComponent) this);
+                return;
             }
         }
     }
--- a/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Fri Sep 02 02:41:37 2016 +0000
@@ -40,8 +40,6 @@
 
 import java.lang.ref.WeakReference;
 
-import java.lang.reflect.Field;
-
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
@@ -140,6 +138,10 @@
                 public void removeLastFocusRequest(Component heavyweight) {
                     KeyboardFocusManager.removeLastFocusRequest(heavyweight);
                 }
+                @Override
+                public Component getMostRecentFocusOwner(Window window) {
+                    return KeyboardFocusManager.getMostRecentFocusOwner(window);
+                }
                 public void setMostRecentFocusOwner(Window window, Component component) {
                     KeyboardFocusManager.setMostRecentFocusOwner(window, component);
                 }
@@ -3053,32 +3055,9 @@
         }
     }
 
-    static Field proxyActive;
     // Accessor to private field isProxyActive of KeyEvent
     private static boolean isProxyActiveImpl(KeyEvent e) {
-        if (proxyActive == null) {
-            proxyActive =  AccessController.doPrivileged(new PrivilegedAction<Field>() {
-                    public Field run() {
-                        Field field = null;
-                        try {
-                            field = KeyEvent.class.getDeclaredField("isProxyActive");
-                            if (field != null) {
-                                field.setAccessible(true);
-                            }
-                        } catch (NoSuchFieldException nsf) {
-                            assert(false);
-                        }
-                        return field;
-                    }
-                });
-        }
-
-        try {
-            return proxyActive.getBoolean(e);
-        } catch (IllegalAccessException iae) {
-            assert(false);
-        }
-        return false;
+        return AWTAccessor.getKeyEventAccessor().isProxyActive(e);
     }
 
     // Returns the value of this KeyEvent's field isProxyActive
--- a/src/java.desktop/share/classes/java/awt/SequencedEvent.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/java/awt/SequencedEvent.java	Fri Sep 02 02:41:37 2016 +0000
@@ -63,6 +63,10 @@
             public boolean isSequencedEvent(AWTEvent event) {
                 return event instanceof SequencedEvent;
             }
+
+            public AWTEvent create(AWTEvent event) {
+                return new SequencedEvent(event);
+            }
         });
     }
 
--- a/src/java.desktop/share/classes/java/awt/event/InputEvent.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/java/awt/event/InputEvent.java	Fri Sep 02 02:41:37 2016 +0000
@@ -302,6 +302,12 @@
                 public boolean canAccessSystemClipboard(InputEvent event) {
                     return event.canAccessSystemClipboard;
                 }
+
+                @Override
+                public void setCanAccessSystemClipboard(InputEvent event,
+                        boolean canAccessSystemClipboard) {
+                    event.canAccessSystemClipboard = canAccessSystemClipboard;
+                }
             });
     }
 
--- a/src/java.desktop/share/classes/java/awt/event/KeyEvent.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/java/awt/event/KeyEvent.java	Fri Sep 02 02:41:37 2016 +0000
@@ -1091,6 +1091,11 @@
                 public Component getOriginalSource( KeyEvent ev ) {
                     return ev.originalSource;
                 }
+
+                @Override
+                public boolean isProxyActive(KeyEvent ev) {
+                    return ev.isProxyActive;
+                }
             });
     }
 
--- a/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
 
 package java.awt.font;
 
-import java.lang.reflect.Field;
 import jdk.internal.misc.JavaAWTFontAccess;
 
 class JavaAWTFontAccessImpl implements JavaAWTFontAccess {
@@ -33,19 +32,17 @@
     // java.awt.font.TextAttribute constants
     public Object getTextAttributeConstant(String name) {
         switch (name) {
-        case "RUN_DIRECTION":
-        case "NUMERIC_SHAPING":
-        case "BIDI_EMBEDDING":
-        case "RUN_DIRECTION_LTR":
-            try {
-                Field f = TextAttribute.class.getField(name);
-                return f.get(null);
-            } catch (NoSuchFieldException | IllegalAccessException x) {
-                throw new AssertionError(x);
-            }
+            case "RUN_DIRECTION":
+                return TextAttribute.RUN_DIRECTION;
+            case "NUMERIC_SHAPING":
+                return TextAttribute.NUMERIC_SHAPING;
+            case "BIDI_EMBEDDING":
+                return TextAttribute.BIDI_EMBEDDING;
+            case "RUN_DIRECTION_LTR":
+                return TextAttribute.RUN_DIRECTION_LTR;
+            default:
+                throw new AssertionError("Constant name is not recognized");
         }
-
-        throw new AssertionError("Constant name is not recognized");
     }
 
     // java.awt.font.NumericShaper
--- a/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java	Fri Sep 02 02:41:37 2016 +0000
@@ -31,6 +31,7 @@
 import java.util.Locale;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
+import sun.awt.AWTAccessor;
 
 /**
  * <p>Base class used to maintain a strongly typed enumeration.  This is
@@ -53,6 +54,17 @@
     private final String defaultResourceBundleName
         = "com.sun.accessibility.internal.resources.accessibility";
 
+    static {
+        AWTAccessor.setAccessibleBundleAccessor(
+                new AWTAccessor.AccessibleBundleAccessor() {
+
+                    @Override
+                    public String getKey(AccessibleBundle accessibleBundle) {
+                        return accessibleBundle.key;
+                    }
+                });
+    }
+
     /**
      * Construct an {@code AccessibleBundle}.
      */
--- a/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java	Fri Sep 02 02:41:37 2016 +0000
@@ -99,6 +99,16 @@
             public AppContext getAppContext(AccessibleContext accessibleContext) {
                 return accessibleContext.targetAppContext;
             }
+
+            @Override
+            public Object getNativeAXResource(AccessibleContext accessibleContext) {
+                return accessibleContext.nativeAXResource;
+            }
+
+            @Override
+            public void setNativeAXResource(AccessibleContext accessibleContext, Object value) {
+                accessibleContext.nativeAXResource = value;
+            }
         });
     }
 
--- a/src/java.desktop/share/classes/javax/imageio/ImageIO.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/imageio/ImageIO.java	Fri Sep 02 02:41:37 2016 +0000
@@ -462,10 +462,13 @@
             return new String[0];
         }
 
-        HashSet<String> s = new HashSet<String>();
+        HashSet<String> s = new HashSet<>();
         while (iter.hasNext()) {
             ImageReaderWriterSpi spi = iter.next();
-            Collections.addAll(s, spiInfo.info(spi));
+            String[] info = spiInfo.info(spi);
+            if (info != null) {
+                Collections.addAll(s, info);
+            }
         }
 
         return s.toArray(new String[s.size()]);
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java	Fri Sep 02 02:41:37 2016 +0000
@@ -412,7 +412,7 @@
 
     /**
      * Creates a {@code TIFFField} from a TIFF native image
-     * metadata node. If the value of the <tt>"number"</tt> attribute
+     * metadata node. If the value of the {@code "number"} attribute
      * of the node is not found in {@code tagSet} then a new
      * {@code TIFFTag} with name {@code TIFFTag.UNKNOWN_TAG_NAME}
      * will be created and assigned to the field.
@@ -420,20 +420,22 @@
      * @param tagSet The {@code TIFFTagSet} to which the
      * {@code TIFFTag} of the field belongs.
      * @param node A native TIFF image metadata {@code TIFFField} node.
-     * @throws NullPointerException if {@code node} is
-     * {@code null}.
-     * @throws IllegalArgumentException if the name of the node is not
-     * {@code "TIFFField"}.
-     * @throws NullPointerException if the node does not contain any data.
-     * @throws IllegalArgumentException if the combination of node attributes
-     * and data is not legal per the {@link #TIFFField(TIFFTag,int,int,Object)}
-     * constructor specification.
+     * @throws IllegalArgumentException If the {@code Node} parameter content
+     * does not adhere to the {@code TIFFField} element structure defined by
+     * the <a href="../../metadata/doc-files/tiff_metadata.html#ImageMetadata">
+     * TIFF native image metadata format specification</a>, or if the
+     * combination of node attributes and data is not legal per the
+     * {@link #TIFFField(TIFFTag,int,int,Object)} constructor specification.
+     * Note that a cause might be set on such an exception.
      * @return A new {@code TIFFField}.
      */
     public static TIFFField createFromMetadataNode(TIFFTagSet tagSet,
                                                    Node node) {
         if (node == null) {
-            throw new NullPointerException("node == null!");
+            // This method is specified to throw only IllegalArgumentExceptions
+            // so we create an IAE with a NullPointerException as its cause.
+            throw new IllegalArgumentException(new NullPointerException
+                ("node == null!"));
         }
         String name = node.getNodeName();
         if (!name.equals("TIFFField")) {
@@ -487,7 +489,17 @@
             tag = new TIFFTag(TIFFTag.UNKNOWN_TAG_NAME, tagNumber, 1 << type);
         }
 
-        return new TIFFField(tag, type, count, data);
+        TIFFField field;
+        try {
+            field = new TIFFField(tag, type, count, data);
+        } catch (NullPointerException npe) {
+            // This method is specified to throw only IllegalArgumentExceptions
+            // so we catch the NullPointerException and set it as the cause of
+            // the IAE which is thrown.
+            throw new IllegalArgumentException(npe);
+        }
+
+        return field;
     }
 
     /**
--- a/src/java.desktop/share/classes/javax/print/ServiceUI.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/print/ServiceUI.java	Fri Sep 02 02:41:37 2016 +0000
@@ -40,6 +40,7 @@
 import javax.print.attribute.PrintRequestAttributeSet;
 import javax.print.attribute.standard.Destination;
 import javax.print.attribute.standard.Fidelity;
+import sun.print.DialogOwner;
 
 import sun.print.ServiceDialog;
 import sun.print.SunAlternateMedia;
@@ -187,9 +188,8 @@
             defaultIndex = 0;
         }
 
-        // For now we set owner to null. In the future, it may be passed
-        // as an argument.
-        Window owner = null;
+        DialogOwner dlgOwner = (DialogOwner)attributes.get(DialogOwner.class);
+        Window owner = (dlgOwner != null) ? dlgOwner.getOwner() : null;
 
         Rectangle gcBounds = (gc == null) ?  GraphicsEnvironment.
             getLocalGraphicsEnvironment().getDefaultScreenDevice().
--- a/src/java.desktop/share/classes/javax/swing/GrayFilter.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/swing/GrayFilter.java	Fri Sep 02 02:41:37 2016 +0000
@@ -26,6 +26,7 @@
 
 import java.awt.*;
 import java.awt.image.*;
+import sun.awt.image.MultiResolutionCachedImage;
 
 /**
  * An image filter that "disables" an image by turning
@@ -48,7 +49,16 @@
      * @param i  an {@code Image} to be created as disabled
      * @return  the new grayscale image created from {@code i}
      */
-    public static Image createDisabledImage (Image i) {
+    public static Image createDisabledImage(Image i) {
+        if (i instanceof MultiResolutionImage) {
+            return MultiResolutionCachedImage
+                    .map((MultiResolutionImage) i,
+                         (img) -> createDisabledImageImpl(img));
+        }
+        return createDisabledImageImpl(i);
+    }
+
+    private static Image createDisabledImageImpl(Image i) {
         GrayFilter filter = new GrayFilter(true, 50);
         ImageProducer prod = new FilteredImageSource(i.getSource(), filter);
         Image grayImage = Toolkit.getDefaultToolkit().createImage(prod);
--- a/src/java.desktop/share/classes/javax/swing/ImageIcon.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/swing/ImageIcon.java	Fri Sep 02 02:41:37 2016 +0000
@@ -40,8 +40,8 @@
 import javax.accessibility.*;
 
 import sun.awt.AppContext;
-import java.lang.reflect.Field;
 import java.security.*;
+import sun.awt.AWTAccessor;
 
 /**
  * An implementation of the Icon interface that paints Icons
@@ -106,11 +106,8 @@
                     final Component component = createNoPermsComponent();
 
                     // 6482575 - clear the appContext field so as not to leak it
-                    Field appContextField =
-
-                            Component.class.getDeclaredField("appContext");
-                    appContextField.setAccessible(true);
-                    appContextField.set(component, null);
+                    AWTAccessor.getComponentAccessor().
+                            setAppContext(component, null);
 
                     return component;
                 } catch (Throwable e) {
--- a/src/java.desktop/share/classes/javax/swing/JComponent.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/swing/JComponent.java	Fri Sep 02 02:41:37 2016 +0000
@@ -55,6 +55,7 @@
 
 import sun.awt.AWTAccessor;
 import sun.awt.SunToolkit;
+import sun.swing.SwingAccessor;
 import sun.swing.SwingUtilities2;
 
 /**
@@ -376,6 +377,21 @@
     private transient Object aaHint;
     private transient Object lcdRenderingHint;
 
+    static {
+        SwingAccessor.setJComponentAccessor(new SwingAccessor.JComponentAccessor() {
+
+            @Override
+            public boolean getFlag(JComponent comp, int aFlag) {
+                return comp.getFlag(aFlag);
+            }
+
+            @Override
+            public void compWriteObjectNotify(JComponent comp) {
+                comp.compWriteObjectNotify();
+            }
+        });
+    }
+
     static Graphics safelyGetGraphics(Component c) {
         return safelyGetGraphics(c, SwingUtilities.getRoot(c));
     }
--- a/src/java.desktop/share/classes/javax/swing/text/GlyphView.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/swing/text/GlyphView.java	Fri Sep 02 02:41:37 2016 +0000
@@ -261,23 +261,7 @@
         if (painter == null) {
             if (defaultPainter == null) {
                 // the classname should probably come from a property file.
-                String classname = "javax.swing.text.GlyphPainter1";
-                try {
-                    Class<?> c;
-                    ClassLoader loader = getClass().getClassLoader();
-                    if (loader != null) {
-                        c = loader.loadClass(classname);
-                    } else {
-                        c = Class.forName(classname);
-                    }
-                    Object o = c.newInstance();
-                    if (o instanceof GlyphPainter) {
-                        defaultPainter = (GlyphPainter) o;
-                    }
-                } catch (Throwable e) {
-                    throw new StateInvariantError("GlyphView: Can't load glyph painter: "
-                                                  + classname);
-                }
+                defaultPainter = new GlyphPainter1();
             }
             setGlyphPainter(defaultPainter.getPainter(this, getStartOffset(),
                                                       getEndOffset()));
--- a/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java	Fri Sep 02 02:41:37 2016 +0000
@@ -61,20 +61,8 @@
         Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty);
         if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) {
             try {
-                if (i18nStrategy == null) {
-                    // the classname should probably come from a property file.
-                    String classname = "javax.swing.text.TextLayoutStrategy";
-                    ClassLoader loader = getClass().getClassLoader();
-                    if (loader != null) {
-                        i18nStrategy = loader.loadClass(classname);
-                    } else {
-                        i18nStrategy = Class.forName(classname);
-                    }
-                }
-                Object o = i18nStrategy.newInstance();
-                if (o instanceof FlowStrategy) {
-                    strategy = (FlowStrategy) o;
-                }
+                // the classname should probably come from a property file.
+                strategy = new TextLayoutStrategy();
             } catch (Throwable e) {
                 throw new StateInvariantError("ParagraphView: Can't create i18n strategy: "
                                               + e.getMessage());
--- a/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java	Fri Sep 02 02:41:37 2016 +0000
@@ -40,6 +40,7 @@
 import java.lang.ref.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import javax.swing.text.html.parser.ParserDelegator;
 
 /**
  * The Swing JEditorPane text component supports different kinds
@@ -610,11 +611,7 @@
      */
     protected Parser getParser() {
         if (defaultParser == null) {
-            try {
-                Class<?> c = Class.forName("javax.swing.text.html.parser.ParserDelegator");
-                defaultParser = (Parser) c.newInstance();
-            } catch (Throwable e) {
-            }
+            defaultParser = new ParserDelegator();
         }
         return defaultParser;
     }
--- a/src/java.desktop/share/classes/sun/applet/AppletPanel.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/sun/applet/AppletPanel.java	Fri Sep 02 02:41:37 2016 +0000
@@ -616,34 +616,8 @@
      * calls KeyboardFocusManager directly.
      */
     private Component getMostRecentFocusOwnerForWindow(Window w) {
-        Method meth = AccessController.doPrivileged(
-            new PrivilegedAction<Method>() {
-                @Override
-                public Method run() {
-                    Method meth = null;
-                    try {
-                        meth = KeyboardFocusManager.class.getDeclaredMethod(
-                                "getMostRecentFocusOwner",
-                                new Class<?>[]{Window.class});
-                        meth.setAccessible(true);
-                    } catch (Exception e) {
-                        // Must never happen
-                        e.printStackTrace();
-                    }
-                    return meth;
-                }
-            });
-        if (meth != null) {
-            // Meth refers static method
-            try {
-                return (Component)meth.invoke(null, new Object[] {w});
-            } catch (Exception e) {
-                // Must never happen
-                e.printStackTrace();
-            }
-        }
-        // Will get here if exception was thrown or meth is null
-        return w.getMostRecentFocusOwner();
+        return AWTAccessor.getKeyboardFocusManagerAccessor()
+                .getMostRecentFocusOwner(w);
     }
 
     /*
--- a/src/java.desktop/share/classes/sun/awt/AWTAccessor.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/sun/awt/AWTAccessor.java	Fri Sep 02 02:41:37 2016 +0000
@@ -34,6 +34,7 @@
 import java.awt.dnd.DropTargetContext;
 import java.awt.dnd.peer.DragSourceContextPeer;
 import java.awt.dnd.peer.DropTargetContextPeer;
+import java.awt.event.AWTEventListener;
 import java.awt.event.InputEvent;
 import java.awt.event.InvocationEvent;
 import java.awt.event.KeyEvent;
@@ -48,6 +49,7 @@
 import java.io.File;
 import java.util.ResourceBundle;
 import java.util.Vector;
+import javax.accessibility.AccessibleBundle;
 
 /**
  * The AWTAccessor utility class.
@@ -406,6 +408,8 @@
          * Accessor for InputEvent.canAccessSystemClipboard field
          */
         boolean canAccessSystemClipboard(InputEvent event);
+        void setCanAccessSystemClipboard(InputEvent event,
+                boolean canAccessSystemClipboard);
     }
 
     /*
@@ -455,6 +459,11 @@
         void removeLastFocusRequest(Component heavyweight);
 
         /**
+         * Gets the most recent focus owner in the window.
+         */
+        Component getMostRecentFocusOwner(Window window);
+
+        /**
          * Sets the most recent focus owner in the window.
          */
         void setMostRecentFocusOwner(Window window, Component component);
@@ -708,6 +717,11 @@
          * Gets original source for KeyEvent
          */
         Component getOriginalSource(KeyEvent ev);
+
+        /**
+         * Gets isProxyActive field for KeyEvent
+         */
+        boolean isProxyActive(KeyEvent ev);
     }
 
     /**
@@ -758,6 +772,11 @@
          * Returns true if the event is an instances of SequencedEvent.
          */
         boolean isSequencedEvent(AWTEvent event);
+
+        /*
+         * Creates SequencedEvent with the given nested event
+         */
+        AWTEvent create(AWTEvent event);
     }
 
     /*
@@ -787,6 +806,15 @@
     public interface AccessibleContextAccessor {
         void setAppContext(AccessibleContext accessibleContext, AppContext appContext);
         AppContext getAppContext(AccessibleContext accessibleContext);
+        Object getNativeAXResource(AccessibleContext accessibleContext);
+        void setNativeAXResource(AccessibleContext accessibleContext, Object value);
+    }
+
+    /*
+     * An accessor object for the AccessibleContext class
+     */
+    public interface AccessibleBundleAccessor {
+        String getKey(AccessibleBundle accessibleBundle);
     }
 
     /*
@@ -845,6 +873,7 @@
     private static InvocationEventAccessor invocationEventAccessor;
     private static SystemColorAccessor systemColorAccessor;
     private static AccessibleContextAccessor accessibleContextAccessor;
+    private static AccessibleBundleAccessor accessibleBundleAccessor;
     private static DragSourceContextAccessor dragSourceContextAccessor;
     private static DropTargetContextAccessor dropTargetContextAccessor;
 
@@ -1235,9 +1264,13 @@
      * Get the accessor object for the java.awt.SequencedEvent class.
      */
     public static SequencedEventAccessor getSequencedEventAccessor() {
-        // The class is not public. So we can't ensure it's initialized.
-        // Null returned value means it's not initialized
-        // (so not a single instance of the event has been created).
+        if (sequencedEventAccessor == null) {
+            try {
+                unsafe.ensureClassInitialized(
+                        Class.forName("java.awt.SequencedEvent"));
+            } catch (ClassNotFoundException ignore) {
+            }
+        }
         return sequencedEventAccessor;
     }
 
@@ -1302,6 +1335,23 @@
     }
 
    /*
+    * Set the accessor object for the javax.accessibility.AccessibleBundle class.
+    */
+    public static void setAccessibleBundleAccessor(AccessibleBundleAccessor accessor) {
+        AWTAccessor.accessibleBundleAccessor = accessor;
+    }
+
+    /*
+     * Get the accessor object for the javax.accessibility.AccessibleBundle class.
+     */
+    public static AccessibleBundleAccessor getAccessibleBundleAccessor() {
+        if (accessibleBundleAccessor == null) {
+            unsafe.ensureClassInitialized(AccessibleBundle.class);
+        }
+        return accessibleBundleAccessor;
+    }
+
+   /*
     * Set the accessor object for the javax.accessibility.AccessibleContext class.
     */
     public static void setAccessibleContextAccessor(AccessibleContextAccessor accessor) {
@@ -1342,4 +1392,4 @@
         AWTAccessor.dropTargetContextAccessor = accessor;
     }
 
-}
+}
\ No newline at end of file
--- a/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Fri Sep 02 02:41:37 2016 +0000
@@ -372,26 +372,6 @@
         cont.setFocusTraversalPolicy(defaultPolicy);
     }
 
-    private static FocusTraversalPolicy createLayoutPolicy() {
-        FocusTraversalPolicy policy = null;
-        try {
-            Class<?> layoutPolicyClass =
-                Class.forName("javax.swing.LayoutFocusTraversalPolicy");
-            policy = (FocusTraversalPolicy)layoutPolicyClass.newInstance();
-        }
-        catch (ClassNotFoundException e) {
-            assert false;
-        }
-        catch (InstantiationException e) {
-            assert false;
-        }
-        catch (IllegalAccessException e) {
-            assert false;
-        }
-
-        return policy;
-    }
-
     /*
      * Insert a mapping from target to AppContext, for later retrieval
      * via targetToAppContext() above.
--- a/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Fri Sep 02 02:41:37 2016 +0000
@@ -33,6 +33,7 @@
 import java.util.function.Function;
 import java.util.function.BiFunction;
 import java.util.stream.Collectors;
+import java.awt.image.MultiResolutionImage;
 import java.awt.image.AbstractMultiResolutionImage;
 
 public class MultiResolutionCachedImage extends AbstractMultiResolutionImage {
@@ -44,17 +45,30 @@
     private int availableInfo;
 
     public MultiResolutionCachedImage(int baseImageWidth, int baseImageHeight,
-            BiFunction<Integer, Integer, Image> mapper) {
-        this(baseImageWidth, baseImageHeight, new Dimension[]{new Dimension(
-            baseImageWidth, baseImageHeight)
+                                      BiFunction<Integer, Integer, Image> mapper)
+    {
+        this(baseImageWidth, baseImageHeight,
+             new Dimension[]{new Dimension( baseImageWidth, baseImageHeight)
         }, mapper);
     }
 
     public MultiResolutionCachedImage(int baseImageWidth, int baseImageHeight,
-            Dimension2D[] sizes, BiFunction<Integer, Integer, Image> mapper) {
+                                      Dimension2D[] sizes,
+                                      BiFunction<Integer, Integer, Image> mapper)
+    {
+        this(baseImageWidth, baseImageHeight, sizes, mapper, true);
+    }
+
+    private MultiResolutionCachedImage(int baseImageWidth, int baseImageHeight,
+                                       Dimension2D[] sizes,
+                                       BiFunction<Integer, Integer, Image> mapper,
+                                       boolean copySizes)
+    {
         this.baseImageWidth = baseImageWidth;
         this.baseImageHeight = baseImageHeight;
-        this.sizes = (sizes == null) ? null : Arrays.copyOf(sizes, sizes.length);
+        this.sizes = (copySizes && sizes != null)
+                                ? Arrays.copyOf(sizes, sizes.length)
+                                : sizes;
         this.mapper = mapper;
     }
 
@@ -99,6 +113,35 @@
                         mapper.apply(getResolutionVariant(width, height)));
     }
 
+    public static Image map(MultiResolutionImage mrImage,
+                            Function<Image, Image> mapper) {
+
+        if (mrImage instanceof MultiResolutionToolkitImage) {
+            MultiResolutionToolkitImage mrtImage =
+                    (MultiResolutionToolkitImage) mrImage;
+            return MultiResolutionToolkitImage.map(mrtImage, mapper);
+        }
+
+        BiFunction<Integer, Integer, Image> sizeMapper
+                = (w, h) -> mapper.apply(mrImage.getResolutionVariant(w, h));
+
+        if (mrImage instanceof MultiResolutionCachedImage) {
+            MultiResolutionCachedImage mrcImage
+                    = (MultiResolutionCachedImage) mrImage;
+
+            return new MultiResolutionCachedImage(mrcImage.baseImageWidth,
+                                                  mrcImage.baseImageHeight,
+                                                  mrcImage.sizes,
+                                                  sizeMapper,
+                                                  false);
+        }
+
+        Image image = (Image) mrImage;
+        int width = image.getWidth(null);
+        int height = image.getHeight(null);
+        return new MultiResolutionCachedImage(width, height, sizeMapper);
+    }
+
     @Override
     public int getWidth(ImageObserver observer) {
         updateInfo(observer, ImageObserver.WIDTH);
--- a/src/java.desktop/share/classes/sun/awt/image/MultiResolutionToolkitImage.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/sun/awt/image/MultiResolutionToolkitImage.java	Fri Sep 02 02:41:37 2016 +0000
@@ -29,6 +29,7 @@
 import java.awt.image.MultiResolutionImage;
 import java.util.Arrays;
 import java.util.List;
+import java.util.function.Function;
 import sun.awt.SoftCache;
 
 public class MultiResolutionToolkitImage extends ToolkitImage implements MultiResolutionImage {
@@ -47,6 +48,13 @@
                 ? this : resolutionVariant;
     }
 
+    public static Image map(MultiResolutionToolkitImage mrImage,
+                            Function<Image, Image> mapper) {
+        Image baseImage = mapper.apply(mrImage);
+        Image rvImage = mapper.apply(mrImage.resolutionVariant);
+        return new MultiResolutionToolkitImage(baseImage, rvImage);
+    }
+
     private static void checkSize(double width, double height) {
         if (width <= 0 || height <= 0) {
             throw new IllegalArgumentException(String.format(
--- a/src/java.desktop/share/classes/sun/print/PSPrinterJob.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/sun/print/PSPrinterJob.java	Fri Sep 02 02:41:37 2016 +0000
@@ -33,11 +33,8 @@
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 import java.awt.HeadlessException;
-import java.awt.Rectangle;
 import java.awt.Shape;
 
-import java.awt.image.BufferedImage;
-
 import java.awt.font.FontRenderContext;
 
 import java.awt.geom.AffineTransform;
@@ -46,7 +43,6 @@
 
 import java.awt.image.BufferedImage;
 
-import java.awt.peer.FontPeer;
 import java.awt.print.Pageable;
 import java.awt.print.PageFormat;
 import java.awt.print.Paper;
@@ -55,14 +51,12 @@
 import java.awt.print.PrinterIOException;
 import java.awt.print.PrinterJob;
 
-import javax.print.DocFlavor;
 import javax.print.PrintService;
 import javax.print.StreamPrintService;
 import javax.print.attribute.HashPrintRequestAttributeSet;
 import javax.print.attribute.PrintRequestAttributeSet;
 import javax.print.attribute.PrintServiceAttributeSet;
 import javax.print.attribute.standard.PrinterName;
-import javax.print.attribute.standard.Chromaticity;
 import javax.print.attribute.standard.Copies;
 import javax.print.attribute.standard.Destination;
 import javax.print.attribute.standard.DialogTypeSelection;
@@ -72,7 +66,6 @@
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
-import java.io.CharConversionException;
 import java.io.File;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -85,17 +78,14 @@
 import java.io.StringWriter;
 
 import java.util.ArrayList;
-import java.util.Enumeration;
 import java.util.Locale;
 import java.util.Properties;
 
 import sun.awt.CharsetString;
 import sun.awt.FontConfiguration;
-import sun.awt.FontDescriptor;
 import sun.awt.PlatformFont;
 import sun.awt.SunToolkit;
 import sun.font.FontAccess;
-import sun.font.FontManagerFactory;
 import sun.font.FontUtilities;
 
 import java.nio.charset.*;
@@ -105,7 +95,9 @@
 
 //REMIND: Remove use of this class when IPPPrintService is moved to share directory.
 import java.lang.reflect.Method;
+import javax.print.attribute.Attribute;
 import javax.print.attribute.standard.JobSheets;
+import javax.print.attribute.standard.Media;
 
 /**
  * A class which initiates and executes a PostScript printer job.
@@ -489,6 +481,23 @@
         return doPrint;
     }
 
+    @Override
+    protected void setAttributes(PrintRequestAttributeSet attributes)
+                                 throws PrinterException {
+        super.setAttributes(attributes);
+        if (attributes == null) {
+            return; // now always use attributes, so this shouldn't happen.
+        }
+        Attribute attr = attributes.get(Media.class);
+        if (attr instanceof CustomMediaTray) {
+            CustomMediaTray customTray = (CustomMediaTray)attr;
+            String choice = customTray.getChoiceName();
+            if (choice != null) {
+                mOptions = " InputSlot="+ choice;
+            }
+        }
+    }
+
     /**
      * Invoked by the RasterPrinterJob super class
      * this method is called to mark the start of a
@@ -1629,7 +1638,7 @@
                 execCmd[n++] = "-o job-sheets=standard";
             }
             if ((pFlags & OPTIONS) != 0) {
-                execCmd[n++] = new String(options);
+                execCmd[n++] = "-o" + options;
             }
         } else {
             ncomps+=1; //add 1 arg for lp
--- a/src/java.desktop/share/classes/sun/print/ServiceDialog.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/sun/print/ServiceDialog.java	Fri Sep 02 02:41:37 2016 +0000
@@ -944,6 +944,10 @@
                  } catch (MalformedURLException ex) {
                      dstSupported = true;
                  }
+            } else {
+                if (psCurrent.isAttributeCategorySupported(dstCategory)) {
+                    dstSupported = true;
+                }
             }
             cbPrintToFile.setEnabled(dstSupported && dstAllowed);
             cbPrintToFile.setSelected(dstSelected && dstAllowed
--- a/src/java.desktop/share/classes/sun/swing/SwingAccessor.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/classes/sun/swing/SwingAccessor.java	Fri Sep 02 02:41:37 2016 +0000
@@ -51,6 +51,16 @@
     }
 
     /**
+     * An accessor for the JComponent class.
+     */
+    public interface JComponentAccessor {
+
+        boolean getFlag(JComponent comp, int aFlag);
+
+        void compWriteObjectNotify(JComponent comp);
+    }
+
+    /**
      * An accessor for the JTextComponent class.
      * Note that we intentionally introduce the JTextComponentAccessor,
      * and not the JComponentAccessor because the needed methods
@@ -106,6 +116,29 @@
     }
 
     /**
+     * The javax.swing.JComponent class accessor object.
+     */
+    private static JComponentAccessor jComponentAccessor;
+
+    /**
+     * Set an accessor object for the javax.swing.JComponent class.
+     */
+    public static void setJComponentAccessor(JComponentAccessor jCompAccessor) {
+        jComponentAccessor = jCompAccessor;
+    }
+
+    /**
+     * Retrieve the accessor object for the javax.swing.JComponent class.
+     */
+    public static JComponentAccessor getJComponentAccessor() {
+        if (jComponentAccessor == null) {
+            unsafe.ensureClassInitialized(JComponent.class);
+        }
+
+        return jComponentAccessor;
+    }
+
+    /**
      * The javax.swing.text.JTextComponent class accessor object.
      */
     private static JTextComponentAccessor jtextComponentAccessor;
--- a/src/java.desktop/share/native/include/jawt.h	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/include/jawt.h	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,7 @@
 #endif
 
 /*
- * AWT native interface (new in JDK 1.3)
+ * AWT native interface.
  *
  * The AWT native interface allows a native C or C++ application a means
  * by which to access native structures in AWT.  This is to facilitate moving
@@ -279,6 +279,50 @@
      */
     jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
 
+    /**
+     * Since 9
+     * Creates a java.awt.Frame placed in a native container. Container is
+     * referenced by the native platform handle. For example on Windows this
+     * corresponds to an HWND. For other platforms, see the appropriate
+     * machine-dependent header file for a description. The reference returned
+     * by this function is a local reference that is only valid in this
+     * environment. This function returns a NULL reference if no frame could be
+     * created with matching platform information.
+     */
+    jobject (JNICALL *CreateEmbeddedFrame) (JNIEnv *env, void* platformInfo);
+
+    /**
+     * Since 9
+     * Moves and resizes the embedded frame. The new location of the top-left
+     * corner is specified by x and y parameters relative to the native parent
+     * component. The new size is specified by width and height.
+     *
+     * The embedded frame should be created by CreateEmbeddedFrame() method, or
+     * this function will not have any effect.
+     *
+     * java.awt.Component.setLocation() and java.awt.Component.setBounds() for
+     * EmbeddedFrame really don't move it within the native parent. These
+     * methods always locate the embedded frame at (0, 0) for backward
+     * compatibility. To allow moving embedded frames this method was
+     * introduced, and it works just the same way as setLocation() and
+     * setBounds() for usual, non-embedded components.
+     *
+     * Using usual get/setLocation() and get/setBounds() together with this new
+     * method is not recommended.
+     */
+    void (JNICALL *SetBounds) (JNIEnv *env, jobject embeddedFrame,
+            jint x, jint y, jint w, jint h);
+    /**
+     * Since 9
+     * Synthesize a native message to activate or deactivate an EmbeddedFrame
+     * window depending on the value of parameter doActivate, if "true"
+     * activates the window; otherwise, deactivates the window.
+     *
+     * The embedded frame should be created by CreateEmbeddedFrame() method, or
+     * this function will not have any effect.
+     */
+    void (JNICALL *SynthesizeWindowActivation) (JNIEnv *env,
+            jobject embeddedFrame, jboolean doActivate);
 } JAWT;
 
 /*
@@ -291,6 +335,7 @@
 #define JAWT_VERSION_1_3 0x00010003
 #define JAWT_VERSION_1_4 0x00010004
 #define JAWT_VERSION_1_7 0x00010007
+#define JAWT_VERSION_9 0x00090000
 
 #ifdef __cplusplus
 } /* extern "C" */
--- a/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -772,6 +772,7 @@
     mlib_image *src;
     mlib_image *dst;
     int i;
+    int j = 0;
     int retStatus = 1;
     mlib_status status;
     double *matrix;
@@ -824,6 +825,15 @@
         return 0;
     }
 
+    /* Check for invalid double value in transformation matrix */
+    for (j = 0; j < 6; j++) {
+
+        if (!(IS_FINITE(matrix[j]))) {
+            (*env)->ReleasePrimitiveArrayCritical(env, jmatrix, matrix, JNI_ABORT);
+            return 0;
+        }
+    }
+
     if (s_printIt) {
         printf("matrix is %g %g %g %g %g %g\n", matrix[0], matrix[1],
                matrix[2], matrix[3], matrix[4], matrix[5]);
@@ -980,6 +990,7 @@
     mlib_image *src;
     mlib_image *dst;
     int i;
+    int j = 0;
     int retStatus = 1;
     mlib_status status;
     double *matrix;
@@ -1044,6 +1055,18 @@
         return 0;
     }
 
+    /* Check for invalid double value in transformation matrix */
+    for (j = 0; j < 6; j++) {
+
+        if (!(IS_FINITE(matrix[j]))) {
+            (*env)->ReleasePrimitiveArrayCritical(env, jmatrix, matrix, JNI_ABORT);
+            free(srcRasterP);
+            free(dstRasterP);
+
+            return 0;
+        }
+    }
+
     if (s_printIt) {
         printf("matrix is %g %g %g %g %g %g\n", matrix[0], matrix[1],
                matrix[2], matrix[3], matrix[4], matrix[5]);
--- a/src/java.desktop/share/native/libfontmanager/HBShaper.c	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/libfontmanager/HBShaper.c	Fri Sep 02 02:41:37 2016 +0000
@@ -72,12 +72,13 @@
 int storeGVData(JNIEnv* env,
                jobject gvdata, jint slot, jint baseIndex, jobject startPt,
                int glyphCount, hb_glyph_info_t *glyphInfo,
-               hb_glyph_position_t *glyphPos, hb_direction_t direction) {
+               hb_glyph_position_t *glyphPos, hb_direction_t direction,
+               float devScale) {
 
     int i;
     float x=0, y=0;
     float startX, startY;
-    float scale = 1.0f/64.0f;
+    float scale = 1.0f/64.0f/devScale;
     unsigned int* glyphs;
     float* positions;
     int initialCount, glyphArrayLen, posArrayLen, maxGlyphs, storeadv;
@@ -216,7 +217,11 @@
     fi->ptSize = ptSize;
     fi->xPtSize = euclidianDistance(fi->matrix[0], fi->matrix[1]);
     fi->yPtSize = euclidianDistance(fi->matrix[2], fi->matrix[3]);
-
+    if (!aat && (getenv("HB_NODEVTX") != NULL)) {
+        fi->devScale = fi->xPtSize / fi->ptSize;
+    } else {
+        fi->devScale = 1.0f;
+    }
     return fi;
 }
 
@@ -309,7 +314,8 @@
      // by calling code.
 
      storeGVData(env, gvdata, slot, baseIndex, startPt,
-                 glyphCount, glyphInfo, glyphPos, direction);
+                 glyphCount, glyphInfo, glyphPos, direction,
+                 jdkFontInfo->devScale);
 
      hb_buffer_destroy (buffer);
      hb_font_destroy(hbfont);
--- a/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc	Fri Sep 02 02:41:37 2016 +0000
@@ -81,6 +81,7 @@
         return 0;
     }
     fadv = env->GetFloatField(pt, sunFontIDs.xFID);
+    fadv *= jdkFontInfo->devScale;
     env->DeleteLocalRef(pt);
 
     return FloatToF26Dot6(fadv); // should this round ?
@@ -324,8 +325,8 @@
                        _hb_jdk_get_font_funcs (),
                        jdkFontInfo, (hb_destroy_func_t) _do_nothing);
     hb_font_set_scale (font,
-                      FloatToF26Dot6(jdkFontInfo->xPtSize),
-                      FloatToF26Dot6(jdkFontInfo->yPtSize));
+                      FloatToF26Dot6(jdkFontInfo->ptSize*jdkFontInfo->devScale),
+                      FloatToF26Dot6(jdkFontInfo->ptSize*jdkFontInfo->devScale));
   return font;
 }
 
--- a/src/java.desktop/share/native/libfontmanager/hb-jdk.h	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/libfontmanager/hb-jdk.h	Fri Sep 02 02:41:37 2016 +0000
@@ -43,6 +43,7 @@
     float ptSize;
     float xPtSize;
     float yPtSize;
+    float devScale; // How much applying the full glyph tx scales x distance.
     jboolean aat;
 } JDKFontInfo;
 
--- a/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
 #include "mlib_image.h"
 #include "mlib_SysMath.h"
 #include "mlib_ImageAffine.h"
+#include "safe_math.h"
+
 
 /***************************************************************/
 mlib_status mlib_AffineEdges(mlib_affine_param *param,
@@ -83,6 +85,12 @@
   dstYStride = mlib_ImageGetStride(dst);
   paddings = mlib_ImageGetPaddings(src);
 
+  /* All the transformation matrix parameters should be finite. if not, return failure */
+  if (!(IS_FINITE(a) && IS_FINITE(b) && IS_FINITE(c) && IS_FINITE(d) &&
+        IS_FINITE(tx) && IS_FINITE(ty))) {
+    return MLIB_FAILURE;
+  }
+
   if (srcWidth >= (1 << 15) || srcHeight >= (1 << 15)) {
     return MLIB_FAILURE;
   }
@@ -288,6 +296,10 @@
     if (dY1 == dY2)
       continue;
 
+    if (!(IS_FINITE(slope))) {
+      continue;
+    }
+
     if (dY1 < 0.0)
       y1 = 0;
     else {
@@ -328,6 +340,10 @@
     if (dY1 == dY2)
       continue;
 
+    if (!(IS_FINITE(slope))) {
+      continue;
+    }
+
     if (dY1 < 0.0)
       y1 = 0;
     else {
--- a/src/java.desktop/share/native/libmlib_image/safe_math.h	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/libmlib_image/safe_math.h	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,15 @@
 #ifndef __SAFE_MATH_H__
 #define __SAFE_MATH_H__
 
+#include "mlib_types.h"
+
 #define SAFE_TO_MULT(a, b) \
     (((a) > 0) && ((b) >= 0) && ((0x7fffffff / (a)) > (b)))
 
 #define SAFE_TO_ADD(a, b) \
     (((a) >= 0) && ((b) >= 0) && ((0x7fffffff - (a)) > (b)))
 
+#define IS_FINITE(a) \
+    (((a) >= MLIB_D64_MIN) && ((a) <= MLIB_D64_MAX))
+
 #endif // __SAFE_MATH_H__
--- a/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c	Fri Sep 02 02:41:37 2016 +0000
@@ -114,7 +114,7 @@
     GifFile->SavedImages = NULL;
     GifFile->SColorMap = NULL;
 
-    Private = (GifFilePrivateType *)malloc(sizeof(GifFilePrivateType));
+    Private = (GifFilePrivateType *)calloc(1, sizeof(GifFilePrivateType));
     if (Private == NULL) {
         if (Error != NULL)
             *Error = D_GIF_ERR_NOT_ENOUGH_MEM;
@@ -122,6 +122,9 @@
         free((char *)GifFile);
         return NULL;
     }
+
+    /*@i1@*/memset(Private, '\0', sizeof(GifFilePrivateType));
+
 #ifdef _WIN32
     _setmode(FileHandle, O_BINARY);    /* Make sure it is in binary mode. */
 #endif /* _WIN32 */
@@ -197,13 +200,14 @@
     GifFile->SavedImages = NULL;
     GifFile->SColorMap = NULL;
 
-    Private = (GifFilePrivateType *)malloc(sizeof(GifFilePrivateType));
+    Private = (GifFilePrivateType *)calloc(1, sizeof(GifFilePrivateType));
     if (!Private) {
         if (Error != NULL)
             *Error = D_GIF_ERR_NOT_ENOUGH_MEM;
         free((char *)GifFile);
         return NULL;
     }
+    /*@i1@*/memset(Private, '\0', sizeof(GifFilePrivateType));
 
     GifFile->Private = (void *)Private;
     Private->FileHandle = 0;
@@ -417,8 +421,8 @@
 
     if (GifFile->SavedImages) {
         SavedImage* new_saved_images =
-            (SavedImage *)realloc(GifFile->SavedImages,
-                            sizeof(SavedImage) * (GifFile->ImageCount + 1));
+            (SavedImage *)reallocarray(GifFile->SavedImages,
+                            (GifFile->ImageCount + 1), sizeof(SavedImage));
         if (new_saved_images == NULL) {
             GifFile->Error = D_GIF_ERR_NOT_ENOUGH_MEM;
             return GIF_ERROR;
@@ -788,6 +792,12 @@
     }
     BitsPerPixel = CodeSize;
 
+    /* this can only happen on a severely malformed GIF */
+    if (BitsPerPixel > 8) {
+        GifFile->Error = D_GIF_ERR_READ_FAILED;    /* somewhat bogus error code */
+        return GIF_ERROR;    /* Failed to read Code size. */
+    }
+
     Private->Buf[0] = 0;    /* Input Buffer empty. */
     Private->BitsPerPixel = BitsPerPixel;
     Private->ClearCode = (1 << BitsPerPixel);
@@ -1123,7 +1133,7 @@
               if (ImageSize > (SIZE_MAX / sizeof(GifPixelType))) {
                   return GIF_ERROR;
               }
-              sp->RasterBits = (unsigned char *)malloc(ImageSize *
+              sp->RasterBits = (unsigned char *)reallocarray(NULL, ImageSize,
                       sizeof(GifPixelType));
 
               if (sp->RasterBits == NULL) {
--- a/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h	Fri Sep 02 02:41:37 2016 +0000
@@ -37,7 +37,7 @@
 
 #define GIFLIB_MAJOR 5
 #define GIFLIB_MINOR 1
-#define GIFLIB_RELEASE 1
+#define GIFLIB_RELEASE 4
 
 #define GIF_ERROR   0
 #define GIF_OK      1
@@ -274,6 +274,9 @@
                                      GifPixelType ColorTransIn2[]);
 extern int GifBitSize(int n);
 
+extern void * reallocarray(void *optr, size_t nmemb, size_t size);
+
+
 /******************************************************************************
  Support for the in-core structures allocation (slurp mode).
 ******************************************************************************/
--- a/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c	Fri Sep 02 02:41:37 2016 +0000
@@ -212,8 +212,8 @@
 
         /* perhaps we can shrink the map? */
         if (RoundUpTo < ColorUnion->ColorCount) {
-            GifColorType *new_map = (GifColorType *)realloc(Map,
-                                 sizeof(GifColorType) * RoundUpTo);
+            GifColorType *new_map = (GifColorType *)reallocarray(Map,
+                                 RoundUpTo, sizeof(GifColorType));
             if( new_map == NULL ) {
                 GifFreeMapObject(ColorUnion);
                 return ((ColorMapObject *) NULL);
@@ -256,9 +256,9 @@
     if (*ExtensionBlocks == NULL)
         *ExtensionBlocks=(ExtensionBlock *)malloc(sizeof(ExtensionBlock));
     else {
-        ExtensionBlock* ep_new = (ExtensionBlock *)realloc(*ExtensionBlocks,
-                                      sizeof(ExtensionBlock) *
-                                      (*ExtensionBlockCount + 1));
+        ExtensionBlock* ep_new = (ExtensionBlock *)reallocarray
+                                      (*ExtensionBlocks, (*ExtensionBlockCount + 1),
+                                      sizeof(ExtensionBlock));
         if( ep_new == NULL )
             return (GIF_ERROR);
         *ExtensionBlocks = ep_new;
@@ -349,8 +349,8 @@
     if (GifFile->SavedImages == NULL)
         GifFile->SavedImages = (SavedImage *)malloc(sizeof(SavedImage));
     else
-        GifFile->SavedImages = (SavedImage *)realloc(GifFile->SavedImages,
-                               sizeof(SavedImage) * (GifFile->ImageCount + 1));
+        GifFile->SavedImages = (SavedImage *)reallocarray(GifFile->SavedImages,
+                               (GifFile->ImageCount + 1), sizeof(SavedImage));
 
     if (GifFile->SavedImages == NULL)
         return ((SavedImage *)NULL);
@@ -379,9 +379,10 @@
             }
 
             /* next, the raster */
-            sp->RasterBits = (unsigned char *)malloc(sizeof(GifPixelType) *
-                                                   CopyFrom->ImageDesc.Height *
-                                                   CopyFrom->ImageDesc.Width);
+            sp->RasterBits = (unsigned char *)reallocarray(NULL,
+                                                  (CopyFrom->ImageDesc.Height *
+                                                  CopyFrom->ImageDesc.Width),
+                                                  sizeof(GifPixelType));
             if (sp->RasterBits == NULL) {
                 FreeLastSavedImage(GifFile);
                 return (SavedImage *)(NULL);
@@ -392,9 +393,9 @@
 
             /* finally, the extension blocks */
             if (sp->ExtensionBlocks != NULL) {
-                sp->ExtensionBlocks = (ExtensionBlock *)malloc(
-                                      sizeof(ExtensionBlock) *
-                                      CopyFrom->ExtensionBlockCount);
+                sp->ExtensionBlocks = (ExtensionBlock *)reallocarray(NULL,
+                                      CopyFrom->ExtensionBlockCount,
+                                      sizeof(ExtensionBlock));
                 if (sp->ExtensionBlocks == NULL) {
                     FreeLastSavedImage(GifFile);
                     return (SavedImage *)(NULL);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/native/libsplashscreen/giflib/openbsd-reallocarray.c	Fri Sep 02 02:41:37 2016 +0000
@@ -0,0 +1,106 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*    $OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $    */
+/*
+ * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+/*
+ * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
+ * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
+ */
+#define MUL_NO_OVERFLOW    ((size_t)1 << (sizeof(size_t) * 4))
+
+void *
+reallocarray(void *optr, size_t nmemb, size_t size)
+{
+    if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
+        nmemb > 0 && SIZE_MAX / nmemb < size) {
+        errno = ENOMEM;
+        return NULL;
+    }
+    /*
+     * Head off variations in realloc behavior on different
+     * platforms (reported by MarkR <mrogers6@users.sf.net>)
+     *
+     * The behaviour of reallocarray is implementation-defined if
+     * nmemb or size is zero. It can return NULL or non-NULL
+     * depending on the platform.
+     * https://www.securecoding.cert.org/confluence/display/c/MEM04-C.Beware+of+zero-lengthallocations
+     *
+     * Here are some extracts from realloc man pages on different platforms.
+     *
+     * void realloc( void memblock, size_t size );
+     *
+     * Windows:
+     *
+     * If there is not enough available memory to expand the block
+     * to the given size, the original block is left unchanged,
+     * and NULL is returned.  If size is zero, then the block
+     * pointed to by memblock is freed; the return value is NULL,
+     * and memblock is left pointing at a freed block.
+     *
+     * OpenBSD:
+     *
+     * If size or nmemb is equal to 0, a unique pointer to an
+     * access protected, zero sized object is returned. Access via
+     * this pointer will generate a SIGSEGV exception.
+     *
+     * Linux:
+     *
+     * If size was equal to 0, either NULL or a pointer suitable
+     * to be passed to free() is returned.
+     *
+     * OS X:
+     *
+     * If size is zero and ptr is not NULL, a new, minimum sized
+     * object is allocated and the original object is freed.
+     *
+     * It looks like images with zero width or height can trigger
+     * this, and fuzzing behaviour will differ by platform, so
+     * fuzzing on one platform may not detect zero-size allocation
+     * problems on other platforms.
+     */
+    if (size == 0 || nmemb == 0)
+        return NULL;
+    return realloc(optr, size * nmemb);
+}
--- a/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java	Fri Sep 02 02:41:37 2016 +0000
@@ -57,8 +57,6 @@
 import java.awt.image.VolatileImage;
 import java.awt.peer.ComponentPeer;
 import java.awt.peer.ContainerPeer;
-import java.lang.reflect.*;
-import java.security.*;
 import java.util.Collection;
 import java.util.Objects;
 import java.util.Set;
@@ -241,46 +239,8 @@
         return false;
     }
 
-    private static Class<?> seClass;
-    private static Constructor<?> seCtor;
-
     static final AWTEvent wrapInSequenced(AWTEvent event) {
-        try {
-            if (seClass == null) {
-                seClass = Class.forName("java.awt.SequencedEvent");
-            }
-
-            if (seCtor == null) {
-                seCtor = AccessController.doPrivileged(new
-                    PrivilegedExceptionAction<Constructor<?>>() {
-                        public Constructor<?> run() throws Exception {
-                            Constructor<?> ctor = seClass.getConstructor(
-                                new Class<?>[] { AWTEvent.class });
-                            ctor.setAccessible(true);
-                            return ctor;
-                        }
-                    });
-            }
-
-            return (AWTEvent) seCtor.newInstance(new Object[] { event });
-        }
-        catch (ClassNotFoundException e) {
-            throw new NoClassDefFoundError("java.awt.SequencedEvent.");
-        }
-        catch (PrivilegedActionException ex) {
-            throw new NoClassDefFoundError("java.awt.SequencedEvent.");
-        }
-        catch (InstantiationException e) {
-            assert false;
-        }
-        catch (IllegalAccessException e) {
-            assert false;
-        }
-        catch (InvocationTargetException e) {
-            assert false;
-        }
-
-        return null;
+        return AWTAccessor.getSequencedEventAccessor().create(event);
     }
 
     // TODO: consider moving it to KeyboardFocusManagerPeerImpl
--- a/src/java.desktop/unix/classes/sun/awt/X11/XMouseDragGestureRecognizer.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XMouseDragGestureRecognizer.java	Fri Sep 02 02:41:37 2016 +0000
@@ -36,10 +36,6 @@
 
 import java.awt.event.InputEvent;
 import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.awt.event.MouseMotionListener;
-
-import java.lang.reflect.*;
 
 import sun.awt.dnd.SunDragSourceContextPeer;
 
--- a/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java	Fri Sep 02 02:41:37 2016 +0000
@@ -32,8 +32,6 @@
 
 import java.lang.ref.WeakReference;
 
-import java.lang.reflect.Method;
-
 import sun.awt.AWTAccessor.ComponentAccessor;
 import sun.util.logging.PlatformLogger;
 
@@ -395,7 +393,6 @@
         return false;
     }
 
-    static Method m_sendMessage;
     static void sendEvent(final AWTEvent e) {
         // The uses of this method imply that the incoming event is system-generated
         SunToolkit.setSystemGenerated(e);
--- a/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java	Fri Sep 02 02:41:37 2016 +0000
@@ -41,14 +41,12 @@
 import java.io.PrintWriter;
 import java.io.Reader;
 import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
 import java.nio.file.Files;
 import java.util.Vector;
 
 import javax.print.CancelablePrintJob;
 import javax.print.Doc;
 import javax.print.DocFlavor;
-import javax.print.DocPrintJob;
 import javax.print.PrintService;
 import javax.print.PrintException;
 import javax.print.event.PrintJobEvent;
@@ -56,7 +54,6 @@
 import javax.print.event.PrintJobAttributeListener;
 
 import javax.print.attribute.Attribute;
-import javax.print.attribute.AttributeSet;
 import javax.print.attribute.AttributeSetUtilities;
 import javax.print.attribute.DocAttributeSet;
 import javax.print.attribute.HashPrintJobAttributeSet;
@@ -65,7 +62,6 @@
 import javax.print.attribute.PrintJobAttributeSet;
 import javax.print.attribute.PrintRequestAttribute;
 import javax.print.attribute.PrintRequestAttributeSet;
-import javax.print.attribute.PrintServiceAttributeSet;
 import javax.print.attribute.standard.Copies;
 import javax.print.attribute.standard.Destination;
 import javax.print.attribute.standard.DocumentName;
@@ -77,13 +73,17 @@
 import javax.print.attribute.standard.MediaSize;
 import javax.print.attribute.standard.MediaSizeName;
 import javax.print.attribute.standard.OrientationRequested;
-import javax.print.attribute.standard.PrinterName;
 import javax.print.attribute.standard.RequestingUserName;
 import javax.print.attribute.standard.NumberUp;
 import javax.print.attribute.standard.Sides;
 import javax.print.attribute.standard.PrinterIsAcceptingJobs;
 
-import java.awt.print.*;
+import java.awt.print.PageFormat;
+import java.awt.print.PrinterJob;
+import java.awt.print.Pageable;
+import java.awt.print.Paper;
+import java.awt.print.Printable;
+import java.awt.print.PrinterException;
 
 
 
@@ -370,7 +370,7 @@
                  customTray instanceof CustomMediaTray) {
                  String choice = customTray.getChoiceName();
                  if (choice != null) {
-                     mOptions += " media="+choice;
+                     mOptions += " InputSlot="+choice;
                  }
              }
 
--- a/src/java.desktop/unix/native/common/awt/awt_DrawingSurface.h	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/unix/native/common/awt/awt_DrawingSurface.h	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
 
 #include <jawt.h>
 #include <jni.h>
-#include <jni_util.h>
 
 _JNI_IMPORT_OR_EXPORT_ JAWT_DrawingSurface* JNICALL
     awt_GetDrawingSurface(JNIEnv* env, jobject target);
@@ -45,4 +44,14 @@
 _JNI_IMPORT_OR_EXPORT_ jobject JNICALL
     awt_GetComponent(JNIEnv* env, void* platformInfo);
 
+_JNI_IMPORT_OR_EXPORT_ jobject JNICALL
+    awt_CreateEmbeddedFrame(JNIEnv* env, void* platformInfo);
+
+_JNI_IMPORT_OR_EXPORT_ void JNICALL
+    awt_SetBounds(JNIEnv *env, jobject embeddedFrame, jint x, jint y,
+                  jint w, jint h);
+
+_JNI_IMPORT_OR_EXPORT_ void JNICALL
+    awt_SynthesizeWindowActivation(JNIEnv *env, jobject embeddedFrame,
+                                   jboolean doActivate);
 #endif /* !_AWT_DRAWING_SURFACE_H_ */
--- a/src/java.desktop/unix/native/libawt_xawt/awt/awt_DrawingSurface.c	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/awt_DrawingSurface.c	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -383,3 +383,48 @@
 
     return target;
 }
+
+// EmbeddedFrame support
+
+static char *const embeddedClassName = "sun/awt/X11/XEmbeddedFrame";
+
+JNIEXPORT jobject JNICALL awt_CreateEmbeddedFrame
+(JNIEnv* env, void* platformInfo)
+{
+    static jmethodID mid = NULL;
+    static jclass cls;
+    if (mid == NULL) {
+        cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL_RETURN(cls, NULL);
+        mid = (*env)->GetMethodID(env, cls, "<init>", "(JZ)V");
+        CHECK_NULL_RETURN(mid, NULL);
+    }
+    return (*env)->NewObject(env, cls, mid, platformInfo, JNI_TRUE);
+}
+
+
+JNIEXPORT void JNICALL awt_SetBounds
+(JNIEnv *env, jobject embeddedFrame, jint x, jint y, jint w, jint h)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL(cls);
+        mid = (*env)->GetMethodID(env, cls, "setBoundsPrivate", "(IIII)V");
+        CHECK_NULL(mid);
+    }
+    (*env)->CallVoidMethod(env, embeddedFrame, mid, x, y, w, h);
+}
+
+JNIEXPORT void JNICALL awt_SynthesizeWindowActivation
+(JNIEnv *env, jobject embeddedFrame, jboolean doActivate)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL(cls);
+        mid = (*env)->GetMethodID(env, cls, "synthesizeWindowActivation", "(Z)V");
+        CHECK_NULL(mid);
+    }
+    (*env)->CallVoidMethod(env, embeddedFrame, mid, doActivate);
+}
--- a/src/java.desktop/unix/native/libjawt/jawt.c	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/unix/native/libjawt/jawt.c	Fri Sep 02 02:41:37 2016 +0000
@@ -45,7 +45,8 @@
 
     if (awt->version != JAWT_VERSION_1_3
         && awt->version != JAWT_VERSION_1_4
-        && awt->version != JAWT_VERSION_1_7) {
+        && awt->version != JAWT_VERSION_1_7
+        && awt->version != JAWT_VERSION_9) {
         return JNI_FALSE;
     }
 
@@ -55,6 +56,11 @@
         awt->Lock = awt_Lock;
         awt->Unlock = awt_Unlock;
         awt->GetComponent = awt_GetComponent;
+        if (awt->version >= JAWT_VERSION_9) {
+            awt->CreateEmbeddedFrame = awt_CreateEmbeddedFrame;
+            awt->SetBounds = awt_SetBounds;
+            awt->SynthesizeWindowActivation = awt_SynthesizeWindowActivation;
+        }
     }
 
     return JNI_TRUE;
--- a/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.cpp	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.cpp	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -272,3 +272,47 @@
 {
     // Do nothing on Windows
 }
+
+// EmbeddedFrame support
+
+static char *const embeddedClassName = "sun/awt/windows/WEmbeddedFrame";
+
+JNIEXPORT jobject JNICALL awt_CreateEmbeddedFrame
+(JNIEnv* env, void* platformInfo)
+{
+    static jmethodID mid = NULL;
+    static jclass cls;
+    if (mid == NULL) {
+        cls = env->FindClass(embeddedClassName);
+        CHECK_NULL_RETURN(cls, NULL);
+        mid = env->GetMethodID(cls, "<init>", "(J)V");
+        CHECK_NULL_RETURN(mid, NULL);
+    }
+    return env->NewObject(cls, mid, platformInfo);
+}
+
+JNIEXPORT void JNICALL awt_SetBounds
+(JNIEnv *env, jobject embeddedFrame, jint x, jint y, jint w, jint h)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = env->FindClass(embeddedClassName);
+        CHECK_NULL(cls);
+        mid = env->GetMethodID(cls, "setBoundsPrivate", "(IIII)V");
+        CHECK_NULL(mid);
+    }
+    env->CallVoidMethod(embeddedFrame, mid, x, y, w, h);
+}
+
+JNIEXPORT void JNICALL awt_SynthesizeWindowActivation
+(JNIEnv *env, jobject embeddedFrame, jboolean doActivate)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = env->FindClass(embeddedClassName);
+        CHECK_NULL(cls);
+        mid = env->GetMethodID(cls, "synthesizeWindowActivation", "(Z)V");
+        CHECK_NULL(mid);
+    }
+    env->CallVoidMethod(embeddedFrame, mid, doActivate);
+}
--- a/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.h	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.h	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -162,6 +162,16 @@
     jobject JNICALL DSGetComponent(
         JNIEnv* env, void* platformInfo);
 
+    _JNI_IMPORT_OR_EXPORT_ jobject JNICALL
+        awt_CreateEmbeddedFrame(JNIEnv* env, void* platformInfo);
+
+    _JNI_IMPORT_OR_EXPORT_ void JNICALL
+        awt_SetBounds(JNIEnv *env, jobject embeddedFrame, jint x,
+                      jint y, jint w, jint h);
+
+    _JNI_IMPORT_OR_EXPORT_ void JNICALL
+        awt_SynthesizeWindowActivation(JNIEnv *env, jobject embeddedFrame,
+                                       jboolean doActivate);
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
--- a/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp	Fri Sep 02 02:41:37 2016 +0000
@@ -1132,7 +1132,7 @@
 
     if (dwRet != IDOK)  {
         /* if failure, cleanup and return failure */
-        GlobalFree(pDevMode);
+        GlobalFree(*pDevMode);
         *pDevMode = NULL;
         return FALSE;
     }
--- a/src/java.desktop/windows/native/libjawt/jawt.cpp	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.desktop/windows/native/libjawt/jawt.cpp	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,9 @@
     }
 
     if (awt->version != JAWT_VERSION_1_3
-        && awt->version != JAWT_VERSION_1_4) {
+        && awt->version != JAWT_VERSION_1_4
+        && awt->version != JAWT_VERSION_1_7
+        && awt->version != JAWT_VERSION_9) {
         return JNI_FALSE;
     }
 
@@ -56,6 +58,11 @@
         awt->Lock = DSLockAWT;
         awt->Unlock = DSUnlockAWT;
         awt->GetComponent = DSGetComponent;
+        if (awt->version >= JAWT_VERSION_9) {
+            awt->CreateEmbeddedFrame = awt_CreateEmbeddedFrame;
+            awt->SetBounds = awt_SetBounds;
+            awt->SynthesizeWindowActivation = awt_SynthesizeWindowActivation;
+        }
     }
 
     return JNI_TRUE;
--- a/src/java.smartcardio/share/classes/sun/security/smartcardio/TerminalImpl.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/java.smartcardio/share/classes/sun/security/smartcardio/TerminalImpl.java	Fri Sep 02 02:41:37 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,10 +75,10 @@
             }
         }
         try {
-            card =  new CardImpl(this, protocol);
+            card = new CardImpl(this, protocol);
             return card;
         } catch (PCSCException e) {
-            if (e.code == SCARD_W_REMOVED_CARD) {
+            if (e.code == SCARD_W_REMOVED_CARD || e.code == SCARD_E_NO_SMARTCARD) {
                 throw new CardNotPresentException("No card present", e);
             } else {
                 throw new CardException("connect() failed", e);
--- a/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java	Fri Sep 02 02:41:37 2016 +0000
@@ -76,20 +76,29 @@
                 sendQuitTo(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     path = findSocketFile(pid);
-                    i++;
-                } while (i <= retries && path == null);
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && path == null) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sendQuitTo(pid);
+                    }
+                } while (time_spend <= timeout && path == null);
                 if (path == null) {
                     throw new AttachNotSupportedException(
-                        "Unable to open socket file: target process not responding " +
-                        "or HotSpot VM not loaded");
+                        String.format("Unable to open socket file %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
--- a/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java	Fri Sep 02 02:41:37 2016 +0000
@@ -44,9 +44,6 @@
     // Any changes to this needs to be synchronized with HotSpot.
     private static final String tmpdir = "/tmp";
 
-    // Indicates if this machine uses the old LinuxThreads
-    static boolean isLinuxThreads;
-
     // The patch to the socket file created by the target VM
     String path;
 
@@ -73,44 +70,37 @@
         if (path == null) {
             File f = createAttachFile(pid);
             try {
-                // On LinuxThreads each thread is a process and we don't have the
-                // pid of the VMThread which has SIGQUIT unblocked. To workaround
-                // this we get the pid of the "manager thread" that is created
-                // by the first call to pthread_create. This is parent of all
-                // threads (except the initial thread).
-                if (isLinuxThreads) {
-                    int mpid;
-                    try {
-                        mpid = getLinuxThreadsManager(pid);
-                    } catch (IOException x) {
-                        throw new AttachNotSupportedException(x.getMessage());
-                    }
-                    assert(mpid >= 1);
-                    sendQuitToChildrenOf(mpid);
-                } else {
-                    sendQuitTo(pid);
-                }
+                sendQuitTo(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     path = findSocketFile(pid);
-                    i++;
-                } while (i <= retries && path == null);
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && path == null) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sendQuitTo(pid);
+                    }
+                } while (time_spend <= timeout && path == null);
                 if (path == null) {
                     throw new AttachNotSupportedException(
-                        "Unable to open socket file: target process not responding " +
-                        "or HotSpot VM not loaded");
+                        String.format("Unable to open socket file %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
             }
-        }
+      }
 
         // Check that the file owner/permission to avoid attaching to
         // bogus process
@@ -340,6 +330,5 @@
 
     static {
         System.loadLibrary("attach");
-        isLinuxThreads = isLinuxThreads();
     }
 }
--- a/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java	Fri Sep 02 02:41:37 2016 +0000
@@ -70,26 +70,34 @@
         // Then we attempt to find the socket file again.
         path = findSocketFile(pid);
         if (path == null) {
-            File f = new File(tmpdir, ".attach_pid" + pid);
-            createAttachFile(f.getPath());
+            File f = createAttachFile(pid);
             try {
                 sendQuitTo(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     path = findSocketFile(pid);
-                    i++;
-                } while (i <= retries && path == null);
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && path == null) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sendQuitTo(pid);
+                    }
+                } while (time_spend <= timeout && path == null);
                 if (path == null) {
                     throw new AttachNotSupportedException(
-                        "Unable to open socket file: target process not responding " +
-                        "or HotSpot VM not loaded");
+                        String.format("Unable to open socket file %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
@@ -282,6 +290,12 @@
         write(fd, b, 0, 1);
     }
 
+    private File createAttachFile(int pid) throws IOException {
+        String fn = ".attach_pid" + pid;
+        File f = new File(tmpdir, fn);
+        createAttachFile0(f.getPath());
+        return f;
+    }
 
     //-- native methods
 
@@ -299,7 +313,7 @@
 
     static native void write(int fd, byte buf[], int off, int bufLen) throws IOException;
 
-    static native void createAttachFile(String path);
+    static native void createAttachFile0(String path);
 
     static native String getTempDir();
 
--- a/src/jdk.attach/macosx/native/libattach/VirtualMachineImpl.c	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/jdk.attach/macosx/native/libattach/VirtualMachineImpl.c	Fri Sep 02 02:41:37 2016 +0000
@@ -270,7 +270,7 @@
  * Method:    createAttachFile
  * Signature: (Ljava.lang.String;)V
  */
-JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_createAttachFile(JNIEnv *env, jclass cls, jstring path)
+JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_createAttachFile0(JNIEnv *env, jclass cls, jstring path)
 {
     const char* _path;
     jboolean isCopy;
--- a/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java	Fri Sep 02 02:41:37 2016 +0000
@@ -319,7 +319,7 @@
 
     // -- attach timeout support
 
-    private static long defaultAttachTimeout = 5000;
+    private static long defaultAttachTimeout = 10000;
     private volatile long attachTimeout;
 
     /*
--- a/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java	Fri Sep 02 02:41:37 2016 +0000
@@ -71,27 +71,36 @@
         } catch (FileNotFoundException fnf1) {
             File f = createAttachFile(pid);
             try {
-                // kill -QUIT will tickle target VM to check for the
-                // attach file.
                 sigquit(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     try {
                         fd = openDoor(pid);
-                    } catch (FileNotFoundException fnf2) { }
-                    i++;
-                } while (i <= retries && fd == -1);
-                if (fd == -1) {
+                    } catch (FileNotFoundException fnf2) {
+                        // pass
+                    }
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && fd == -1) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sigquit(pid);
+                    }
+                } while (time_spend <= timeout && fd == -1);
+                if (fd  == -1) {
                     throw new AttachNotSupportedException(
-                        "Unable to open door: target process not responding or " +
-                        "HotSpot VM not loaded");
+                        String.format("Unable to open door %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
--- a/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java	Fri Sep 02 02:41:37 2016 +0000
@@ -39,6 +39,7 @@
 //import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.Stack;
+import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import jdk.internal.jline.Terminal;
@@ -2336,6 +2337,33 @@
                 out.flush();
             }
 
+            Stack<Character> pushBackChar = new Stack<Character>();
+
+            if (terminal.isAnsiSupported()) {
+                //detect the prompt length by reading the cursor position from the terminal
+                //the real prompt length could differ from the simple prompt length due to
+                //use of escape sequences:
+                out.write("\033[6n");
+                out.flush();
+                StringBuilder input = new StringBuilder();
+                while (true) {
+                    int read;
+                    while ((read = in.read()) != 'R') {
+                        input.appendCodePoint(read);
+                    }
+                    input.appendCodePoint(read);
+                    Matcher m = CURSOR_COLUMN_PATTERN.matcher(input);
+                    if (m.matches()) {
+                        promptLen = Integer.parseInt(m.group("column")) - 1;
+                        String prefix = m.group("prefix");
+                        for (int i = prefix.length() - 1; i >= 0; i--) {
+                            pushBackChar.push(prefix.charAt(i));
+                        }
+                        break;
+                    }
+                }
+            }
+
             // if the terminal is unsupported, just use plain-java reading
             if (!terminal.isSupported()) {
                 return readLineSimple();
@@ -2352,7 +2380,6 @@
             boolean success = true;
 
             StringBuilder sb = new StringBuilder();
-            Stack<Character> pushBackChar = new Stack<Character>();
             while (true) {
                 int c = pushBackChar.isEmpty() ? readCharacter() : pushBackChar.pop ();
                 if (c == -1) {
@@ -3193,6 +3220,9 @@
             }
         }
     }
+    //where:
+        private Pattern CURSOR_COLUMN_PATTERN =
+                Pattern.compile("(?<prefix>.*)\033\\[[0-9]+;(?<column>[0-9]+)R");
 
     /**
      * Read a line for unsupported terminals.
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Thu Sep 01 23:20:11 2016 +0000
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Fri Sep 02 02:41:37 2016 +0000
@@ -29,12 +29,12 @@
 import java.lang.invoke.MethodType;
 import java.nio.file.Files;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.EnumSet;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import jdk.internal.misc.SharedSecrets;
@@ -69,11 +69,11 @@
     private static final JavaLangInvokeAccess JLIA
             = SharedSecrets.getJavaLangInvokeAccess();
 
-    List<String> speciesTypes;
+    Set<String> speciesTypes;
 
-    List<String> invokerTypes;
+    Set<String> invokerTypes;
 
-    Map<String, List<String>> dmhMethods;
+    Map<String, Set<String>> dmhMethods;
 
     public GenerateJLIClassesPlugin() {
     }
@@ -110,8 +110,8 @@
      * A better long-term solution is to define and run a set of quick
      * generators and extracting this list as a step in the build process.
      */
-    public static List<String> defaultSpecies() {
-        return List.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
+    public static Set<String> defaultSpecies() {
+        return Set.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
                 "L7II", "L7IIL", "L8", "L9", "L10", "L10I", "L10II", "L10IIL",
                 "L11", "L12", "L13", "LI", "D", "L3I", "LIL", "LLI", "LLIL",
                 "LILL", "I", "LLILL");
@@ -120,23 +120,23 @@
     /**
      * @return the default invoker forms to generate.
      */
-    private static List<String> defaultInvokers() {
-        return List.of("LL_L", "LL_I", "LILL_I", "L6_L");
+    private static Set<String> defaultInvokers() {
+        return Set.of("LL_L", "LL_I", "LILL_I", "L6_L");
     }
 
     /**
      * @return the list of default DirectMethodHandle methods to generate.
      */
-    private static Map<String, List<String>> defaultDMHMethods() {
+    private static Map<String, Set<String>> defaultDMHMethods() {
         return Map.of(
-            DMH_INVOKE_VIRTUAL, List.of("L_L", "LL_L", "LLI_I", "L3_V"),
-            DMH_INVOKE_SPECIAL, List.of("LL_I", "LL_L", "LLF_L", "LLD_L", "L3_L",
+            DMH_INVOKE_VIRTUAL, Set.of("L_L", "LL_L", "LLI_I", "L3_V"),
+            DMH_INVOKE_SPECIAL, Set.of("LL_I", "LL_L", "LLF_L", "LLD_L", "L3_L",
                 "L4_L", "L5_L", "L6_L", "L7_L", "L8_L", "LLI_I", "LLI_L",
                 "LLIL_I", "LLII_I", "LLII_L", "L3I_L", "L3I_I", "LLILI_I",
                 "LLIIL_L", "LLIILL_L", "LLIILL_I", "LLIIL_I", "LLILIL_I",
                 "LLILILL_I", "LLILII_I", "LLI3_I", "LLI3L_I", "LLI3LL_I",
                 "LLI3_L", "LLI4_I"),
-            DMH_INVOKE_STATIC, List.of("LII_I", "LIL_I", "LILIL_I", "LILII_I",
+            DMH_INVOKE_STATIC, Set.of("LII_I", "LIL_I", "LILIL_I", "LILII_I",
                 "L_I", "L_L", "L_V", "LD_L", "LF_L", "LI_I", "LII_L", "LLI_L",
                 "LL_V", "LL_L", "L3_L", "L4_L", "L5_L", "L6_L", "L7_L",
                 "L8_L", "L9_L", "L10_L", "L10I_L", "L10II_L", "L10IIL_L",
@@ -159,15 +159,48 @@
     public void configure(Map<String, String> config) {
         String mainArgument = config.get(NAME);
 
-        if (mainArgument != null && mainArgument.startsWith("@")) {
+        if ("none".equals(mainArgument)) {
+            speciesTypes = Set.of();
+            invokerTypes = Set.of();
+            dmhMethods = Map.of();
+            return;
+        }
+
+        // Start with the default configuration
+        Set<String> defaultBMHSpecies = defaultSpecies();
+        // Expand BMH species signatures
+        defaultBMHSpecies = defaultBMHSpecies.stream()
+                .map(type -> expandSignature(type))
+                .collect(Collectors.toSet());
+
+        Set<String> defaultInvokerTypes = defaultInvokers();
+        validateMethodTypes(defaultInvokerTypes);
+
+        Map<String, Set<String>> defaultDmhMethods = defaultDMHMethods();
+        for (Set<String> dmhMethodTypes : defaultDmhMethods.values()) {
+            validateMethodTypes(dmhMethodTypes);
+        }
+
+        // Extend the default configuration with the contents in the supplied
+        // input file
+        if (mainArgument == null || !mainArgument.startsWith("@")) {
+            speciesTypes = defaultBMHSpecies;
+            invokerTypes = defaultInvokerTypes;
+            dmhMethods = defaultDmhMethods;
+        } else {
             File file = new File(mainArgument.substring(1));
             if (file.exists()) {
-                speciesTypes = new ArrayList<>();
-                invokerTypes = new ArrayList<>();
-                dmhMethods = new HashMap<>();
-                Stream<String> lines = fileLines(file);
-
-                lines.map(line -> line.split(" "))
+                // Use TreeSet/TreeMap to keep things sorted in a deterministic
+                // order to avoid scrambling the layout on small changes and to
+                // ease finding methods in the generated code
+                speciesTypes = new TreeSet<>(defaultBMHSpecies);
+                invokerTypes = new TreeSet<>(defaultInvokerTypes);
+                dmhMethods = new TreeMap<>();
+                for (Map.Entry<String, Set<String>> entry : defaultDmhMethods.entrySet()) {
+                    dmhMethods.put(entry.getKey(), new TreeSet<>(entry.getValue()));
+                }
+                fileLines(file)
+                    .map(line -> line.split(" "))
                     .forEach(parts -> {
                         switch (parts[0]) {
                             case "[BMH_RESOLVE]":
@@ -191,28 +224,14 @@
                         }
                 });
             }
-        } else {
-            List<String> bmhSpecies = defaultSpecies();
-            // Expand BMH species signatures
-            speciesTypes = bmhSpecies.stream()
-                    .map(type -> expandSignature(type))
-                    .collect(Collectors.toList());
-
-            invokerTypes = defaultInvokers();
-            validateMethodTypes(invokerTypes);
-
-            dmhMethods = defaultDMHMethods();
-            for (List<String> dmhMethodTypes : dmhMethods.values()) {
-                validateMethodTypes(dmhMethodTypes);
-            }
         }
     }