Sat, 04 Aug 2018 12:53:22 +0100
Merge
.hgtags | file | annotate | diff | comparison | revisions |
1.1 --- a/.hgtags Fri Jul 27 11:47:10 2018 +0100 1.2 +++ b/.hgtags Sat Aug 04 12:53:22 2018 +0100 1.3 @@ -1192,3 +1192,10 @@ 1.4 2bf8498a25ec87c92584a6542f8724644c8c5706 jdk8u201-b00 1.5 5aa3d728164a674d08ad847811be6bdd853e9bf8 jdk8u191-b02 1.6 dd79b482625361458b2b34e7d669ee982eee06a4 jdk8u191-b03 1.7 +541c205d7fd15ab840f48aaeeaea3f63209d1687 jdk8u191-b04 1.8 +c19c5b73704e3d188bedfe52a473b408ca39009f jdk8u182-b00 1.9 +0341fa6dbb363ee4dc5dbf5bfc4f820523400a72 jdk8u192-b00 1.10 +5792d995ed26eec0417d96a2423446bbcd6951a9 jdk8u192-b01 1.11 +792ccf73293ac2a93cf19cb827d06bcaa896caea jdk8u192-b02 1.12 +1c0a59cee0e4e680dd0973f022b86de5637b9b75 jdk8u192-b03 1.13 +a8d61d7f13b0de755da1335c15b72c53c59e92b5 jdk8u192-b04
2.1 --- a/make/aix/makefiles/jsig.make Fri Jul 27 11:47:10 2018 +0100 2.2 +++ b/make/aix/makefiles/jsig.make Sat Aug 04 12:53:22 2018 +0100 2.3 @@ -45,7 +45,7 @@ 2.4 # cause problems with interposing. See CR: 6466665 2.5 # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) 2.6 2.7 -LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) 2.8 +LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) 2.9 2.10 LFLAGS_JSIG += $(BIN_UTILS) 2.11
3.1 --- a/make/aix/makefiles/saproc.make Fri Jul 27 11:47:10 2018 +0100 3.2 +++ b/make/aix/makefiles/saproc.make Sat Aug 04 12:53:22 2018 +0100 3.3 @@ -66,7 +66,7 @@ 3.4 endif 3.5 3.6 3.7 -SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) 3.8 +SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) 3.9 3.10 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) 3.11 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
4.1 --- a/make/aix/makefiles/vm.make Fri Jul 27 11:47:10 2018 +0100 4.2 +++ b/make/aix/makefiles/vm.make Sat Aug 04 12:53:22 2018 +0100 4.3 @@ -117,7 +117,7 @@ 4.4 4.5 # Extra flags from gnumake's invocation or environment 4.6 CFLAGS += $(EXTRA_CFLAGS) 4.7 -LFLAGS += $(EXTRA_CFLAGS) 4.8 +LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) 4.9 4.10 # Don't set excutable bit on stack segment 4.11 # the same could be done by separate execstack command
5.1 --- a/make/bsd/makefiles/jsig.make Fri Jul 27 11:47:10 2018 +0100 5.2 +++ b/make/bsd/makefiles/jsig.make Sat Aug 04 12:53:22 2018 +0100 5.3 @@ -52,7 +52,7 @@ 5.4 # cause problems with interposing. See CR: 6466665 5.5 # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) 5.6 5.7 -LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE) 5.8 +LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) 5.9 5.10 # DEBUG_BINARIES overrides everything, use full -g debug information 5.11 ifeq ($(DEBUG_BINARIES), true) 5.12 @@ -62,7 +62,7 @@ 5.13 $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) 5.14 @echo Making signal interposition lib... 5.15 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ 5.16 - $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< 5.17 + $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< 5.18 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 5.19 ifeq ($(OS_VENDOR), Darwin) 5.20 $(DSYMUTIL) $@
6.1 --- a/make/bsd/makefiles/saproc.make Fri Jul 27 11:47:10 2018 +0100 6.2 +++ b/make/bsd/makefiles/saproc.make Sat Aug 04 12:53:22 2018 +0100 6.3 @@ -114,7 +114,7 @@ 6.4 # bring in minimum version argument or we'll fail on OSX 10.10 6.5 SA_LFLAGS = $(LFLAGS) 6.6 endif 6.7 -SA_LFLAGS += $(LDFLAGS_HASH_STYLE) 6.8 +SA_LFLAGS += $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) 6.9 6.10 BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \ 6.11 -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]")
7.1 --- a/make/bsd/makefiles/vm.make Fri Jul 27 11:47:10 2018 +0100 7.2 +++ b/make/bsd/makefiles/vm.make Sat Aug 04 12:53:22 2018 +0100 7.3 @@ -119,7 +119,7 @@ 7.4 7.5 # Extra flags from gnumake's invocation or environment 7.6 CFLAGS += $(EXTRA_CFLAGS) 7.7 -LFLAGS += $(EXTRA_CFLAGS) 7.8 +LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) 7.9 7.10 # Don't set excutable bit on stack segment 7.11 # the same could be done by separate execstack command
8.1 --- a/make/linux/makefiles/defs.make Fri Jul 27 11:47:10 2018 +0100 8.2 +++ b/make/linux/makefiles/defs.make Sat Aug 04 12:53:22 2018 +0100 8.3 @@ -239,10 +239,12 @@ 8.4 # client and server subdirectories have symbolic links to ../libjsig.so 8.5 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) 8.6 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 8.7 - ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.8 - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz 8.9 - else 8.10 - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo 8.11 + ifneq ($(STRIP_POLICY),no_strip) 8.12 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.13 + EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz 8.14 + else 8.15 + EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo 8.16 + endif 8.17 endif 8.18 endif 8.19 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server 8.20 @@ -253,10 +255,12 @@ 8.21 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt 8.22 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) 8.23 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 8.24 - ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.25 - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz 8.26 - else 8.27 - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo 8.28 + ifneq ($(STRIP_POLICY),no_strip) 8.29 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.30 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz 8.31 + else 8.32 + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo 8.33 + endif 8.34 endif 8.35 endif 8.36 endif 8.37 @@ -265,10 +269,12 @@ 8.38 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt 8.39 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) 8.40 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 8.41 - ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.42 - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz 8.43 - else 8.44 - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo 8.45 + ifneq ($(STRIP_POLICY),no_strip) 8.46 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.47 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz 8.48 + else 8.49 + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo 8.50 + endif 8.51 endif 8.52 endif 8.53 endif 8.54 @@ -278,10 +284,12 @@ 8.55 EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX) 8.56 8.57 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 8.58 - ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.59 - EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz 8.60 - else 8.61 - EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo 8.62 + ifneq ($(STRIP_POLICY),no_strip) 8.63 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.64 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz 8.65 + else 8.66 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo 8.67 + endif 8.68 endif 8.69 endif 8.70 endif 8.71 @@ -293,12 +301,14 @@ 8.72 ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ 8.73 $(EXPORT_LIB_DIR)/sa-jdi.jar 8.74 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 8.75 - ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.76 - ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz 8.77 - ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz 8.78 - else 8.79 - ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo 8.80 - ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo 8.81 + ifneq ($(STRIP_POLICY),no_strip) 8.82 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 8.83 + ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz 8.84 + ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz 8.85 + else 8.86 + ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo 8.87 + ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo 8.88 + endif 8.89 endif 8.90 endif 8.91 ADD_SA_BINARIES/ppc =
9.1 --- a/make/linux/makefiles/jsig.make Fri Jul 27 11:47:10 2018 +0100 9.2 +++ b/make/linux/makefiles/jsig.make Sat Aug 04 12:53:22 2018 +0100 9.3 @@ -44,7 +44,7 @@ 9.4 # cause problems with interposing. See CR: 6466665 9.5 # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) 9.6 9.7 -LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(LDFLAGS_NO_EXEC_STACK) 9.8 +LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(LDFLAGS_NO_EXEC_STACK) $(EXTRA_LDFLAGS) 9.9 9.10 # DEBUG_BINARIES overrides everything, use full -g debug information 9.11 ifeq ($(DEBUG_BINARIES), true) 9.12 @@ -56,19 +56,23 @@ 9.13 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ 9.14 $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl 9.15 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 9.16 + ifneq ($(STRIP_POLICY),no_strip) 9.17 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) 9.18 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ 9.19 + endif 9.20 ifeq ($(STRIP_POLICY),all_strip) 9.21 $(QUIETLY) $(STRIP) $@ 9.22 else 9.23 ifeq ($(STRIP_POLICY),min_strip) 9.24 $(QUIETLY) $(STRIP) -g $@ 9.25 + endif 9.26 # implied else here is no stripping at all 9.27 - endif 9.28 endif 9.29 - ifeq ($(ZIP_DEBUGINFO_FILES),1) 9.30 + ifneq ($(STRIP_POLICY),no_strip) 9.31 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 9.32 $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) 9.33 $(RM) $(LIBJSIG_DEBUGINFO) 9.34 + endif 9.35 endif 9.36 endif 9.37
10.1 --- a/make/linux/makefiles/saproc.make Fri Jul 27 11:47:10 2018 +0100 10.2 +++ b/make/linux/makefiles/saproc.make Sat Aug 04 12:53:22 2018 +0100 10.3 @@ -1,5 +1,5 @@ 10.4 # 10.5 -# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 10.6 +# Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. 10.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.8 # 10.9 # This code is free software; you can redistribute it and/or modify it 10.10 @@ -73,7 +73,8 @@ 10.11 else 10.12 ALT_SAINCDIR= 10.13 endif 10.14 -SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) 10.15 +SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) \ 10.16 + $(LDFLAGS_NO_EXEC_STACK) $(EXTRA_LDFLAGS) 10.17 10.18 SAARCH ?= $(BUILDARCH) 10.19 10.20 @@ -98,19 +99,23 @@ 10.21 -o $@ \ 10.22 -lthread_db 10.23 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 10.24 + ifneq ($(STRIP_POLICY),no_strip) 10.25 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) 10.26 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ 10.27 + endif 10.28 ifeq ($(STRIP_POLICY),all_strip) 10.29 $(QUIETLY) $(STRIP) $@ 10.30 else 10.31 ifeq ($(STRIP_POLICY),min_strip) 10.32 $(QUIETLY) $(STRIP) -g $@ 10.33 + endif 10.34 # implied else here is no stripping at all 10.35 - endif 10.36 endif 10.37 - ifeq ($(ZIP_DEBUGINFO_FILES),1) 10.38 + ifneq ($(STRIP_POLICY),no_strip) 10.39 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 10.40 $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) 10.41 $(RM) $(LIBSAPROC_DEBUGINFO) 10.42 + endif 10.43 endif 10.44 endif 10.45
11.1 --- a/make/linux/makefiles/vm.make Fri Jul 27 11:47:10 2018 +0100 11.2 +++ b/make/linux/makefiles/vm.make Sat Aug 04 12:53:22 2018 +0100 11.3 @@ -122,7 +122,7 @@ 11.4 11.5 # Extra flags from gnumake's invocation or environment 11.6 CFLAGS += $(EXTRA_CFLAGS) 11.7 -LFLAGS += $(EXTRA_CFLAGS) 11.8 +LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) 11.9 11.10 # Don't set excutable bit on stack segment 11.11 # the same could be done by separate execstack command 11.12 @@ -357,19 +357,23 @@ 11.13 } 11.14 11.15 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 11.16 + ifneq ($(STRIP_POLICY),no_strip) 11.17 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO) 11.18 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ 11.19 + endif 11.20 ifeq ($(STRIP_POLICY),all_strip) 11.21 $(QUIETLY) $(STRIP) $@ 11.22 else 11.23 ifeq ($(STRIP_POLICY),min_strip) 11.24 $(QUIETLY) $(STRIP) -g $@ 11.25 + endif 11.26 # implied else here is no stripping at all 11.27 - endif 11.28 endif 11.29 - ifeq ($(ZIP_DEBUGINFO_FILES),1) 11.30 + ifneq ($(STRIP_POLICY),no_strip) 11.31 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 11.32 $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) 11.33 $(RM) $(LIBJVM_DEBUGINFO) 11.34 + endif 11.35 endif 11.36 endif 11.37
12.1 --- a/make/solaris/makefiles/adlc.make Fri Jul 27 11:47:10 2018 +0100 12.2 +++ b/make/solaris/makefiles/adlc.make Sat Aug 04 12:53:22 2018 +0100 12.3 @@ -76,6 +76,11 @@ 12.4 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) 12.5 CFLAGS_WARN = +w -errwarn 12.6 endif 12.7 +# When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly 12.8 +# instantiated template functions trigger this warning when +w is active. 12.9 +ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 513), 1) 12.10 + CFLAGS_WARN += -erroff=notemsource 12.11 +endif 12.12 CFLAGS += $(CFLAGS_WARN) 12.13 12.14 ifeq ("${Platform_compiler}", "sparcWorks")
13.1 --- a/make/windows/makefiles/compile.make Fri Jul 27 11:47:10 2018 +0100 13.2 +++ b/make/windows/makefiles/compile.make Sat Aug 04 12:53:22 2018 +0100 13.3 @@ -147,6 +147,15 @@ 13.4 !if "$(MSC_VER)" == "1700" 13.5 COMPILER_NAME=VS2012 13.6 !endif 13.7 +!if "$(MSC_VER)" == "1800" 13.8 +COMPILER_NAME=VS2013 13.9 +!endif 13.10 +!if "$(MSC_VER)" == "1900" 13.11 +COMPILER_NAME=VS2015 13.12 +!endif 13.13 +!if "$(MSC_VER)" == "1912" 13.14 +COMPILER_NAME=VS2017 13.15 +!endif 13.16 !endif 13.17 13.18 # By default, we do not want to use the debug version of the msvcrt.dll file 13.19 @@ -250,6 +259,52 @@ 13.20 SAFESEH_FLAG = /SAFESEH 13.21 !endif 13.22 13.23 +!if "$(COMPILER_NAME)" == "VS2013" 13.24 +PRODUCT_OPT_OPTION = /O2 /Oy- 13.25 +FASTDEBUG_OPT_OPTION = /O2 /Oy- 13.26 +DEBUG_OPT_OPTION = /Od 13.27 +GX_OPTION = /EHsc 13.28 +LD_FLAGS = /manifest $(LD_FLAGS) 13.29 +MP_FLAG = /MP 13.30 +# Manifest Tool - used in VS2005 and later to adjust manifests stored 13.31 +# as resources inside build artifacts. 13.32 +!if "x$(MT)" == "x" 13.33 +MT=mt.exe 13.34 +!endif 13.35 +SAFESEH_FLAG = /SAFESEH 13.36 +!endif 13.37 + 13.38 + 13.39 +!if "$(COMPILER_NAME)" == "VS2015" 13.40 +PRODUCT_OPT_OPTION = /O2 /Oy- 13.41 +FASTDEBUG_OPT_OPTION = /O2 /Oy- 13.42 +DEBUG_OPT_OPTION = /Od 13.43 +GX_OPTION = /EHsc 13.44 +LD_FLAGS = /manifest $(LD_FLAGS) 13.45 +MP_FLAG = /MP 13.46 +# Manifest Tool - used in VS2005 and later to adjust manifests stored 13.47 +# as resources inside build artifacts. 13.48 +!if "x$(MT)" == "x" 13.49 +MT=mt.exe 13.50 +!endif 13.51 +SAFESEH_FLAG = /SAFESEH 13.52 +!endif 13.53 + 13.54 +!if "$(COMPILER_NAME)" == "VS2017" 13.55 +PRODUCT_OPT_OPTION = /O2 /Oy- 13.56 +FASTDEBUG_OPT_OPTION = /O2 /Oy- 13.57 +DEBUG_OPT_OPTION = /Od 13.58 +GX_OPTION = /EHsc 13.59 +LD_FLAGS = /manifest $(LD_FLAGS) 13.60 +MP_FLAG = /MP 13.61 +# Manifest Tool - used in VS2005 and later to adjust manifests stored 13.62 +# as resources inside build artifacts. 13.63 +!if "x$(MT)" == "x" 13.64 +MT=mt.exe 13.65 +!endif 13.66 +SAFESEH_FLAG = /SAFESEH 13.67 +!endif 13.68 + 13.69 !if "$(BUILDARCH)" == "i486" 13.70 LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS) 13.71 !endif
14.1 --- a/make/windows/makefiles/sanity.make Fri Jul 27 11:47:10 2018 +0100 14.2 +++ b/make/windows/makefiles/sanity.make Sat Aug 04 12:53:22 2018 +0100 14.3 @@ -28,8 +28,15 @@ 14.4 14.5 checkCL: 14.6 @ if "$(MSC_VER)" NEQ "1310" if "$(MSC_VER)" NEQ "1399" if "$(MSC_VER)" NEQ "1400" if "$(MSC_VER)" NEQ "1500" if "$(MSC_VER)" NEQ "1600" if "$(MSC_VER)" NEQ "1700" \ 14.7 + if "$(MSC_VER)" NEQ "1800" \ 14.8 + if "$(MSC_VER)" NEQ "1900" \ 14.9 + if "$(MSC_VER)" NEQ "1912" \ 14.10 echo *** WARNING *** unrecognized cl.exe version $(MSC_VER) ($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection. 14.11 14.12 checkLink: 14.13 @ if "$(LD_VER)" NEQ "710" if "$(LD_VER)" NEQ "800" if "$(LD_VER)" NEQ "900" if "$(LD_VER)" NEQ "1000" if "$(LD_VER)" NEQ "1100" \ 14.14 + if "$(LD_VER)" NEQ "1200" \ 14.15 + if "$(LD_VER)" NEQ "1300" \ 14.16 + if "$(LD_VER)" NEQ "1400" \ 14.17 + if "$(LD_VER)" NEQ "1412" \ 14.18 echo *** WARNING *** unrecognized link.exe version $(LD_VER) ($(RAW_LD_VER)). Use FORCE_LD_VER to override automatic detection.
15.1 --- a/make/windows/makefiles/vm.make Fri Jul 27 11:47:10 2018 +0100 15.2 +++ b/make/windows/makefiles/vm.make Sat Aug 04 12:53:22 2018 +0100 15.3 @@ -128,8 +128,8 @@ 15.4 15.5 !if "$(USE_PRECOMPILED_HEADER)" != "0" 15.6 CXX_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp" 15.7 -!if "$(COMPILER_NAME)" == "VS2012" 15.8 -# VS2012 requires this object file to be listed: 15.9 +!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017" 15.10 +# VS2012 and later require this object file to be listed: 15.11 LD_FLAGS=$(LD_FLAGS) _build_pch_file.obj 15.12 !endif 15.13 !else
16.1 --- a/src/cpu/ppc/vm/methodHandles_ppc.cpp Fri Jul 27 11:47:10 2018 +0100 16.2 +++ b/src/cpu/ppc/vm/methodHandles_ppc.cpp Sat Aug 04 12:53:22 2018 +0100 16.3 @@ -463,7 +463,7 @@ 16.4 bool has_mh = (strstr(adaptername, "/static") == NULL && 16.5 strstr(adaptername, "linkTo") == NULL); // static linkers don't have MH 16.6 const char* mh_reg_name = has_mh ? "R23_method_handle" : "G23"; 16.7 - tty->print_cr("MH %s %s="INTPTR_FORMAT " sp=" INTPTR_FORMAT, 16.8 + tty->print_cr("MH %s %s=" INTPTR_FORMAT " sp=" INTPTR_FORMAT, 16.9 adaptername, mh_reg_name, (intptr_t) mh, (intptr_t) entry_sp); 16.10 16.11 if (Verbose) {
17.1 --- a/src/cpu/ppc/vm/ppc.ad Fri Jul 27 11:47:10 2018 +0100 17.2 +++ b/src/cpu/ppc/vm/ppc.ad Sat Aug 04 12:53:22 2018 +0100 17.3 @@ -1,5 +1,5 @@ 17.4 // 17.5 -// Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 17.6 +// Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. 17.7 // Copyright (c) 2012, 2017 SAP SE. All rights reserved. 17.8 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.9 // 17.10 @@ -2174,12 +2174,12 @@ 17.11 } 17.12 17.13 // Vector ideal reg. 17.14 -const int Matcher::vector_ideal_reg(int size) { 17.15 +const uint Matcher::vector_ideal_reg(int size) { 17.16 assert(MaxVectorSize == 8 && size == 8, ""); 17.17 return Op_RegL; 17.18 } 17.19 17.20 -const int Matcher::vector_shift_count_ideal_reg(int size) { 17.21 +const uint Matcher::vector_shift_count_ideal_reg(int size) { 17.22 fatal("vector shift is not supported"); 17.23 return Node::NotAMachineReg; 17.24 }
18.1 --- a/src/cpu/sparc/vm/methodHandles_sparc.cpp Fri Jul 27 11:47:10 2018 +0100 18.2 +++ b/src/cpu/sparc/vm/methodHandles_sparc.cpp Sat Aug 04 12:53:22 2018 +0100 18.3 @@ -481,7 +481,7 @@ 18.4 bool has_mh = (strstr(adaptername, "/static") == NULL && 18.5 strstr(adaptername, "linkTo") == NULL); // static linkers don't have MH 18.6 const char* mh_reg_name = has_mh ? "G3_mh" : "G3"; 18.7 - tty->print_cr("MH %s %s="INTPTR_FORMAT " saved_sp=" INTPTR_FORMAT " args=" INTPTR_FORMAT, 18.8 + tty->print_cr("MH %s %s=" INTPTR_FORMAT " saved_sp=" INTPTR_FORMAT " args=" INTPTR_FORMAT, 18.9 adaptername, mh_reg_name, 18.10 (intptr_t) mh, saved_sp, args); 18.11
19.1 --- a/src/cpu/sparc/vm/sparc.ad Fri Jul 27 11:47:10 2018 +0100 19.2 +++ b/src/cpu/sparc/vm/sparc.ad Sat Aug 04 12:53:22 2018 +0100 19.3 @@ -1,5 +1,5 @@ 19.4 // 19.5 -// Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 19.6 +// Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. 19.7 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 19.8 // 19.9 // This code is free software; you can redistribute it and/or modify it 19.10 @@ -1877,12 +1877,12 @@ 19.11 } 19.12 19.13 // Vector ideal reg 19.14 -const int Matcher::vector_ideal_reg(int size) { 19.15 +const uint Matcher::vector_ideal_reg(int size) { 19.16 assert(MaxVectorSize == 8, ""); 19.17 return Op_RegD; 19.18 } 19.19 19.20 -const int Matcher::vector_shift_count_ideal_reg(int size) { 19.21 +const uint Matcher::vector_shift_count_ideal_reg(int size) { 19.22 fatal("vector shift is not supported"); 19.23 return Node::NotAMachineReg; 19.24 }
20.1 --- a/src/cpu/sparc/vm/vm_version_sparc.cpp Fri Jul 27 11:47:10 2018 +0100 20.2 +++ b/src/cpu/sparc/vm/vm_version_sparc.cpp Sat Aug 04 12:53:22 2018 +0100 20.3 @@ -1,5 +1,5 @@ 20.4 /* 20.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 20.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 20.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 20.8 * 20.9 * This code is free software; you can redistribute it and/or modify it 20.10 @@ -140,10 +140,17 @@ 20.11 if (is_niagara_plus()) { 20.12 if (has_blk_init() && (cache_line_size > 0) && UseTLAB && 20.13 FLAG_IS_DEFAULT(AllocatePrefetchInstr)) { 20.14 - // Use BIS instruction for TLAB allocation prefetch. 20.15 - FLAG_SET_ERGO(intx, AllocatePrefetchInstr, 1); 20.16 - if (FLAG_IS_DEFAULT(AllocatePrefetchStyle)) { 20.17 - FLAG_SET_ERGO(intx, AllocatePrefetchStyle, 3); 20.18 + if (!has_sparc5_instr()) { 20.19 + // Use BIS instruction for TLAB allocation prefetch 20.20 + // on Niagara plus processors other than those based on CoreS4. 20.21 + FLAG_SET_DEFAULT(AllocatePrefetchInstr, 1); 20.22 + } else { 20.23 + // On CoreS4 processors use prefetch instruction 20.24 + // to avoid partial RAW issue, also use prefetch style 3. 20.25 + FLAG_SET_DEFAULT(AllocatePrefetchInstr, 0); 20.26 + if (FLAG_IS_DEFAULT(AllocatePrefetchStyle)) { 20.27 + FLAG_SET_DEFAULT(AllocatePrefetchStyle, 3); 20.28 + } 20.29 } 20.30 if (FLAG_IS_DEFAULT(AllocatePrefetchDistance)) { 20.31 // Use smaller prefetch distance with BIS 20.32 @@ -165,6 +172,11 @@ 20.33 FLAG_SET_DEFAULT(AllocatePrefetchDistance, 256); 20.34 } 20.35 if (AllocatePrefetchInstr == 1) { 20.36 + 20.37 + // Use allocation prefetch style 3 because BIS instructions 20.38 + // require aligned memory addresses. 20.39 + FLAG_SET_DEFAULT(AllocatePrefetchStyle, 3); 20.40 + 20.41 // Need a space at the end of TLAB for BIS since it 20.42 // will fault when accessing memory outside of heap. 20.43
21.1 --- a/src/cpu/sparc/vm/vtableStubs_sparc.cpp Fri Jul 27 11:47:10 2018 +0100 21.2 +++ b/src/cpu/sparc/vm/vtableStubs_sparc.cpp Sat Aug 04 12:53:22 2018 +0100 21.3 @@ -111,7 +111,7 @@ 21.4 masm->flush(); 21.5 21.6 if (PrintMiscellaneous && (WizardMode || Verbose)) { 21.7 - tty->print_cr("vtable #%d at "PTR_FORMAT"[%d] left over: %d", 21.8 + tty->print_cr("vtable #%d at " PTR_FORMAT "[%d] left over: %d", 21.9 vtable_index, s->entry_point(), 21.10 (int)(s->code_end() - s->entry_point()), 21.11 (int)(s->code_end() - __ pc())); 21.12 @@ -219,7 +219,7 @@ 21.13 masm->flush(); 21.14 21.15 if (PrintMiscellaneous && (WizardMode || Verbose)) { 21.16 - tty->print_cr("itable #%d at "PTR_FORMAT"[%d] left over: %d", 21.17 + tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d", 21.18 itable_index, s->entry_point(), 21.19 (int)(s->code_end() - s->entry_point()), 21.20 (int)(s->code_end() - __ pc()));
22.1 --- a/src/cpu/x86/vm/c1_Runtime1_x86.cpp Fri Jul 27 11:47:10 2018 +0100 22.2 +++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp Sat Aug 04 12:53:22 2018 +0100 22.3 @@ -1,5 +1,5 @@ 22.4 /* 22.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 22.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 22.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 22.8 * 22.9 * This code is free software; you can redistribute it and/or modify it 22.10 @@ -1667,31 +1667,15 @@ 22.11 __ jmp(done); 22.12 22.13 __ bind(runtime); 22.14 - __ push(rcx); 22.15 -#ifdef _LP64 22.16 - __ push(r8); 22.17 - __ push(r9); 22.18 - __ push(r10); 22.19 - __ push(r11); 22.20 -# ifndef _WIN64 22.21 - __ push(rdi); 22.22 - __ push(rsi); 22.23 -# endif 22.24 -#endif 22.25 + 22.26 + save_live_registers(sasm, 3); 22.27 + 22.28 // load the pre-value 22.29 f.load_argument(0, rcx); 22.30 __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread); 22.31 -#ifdef _LP64 22.32 -# ifndef _WIN64 22.33 - __ pop(rsi); 22.34 - __ pop(rdi); 22.35 -# endif 22.36 - __ pop(r11); 22.37 - __ pop(r10); 22.38 - __ pop(r9); 22.39 - __ pop(r8); 22.40 -#endif 22.41 - __ pop(rcx); 22.42 + 22.43 + restore_live_registers(sasm); 22.44 + 22.45 __ bind(done); 22.46 22.47 __ pop(rdx); 22.48 @@ -1773,27 +1757,13 @@ 22.49 22.50 __ bind(runtime); 22.51 __ push(rdx); 22.52 -#ifdef _LP64 22.53 - __ push(r8); 22.54 - __ push(r9); 22.55 - __ push(r10); 22.56 - __ push(r11); 22.57 -# ifndef _WIN64 22.58 - __ push(rdi); 22.59 - __ push(rsi); 22.60 -# endif 22.61 -#endif 22.62 + 22.63 + save_live_registers(sasm, 3); 22.64 + 22.65 __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), card_addr, thread); 22.66 -#ifdef _LP64 22.67 -# ifndef _WIN64 22.68 - __ pop(rsi); 22.69 - __ pop(rdi); 22.70 -# endif 22.71 - __ pop(r11); 22.72 - __ pop(r10); 22.73 - __ pop(r9); 22.74 - __ pop(r8); 22.75 -#endif 22.76 + 22.77 + restore_live_registers(sasm); 22.78 + 22.79 __ pop(rdx); 22.80 __ bind(done); 22.81
23.1 --- a/src/cpu/x86/vm/interpreterRT_x86_64.cpp Fri Jul 27 11:47:10 2018 +0100 23.2 +++ b/src/cpu/x86/vm/interpreterRT_x86_64.cpp Sat Aug 04 12:53:22 2018 +0100 23.3 @@ -1,5 +1,5 @@ 23.4 /* 23.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 23.6 + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. 23.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 23.8 * 23.9 * This code is free software; you can redistribute it and/or modify it 23.10 @@ -346,8 +346,9 @@ 23.11 _from -= Interpreter::stackElementSize; 23.12 23.13 if (_num_args < Argument::n_float_register_parameters_c-1) { 23.14 + assert((_num_args*2) < BitsPerWord, "_num_args*2 is out of range"); 23.15 *_reg_args++ = from_obj; 23.16 - *_fp_identifiers |= (intptr_t)(0x01 << (_num_args*2)); // mark as float 23.17 + *_fp_identifiers |= ((intptr_t)0x01 << (_num_args*2)); // mark as float 23.18 _num_args++; 23.19 } else { 23.20 *_to++ = from_obj; 23.21 @@ -360,8 +361,9 @@ 23.22 _from -= 2*Interpreter::stackElementSize; 23.23 23.24 if (_num_args < Argument::n_float_register_parameters_c-1) { 23.25 + assert((_num_args*2) < BitsPerWord, "_num_args*2 is out of range"); 23.26 *_reg_args++ = from_obj; 23.27 - *_fp_identifiers |= (intptr_t)(0x3 << (_num_args*2)); // mark as double 23.28 + *_fp_identifiers |= ((intptr_t)0x3 << (_num_args*2)); // mark as double 23.29 _num_args++; 23.30 } else { 23.31 *_to++ = from_obj;
24.1 --- a/src/cpu/x86/vm/macroAssembler_x86.cpp Fri Jul 27 11:47:10 2018 +0100 24.2 +++ b/src/cpu/x86/vm/macroAssembler_x86.cpp Sat Aug 04 12:53:22 2018 +0100 24.3 @@ -5217,7 +5217,7 @@ 24.4 { 24.5 ResourceMark rm; 24.6 stringStream ss; 24.7 - ss.print("DelayedValue="INTPTR_FORMAT, delayed_value_addr[1]); 24.8 + ss.print("DelayedValue=" INTPTR_FORMAT, delayed_value_addr[1]); 24.9 buf = code_string(ss.as_string()); 24.10 } 24.11 jcc(Assembler::notZero, L);
25.1 --- a/src/cpu/x86/vm/methodHandles_x86.cpp Fri Jul 27 11:47:10 2018 +0100 25.2 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp Sat Aug 04 12:53:22 2018 +0100 25.3 @@ -483,7 +483,7 @@ 25.4 bool has_mh = (strstr(adaptername, "/static") == NULL && 25.5 strstr(adaptername, "linkTo") == NULL); // static linkers don't have MH 25.6 const char* mh_reg_name = has_mh ? "rcx_mh" : "rcx"; 25.7 - tty->print_cr("MH %s %s="PTR_FORMAT" sp="PTR_FORMAT, 25.8 + tty->print_cr("MH %s %s=" PTR_FORMAT " sp=" PTR_FORMAT, 25.9 adaptername, mh_reg_name, 25.10 (void *)mh, entry_sp); 25.11
26.1 --- a/src/cpu/x86/vm/vtableStubs_x86_32.cpp Fri Jul 27 11:47:10 2018 +0100 26.2 +++ b/src/cpu/x86/vm/vtableStubs_x86_32.cpp Sat Aug 04 12:53:22 2018 +0100 26.3 @@ -118,7 +118,7 @@ 26.4 masm->flush(); 26.5 26.6 if (PrintMiscellaneous && (WizardMode || Verbose)) { 26.7 - tty->print_cr("vtable #%d at "PTR_FORMAT"[%d] left over: %d", 26.8 + tty->print_cr("vtable #%d at " PTR_FORMAT "[%d] left over: %d", 26.9 vtable_index, p2i(s->entry_point()), 26.10 (int)(s->code_end() - s->entry_point()), 26.11 (int)(s->code_end() - __ pc())); 26.12 @@ -217,7 +217,7 @@ 26.13 __ flush(); 26.14 26.15 if (PrintMiscellaneous && (WizardMode || Verbose)) { 26.16 - tty->print_cr("itable #%d at "PTR_FORMAT"[%d] left over: %d", 26.17 + tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d", 26.18 itable_index, p2i(s->entry_point()), 26.19 (int)(s->code_end() - s->entry_point()), 26.20 (int)(s->code_end() - __ pc()));
27.1 --- a/src/cpu/x86/vm/vtableStubs_x86_64.cpp Fri Jul 27 11:47:10 2018 +0100 27.2 +++ b/src/cpu/x86/vm/vtableStubs_x86_64.cpp Sat Aug 04 12:53:22 2018 +0100 27.3 @@ -113,7 +113,7 @@ 27.4 __ flush(); 27.5 27.6 if (PrintMiscellaneous && (WizardMode || Verbose)) { 27.7 - tty->print_cr("vtable #%d at "PTR_FORMAT"[%d] left over: %d", 27.8 + tty->print_cr("vtable #%d at " PTR_FORMAT "[%d] left over: %d", 27.9 vtable_index, s->entry_point(), 27.10 (int)(s->code_end() - s->entry_point()), 27.11 (int)(s->code_end() - __ pc())); 27.12 @@ -220,7 +220,7 @@ 27.13 __ flush(); 27.14 27.15 if (PrintMiscellaneous && (WizardMode || Verbose)) { 27.16 - tty->print_cr("itable #%d at "PTR_FORMAT"[%d] left over: %d", 27.17 + tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d", 27.18 itable_index, s->entry_point(), 27.19 (int)(s->code_end() - s->entry_point()), 27.20 (int)(s->code_end() - __ pc()));
28.1 --- a/src/cpu/x86/vm/x86.ad Fri Jul 27 11:47:10 2018 +0100 28.2 +++ b/src/cpu/x86/vm/x86.ad Sat Aug 04 12:53:22 2018 +0100 28.3 @@ -1,5 +1,5 @@ 28.4 // 28.5 -// Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 28.6 +// Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. 28.7 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 28.8 // 28.9 // This code is free software; you can redistribute it and/or modify it 28.10 @@ -683,7 +683,7 @@ 28.11 } 28.12 28.13 // Vector ideal reg corresponding to specidied size in bytes 28.14 -const int Matcher::vector_ideal_reg(int size) { 28.15 +const uint Matcher::vector_ideal_reg(int size) { 28.16 assert(MaxVectorSize >= size, ""); 28.17 switch(size) { 28.18 case 4: return Op_VecS; 28.19 @@ -696,7 +696,7 @@ 28.20 } 28.21 28.22 // Only lowest bits of xmm reg are used for vector shift count. 28.23 -const int Matcher::vector_shift_count_ideal_reg(int size) { 28.24 +const uint Matcher::vector_shift_count_ideal_reg(int size) { 28.25 return Op_VecS; 28.26 } 28.27
29.1 --- a/src/os/aix/vm/os_aix.cpp Fri Jul 27 11:47:10 2018 +0100 29.2 +++ b/src/os/aix/vm/os_aix.cpp Sat Aug 04 12:53:22 2018 +0100 29.3 @@ -1,5 +1,5 @@ 29.4 /* 29.5 - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. 29.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 29.7 * Copyright 2012, 2014 SAP AG. All rights reserved. 29.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 29.9 * 29.10 @@ -410,7 +410,7 @@ 29.11 // thread (because primordial thread's stack may have different page size than 29.12 // pthread thread stacks). Running a VM on the primordial thread won't work for a 29.13 // number of reasons so we may just as well guarantee it here 29.14 - guarantee(!os::Aix::is_primordial_thread(), "Must not be called for primordial thread"); 29.15 + guarantee(!os::is_primordial_thread(), "Must not be called for primordial thread"); 29.16 29.17 // query stack page size 29.18 { 29.19 @@ -3835,7 +3835,7 @@ 29.20 29.21 ThreadCritical::initialize(); 29.22 29.23 - // Main_thread points to the aboriginal thread. 29.24 + // _main_thread points to the thread that created/loaded the JVM. 29.25 Aix::_main_thread = pthread_self(); 29.26 29.27 initial_time_count = os::elapsed_counter(); 29.28 @@ -4521,7 +4521,7 @@ 29.29 } 29.30 } 29.31 29.32 -bool os::Aix::is_primordial_thread() { 29.33 +bool os::is_primordial_thread(void) { 29.34 if (pthread_self() == (pthread_t)1) { 29.35 return true; 29.36 } else { 29.37 @@ -4656,7 +4656,7 @@ 29.38 29.39 // This only works when invoked on a pthread. As we agreed not to use 29.40 // primordial threads anyway, I assert here 29.41 - guarantee(!os::Aix::is_primordial_thread(), "not allowed on the primordial thread"); 29.42 + guarantee(!os::is_primordial_thread(), "not allowed on the primordial thread"); 29.43 29.44 // information about this api can be found (a) in the pthread.h header and 29.45 // (b) in http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.basetechref/doc/basetrf1/pthread_getthrds_np.htm
30.1 --- a/src/os/aix/vm/os_aix.hpp Fri Jul 27 11:47:10 2018 +0100 30.2 +++ b/src/os/aix/vm/os_aix.hpp Sat Aug 04 12:53:22 2018 +0100 30.3 @@ -1,5 +1,5 @@ 30.4 /* 30.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 30.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 30.7 * Copyright 2013 SAP AG. All rights reserved. 30.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 30.9 * 30.10 @@ -170,12 +170,6 @@ 30.11 // Given an address, returns the size of the page backing that address 30.12 static size_t query_pagesize(void* p); 30.13 30.14 - // Return `true' if the calling thread is the primordial thread. The 30.15 - // primordial thread is the thread which contains the main function, 30.16 - // *not* necessarily the thread which initialized the VM by calling 30.17 - // JNI_CreateJavaVM. 30.18 - static bool is_primordial_thread(void); 30.19 - 30.20 static int page_size(void) { 30.21 assert(_page_size != -1, "not initialized"); 30.22 return _page_size;
31.1 --- a/src/os/bsd/vm/os_bsd.cpp Fri Jul 27 11:47:10 2018 +0100 31.2 +++ b/src/os/bsd/vm/os_bsd.cpp Sat Aug 04 12:53:22 2018 +0100 31.3 @@ -1,5 +1,5 @@ 31.4 /* 31.5 - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. 31.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 31.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 31.8 * 31.9 * This code is free software; you can redistribute it and/or modify it 31.10 @@ -3611,7 +3611,7 @@ 31.11 31.12 Bsd::initialize_system_info(); 31.13 31.14 - // main_thread points to the aboriginal thread 31.15 + // _main_thread points to the thread that created/loaded the JVM. 31.16 Bsd::_main_thread = pthread_self(); 31.17 31.18 Bsd::clock_init();
32.1 --- a/src/os/bsd/vm/os_bsd.hpp Fri Jul 27 11:47:10 2018 +0100 32.2 +++ b/src/os/bsd/vm/os_bsd.hpp Sat Aug 04 12:53:22 2018 +0100 32.3 @@ -1,5 +1,5 @@ 32.4 /* 32.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 32.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 32.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 32.8 * 32.9 * This code is free software; you can redistribute it and/or modify it 32.10 @@ -92,7 +92,6 @@ 32.11 32.12 static void hotspot_sigmask(Thread* thread); 32.13 32.14 - static bool is_initial_thread(void); 32.15 static pid_t gettid(); 32.16 32.17 static int page_size(void) { return _page_size; }
33.1 --- a/src/os/linux/vm/os_linux.cpp Fri Jul 27 11:47:10 2018 +0100 33.2 +++ b/src/os/linux/vm/os_linux.cpp Sat Aug 04 12:53:22 2018 +0100 33.3 @@ -1,5 +1,5 @@ 33.4 /* 33.5 - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. 33.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 33.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 33.8 * 33.9 * This code is free software; you can redistribute it and/or modify it 33.10 @@ -996,8 +996,8 @@ 33.11 } 33.12 } 33.13 33.14 - if (os::Linux::is_initial_thread()) { 33.15 - // If current thread is initial thread, its stack is mapped on demand, 33.16 + if (os::is_primordial_thread()) { 33.17 + // If current thread is primordial thread, its stack is mapped on demand, 33.18 // see notes about MAP_GROWSDOWN. Here we try to force kernel to map 33.19 // the entire stack region to avoid SEGV in stack banging. 33.20 // It is also useful to get around the heap-stack-gap problem on SuSE 33.21 @@ -1082,21 +1082,24 @@ 33.22 } 33.23 33.24 ////////////////////////////////////////////////////////////////////////////// 33.25 -// initial thread 33.26 - 33.27 -// Check if current thread is the initial thread, similar to Solaris thr_main. 33.28 -bool os::Linux::is_initial_thread(void) { 33.29 +// primordial thread 33.30 + 33.31 +// Check if current thread is the primordial thread, similar to Solaris thr_main. 33.32 +bool os::is_primordial_thread(void) { 33.33 char dummy; 33.34 // If called before init complete, thread stack bottom will be null. 33.35 // Can be called if fatal error occurs before initialization. 33.36 - if (initial_thread_stack_bottom() == NULL) return false; 33.37 - assert(initial_thread_stack_bottom() != NULL && 33.38 - initial_thread_stack_size() != 0, 33.39 - "os::init did not locate initial thread's stack region"); 33.40 - if ((address)&dummy >= initial_thread_stack_bottom() && 33.41 - (address)&dummy < initial_thread_stack_bottom() + initial_thread_stack_size()) 33.42 + if (os::Linux::initial_thread_stack_bottom() == NULL) return false; 33.43 + assert(os::Linux::initial_thread_stack_bottom() != NULL && 33.44 + os::Linux::initial_thread_stack_size() != 0, 33.45 + "os::init did not locate primordial thread's stack region"); 33.46 + if ((address)&dummy >= os::Linux::initial_thread_stack_bottom() && 33.47 + (address)&dummy < os::Linux::initial_thread_stack_bottom() + 33.48 + os::Linux::initial_thread_stack_size()) { 33.49 return true; 33.50 - else return false; 33.51 + } else { 33.52 + return false; 33.53 + } 33.54 } 33.55 33.56 // Find the virtual memory area that contains addr 33.57 @@ -1123,7 +1126,7 @@ 33.58 return false; 33.59 } 33.60 33.61 -// Locate initial thread stack. This special handling of initial thread stack 33.62 +// Locate primordial thread stack. This special handling of primordial thread stack 33.63 // is needed because pthread_getattr_np() on most (all?) Linux distros returns 33.64 // bogus value for the primordial process thread. While the launcher has created 33.65 // the VM in a new thread since JDK 6, we still have to allow for the use of the 33.66 @@ -1147,7 +1150,10 @@ 33.67 // 6308388: a bug in ld.so will relocate its own .data section to the 33.68 // lower end of primordial stack; reduce ulimit -s value a little bit 33.69 // so we won't install guard page on ld.so's data section. 33.70 - stack_size -= 2 * page_size(); 33.71 + // But ensure we don't underflow the stack size - allow 1 page spare 33.72 + if (stack_size >= (size_t)(3 * page_size())) { 33.73 + stack_size -= 2 * page_size(); 33.74 + } 33.75 33.76 // Try to figure out where the stack base (top) is. This is harder. 33.77 // 33.78 @@ -1268,16 +1274,16 @@ 33.79 33.80 if (i != 28 - 2) { 33.81 assert(false, "Bad conversion from /proc/self/stat"); 33.82 - // product mode - assume we are the initial thread, good luck in the 33.83 + // product mode - assume we are the primordial thread, good luck in the 33.84 // embedded case. 33.85 - warning("Can't detect initial thread stack location - bad conversion"); 33.86 + warning("Can't detect primordial thread stack location - bad conversion"); 33.87 stack_start = (uintptr_t) &rlim; 33.88 } 33.89 } else { 33.90 // For some reason we can't open /proc/self/stat (for example, running on 33.91 // FreeBSD with a Linux emulator, or inside chroot), this should work for 33.92 // most cases, so don't abort: 33.93 - warning("Can't detect initial thread stack location - no /proc/self/stat"); 33.94 + warning("Can't detect primordial thread stack location - no /proc/self/stat"); 33.95 stack_start = (uintptr_t) &rlim; 33.96 } 33.97 } 33.98 @@ -1297,7 +1303,7 @@ 33.99 stack_top = (uintptr_t)high; 33.100 } else { 33.101 // failed, likely because /proc/self/maps does not exist 33.102 - warning("Can't detect initial thread stack location - find_vma failed"); 33.103 + warning("Can't detect primordial thread stack location - find_vma failed"); 33.104 // best effort: stack_start is normally within a few pages below the real 33.105 // stack top, use it as stack top, and reduce stack size so we won't put 33.106 // guard page outside stack. 33.107 @@ -3169,11 +3175,11 @@ 33.108 // where we're going to put our guard pages, truncate the mapping at 33.109 // that point by munmap()ping it. This ensures that when we later 33.110 // munmap() the guard pages we don't leave a hole in the stack 33.111 -// mapping. This only affects the main/initial thread 33.112 +// mapping. This only affects the main/primordial thread 33.113 33.114 bool os::pd_create_stack_guard_pages(char* addr, size_t size) { 33.115 33.116 - if (os::Linux::is_initial_thread()) { 33.117 + if (os::is_primordial_thread()) { 33.118 // As we manually grow stack up to bottom inside create_attached_thread(), 33.119 // it's likely that os::Linux::initial_thread_stack_bottom is mapped and 33.120 // we don't need to do anything special. 33.121 @@ -3198,14 +3204,14 @@ 33.122 33.123 // If this is a growable mapping, remove the guard pages entirely by 33.124 // munmap()ping them. If not, just call uncommit_memory(). This only 33.125 -// affects the main/initial thread, but guard against future OS changes 33.126 -// It's safe to always unmap guard pages for initial thread because we 33.127 -// always place it right after end of the mapped region 33.128 +// affects the main/primordial thread, but guard against future OS changes. 33.129 +// It's safe to always unmap guard pages for primordial thread because we 33.130 +// always place it right after end of the mapped region. 33.131 33.132 bool os::remove_stack_guard_pages(char* addr, size_t size) { 33.133 uintptr_t stack_extent, stack_base; 33.134 33.135 - if (os::Linux::is_initial_thread()) { 33.136 + if (os::is_primordial_thread()) { 33.137 return ::munmap(addr, size) == 0; 33.138 } 33.139 33.140 @@ -4980,10 +4986,9 @@ 33.141 } 33.142 } 33.143 33.144 -// this is called _before_ the most of global arguments have been parsed 33.145 +// this is called _before_ most of the global arguments have been parsed 33.146 void os::init(void) { 33.147 char dummy; /* used to get a guess on initial stack address */ 33.148 -// first_hrtime = gethrtime(); 33.149 33.150 // With LinuxThreads the JavaMain thread pid (primordial thread) 33.151 // is different than the pid of the java launcher thread. 33.152 @@ -5010,7 +5015,7 @@ 33.153 33.154 Linux::initialize_system_info(); 33.155 33.156 - // main_thread points to the aboriginal thread 33.157 + // _main_thread points to the thread that created/loaded the JVM. 33.158 Linux::_main_thread = pthread_self(); 33.159 33.160 Linux::clock_init();
34.1 --- a/src/os/linux/vm/os_linux.hpp Fri Jul 27 11:47:10 2018 +0100 34.2 +++ b/src/os/linux/vm/os_linux.hpp Sat Aug 04 12:53:22 2018 +0100 34.3 @@ -1,5 +1,5 @@ 34.4 /* 34.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 34.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 34.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 34.8 * 34.9 * This code is free software; you can redistribute it and/or modify it 34.10 @@ -142,7 +142,6 @@ 34.11 34.12 static address initial_thread_stack_bottom(void) { return _initial_thread_stack_bottom; } 34.13 static uintptr_t initial_thread_stack_size(void) { return _initial_thread_stack_size; } 34.14 - static bool is_initial_thread(void); 34.15 34.16 static int page_size(void) { return _page_size; } 34.17 static void set_page_size(int val) { _page_size = val; }
35.1 --- a/src/os/solaris/vm/os_solaris.cpp Fri Jul 27 11:47:10 2018 +0100 35.2 +++ b/src/os/solaris/vm/os_solaris.cpp Sat Aug 04 12:53:22 2018 +0100 35.3 @@ -1,5 +1,5 @@ 35.4 /* 35.5 - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 35.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 35.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 35.8 * 35.9 * This code is free software; you can redistribute it and/or modify it 35.10 @@ -200,17 +200,21 @@ 35.11 return st; 35.12 } 35.13 35.14 -address os::current_stack_base() { 35.15 +bool os::is_primordial_thread(void) { 35.16 int r = thr_main() ; 35.17 guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ; 35.18 - bool is_primordial_thread = r; 35.19 + return r == 1; 35.20 +} 35.21 + 35.22 +address os::current_stack_base() { 35.23 + bool _is_primordial_thread = is_primordial_thread(); 35.24 35.25 // Workaround 4352906, avoid calls to thr_stksegment by 35.26 // thr_main after the first one (it looks like we trash 35.27 // some data, causing the value for ss_sp to be incorrect). 35.28 - if (!is_primordial_thread || os::Solaris::_main_stack_base == NULL) { 35.29 + if (!_is_primordial_thread || os::Solaris::_main_stack_base == NULL) { 35.30 stack_t st = get_stack_info(); 35.31 - if (is_primordial_thread) { 35.32 + if (_is_primordial_thread) { 35.33 // cache initial value of stack base 35.34 os::Solaris::_main_stack_base = (address)st.ss_sp; 35.35 } 35.36 @@ -224,9 +228,7 @@ 35.37 size_t os::current_stack_size() { 35.38 size_t size; 35.39 35.40 - int r = thr_main() ; 35.41 - guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ; 35.42 - if(!r) { 35.43 + if (!is_primordial_thread()) { 35.44 size = get_stack_info().ss_size; 35.45 } else { 35.46 struct rlimit limits; 35.47 @@ -1287,9 +1289,7 @@ 35.48 35.49 // First crack at OS-specific initialization, from inside the new thread. 35.50 void os::initialize_thread(Thread* thr) { 35.51 - int r = thr_main() ; 35.52 - guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ; 35.53 - if (r) { 35.54 + if (is_primordial_thread()) { 35.55 JavaThread* jt = (JavaThread *)thr; 35.56 assert(jt != NULL,"Sanity check"); 35.57 size_t stack_size; 35.58 @@ -4914,6 +4914,7 @@ 35.59 // (Solaris only) this switches to calls that actually do locking. 35.60 ThreadCritical::initialize(); 35.61 35.62 + // main_thread points to the thread that created/loaded the JVM. 35.63 main_thread = thr_self(); 35.64 35.65 // Constant minimum stack size allowed. It must be at least
36.1 --- a/src/os/windows/vm/os_windows.cpp Fri Jul 27 11:47:10 2018 +0100 36.2 +++ b/src/os/windows/vm/os_windows.cpp Sat Aug 04 12:53:22 2018 +0100 36.3 @@ -1,5 +1,5 @@ 36.4 /* 36.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 36.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 36.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 36.8 * 36.9 * This code is free software; you can redistribute it and/or modify it 36.10 @@ -2197,13 +2197,6 @@ 36.11 // Windows Vista/2008 heap corruption check 36.12 #define EXCEPTION_HEAP_CORRUPTION 0xC0000374 36.13 36.14 -#define def_excpt(val) #val, val 36.15 - 36.16 -struct siglabel { 36.17 - char *name; 36.18 - int number; 36.19 -}; 36.20 - 36.21 // All Visual C++ exceptions thrown from code generated by the Microsoft Visual 36.22 // C++ compiler contain this error code. Because this is a compiler-generated 36.23 // error, the code is not listed in the Win32 API header files. 36.24 @@ -2213,8 +2206,9 @@ 36.25 36.26 #define EXCEPTION_UNCAUGHT_CXX_EXCEPTION 0xE06D7363 36.27 36.28 - 36.29 -struct siglabel exceptlabels[] = { 36.30 +#define def_excpt(val) { #val, (val) } 36.31 + 36.32 +static const struct { char* name; uint number; } exceptlabels[] = { 36.33 def_excpt(EXCEPTION_ACCESS_VIOLATION), 36.34 def_excpt(EXCEPTION_DATATYPE_MISALIGNMENT), 36.35 def_excpt(EXCEPTION_BREAKPOINT), 36.36 @@ -2239,16 +2233,16 @@ 36.37 def_excpt(EXCEPTION_GUARD_PAGE), 36.38 def_excpt(EXCEPTION_INVALID_HANDLE), 36.39 def_excpt(EXCEPTION_UNCAUGHT_CXX_EXCEPTION), 36.40 - def_excpt(EXCEPTION_HEAP_CORRUPTION), 36.41 + def_excpt(EXCEPTION_HEAP_CORRUPTION) 36.42 #ifdef _M_IA64 36.43 - def_excpt(EXCEPTION_REG_NAT_CONSUMPTION), 36.44 + , def_excpt(EXCEPTION_REG_NAT_CONSUMPTION) 36.45 #endif 36.46 - NULL, 0 36.47 }; 36.48 36.49 const char* os::exception_name(int exception_code, char *buf, size_t size) { 36.50 - for (int i = 0; exceptlabels[i].name != NULL; i++) { 36.51 - if (exceptlabels[i].number == exception_code) { 36.52 + uint code = static_cast<uint>(exception_code); 36.53 + for (uint i = 0; i < ARRAY_SIZE(exceptlabels); ++i) { 36.54 + if (exceptlabels[i].number == code) { 36.55 jio_snprintf(buf, size, "%s", exceptlabels[i].name); 36.56 return buf; 36.57 } 36.58 @@ -2271,9 +2265,9 @@ 36.59 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); 36.60 assert(ctx->Rax == min_jint, "unexpected idiv exception"); 36.61 // set correct result values and continue after idiv instruction 36.62 - ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes 36.63 - ctx->Rax = (DWORD)min_jint; // result 36.64 - ctx->Rdx = (DWORD)0; // remainder 36.65 + ctx->Rip = (DWORD64)pc + 2; // idiv reg, reg is 2 bytes 36.66 + ctx->Rax = (DWORD64)min_jint; // result 36.67 + ctx->Rdx = (DWORD64)0; // remainder 36.68 // Continue the execution 36.69 #else 36.70 PCONTEXT ctx = exceptionInfo->ContextRecord; 36.71 @@ -5792,7 +5786,7 @@ 36.72 char* result = os::reserve_memory_special(large_allocation_size, os::large_page_size(), NULL, false); 36.73 if (result == NULL) { 36.74 if (VerboseInternalVMTests) { 36.75 - gclog_or_tty->print("Failed to allocate control block with size "SIZE_FORMAT". Skipping remainder of test.", 36.76 + gclog_or_tty->print("Failed to allocate control block with size " SIZE_FORMAT ". Skipping remainder of test.", 36.77 large_allocation_size); 36.78 } 36.79 } else { 36.80 @@ -5805,7 +5799,7 @@ 36.81 char* actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), expected_location, false); 36.82 if (actual_location == NULL) { 36.83 if (VerboseInternalVMTests) { 36.84 - gclog_or_tty->print("Failed to allocate any memory at "PTR_FORMAT" size "SIZE_FORMAT". Skipping remainder of test.", 36.85 + gclog_or_tty->print("Failed to allocate any memory at " PTR_FORMAT " size " SIZE_FORMAT ". Skipping remainder of test.", 36.86 expected_location, large_allocation_size); 36.87 } 36.88 } else { 36.89 @@ -5813,7 +5807,7 @@ 36.90 os::release_memory_special(actual_location, expected_allocation_size); 36.91 // only now check, after releasing any memory to avoid any leaks. 36.92 assert(actual_location == expected_location, 36.93 - err_msg("Failed to allocate memory at requested location "PTR_FORMAT" of size "SIZE_FORMAT", is "PTR_FORMAT" instead", 36.94 + err_msg("Failed to allocate memory at requested location " PTR_FORMAT " of size " SIZE_FORMAT ", is " PTR_FORMAT " instead", 36.95 expected_location, expected_allocation_size, actual_location)); 36.96 } 36.97 }
37.1 --- a/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp Fri Jul 27 11:47:10 2018 +0100 37.2 +++ b/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp Sat Aug 04 12:53:22 2018 +0100 37.3 @@ -1,5 +1,5 @@ 37.4 /* 37.5 - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 37.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 37.7 * Copyright 2012, 2015 SAP AG. All rights reserved. 37.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 37.9 * 37.10 @@ -510,8 +510,8 @@ 37.11 // pthread_attr_getstack() 37.12 37.13 static void current_stack_region(address * bottom, size_t * size) { 37.14 - if (os::Linux::is_initial_thread()) { 37.15 - // initial thread needs special handling because pthread_getattr_np() 37.16 + if (os::is_primordial_thread()) { 37.17 + // primordial thread needs special handling because pthread_getattr_np() 37.18 // may return bogus value. 37.19 *bottom = os::Linux::initial_thread_stack_bottom(); 37.20 *size = os::Linux::initial_thread_stack_size();
38.1 --- a/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp Fri Jul 27 11:47:10 2018 +0100 38.2 +++ b/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp Sat Aug 04 12:53:22 2018 +0100 38.3 @@ -1,5 +1,5 @@ 38.4 /* 38.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 38.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 38.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 38.8 * 38.9 * This code is free software; you can redistribute it and/or modify it 38.10 @@ -162,8 +162,8 @@ 38.11 } 38.12 38.13 static void current_stack_region(address* bottom, size_t* size) { 38.14 - if (os::Linux::is_initial_thread()) { 38.15 - // initial thread needs special handling because pthread_getattr_np() 38.16 + if (os::is_primordial_thread()) { 38.17 + // primordial thread needs special handling because pthread_getattr_np() 38.18 // may return bogus value. 38.19 *bottom = os::Linux::initial_thread_stack_bottom(); 38.20 *size = os::Linux::initial_thread_stack_size();
39.1 --- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Fri Jul 27 11:47:10 2018 +0100 39.2 +++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Sat Aug 04 12:53:22 2018 +0100 39.3 @@ -1,5 +1,5 @@ 39.4 /* 39.5 - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 39.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 39.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 39.8 * 39.9 * This code is free software; you can redistribute it and/or modify it 39.10 @@ -712,8 +712,8 @@ 39.11 // pthread_attr_getstack() 39.12 39.13 static void current_stack_region(address * bottom, size_t * size) { 39.14 - if (os::Linux::is_initial_thread()) { 39.15 - // initial thread needs special handling because pthread_getattr_np() 39.16 + if (os::is_primordial_thread()) { 39.17 + // primordial thread needs special handling because pthread_getattr_np() 39.18 // may return bogus value. 39.19 *bottom = os::Linux::initial_thread_stack_bottom(); 39.20 *size = os::Linux::initial_thread_stack_size();
40.1 --- a/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Fri Jul 27 11:47:10 2018 +0100 40.2 +++ b/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Sat Aug 04 12:53:22 2018 +0100 40.3 @@ -1,5 +1,5 @@ 40.4 /* 40.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 40.6 + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. 40.7 * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. 40.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 40.9 * 40.10 @@ -360,7 +360,7 @@ 40.11 // The initial thread has a growable stack, and the size reported 40.12 // by pthread_attr_getstack is the maximum size it could possibly 40.13 // be given what currently mapped. This can be huge, so we cap it. 40.14 - if (os::Linux::is_initial_thread()) { 40.15 + if (os::is_primordial_thread()) { 40.16 stack_bytes = stack_top - stack_bottom; 40.17 40.18 if (stack_bytes > JavaThread::stack_size_at_create()) 40.19 @@ -408,6 +408,7 @@ 40.20 40.21 extern "C" { 40.22 int SpinPause() { 40.23 + return 0; // Shouldn't matter. 40.24 } 40.25 40.26
41.1 --- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp Fri Jul 27 11:47:10 2018 +0100 41.2 +++ b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp Sat Aug 04 12:53:22 2018 +0100 41.3 @@ -36,18 +36,24 @@ 41.4 41.5 // Atomically copy 64 bits of data 41.6 static void atomic_copy64(volatile void *src, volatile void *dst) { 41.7 -#if defined(PPC32) 41.8 +#if defined(PPC32) && !defined(__SPE__) 41.9 double tmp; 41.10 - asm volatile ("lfd %0, 0(%1)\n" 41.11 - "stfd %0, 0(%2)\n" 41.12 - : "=f"(tmp) 41.13 - : "b"(src), "b"(dst)); 41.14 + asm volatile ("lfd %0, %2\n" 41.15 + "stfd %0, %1\n" 41.16 + : "=&f"(tmp), "=Q"(*(volatile double*)dst) 41.17 + : "Q"(*(volatile double*)src)); 41.18 +#elif defined(PPC32) && defined(__SPE__) 41.19 + long tmp; 41.20 + asm volatile ("evldd %0, %2\n" 41.21 + "evstdd %0, %1\n" 41.22 + : "=&r"(tmp), "=Q"(*(volatile long*)dst) 41.23 + : "Q"(*(volatile long*)src)); 41.24 #elif defined(S390) && !defined(_LP64) 41.25 double tmp; 41.26 - asm volatile ("ld %0, 0(%1)\n" 41.27 - "std %0, 0(%2)\n" 41.28 - : "=r"(tmp) 41.29 - : "a"(src), "a"(dst)); 41.30 + asm volatile ("ld %0, %2\n" 41.31 + "std %0, %1\n" 41.32 + : "=&f"(tmp), "=Q"(*(volatile double*)dst) 41.33 + : "Q"(*(volatile double*)src)); 41.34 #else 41.35 *(jlong *) dst = *(jlong *) src; 41.36 #endif
42.1 --- a/src/os_cpu/windows_x86/vm/os_windows_x86.cpp Fri Jul 27 11:47:10 2018 +0100 42.2 +++ b/src/os_cpu/windows_x86/vm/os_windows_x86.cpp Sat Aug 04 12:53:22 2018 +0100 42.3 @@ -454,11 +454,18 @@ 42.4 // Returns an estimate of the current stack pointer. Result must be guaranteed 42.5 // to point into the calling threads stack, and be no lower than the current 42.6 // stack pointer. 42.7 +#if defined(_MSC_VER) && _MSC_VER >= 1900 42.8 +// warning C4172: returning address of local variable or temporary: dummy 42.9 +#pragma warning(disable: 4172) 42.10 +#endif 42.11 address os::current_stack_pointer() { 42.12 int dummy; 42.13 address sp = (address)&dummy; 42.14 return sp; 42.15 } 42.16 +#if defined(_MSC_VER) && _MSC_VER >= 1900 42.17 +#pragma warning(default: 4172) 42.18 +#endif 42.19 #else 42.20 // Returns the current stack pointer. Accurate value needed for 42.21 // os::verify_stack_alignment().
43.1 --- a/src/share/vm/adlc/arena.hpp Fri Jul 27 11:47:10 2018 +0100 43.2 +++ b/src/share/vm/adlc/arena.hpp Sat Aug 04 12:53:22 2018 +0100 43.3 @@ -1,5 +1,5 @@ 43.4 /* 43.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 43.6 + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. 43.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 43.8 * 43.9 * This code is free software; you can redistribute it and/or modify it 43.10 @@ -69,6 +69,11 @@ 43.11 //------------------------------Chunk------------------------------------------ 43.12 // Linked list of raw memory chunks 43.13 class Chunk: public CHeapObj { 43.14 + private: 43.15 + // This ordinary operator delete is needed even though not used, so the 43.16 + // below two-argument operator delete will be treated as a placement 43.17 + // delete rather than an ordinary sized delete; see C++14 3.7.4.2/p2. 43.18 + void operator delete(void* p); 43.19 public: 43.20 void* operator new(size_t size, size_t length) throw(); 43.21 void operator delete(void* p, size_t length);
44.1 --- a/src/share/vm/adlc/output_c.cpp Fri Jul 27 11:47:10 2018 +0100 44.2 +++ b/src/share/vm/adlc/output_c.cpp Sat Aug 04 12:53:22 2018 +0100 44.3 @@ -1,5 +1,5 @@ 44.4 /* 44.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 44.6 + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. 44.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 44.8 * 44.9 * This code is free software; you can redistribute it and/or modify it 44.10 @@ -4177,11 +4177,11 @@ 44.11 fprintf(fp_cpp,"%s\n", _frame->_c_calling_convention); 44.12 fprintf(fp_cpp,"}\n\n"); 44.13 // Java Return Value Location 44.14 - fprintf(fp_cpp,"OptoRegPair Matcher::return_value(int ideal_reg, bool is_outgoing) {\n"); 44.15 + fprintf(fp_cpp,"OptoRegPair Matcher::return_value(uint ideal_reg, bool is_outgoing) {\n"); 44.16 fprintf(fp_cpp,"%s\n", _frame->_return_value); 44.17 fprintf(fp_cpp,"}\n\n"); 44.18 // Native Return Value Location 44.19 - fprintf(fp_cpp,"OptoRegPair Matcher::c_return_value(int ideal_reg, bool is_outgoing) {\n"); 44.20 + fprintf(fp_cpp,"OptoRegPair Matcher::c_return_value(uint ideal_reg, bool is_outgoing) {\n"); 44.21 fprintf(fp_cpp,"%s\n", _frame->_c_return_value); 44.22 fprintf(fp_cpp,"}\n\n"); 44.23
45.1 --- a/src/share/vm/c1/c1_CFGPrinter.cpp Fri Jul 27 11:47:10 2018 +0100 45.2 +++ b/src/share/vm/c1/c1_CFGPrinter.cpp Sat Aug 04 12:53:22 2018 +0100 45.3 @@ -161,7 +161,7 @@ 45.4 45.5 print("name \"%s\"", method_name(_compilation->method(), true)); 45.6 print("method \"%s\"", method_name(_compilation->method())); 45.7 - print("date "INT64_FORMAT, (int64_t) os::javaTimeMillis()); 45.8 + print("date " INT64_FORMAT, (int64_t) os::javaTimeMillis()); 45.9 45.10 print_end("compilation"); 45.11 }
46.1 --- a/src/share/vm/classfile/altHashing.cpp Fri Jul 27 11:47:10 2018 +0100 46.2 +++ b/src/share/vm/classfile/altHashing.cpp Sat Aug 04 12:53:22 2018 +0100 46.3 @@ -1,5 +1,5 @@ 46.4 /* 46.5 - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 46.6 + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. 46.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 46.8 * 46.9 * This code is free software; you can redistribute it and/or modify it 46.10 @@ -224,7 +224,7 @@ 46.11 static const jbyte THREE_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82}; 46.12 static const jbyte FOUR_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83}; 46.13 static const jchar TWO_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382}; 46.14 -static const jint ONE_INT[] = { 0x83828180}; 46.15 +static const jint ONE_INT[] = { (jint) 0x83828180}; 46.16 static const jbyte SIX_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85}; 46.17 static const jchar THREE_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382, (jchar) 0x8584}; 46.18 static const jbyte EIGHT_BYTE[] = { 46.19 @@ -235,7 +235,7 @@ 46.20 (jchar) 0x8180, (jchar) 0x8382, 46.21 (jchar) 0x8584, (jchar) 0x8786}; 46.22 46.23 -static const jint TWO_INT[] = { 0x83828180, 0x87868584}; 46.24 +static const jint TWO_INT[] = { (jint) 0x83828180, (jint) 0x87868584}; 46.25 46.26 static const juint MURMUR3_32_X86_CHECK_VALUE = 0xB0F57EE3; 46.27
47.1 --- a/src/share/vm/classfile/classFileParser.cpp Fri Jul 27 11:47:10 2018 +0100 47.2 +++ b/src/share/vm/classfile/classFileParser.cpp Sat Aug 04 12:53:22 2018 +0100 47.3 @@ -1,5 +1,5 @@ 47.4 /* 47.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 47.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 47.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 47.8 * 47.9 * This code is free software; you can redistribute it and/or modify it 47.10 @@ -275,7 +275,7 @@ 47.11 char* str = java_lang_String::as_utf8_string(patch()); 47.12 // (could use java_lang_String::as_symbol instead, but might as well batch them) 47.13 utf8_buffer = (u1*) str; 47.14 - utf8_length = (int) strlen(str); 47.15 + utf8_length = (u2) strlen(str); 47.16 } 47.17 47.18 unsigned int hash;
48.1 --- a/src/share/vm/classfile/classLoaderData.cpp Fri Jul 27 11:47:10 2018 +0100 48.2 +++ b/src/share/vm/classfile/classLoaderData.cpp Sat Aug 04 12:53:22 2018 +0100 48.3 @@ -502,7 +502,7 @@ 48.4 48.5 void ClassLoaderData::dump(outputStream * const out) { 48.6 ResourceMark rm; 48.7 - out->print("ClassLoaderData CLD: "PTR_FORMAT", loader: "PTR_FORMAT", loader_klass: "PTR_FORMAT" %s {", 48.8 + out->print("ClassLoaderData CLD: " PTR_FORMAT ", loader: " PTR_FORMAT ", loader_klass: " PTR_FORMAT " %s {", 48.9 p2i(this), p2i((void *)class_loader()), 48.10 p2i(class_loader() != NULL ? class_loader()->klass() : NULL), loader_name()); 48.11 if (claimed()) out->print(" claimed "); 48.12 @@ -520,7 +520,7 @@ 48.13 ResourceMark rm; 48.14 Klass* k = _klasses; 48.15 while (k != NULL) { 48.16 - out->print_cr("klass "PTR_FORMAT", %s, CT: %d, MUT: %d", k, k->name()->as_C_string(), 48.17 + out->print_cr("klass " PTR_FORMAT ", %s, CT: %d, MUT: %d", k, k->name()->as_C_string(), 48.18 k->has_modified_oops(), k->has_accumulated_modified_oops()); 48.19 assert(k != k->next_link(), "no loops!"); 48.20 k = k->next_link();
49.1 --- a/src/share/vm/classfile/dictionary.cpp Fri Jul 27 11:47:10 2018 +0100 49.2 +++ b/src/share/vm/classfile/dictionary.cpp Sat Aug 04 12:53:22 2018 +0100 49.3 @@ -568,7 +568,7 @@ 49.4 } 49.5 49.6 void ProtectionDomainCacheEntry::print() { 49.7 - tty->print_cr("entry "PTR_FORMAT" value "PTR_FORMAT" strongly_reachable %d next "PTR_FORMAT, 49.8 + tty->print_cr("entry " PTR_FORMAT " value " PTR_FORMAT " strongly_reachable %d next " PTR_FORMAT, 49.9 this, (void*)literal(), _strongly_reachable, next()); 49.10 } 49.11 #endif
50.1 --- a/src/share/vm/classfile/dictionary.hpp Fri Jul 27 11:47:10 2018 +0100 50.2 +++ b/src/share/vm/classfile/dictionary.hpp Sat Aug 04 12:53:22 2018 +0100 50.3 @@ -373,7 +373,7 @@ 50.4 50.5 void print_on(outputStream* st) const { 50.6 symbol()->print_value_on(st); 50.7 - st->print("/mode="INTX_FORMAT, symbol_mode()); 50.8 + st->print("/mode=" INTX_FORMAT, symbol_mode()); 50.9 st->print(" -> "); 50.10 bool printed = false; 50.11 if (method() != NULL) {
51.1 --- a/src/share/vm/classfile/javaClasses.hpp Fri Jul 27 11:47:10 2018 +0100 51.2 +++ b/src/share/vm/classfile/javaClasses.hpp Sat Aug 04 12:53:22 2018 +0100 51.3 @@ -1209,7 +1209,7 @@ 51.4 static oop target( oop site) { return site->obj_field( _target_offset); } 51.5 static void set_target( oop site, oop target) { site->obj_field_put( _target_offset, target); } 51.6 51.7 - static volatile oop target_volatile(oop site) { return site->obj_field_volatile( _target_offset); } 51.8 + static volatile oop target_volatile(oop site) { return oop((oopDesc *)(site->obj_field_volatile(_target_offset))); } 51.9 static void set_target_volatile(oop site, oop target) { site->obj_field_put_volatile(_target_offset, target); } 51.10 51.11 // Testers
52.1 --- a/src/share/vm/classfile/vmSymbols.hpp Fri Jul 27 11:47:10 2018 +0100 52.2 +++ b/src/share/vm/classfile/vmSymbols.hpp Sat Aug 04 12:53:22 2018 +0100 52.3 @@ -418,6 +418,7 @@ 52.4 template(getProtectionDomain_name, "getProtectionDomain") \ 52.5 template(getProtectionDomain_signature, "(Ljava/security/CodeSource;)Ljava/security/ProtectionDomain;") \ 52.6 template(url_code_signer_array_void_signature, "(Ljava/net/URL;[Ljava/security/CodeSigner;)V") \ 52.7 + template(resolved_references_name, "<resolved_references>") \ 52.8 template(referencequeue_null_name, "NULL") \ 52.9 template(referencequeue_enqueued_name, "ENQUEUED") \ 52.10 \ 52.11 @@ -508,6 +509,7 @@ 52.12 template(class_array_signature, "[Ljava/lang/Class;") \ 52.13 template(classloader_signature, "Ljava/lang/ClassLoader;") \ 52.14 template(object_signature, "Ljava/lang/Object;") \ 52.15 + template(object_array_signature, "[Ljava/lang/Object;") \ 52.16 template(class_signature, "Ljava/lang/Class;") \ 52.17 template(string_signature, "Ljava/lang/String;") \ 52.18 template(reference_signature, "Ljava/lang/ref/Reference;") \
53.1 --- a/src/share/vm/code/exceptionHandlerTable.cpp Fri Jul 27 11:47:10 2018 +0100 53.2 +++ b/src/share/vm/code/exceptionHandlerTable.cpp Sat Aug 04 12:53:22 2018 +0100 53.3 @@ -186,7 +186,7 @@ 53.4 void ImplicitExceptionTable::print(address base) const { 53.5 tty->print("{"); 53.6 for( uint i=0; i<len(); i++ ) 53.7 - tty->print("< "INTPTR_FORMAT", "INTPTR_FORMAT" > ",base + *adr(i), base + *(adr(i)+1)); 53.8 + tty->print("< " INTPTR_FORMAT ", " INTPTR_FORMAT " > ",base + *adr(i), base + *(adr(i)+1)); 53.9 tty->print_cr("}"); 53.10 } 53.11
54.1 --- a/src/share/vm/code/nmethod.cpp Fri Jul 27 11:47:10 2018 +0100 54.2 +++ b/src/share/vm/code/nmethod.cpp Sat Aug 04 12:53:22 2018 +0100 54.3 @@ -2323,7 +2323,7 @@ 54.4 void maybe_print(oop* p) { 54.5 if (_print_nm == NULL) return; 54.6 if (!_detected_scavenge_root) _print_nm->print_on(tty, "new scavenge root"); 54.7 - tty->print_cr(""PTR_FORMAT"[offset=%d] detected scavengable oop "PTR_FORMAT" (found at "PTR_FORMAT")", 54.8 + tty->print_cr("" PTR_FORMAT "[offset=%d] detected scavengable oop " PTR_FORMAT " (found at " PTR_FORMAT ")", 54.9 _print_nm, (int)((intptr_t)p - (intptr_t)_print_nm), 54.10 (void *)(*p), (intptr_t)p); 54.11 (*p)->print(); 54.12 @@ -2704,7 +2704,7 @@ 54.13 _nm->print_nmethod(true); 54.14 _ok = false; 54.15 } 54.16 - tty->print_cr("*** non-oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)", 54.17 + tty->print_cr("*** non-oop " PTR_FORMAT " found at " PTR_FORMAT " (offset %d)", 54.18 (void *)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm)); 54.19 } 54.20 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); } 54.21 @@ -2828,7 +2828,7 @@ 54.22 _nm->print_nmethod(true); 54.23 _ok = false; 54.24 } 54.25 - tty->print_cr("*** scavengable oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)", 54.26 + tty->print_cr("*** scavengable oop " PTR_FORMAT " found at " PTR_FORMAT " (offset %d)", 54.27 (void *)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm)); 54.28 (*p)->print(); 54.29 } 54.30 @@ -2873,7 +2873,7 @@ 54.31 print_on(tty, NULL); 54.32 54.33 if (WizardMode) { 54.34 - tty->print("((nmethod*) "INTPTR_FORMAT ") ", this); 54.35 + tty->print("((nmethod*) " INTPTR_FORMAT ") ", this); 54.36 tty->print(" for method " INTPTR_FORMAT , (address)method()); 54.37 tty->print(" { "); 54.38 if (is_in_use()) tty->print("in_use ");
55.1 --- a/src/share/vm/compiler/compileBroker.cpp Fri Jul 27 11:47:10 2018 +0100 55.2 +++ b/src/share/vm/compiler/compileBroker.cpp Sat Aug 04 12:53:22 2018 +0100 55.3 @@ -203,7 +203,7 @@ 55.4 } 55.5 55.6 void log_nmethod(JavaThread* thread, nmethod* nm) { 55.7 - log(thread, "nmethod %d%s " INTPTR_FORMAT " code ["INTPTR_FORMAT ", " INTPTR_FORMAT "]", 55.8 + log(thread, "nmethod %d%s " INTPTR_FORMAT " code [" INTPTR_FORMAT ", " INTPTR_FORMAT "]", 55.9 nm->compile_id(), nm->is_osr_method() ? "%" : "", 55.10 p2i(nm), p2i(nm->code_begin()), p2i(nm->code_end())); 55.11 }
56.1 --- a/src/share/vm/compiler/disassembler.cpp Fri Jul 27 11:47:10 2018 +0100 56.2 +++ b/src/share/vm/compiler/disassembler.cpp Sat Aug 04 12:53:22 2018 +0100 56.3 @@ -60,7 +60,7 @@ 56.4 Disassembler::decode_func_virtual Disassembler::_decode_instructions_virtual = NULL; 56.5 Disassembler::decode_func Disassembler::_decode_instructions = NULL; 56.6 56.7 -static const char hsdis_library_name[] = "hsdis-"HOTSPOT_LIB_ARCH; 56.8 +static const char hsdis_library_name[] = "hsdis-" HOTSPOT_LIB_ARCH; 56.9 static const char decode_instructions_virtual_name[] = "decode_instructions_virtual"; 56.10 static const char decode_instructions_name[] = "decode_instructions"; 56.11 static bool use_new_version = true;
57.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Fri Jul 27 11:47:10 2018 +0100 57.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Sat Aug 04 12:53:22 2018 +0100 57.3 @@ -1,5 +1,5 @@ 57.4 /* 57.5 - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 57.6 + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. 57.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 57.8 * 57.9 * This code is free software; you can redistribute it and/or modify it 57.10 @@ -838,18 +838,18 @@ 57.11 GenCollectedHeap* gch = GenCollectedHeap::heap(); 57.12 if (PrintGCDetails) { 57.13 if (Verbose) { 57.14 - gclog_or_tty->print("[%d %s-%s: "SIZE_FORMAT"("SIZE_FORMAT")]", 57.15 + gclog_or_tty->print("[%d %s-%s: " SIZE_FORMAT "(" SIZE_FORMAT ")]", 57.16 level(), short_name(), s, used(), capacity()); 57.17 } else { 57.18 - gclog_or_tty->print("[%d %s-%s: "SIZE_FORMAT"K("SIZE_FORMAT"K)]", 57.19 + gclog_or_tty->print("[%d %s-%s: " SIZE_FORMAT "K(" SIZE_FORMAT "K)]", 57.20 level(), short_name(), s, used() / K, capacity() / K); 57.21 } 57.22 } 57.23 if (Verbose) { 57.24 - gclog_or_tty->print(" "SIZE_FORMAT"("SIZE_FORMAT")", 57.25 + gclog_or_tty->print(" " SIZE_FORMAT "(" SIZE_FORMAT ")", 57.26 gch->used(), gch->capacity()); 57.27 } else { 57.28 - gclog_or_tty->print(" "SIZE_FORMAT"K("SIZE_FORMAT"K)", 57.29 + gclog_or_tty->print(" " SIZE_FORMAT "K(" SIZE_FORMAT "K)", 57.30 gch->used() / K, gch->capacity() / K); 57.31 } 57.32 } 57.33 @@ -879,8 +879,8 @@ 57.34 bool res = (available >= av_promo) || (available >= max_promotion_in_bytes); 57.35 if (Verbose && PrintGCDetails) { 57.36 gclog_or_tty->print_cr( 57.37 - "CMS: promo attempt is%s safe: available("SIZE_FORMAT") %s av_promo("SIZE_FORMAT")," 57.38 - "max_promo("SIZE_FORMAT")", 57.39 + "CMS: promo attempt is%s safe: available(" SIZE_FORMAT ") %s av_promo(" SIZE_FORMAT ")," 57.40 + "max_promo(" SIZE_FORMAT ")", 57.41 res? "":" not", available, res? ">=":"<", 57.42 av_promo, max_promotion_in_bytes); 57.43 } 57.44 @@ -966,8 +966,8 @@ 57.45 desired_free_percentage); 57.46 gclog_or_tty->print_cr(" Maximum free fraction %f", 57.47 maximum_free_percentage); 57.48 - gclog_or_tty->print_cr(" Capactiy "SIZE_FORMAT, capacity()/1000); 57.49 - gclog_or_tty->print_cr(" Desired capacity "SIZE_FORMAT, 57.50 + gclog_or_tty->print_cr(" Capactiy " SIZE_FORMAT, capacity()/1000); 57.51 + gclog_or_tty->print_cr(" Desired capacity " SIZE_FORMAT, 57.52 desired_capacity/1000); 57.53 int prev_level = level() - 1; 57.54 if (prev_level >= 0) { 57.55 @@ -975,14 +975,14 @@ 57.56 GenCollectedHeap* gch = GenCollectedHeap::heap(); 57.57 Generation* prev_gen = gch->_gens[prev_level]; 57.58 prev_size = prev_gen->capacity(); 57.59 - gclog_or_tty->print_cr(" Younger gen size "SIZE_FORMAT, 57.60 + gclog_or_tty->print_cr(" Younger gen size " SIZE_FORMAT, 57.61 prev_size/1000); 57.62 } 57.63 - gclog_or_tty->print_cr(" unsafe_max_alloc_nogc "SIZE_FORMAT, 57.64 + gclog_or_tty->print_cr(" unsafe_max_alloc_nogc " SIZE_FORMAT, 57.65 unsafe_max_alloc_nogc()/1000); 57.66 - gclog_or_tty->print_cr(" contiguous available "SIZE_FORMAT, 57.67 + gclog_or_tty->print_cr(" contiguous available " SIZE_FORMAT, 57.68 contiguous_available()/1000); 57.69 - gclog_or_tty->print_cr(" Expand by "SIZE_FORMAT" (bytes)", 57.70 + gclog_or_tty->print_cr(" Expand by " SIZE_FORMAT " (bytes)", 57.71 expand_bytes); 57.72 } 57.73 // safe if expansion fails 57.74 @@ -1513,8 +1513,8 @@ 57.75 stats().print_on(gclog_or_tty); 57.76 gclog_or_tty->print_cr("time_until_cms_gen_full %3.7f", 57.77 stats().time_until_cms_gen_full()); 57.78 - gclog_or_tty->print_cr("free="SIZE_FORMAT, _cmsGen->free()); 57.79 - gclog_or_tty->print_cr("contiguous_available="SIZE_FORMAT, 57.80 + gclog_or_tty->print_cr("free=" SIZE_FORMAT, _cmsGen->free()); 57.81 + gclog_or_tty->print_cr("contiguous_available=" SIZE_FORMAT, 57.82 _cmsGen->contiguous_available()); 57.83 gclog_or_tty->print_cr("promotion_rate=%g", stats().promotion_rate()); 57.84 gclog_or_tty->print_cr("cms_allocation_rate=%g", stats().cms_allocation_rate()); 57.85 @@ -2792,8 +2792,8 @@ 57.86 assert(_numObjectsPromoted == 0, "check"); 57.87 assert(_numWordsPromoted == 0, "check"); 57.88 if (Verbose && PrintGC) { 57.89 - gclog_or_tty->print("Allocated "SIZE_FORMAT" objects, " 57.90 - SIZE_FORMAT" bytes concurrently", 57.91 + gclog_or_tty->print("Allocated " SIZE_FORMAT " objects, " 57.92 + SIZE_FORMAT " bytes concurrently", 57.93 _numObjectsAllocated, _numWordsAllocated*sizeof(HeapWord)); 57.94 } 57.95 _numObjectsAllocated = 0; 57.96 @@ -2879,8 +2879,8 @@ 57.97 assert(_numObjectsAllocated == 0, "check"); 57.98 assert(_numWordsAllocated == 0, "check"); 57.99 if (Verbose && PrintGC) { 57.100 - gclog_or_tty->print("Promoted "SIZE_FORMAT" objects, " 57.101 - SIZE_FORMAT" bytes", 57.102 + gclog_or_tty->print("Promoted " SIZE_FORMAT " objects, " 57.103 + SIZE_FORMAT " bytes", 57.104 _numObjectsPromoted, _numWordsPromoted*sizeof(HeapWord)); 57.105 } 57.106 _numObjectsPromoted = 0; 57.107 @@ -2890,7 +2890,7 @@ 57.108 if (PrintGC && Verbose) { 57.109 // Call down the chain in contiguous_available needs the freelistLock 57.110 // so print this out before releasing the freeListLock. 57.111 - gclog_or_tty->print(" Contiguous available "SIZE_FORMAT" bytes ", 57.112 + gclog_or_tty->print(" Contiguous available " SIZE_FORMAT " bytes ", 57.113 contiguous_available()); 57.114 } 57.115 } 57.116 @@ -2978,7 +2978,7 @@ 57.117 HeapWord* addr = _marks->offsetToHeapWord(offset); 57.118 if (!_marks->isMarked(addr)) { 57.119 oop(addr)->print_on(gclog_or_tty); 57.120 - gclog_or_tty->print_cr(" ("INTPTR_FORMAT" should have been marked)", addr); 57.121 + gclog_or_tty->print_cr(" (" INTPTR_FORMAT " should have been marked)", addr); 57.122 _failed = true; 57.123 } 57.124 return true; 57.125 @@ -5039,7 +5039,7 @@ 57.126 57.127 SpecializationStats::clear(); 57.128 if (PrintGCDetails) { 57.129 - gclog_or_tty->print("[YG occupancy: "SIZE_FORMAT" K ("SIZE_FORMAT" K)]", 57.130 + gclog_or_tty->print("[YG occupancy: " SIZE_FORMAT " K (" SIZE_FORMAT " K)]", 57.131 _young_gen->used() / K, 57.132 _young_gen->capacity() / K); 57.133 } 57.134 @@ -5172,8 +5172,8 @@ 57.135 if (ser_ovflw > 0) { 57.136 if (PrintCMSStatistics != 0) { 57.137 gclog_or_tty->print_cr("Marking stack overflow (benign) " 57.138 - "(pmc_pc="SIZE_FORMAT", pmc_rm="SIZE_FORMAT", kac="SIZE_FORMAT 57.139 - ", kac_preclean="SIZE_FORMAT")", 57.140 + "(pmc_pc=" SIZE_FORMAT ", pmc_rm=" SIZE_FORMAT ", kac=" SIZE_FORMAT 57.141 + ", kac_preclean=" SIZE_FORMAT ")", 57.142 _ser_pmc_preclean_ovflw, _ser_pmc_remark_ovflw, 57.143 _ser_kac_ovflw, _ser_kac_preclean_ovflw); 57.144 } 57.145 @@ -5186,7 +5186,7 @@ 57.146 if (_par_pmc_remark_ovflw > 0 || _par_kac_ovflw > 0) { 57.147 if (PrintCMSStatistics != 0) { 57.148 gclog_or_tty->print_cr("Work queue overflow (benign) " 57.149 - "(pmc_rm="SIZE_FORMAT", kac="SIZE_FORMAT")", 57.150 + "(pmc_rm=" SIZE_FORMAT ", kac=" SIZE_FORMAT ")", 57.151 _par_pmc_remark_ovflw, _par_kac_ovflw); 57.152 } 57.153 _par_pmc_remark_ovflw = 0; 57.154 @@ -5194,12 +5194,12 @@ 57.155 } 57.156 if (PrintCMSStatistics != 0) { 57.157 if (_markStack._hit_limit > 0) { 57.158 - gclog_or_tty->print_cr(" (benign) Hit max stack size limit ("SIZE_FORMAT")", 57.159 + gclog_or_tty->print_cr(" (benign) Hit max stack size limit (" SIZE_FORMAT ")", 57.160 _markStack._hit_limit); 57.161 } 57.162 if (_markStack._failed_double > 0) { 57.163 - gclog_or_tty->print_cr(" (benign) Failed stack doubling ("SIZE_FORMAT")," 57.164 - " current capacity "SIZE_FORMAT, 57.165 + gclog_or_tty->print_cr(" (benign) Failed stack doubling (" SIZE_FORMAT ")," 57.166 + " current capacity " SIZE_FORMAT, 57.167 _markStack._failed_double, 57.168 _markStack.capacity()); 57.169 } 57.170 @@ -5963,7 +5963,7 @@ 57.171 &markFromDirtyCardsClosure); 57.172 verify_work_stacks_empty(); 57.173 if (PrintCMSStatistics != 0) { 57.174 - gclog_or_tty->print(" (re-scanned "SIZE_FORMAT" dirty cards in cms gen) ", 57.175 + gclog_or_tty->print(" (re-scanned " SIZE_FORMAT " dirty cards in cms gen) ", 57.176 markFromDirtyCardsClosure.num_dirty_cards()); 57.177 } 57.178 } 57.179 @@ -6829,7 +6829,7 @@ 57.180 size_t start_ofs = heapWordToOffset(mr.start()); 57.181 // Make sure that end() is appropriately aligned 57.182 assert(mr.end() == (HeapWord*)round_to((intptr_t)mr.end(), 57.183 - (1 << (_shifter+LogHeapWordSize))), 57.184 + ((intptr_t) 1 << (_shifter+LogHeapWordSize))), 57.185 "Misaligned mr.end()"); 57.186 size_t end_ofs = heapWordToOffset(mr.end()); 57.187 assert(end_ofs > start_ofs, "Should mark at least one bit"); 57.188 @@ -6893,8 +6893,8 @@ 57.189 } else if (_failed_double++ == 0 && !CMSConcurrentMTEnabled && PrintGCDetails) { 57.190 // Failed to double capacity, continue; 57.191 // we print a detail message only once per CMS cycle. 57.192 - gclog_or_tty->print(" (benign) Failed to expand marking stack from "SIZE_FORMAT"K to " 57.193 - SIZE_FORMAT"K", 57.194 + gclog_or_tty->print(" (benign) Failed to expand marking stack from " SIZE_FORMAT "K to " 57.195 + SIZE_FORMAT "K", 57.196 _capacity / K, new_capacity / K); 57.197 } 57.198 } 57.199 @@ -8216,25 +8216,25 @@ 57.200 ShouldNotReachHere(); 57.201 } 57.202 if (Verbose && PrintGC) { 57.203 - gclog_or_tty->print("Collected "SIZE_FORMAT" objects, " SIZE_FORMAT " bytes", 57.204 + gclog_or_tty->print("Collected " SIZE_FORMAT " objects, " SIZE_FORMAT " bytes", 57.205 _numObjectsFreed, _numWordsFreed*sizeof(HeapWord)); 57.206 - gclog_or_tty->print_cr("\nLive "SIZE_FORMAT" objects, " 57.207 - SIZE_FORMAT" bytes " 57.208 - "Already free "SIZE_FORMAT" objects, "SIZE_FORMAT" bytes", 57.209 + gclog_or_tty->print_cr("\nLive " SIZE_FORMAT " objects, " 57.210 + SIZE_FORMAT " bytes " 57.211 + "Already free " SIZE_FORMAT " objects, " SIZE_FORMAT " bytes", 57.212 _numObjectsLive, _numWordsLive*sizeof(HeapWord), 57.213 _numObjectsAlreadyFree, _numWordsAlreadyFree*sizeof(HeapWord)); 57.214 size_t totalBytes = (_numWordsFreed + _numWordsLive + _numWordsAlreadyFree) 57.215 * sizeof(HeapWord); 57.216 - gclog_or_tty->print_cr("Total sweep: "SIZE_FORMAT" bytes", totalBytes); 57.217 + gclog_or_tty->print_cr("Total sweep: " SIZE_FORMAT " bytes", totalBytes); 57.218 57.219 if (PrintCMSStatistics && CMSVerifyReturnedBytes) { 57.220 size_t indexListReturnedBytes = _sp->sumIndexedFreeListArrayReturnedBytes(); 57.221 size_t dict_returned_bytes = _sp->dictionary()->sum_dict_returned_bytes(); 57.222 size_t returned_bytes = indexListReturnedBytes + dict_returned_bytes; 57.223 - gclog_or_tty->print("Returned "SIZE_FORMAT" bytes", returned_bytes); 57.224 - gclog_or_tty->print(" Indexed List Returned "SIZE_FORMAT" bytes", 57.225 + gclog_or_tty->print("Returned " SIZE_FORMAT " bytes", returned_bytes); 57.226 + gclog_or_tty->print(" Indexed List Returned " SIZE_FORMAT " bytes", 57.227 indexListReturnedBytes); 57.228 - gclog_or_tty->print_cr(" Dictionary Returned "SIZE_FORMAT" bytes", 57.229 + gclog_or_tty->print_cr(" Dictionary Returned " SIZE_FORMAT " bytes", 57.230 dict_returned_bytes); 57.231 } 57.232 } 57.233 @@ -8313,13 +8313,13 @@ 57.234 // coalesced chunk to the appropriate free list. 57.235 if (inFreeRange()) { 57.236 assert(freeFinger() >= _sp->bottom() && freeFinger() < _limit, 57.237 - err_msg("freeFinger() " PTR_FORMAT" is out-of-bounds", freeFinger())); 57.238 + err_msg("freeFinger() " PTR_FORMAT " is out-of-bounds", freeFinger())); 57.239 flush_cur_free_chunk(freeFinger(), 57.240 pointer_delta(addr, freeFinger())); 57.241 if (CMSTraceSweeper) { 57.242 gclog_or_tty->print("Sweep: last chunk: "); 57.243 - gclog_or_tty->print("put_free_blk 0x%x ("SIZE_FORMAT") " 57.244 - "[coalesced:"SIZE_FORMAT"]\n", 57.245 + gclog_or_tty->print("put_free_blk 0x%x (" SIZE_FORMAT ") " 57.246 + "[coalesced:" SIZE_FORMAT "]\n", 57.247 freeFinger(), pointer_delta(addr, freeFinger()), 57.248 lastFreeRangeCoalesced()); 57.249 }
58.1 --- a/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp Fri Jul 27 11:47:10 2018 +0100 58.2 +++ b/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp Sat Aug 04 12:53:22 2018 +0100 58.3 @@ -117,7 +117,7 @@ 58.4 } 58.5 guarantee(sum_of_reclaimable_bytes == _remaining_reclaimable_bytes, 58.6 err_msg("reclaimable bytes inconsistent, " 58.7 - "remaining: "SIZE_FORMAT" sum: "SIZE_FORMAT, 58.8 + "remaining: " SIZE_FORMAT " sum: " SIZE_FORMAT, 58.9 _remaining_reclaimable_bytes, sum_of_reclaimable_bytes)); 58.10 } 58.11 #endif // !PRODUCT
59.1 --- a/src/share/vm/gc_implementation/g1/collectionSetChooser.hpp Fri Jul 27 11:47:10 2018 +0100 59.2 +++ b/src/share/vm/gc_implementation/g1/collectionSetChooser.hpp Sat Aug 04 12:53:22 2018 +0100 59.3 @@ -92,7 +92,7 @@ 59.4 regions_at_put(_curr_index, NULL); 59.5 assert(hr->reclaimable_bytes() <= _remaining_reclaimable_bytes, 59.6 err_msg("remaining reclaimable bytes inconsistent " 59.7 - "from region: "SIZE_FORMAT" remaining: "SIZE_FORMAT, 59.8 + "from region: " SIZE_FORMAT " remaining: " SIZE_FORMAT, 59.9 hr->reclaimable_bytes(), _remaining_reclaimable_bytes)); 59.10 _remaining_reclaimable_bytes -= hr->reclaimable_bytes(); 59.11 _curr_index += 1;
60.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Fri Jul 27 11:47:10 2018 +0100 60.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp Sat Aug 04 12:53:22 2018 +0100 60.3 @@ -284,7 +284,7 @@ 60.4 if (PrintGCDetails && Verbose) { 60.5 // Failed to double capacity, continue; 60.6 gclog_or_tty->print(" (benign) Failed to expand marking stack capacity from " 60.7 - SIZE_FORMAT"K to " SIZE_FORMAT"K", 60.8 + SIZE_FORMAT "K to " SIZE_FORMAT "K", 60.9 _capacity / K, new_capacity / K); 60.10 } 60.11 } 60.12 @@ -581,7 +581,7 @@ 60.13 _verbose_level = verbose_level; 60.14 60.15 if (verbose_low()) { 60.16 - gclog_or_tty->print_cr("[global] init, heap start = "PTR_FORMAT", " 60.17 + gclog_or_tty->print_cr("[global] init, heap start = " PTR_FORMAT", " 60.18 "heap end = " INTPTR_FORMAT, p2i(_heap_start), p2i(_heap_end)); 60.19 } 60.20 60.21 @@ -837,7 +837,7 @@ 60.22 // in a STW phase. 60.23 assert(!concurrent_marking_in_progress(), "invariant"); 60.24 assert(out_of_regions(), 60.25 - err_msg("only way to get here: _finger: "PTR_FORMAT", _heap_end: "PTR_FORMAT, 60.26 + err_msg("only way to get here: _finger: " PTR_FORMAT ", _heap_end: " PTR_FORMAT, 60.27 p2i(_finger), p2i(_heap_end))); 60.28 } 60.29 } 60.30 @@ -1452,7 +1452,7 @@ 60.31 60.32 assert(start <= hr->end() && start <= ntams && ntams <= hr->end(), 60.33 err_msg("Preconditions not met - " 60.34 - "start: "PTR_FORMAT", ntams: "PTR_FORMAT", end: "PTR_FORMAT, 60.35 + "start: " PTR_FORMAT ", ntams: " PTR_FORMAT ", end: " PTR_FORMAT, 60.36 p2i(start), p2i(ntams), p2i(hr->end()))); 60.37 60.38 // Find the first marked object at or after "start". 60.39 @@ -1769,10 +1769,10 @@ 60.40 } 60.41 60.42 assert(end_idx <= _card_bm->size(), 60.43 - err_msg("oob: end_idx= "SIZE_FORMAT", bitmap size= "SIZE_FORMAT, 60.44 + err_msg("oob: end_idx= " SIZE_FORMAT ", bitmap size= " SIZE_FORMAT, 60.45 end_idx, _card_bm->size())); 60.46 assert(start_idx < _card_bm->size(), 60.47 - err_msg("oob: start_idx= "SIZE_FORMAT", bitmap size= "SIZE_FORMAT, 60.48 + err_msg("oob: start_idx= " SIZE_FORMAT ", bitmap size= " SIZE_FORMAT, 60.49 start_idx, _card_bm->size())); 60.50 60.51 _cm->set_card_bitmap_range(_card_bm, start_idx, end_idx, true /* is_par */); 60.52 @@ -2277,7 +2277,7 @@ 60.53 oop obj = oopDesc::load_decode_heap_oop(p); 60.54 if (_cm->verbose_high()) { 60.55 gclog_or_tty->print_cr("\t[%u] we're looking at location " 60.56 - "*"PTR_FORMAT" = "PTR_FORMAT, 60.57 + "*" PTR_FORMAT " = " PTR_FORMAT, 60.58 _task->worker_id(), p2i(p), p2i((void*) obj)); 60.59 } 60.60 60.61 @@ -2846,7 +2846,7 @@ 60.62 } 60.63 } 60.64 60.65 - _out->print_cr(" "PTR_FORMAT": "PTR_FORMAT"%s%s", 60.66 + _out->print_cr(" " PTR_FORMAT ": " PTR_FORMAT "%s%s", 60.67 p2i(p), p2i((void*) obj), str, str2); 60.68 } 60.69 }; 60.70 @@ -2873,7 +2873,7 @@ 60.71 bool print_it = _all || over_tams || marked; 60.72 60.73 if (print_it) { 60.74 - _out->print_cr(" "PTR_FORMAT"%s", 60.75 + _out->print_cr(" " PTR_FORMAT "%s", 60.76 p2i((void *)o), (over_tams) ? " >" : (marked) ? " M" : ""); 60.77 PrintReachableOopClosure oopCl(_out, _vo, _all); 60.78 o->oop_iterate_no_header(&oopCl); 60.79 @@ -2894,7 +2894,7 @@ 60.80 HeapWord* e = hr->end(); 60.81 HeapWord* t = hr->top(); 60.82 HeapWord* p = _g1h->top_at_mark_start(hr, _vo); 60.83 - _out->print_cr("** ["PTR_FORMAT", "PTR_FORMAT"] top: "PTR_FORMAT" " 60.84 + _out->print_cr("** [" PTR_FORMAT ", " PTR_FORMAT "] top: " PTR_FORMAT " " 60.85 "TAMS: " PTR_FORMAT, p2i(b), p2i(e), p2i(t), p2i(p)); 60.86 _out->cr(); 60.87 60.88 @@ -3018,9 +3018,9 @@ 60.89 HeapWord* limit = curr_region->next_top_at_mark_start(); 60.90 60.91 if (verbose_low()) { 60.92 - gclog_or_tty->print_cr("[%u] curr_region = "PTR_FORMAT" " 60.93 - "["PTR_FORMAT", "PTR_FORMAT"), " 60.94 - "limit = "PTR_FORMAT, 60.95 + gclog_or_tty->print_cr("[%u] curr_region = " PTR_FORMAT " " 60.96 + "[" PTR_FORMAT ", " PTR_FORMAT "), " 60.97 + "limit = " PTR_FORMAT, 60.98 worker_id, p2i(curr_region), p2i(bottom), p2i(end), p2i(limit)); 60.99 } 60.100 60.101 @@ -3035,7 +3035,7 @@ 60.102 60.103 if (limit > bottom) { 60.104 if (verbose_low()) { 60.105 - gclog_or_tty->print_cr("[%u] region "PTR_FORMAT" is not empty, " 60.106 + gclog_or_tty->print_cr("[%u] region " PTR_FORMAT " is not empty, " 60.107 "returning it ", worker_id, p2i(curr_region)); 60.108 } 60.109 return curr_region; 60.110 @@ -3043,7 +3043,7 @@ 60.111 assert(limit == bottom, 60.112 "the region limit should be at bottom"); 60.113 if (verbose_low()) { 60.114 - gclog_or_tty->print_cr("[%u] region "PTR_FORMAT" is empty, " 60.115 + gclog_or_tty->print_cr("[%u] region " PTR_FORMAT " is empty, " 60.116 "returning NULL", worker_id, p2i(curr_region)); 60.117 } 60.118 // we return NULL and the caller should try calling 60.119 @@ -3055,13 +3055,13 @@ 60.120 if (verbose_low()) { 60.121 if (curr_region == NULL) { 60.122 gclog_or_tty->print_cr("[%u] found uncommitted region, moving finger, " 60.123 - "global finger = "PTR_FORMAT", " 60.124 - "our finger = "PTR_FORMAT, 60.125 + "global finger = " PTR_FORMAT ", " 60.126 + "our finger = " PTR_FORMAT, 60.127 worker_id, p2i(_finger), p2i(finger)); 60.128 } else { 60.129 gclog_or_tty->print_cr("[%u] somebody else moved the finger, " 60.130 - "global finger = "PTR_FORMAT", " 60.131 - "our finger = "PTR_FORMAT, 60.132 + "global finger = " PTR_FORMAT ", " 60.133 + "our finger = " PTR_FORMAT, 60.134 worker_id, p2i(_finger), p2i(finger)); 60.135 } 60.136 } 60.137 @@ -3097,7 +3097,7 @@ 60.138 60.139 void do_object_work(oop obj) { 60.140 guarantee(!_g1h->obj_in_cs(obj), 60.141 - err_msg("obj: "PTR_FORMAT" in CSet, phase: %s, info: %d", 60.142 + err_msg("obj: " PTR_FORMAT " in CSet, phase: %s, info: %d", 60.143 p2i((void*) obj), phase_str(), _info)); 60.144 } 60.145 60.146 @@ -3158,7 +3158,7 @@ 60.147 // here. 60.148 HeapRegion* global_hr = _g1h->heap_region_containing_raw(global_finger); 60.149 guarantee(global_hr == NULL || global_finger == global_hr->bottom(), 60.150 - err_msg("global finger: "PTR_FORMAT" region: "HR_FORMAT, 60.151 + err_msg("global finger: " PTR_FORMAT " region: " HR_FORMAT, 60.152 p2i(global_finger), HR_FORMAT_PARAMS(global_hr))); 60.153 } 60.154 60.155 @@ -3172,7 +3172,7 @@ 60.156 HeapRegion* task_hr = _g1h->heap_region_containing_raw(task_finger); 60.157 guarantee(task_hr == NULL || task_finger == task_hr->bottom() || 60.158 !task_hr->in_collection_set(), 60.159 - err_msg("task finger: "PTR_FORMAT" region: "HR_FORMAT, 60.160 + err_msg("task finger: " PTR_FORMAT " region: " HR_FORMAT, 60.161 p2i(task_finger), HR_FORMAT_PARAMS(task_hr))); 60.162 } 60.163 } 60.164 @@ -3214,8 +3214,8 @@ 60.165 60.166 assert(start <= limit && limit <= hr->top() && hr->top() <= hr->end(), 60.167 err_msg("Preconditions not met - " 60.168 - "start: "PTR_FORMAT", limit: "PTR_FORMAT", " 60.169 - "top: "PTR_FORMAT", end: "PTR_FORMAT, 60.170 + "start: " PTR_FORMAT ", limit: " PTR_FORMAT ", " 60.171 + "top: " PTR_FORMAT ", end: " PTR_FORMAT, 60.172 p2i(start), p2i(limit), p2i(hr->top()), p2i(hr->end()))); 60.173 60.174 assert(hr->next_marked_bytes() == 0, "Precondition"); 60.175 @@ -3494,7 +3494,7 @@ 60.176 #ifndef PRODUCT 60.177 // for debugging purposes 60.178 void ConcurrentMark::print_finger() { 60.179 - gclog_or_tty->print_cr("heap ["PTR_FORMAT", "PTR_FORMAT"), global finger = "PTR_FORMAT, 60.180 + gclog_or_tty->print_cr("heap [" PTR_FORMAT ", " PTR_FORMAT "), global finger = " PTR_FORMAT, 60.181 p2i(_heap_start), p2i(_heap_end), p2i(_finger)); 60.182 for (uint i = 0; i < _max_worker_id; ++i) { 60.183 gclog_or_tty->print(" %u: " PTR_FORMAT, i, p2i(_tasks[i]->finger())); 60.184 @@ -3579,7 +3579,7 @@ 60.185 "claim_region() should have filtered out continues humongous regions"); 60.186 60.187 if (_cm->verbose_low()) { 60.188 - gclog_or_tty->print_cr("[%u] setting up for region "PTR_FORMAT, 60.189 + gclog_or_tty->print_cr("[%u] setting up for region " PTR_FORMAT, 60.190 _worker_id, p2i(hr)); 60.191 } 60.192 60.193 @@ -3596,7 +3596,7 @@ 60.194 if (limit == bottom) { 60.195 if (_cm->verbose_low()) { 60.196 gclog_or_tty->print_cr("[%u] found an empty region " 60.197 - "["PTR_FORMAT", "PTR_FORMAT")", 60.198 + "[" PTR_FORMAT ", " PTR_FORMAT ")", 60.199 _worker_id, p2i(bottom), p2i(limit)); 60.200 } 60.201 // The region was collected underneath our feet. 60.202 @@ -3628,7 +3628,7 @@ 60.203 void CMTask::giveup_current_region() { 60.204 assert(_curr_region != NULL, "invariant"); 60.205 if (_cm->verbose_low()) { 60.206 - gclog_or_tty->print_cr("[%u] giving up region "PTR_FORMAT, 60.207 + gclog_or_tty->print_cr("[%u] giving up region " PTR_FORMAT, 60.208 _worker_id, p2i(_curr_region)); 60.209 } 60.210 clear_region_fields(); 60.211 @@ -3750,7 +3750,7 @@ 60.212 60.213 if (_cm->verbose_medium()) { 60.214 gclog_or_tty->print_cr("[%u] regular clock, interval = %1.2lfms, " 60.215 - "scanned = "SIZE_FORMAT"%s, refs reached = "SIZE_FORMAT"%s", 60.216 + "scanned = " SIZE_FORMAT "%s, refs reached = " SIZE_FORMAT "%s", 60.217 _worker_id, last_interval_ms, 60.218 _words_scanned, 60.219 (_words_scanned >= _words_scanned_limit) ? " (*)" : "", 60.220 @@ -3919,7 +3919,7 @@ 60.221 statsOnly( ++_local_pops ); 60.222 60.223 if (_cm->verbose_high()) { 60.224 - gclog_or_tty->print_cr("[%u] popped "PTR_FORMAT, _worker_id, 60.225 + gclog_or_tty->print_cr("[%u] popped " PTR_FORMAT, _worker_id, 60.226 p2i((void*) obj)); 60.227 } 60.228 60.229 @@ -4272,8 +4272,8 @@ 60.230 60.231 if (_cm->verbose_low()) { 60.232 gclog_or_tty->print_cr("[%u] we're scanning part " 60.233 - "["PTR_FORMAT", "PTR_FORMAT") " 60.234 - "of region "HR_FORMAT, 60.235 + "[" PTR_FORMAT ", " PTR_FORMAT ") " 60.236 + "of region " HR_FORMAT, 60.237 _worker_id, p2i(_finger), p2i(_region_limit), 60.238 HR_FORMAT_PARAMS(_curr_region)); 60.239 } 60.240 @@ -4360,7 +4360,7 @@ 60.241 60.242 if (_cm->verbose_low()) { 60.243 gclog_or_tty->print_cr("[%u] we successfully claimed " 60.244 - "region "PTR_FORMAT, 60.245 + "region " PTR_FORMAT, 60.246 _worker_id, p2i(claimed_region)); 60.247 } 60.248 60.249 @@ -4421,7 +4421,7 @@ 60.250 60.251 if (_cm->try_stealing(_worker_id, &_hash_seed, obj)) { 60.252 if (_cm->verbose_medium()) { 60.253 - gclog_or_tty->print_cr("[%u] stolen "PTR_FORMAT" successfully", 60.254 + gclog_or_tty->print_cr("[%u] stolen " PTR_FORMAT " successfully", 60.255 _worker_id, p2i((void*) obj)); 60.256 } 60.257 60.258 @@ -4629,7 +4629,7 @@ 60.259 // identify them easily in a large log file. 60.260 #define G1PPRL_LINE_PREFIX "###" 60.261 60.262 -#define G1PPRL_ADDR_BASE_FORMAT " "PTR_FORMAT"-"PTR_FORMAT 60.263 +#define G1PPRL_ADDR_BASE_FORMAT " " PTR_FORMAT "-" PTR_FORMAT 60.264 #ifdef _LP64 60.265 #define G1PPRL_ADDR_BASE_H_FORMAT " %37s" 60.266 #else // _LP64 60.267 @@ -4639,16 +4639,16 @@ 60.268 // For per-region info 60.269 #define G1PPRL_TYPE_FORMAT " %-4s" 60.270 #define G1PPRL_TYPE_H_FORMAT " %4s" 60.271 -#define G1PPRL_BYTE_FORMAT " "SIZE_FORMAT_W(9) 60.272 +#define G1PPRL_BYTE_FORMAT " " SIZE_FORMAT_W(9) 60.273 #define G1PPRL_BYTE_H_FORMAT " %9s" 60.274 #define G1PPRL_DOUBLE_FORMAT " %14.1f" 60.275 #define G1PPRL_DOUBLE_H_FORMAT " %14s" 60.276 60.277 // For summary info 60.278 -#define G1PPRL_SUM_ADDR_FORMAT(tag) " "tag":"G1PPRL_ADDR_BASE_FORMAT 60.279 -#define G1PPRL_SUM_BYTE_FORMAT(tag) " "tag": "SIZE_FORMAT 60.280 -#define G1PPRL_SUM_MB_FORMAT(tag) " "tag": %1.2f MB" 60.281 -#define G1PPRL_SUM_MB_PERC_FORMAT(tag) G1PPRL_SUM_MB_FORMAT(tag)" / %1.2f %%" 60.282 +#define G1PPRL_SUM_ADDR_FORMAT(tag) " " tag ":" G1PPRL_ADDR_BASE_FORMAT 60.283 +#define G1PPRL_SUM_BYTE_FORMAT(tag) " " tag ": " SIZE_FORMAT 60.284 +#define G1PPRL_SUM_MB_FORMAT(tag) " " tag ": %1.2f MB" 60.285 +#define G1PPRL_SUM_MB_PERC_FORMAT(tag) G1PPRL_SUM_MB_FORMAT(tag) " / %1.2f %%" 60.286 60.287 G1PrintRegionLivenessInfoClosure:: 60.288 G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name)
61.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp Fri Jul 27 11:47:10 2018 +0100 61.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp Sat Aug 04 12:53:22 2018 +0100 61.3 @@ -196,8 +196,8 @@ 61.4 assert(_bmStartWord <= (addr) && (addr) < (_bmStartWord + _bmWordSize), \ 61.5 "outside underlying space?"); \ 61.6 assert(G1CollectedHeap::heap()->is_in_exact(addr), \ 61.7 - err_msg("Trying to access not available bitmap "PTR_FORMAT \ 61.8 - " corresponding to "PTR_FORMAT" (%u)", \ 61.9 + err_msg("Trying to access not available bitmap " PTR_FORMAT \ 61.10 + " corresponding to " PTR_FORMAT " (%u)", \ 61.11 p2i(this), p2i(addr), G1CollectedHeap::heap()->addr_to_region(addr))); 61.12 61.13 inline void CMBitMap::mark(HeapWord* addr) { 61.14 @@ -343,7 +343,7 @@ 61.15 61.16 inline void CMTask::deal_with_reference(oop obj) { 61.17 if (_cm->verbose_high()) { 61.18 - gclog_or_tty->print_cr("[%u] we're dealing with reference = "PTR_FORMAT, 61.19 + gclog_or_tty->print_cr("[%u] we're dealing with reference = " PTR_FORMAT, 61.20 _worker_id, p2i((void*) obj)); 61.21 } 61.22 61.23 @@ -392,7 +392,7 @@ 61.24 // assert that word_size is under an upper bound which is its 61.25 // containing region's capacity. 61.26 assert(word_size * HeapWordSize <= hr->capacity(), 61.27 - err_msg("size: "SIZE_FORMAT" capacity: "SIZE_FORMAT" "HR_FORMAT, 61.28 + err_msg("size: " SIZE_FORMAT " capacity: " SIZE_FORMAT " " HR_FORMAT, 61.29 word_size * HeapWordSize, hr->capacity(), 61.30 HR_FORMAT_PARAMS(hr))); 61.31
62.1 --- a/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp Fri Jul 27 11:47:10 2018 +0100 62.2 +++ b/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp Sat Aug 04 12:53:22 2018 +0100 62.3 @@ -140,7 +140,7 @@ 62.4 } 62.5 62.6 void G1AllocRegion::fill_in_ext_msg(ar_ext_msg* msg, const char* message) { 62.7 - msg->append("[%s] %s c: %u b: %s r: "PTR_FORMAT" u: "SIZE_FORMAT, 62.8 + msg->append("[%s] %s c: %u b: %s r: " PTR_FORMAT " u: " SIZE_FORMAT, 62.9 _name, message, _count, BOOL_TO_STR(_bot_updates), 62.10 p2i(_alloc_region), _used_bytes_before); 62.11 } 62.12 @@ -217,7 +217,7 @@ 62.13 62.14 if (G1_ALLOC_REGION_TRACING > 1) { 62.15 if (result != NULL) { 62.16 - jio_snprintf(rest_buffer, buffer_length, SIZE_FORMAT" "PTR_FORMAT, 62.17 + jio_snprintf(rest_buffer, buffer_length, SIZE_FORMAT " " PTR_FORMAT, 62.18 word_size, result); 62.19 } else if (word_size != 0) { 62.20 jio_snprintf(rest_buffer, buffer_length, SIZE_FORMAT, word_size);
63.1 --- a/src/share/vm/gc_implementation/g1/g1Allocator.hpp Fri Jul 27 11:47:10 2018 +0100 63.2 +++ b/src/share/vm/gc_implementation/g1/g1Allocator.hpp Sat Aug 04 12:53:22 2018 +0100 63.3 @@ -73,7 +73,7 @@ 63.4 63.5 void decrease_used(size_t bytes) { 63.6 assert(_summary_bytes_used >= bytes, 63.7 - err_msg("invariant: _summary_bytes_used: "SIZE_FORMAT" should be >= bytes: "SIZE_FORMAT, 63.8 + err_msg("invariant: _summary_bytes_used: " SIZE_FORMAT " should be >= bytes: " SIZE_FORMAT, 63.9 _summary_bytes_used, bytes)); 63.10 _summary_bytes_used -= bytes; 63.11 }
64.1 --- a/src/share/vm/gc_implementation/g1/g1BiasedArray.cpp Fri Jul 27 11:47:10 2018 +0100 64.2 +++ b/src/share/vm/gc_implementation/g1/g1BiasedArray.cpp Sat Aug 04 12:53:22 2018 +0100 64.3 @@ -36,19 +36,19 @@ 64.4 #ifndef PRODUCT 64.5 void G1BiasedMappedArrayBase::verify_index(idx_t index) const { 64.6 guarantee(_base != NULL, "Array not initialized"); 64.7 - guarantee(index < length(), err_msg("Index out of bounds index: "SIZE_FORMAT" length: "SIZE_FORMAT, index, length())); 64.8 + guarantee(index < length(), err_msg("Index out of bounds index: " SIZE_FORMAT " length: " SIZE_FORMAT, index, length())); 64.9 } 64.10 64.11 void G1BiasedMappedArrayBase::verify_biased_index(idx_t biased_index) const { 64.12 guarantee(_biased_base != NULL, "Array not initialized"); 64.13 guarantee(biased_index >= bias() && biased_index < (bias() + length()), 64.14 - err_msg("Biased index out of bounds, index: "SIZE_FORMAT" bias: "SIZE_FORMAT" length: "SIZE_FORMAT, biased_index, bias(), length())); 64.15 + err_msg("Biased index out of bounds, index: " SIZE_FORMAT " bias: " SIZE_FORMAT " length: " SIZE_FORMAT, biased_index, bias(), length())); 64.16 } 64.17 64.18 void G1BiasedMappedArrayBase::verify_biased_index_inclusive_end(idx_t biased_index) const { 64.19 guarantee(_biased_base != NULL, "Array not initialized"); 64.20 guarantee(biased_index >= bias() && biased_index <= (bias() + length()), 64.21 - err_msg("Biased index out of inclusive bounds, index: "SIZE_FORMAT" bias: "SIZE_FORMAT" length: "SIZE_FORMAT, biased_index, bias(), length())); 64.22 + err_msg("Biased index out of inclusive bounds, index: " SIZE_FORMAT " bias: " SIZE_FORMAT " length: " SIZE_FORMAT, biased_index, bias(), length())); 64.23 } 64.24 64.25 class TestMappedArray : public G1BiasedMappedArray<int> {
65.1 --- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp Fri Jul 27 11:47:10 2018 +0100 65.2 +++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp Sat Aug 04 12:53:22 2018 +0100 65.3 @@ -385,11 +385,11 @@ 65.4 HeapWord* card_addr = _array->address_for_index(card); 65.5 HeapWord* block_start = block_start_const(card_addr); 65.6 if (block_start != obj_start) { 65.7 - gclog_or_tty->print_cr("block start: "PTR_FORMAT" is incorrect - " 65.8 - "card index: "SIZE_FORMAT" " 65.9 - "card addr: "PTR_FORMAT" BOT entry: %u " 65.10 - "obj: "PTR_FORMAT" word size: "SIZE_FORMAT" " 65.11 - "cards: ["SIZE_FORMAT","SIZE_FORMAT"]", 65.12 + gclog_or_tty->print_cr("block start: " PTR_FORMAT " is incorrect - " 65.13 + "card index: " SIZE_FORMAT " " 65.14 + "card addr: " PTR_FORMAT " BOT entry: %u " 65.15 + "obj: " PTR_FORMAT " word size: " SIZE_FORMAT " " 65.16 + "cards: [" SIZE_FORMAT "," SIZE_FORMAT "]", 65.17 block_start, card, card_addr, 65.18 _array->offset_array(card), 65.19 obj_start, word_size, first_card, last_card); 65.20 @@ -404,11 +404,11 @@ 65.21 G1BlockOffsetArray::print_on(outputStream* out) { 65.22 size_t from_index = _array->index_for(_bottom); 65.23 size_t to_index = _array->index_for(_end); 65.24 - out->print_cr(">> BOT for area ["PTR_FORMAT","PTR_FORMAT") " 65.25 - "cards ["SIZE_FORMAT","SIZE_FORMAT")", 65.26 + out->print_cr(">> BOT for area [" PTR_FORMAT "," PTR_FORMAT ") " 65.27 + "cards [" SIZE_FORMAT "," SIZE_FORMAT ")", 65.28 _bottom, _end, from_index, to_index); 65.29 for (size_t i = from_index; i < to_index; ++i) { 65.30 - out->print_cr(" entry "SIZE_FORMAT_W(8)" | "PTR_FORMAT" : %3u", 65.31 + out->print_cr(" entry " SIZE_FORMAT_W(8) " | " PTR_FORMAT " : %3u", 65.32 i, _array->address_for_index(i), 65.33 (uint) _array->offset_array(i)); 65.34 } 65.35 @@ -488,7 +488,7 @@ 65.36 void 65.37 G1BlockOffsetArrayContigSpace::print_on(outputStream* out) { 65.38 G1BlockOffsetArray::print_on(out); 65.39 - out->print_cr(" next offset threshold: "PTR_FORMAT, _next_offset_threshold); 65.40 - out->print_cr(" next offset index: "SIZE_FORMAT, _next_offset_index); 65.41 + out->print_cr(" next offset threshold: " PTR_FORMAT, _next_offset_threshold); 65.42 + out->print_cr(" next offset index: " SIZE_FORMAT, _next_offset_index); 65.43 } 65.44 #endif // !PRODUCT
66.1 --- a/src/share/vm/gc_implementation/g1/g1CardCounts.cpp Fri Jul 27 11:47:10 2018 +0100 66.2 +++ b/src/share/vm/gc_implementation/g1/g1CardCounts.cpp Sat Aug 04 12:53:22 2018 +0100 66.3 @@ -44,7 +44,7 @@ 66.4 void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) { 66.5 if (has_count_table()) { 66.6 assert(from_card_num < to_card_num, 66.7 - err_msg("Wrong order? from: " SIZE_FORMAT ", to: "SIZE_FORMAT, 66.8 + err_msg("Wrong order? from: " SIZE_FORMAT ", to: " SIZE_FORMAT, 66.9 from_card_num, to_card_num)); 66.10 Copy::fill_to_bytes(&_card_counts[from_card_num], (to_card_num - from_card_num)); 66.11 } 66.12 @@ -87,7 +87,7 @@ 66.13 if (has_count_table()) { 66.14 size_t card_num = ptr_2_card_num(card_ptr); 66.15 assert(card_num < _reserved_max_card_num, 66.16 - err_msg("Card "SIZE_FORMAT" outside of card counts table (max size "SIZE_FORMAT")", 66.17 + err_msg("Card " SIZE_FORMAT " outside of card counts table (max size " SIZE_FORMAT ")", 66.18 card_num, _reserved_max_card_num)); 66.19 count = (uint) _card_counts[card_num]; 66.20 if (count < G1ConcRSHotCardLimit) {
67.1 --- a/src/share/vm/gc_implementation/g1/g1CardCounts.hpp Fri Jul 27 11:47:10 2018 +0100 67.2 +++ b/src/share/vm/gc_implementation/g1/g1CardCounts.hpp Sat Aug 04 12:53:22 2018 +0100 67.3 @@ -91,7 +91,7 @@ 67.4 67.5 jbyte* card_num_2_ptr(size_t card_num) { 67.6 assert(card_num >= 0 && card_num < _reserved_max_card_num, 67.7 - err_msg("card num out of range: "SIZE_FORMAT, card_num)); 67.8 + err_msg("card num out of range: " SIZE_FORMAT, card_num)); 67.9 return (jbyte*) (_ct_bot + card_num); 67.10 } 67.11
68.1 --- a/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp Fri Jul 27 11:47:10 2018 +0100 68.2 +++ b/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp Sat Aug 04 12:53:22 2018 +0100 68.3 @@ -352,11 +352,11 @@ 68.4 assert(set1.is_empty(), "Code root set must be initially empty but is not."); 68.5 68.6 assert(G1CodeRootSet::static_mem_size() == sizeof(void*), 68.7 - err_msg("The code root set's static memory usage is incorrect, "SIZE_FORMAT" bytes", G1CodeRootSet::static_mem_size())); 68.8 + err_msg("The code root set's static memory usage is incorrect, " SIZE_FORMAT " bytes", G1CodeRootSet::static_mem_size())); 68.9 68.10 set1.add((nmethod*)1); 68.11 assert(set1.length() == 1, err_msg("Added exactly one element, but set contains " 68.12 - SIZE_FORMAT" elements", set1.length())); 68.13 + SIZE_FORMAT " elements", set1.length())); 68.14 68.15 const size_t num_to_add = (size_t)G1CodeRootSet::Threshold + 1; 68.16 68.17 @@ -365,14 +365,14 @@ 68.18 } 68.19 assert(set1.length() == 1, 68.20 err_msg("Duplicate detection should not have increased the set size but " 68.21 - "is "SIZE_FORMAT, set1.length())); 68.22 + "is " SIZE_FORMAT, set1.length())); 68.23 68.24 for (size_t i = 2; i <= num_to_add; i++) { 68.25 set1.add((nmethod*)(uintptr_t)(i)); 68.26 } 68.27 assert(set1.length() == num_to_add, 68.28 - err_msg("After adding in total "SIZE_FORMAT" distinct code roots, they " 68.29 - "need to be in the set, but there are only "SIZE_FORMAT, 68.30 + err_msg("After adding in total " SIZE_FORMAT " distinct code roots, they " 68.31 + "need to be in the set, but there are only " SIZE_FORMAT, 68.32 num_to_add, set1.length())); 68.33 68.34 assert(CodeRootSetTable::_purge_list != NULL, "should have grown to large hashtable"); 68.35 @@ -387,7 +387,7 @@ 68.36 } 68.37 } 68.38 assert(num_popped == num_to_add, 68.39 - err_msg("Managed to pop "SIZE_FORMAT" code roots, but only "SIZE_FORMAT" " 68.40 + err_msg("Managed to pop " SIZE_FORMAT " code roots, but only " SIZE_FORMAT " " 68.41 "were added", num_popped, num_to_add)); 68.42 assert(CodeRootSetTable::_purge_list != NULL, "should have grown to large hashtable"); 68.43
69.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Jul 27 11:47:10 2018 +0100 69.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Sat Aug 04 12:53:22 2018 +0100 69.3 @@ -230,7 +230,7 @@ 69.4 HeapRegion* last = NULL; 69.5 while (curr != NULL) { 69.6 if (!curr->is_young()) { 69.7 - gclog_or_tty->print_cr("### YOUNG REGION "PTR_FORMAT"-"PTR_FORMAT" " 69.8 + gclog_or_tty->print_cr("### YOUNG REGION " PTR_FORMAT "-" PTR_FORMAT " " 69.9 "incorrectly tagged (y: %d, surv: %d)", 69.10 curr->bottom(), curr->end(), 69.11 curr->is_young(), curr->is_survivor()); 69.12 @@ -359,7 +359,7 @@ 69.13 if (curr == NULL) 69.14 gclog_or_tty->print_cr(" empty"); 69.15 while (curr != NULL) { 69.16 - gclog_or_tty->print_cr(" "HR_FORMAT", P: "PTR_FORMAT ", N: "PTR_FORMAT", age: %4d", 69.17 + gclog_or_tty->print_cr(" " HR_FORMAT ", P: " PTR_FORMAT ", N: " PTR_FORMAT ", age: %4d", 69.18 HR_FORMAT_PARAMS(curr), 69.19 curr->prev_top_at_mark_start(), 69.20 curr->next_top_at_mark_start(), 69.21 @@ -490,7 +490,7 @@ 69.22 gclog_or_tty->print_cr("Log entries = %d, dirty cards = %d.", 69.23 clear.num_processed(), orig_count); 69.24 guarantee(redirty.num_processed() == clear.num_processed(), 69.25 - err_msg("Redirtied "SIZE_FORMAT" cards, bug cleared "SIZE_FORMAT, 69.26 + err_msg("Redirtied " SIZE_FORMAT " cards, bug cleared " SIZE_FORMAT, 69.27 redirty.num_processed(), clear.num_processed())); 69.28 69.29 CountNonCleanMemRegionClosure count3(this); 69.30 @@ -528,7 +528,7 @@ 69.31 HeapRegion* res = _hrm.allocate_free_region(is_old); 69.32 if (G1ConcRegionFreeingVerbose) { 69.33 gclog_or_tty->print_cr("G1ConcRegionFreeing [region alloc] : " 69.34 - "allocated "HR_FORMAT" from secondary_free_list", 69.35 + "allocated " HR_FORMAT " from secondary_free_list", 69.36 HR_FORMAT_PARAMS(res)); 69.37 } 69.38 return res; 69.39 @@ -1597,8 +1597,8 @@ 69.40 // This assert only makes sense here, before we adjust them 69.41 // with respect to the min and max heap size. 69.42 assert(minimum_desired_capacity <= maximum_desired_capacity, 69.43 - err_msg("minimum_desired_capacity = "SIZE_FORMAT", " 69.44 - "maximum_desired_capacity = "SIZE_FORMAT, 69.45 + err_msg("minimum_desired_capacity = " SIZE_FORMAT ", " 69.46 + "maximum_desired_capacity = " SIZE_FORMAT, 69.47 minimum_desired_capacity, maximum_desired_capacity)); 69.48 69.49 // Should not be greater than the heap max size. No need to adjust 69.50 @@ -2256,7 +2256,7 @@ 69.51 virtual bool doHeapRegion(HeapRegion* hr) { 69.52 unsigned region_gc_time_stamp = hr->get_gc_time_stamp(); 69.53 if (_gc_time_stamp != region_gc_time_stamp) { 69.54 - gclog_or_tty->print_cr("Region "HR_FORMAT" has GC time stamp = %d, " 69.55 + gclog_or_tty->print_cr("Region " HR_FORMAT " has GC time stamp = %d, " 69.56 "expected %d", HR_FORMAT_PARAMS(hr), 69.57 region_gc_time_stamp, _gc_time_stamp); 69.58 _failures = true; 69.59 @@ -2679,7 +2679,7 @@ 69.60 } else if (r->continuesHumongous()) { 69.61 if (r->humongous_start_region() != _sh_region) { 69.62 gclog_or_tty->print_cr("Region " HR_FORMAT ", " 69.63 - "HS = "PTR_FORMAT", should be "PTR_FORMAT, 69.64 + "HS = " PTR_FORMAT ", should be " PTR_FORMAT, 69.65 HR_FORMAT_PARAMS(r), 69.66 r->humongous_start_region(), 69.67 _sh_region); 69.68 @@ -2991,10 +2991,10 @@ 69.69 if (!oopDesc::is_null(heap_oop)) { 69.70 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); 69.71 if (_g1h->is_obj_dead_cond(obj, _vo)) { 69.72 - gclog_or_tty->print_cr("Root location "PTR_FORMAT" " 69.73 - "points to dead obj "PTR_FORMAT, p, (void*) obj); 69.74 + gclog_or_tty->print_cr("Root location " PTR_FORMAT " " 69.75 + "points to dead obj " PTR_FORMAT, p, (void*) obj); 69.76 if (_vo == VerifyOption_G1UseMarkWord) { 69.77 - gclog_or_tty->print_cr(" Mark word: "PTR_FORMAT, (void*)(obj->mark())); 69.78 + gclog_or_tty->print_cr(" Mark word: " PTR_FORMAT, (void*)(obj->mark())); 69.79 } 69.80 obj->print_on(gclog_or_tty); 69.81 _failures = true; 69.82 @@ -3041,9 +3041,9 @@ 69.83 // Verify that the strong code root list for this region 69.84 // contains the nmethod 69.85 if (!hrrs->strong_code_roots_list_contains(_nm)) { 69.86 - gclog_or_tty->print_cr("Code root location "PTR_FORMAT" " 69.87 - "from nmethod "PTR_FORMAT" not in strong " 69.88 - "code roots for region ["PTR_FORMAT","PTR_FORMAT")", 69.89 + gclog_or_tty->print_cr("Code root location " PTR_FORMAT " " 69.90 + "from nmethod " PTR_FORMAT " not in strong " 69.91 + "code roots for region [" PTR_FORMAT "," PTR_FORMAT ")", 69.92 p, _nm, hr->bottom(), hr->end()); 69.93 _failures = true; 69.94 } 69.95 @@ -3173,7 +3173,7 @@ 69.96 if (o != NULL) { 69.97 HeapWord *start = (HeapWord *) o; 69.98 size_t word_sz = o->size(); 69.99 - gclog_or_tty->print("\nPrinting obj "PTR_FORMAT" of size " SIZE_FORMAT 69.100 + gclog_or_tty->print("\nPrinting obj " PTR_FORMAT " of size " SIZE_FORMAT 69.101 " isMarkedPrev %d isMarkedNext %d isAllocSince %d\n", 69.102 (void*) o, word_sz, 69.103 _g1->isMarkedPrev(o), 69.104 @@ -3184,7 +3184,7 @@ 69.105 int *val; 69.106 for (cur = start; cur < end; cur++) { 69.107 val = (int *) cur; 69.108 - gclog_or_tty->print("\t "PTR_FORMAT":"PTR_FORMAT"\n", val, *val); 69.109 + gclog_or_tty->print("\t " PTR_FORMAT ":" PTR_FORMAT "\n", val, *val); 69.110 } 69.111 } 69.112 } 69.113 @@ -3219,9 +3219,9 @@ 69.114 r->object_iterate(¬_dead_yet_cl); 69.115 if (_vo != VerifyOption_G1UseNextMarking) { 69.116 if (r->max_live_bytes() < not_dead_yet_cl.live_bytes()) { 69.117 - gclog_or_tty->print_cr("["PTR_FORMAT","PTR_FORMAT"] " 69.118 - "max_live_bytes "SIZE_FORMAT" " 69.119 - "< calculated "SIZE_FORMAT, 69.120 + gclog_or_tty->print_cr("[" PTR_FORMAT "," PTR_FORMAT "] " 69.121 + "max_live_bytes " SIZE_FORMAT " " 69.122 + "< calculated " SIZE_FORMAT, 69.123 r->bottom(), r->end(), 69.124 r->max_live_bytes(), 69.125 not_dead_yet_cl.live_bytes()); 69.126 @@ -3533,7 +3533,7 @@ 69.127 size_t occupied = hrrs->occupied(); 69.128 _occupied_sum += occupied; 69.129 69.130 - gclog_or_tty->print_cr("Printing RSet for region "HR_FORMAT, 69.131 + gclog_or_tty->print_cr("Printing RSet for region " HR_FORMAT, 69.132 HR_FORMAT_PARAMS(r)); 69.133 if (occupied == 0) { 69.134 gclog_or_tty->print_cr(" RSet is empty"); 69.135 @@ -3552,7 +3552,7 @@ 69.136 } 69.137 69.138 ~PrintRSetsClosure() { 69.139 - gclog_or_tty->print_cr("Occupied Sum: "SIZE_FORMAT, _occupied_sum); 69.140 + gclog_or_tty->print_cr("Occupied Sum: " SIZE_FORMAT, _occupied_sum); 69.141 gclog_or_tty->print_cr("========================================"); 69.142 gclog_or_tty->cr(); 69.143 } 69.144 @@ -4416,7 +4416,7 @@ 69.145 G1CollectedHeap::handle_evacuation_failure_par(G1ParScanThreadState* _par_scan_state, 69.146 oop old) { 69.147 assert(obj_in_cs(old), 69.148 - err_msg("obj: "PTR_FORMAT" should still be in the CSet", 69.149 + err_msg("obj: " PTR_FORMAT " should still be in the CSet", 69.150 (HeapWord*) old)); 69.151 markOop m = old->mark(); 69.152 oop forward_ptr = old->forward_to_atomic(old); 69.153 @@ -4450,7 +4450,7 @@ 69.154 // space for this object (old != forward_ptr) or they beat us in 69.155 // self-forwarding it (old == forward_ptr). 69.156 assert(old == forward_ptr || !obj_in_cs(forward_ptr), 69.157 - err_msg("obj: "PTR_FORMAT" forwarded to: "PTR_FORMAT" " 69.158 + err_msg("obj: " PTR_FORMAT " forwarded to: " PTR_FORMAT " " 69.159 "should not be in the CSet", 69.160 (HeapWord*) old, (HeapWord*) forward_ptr)); 69.161 return forward_ptr; 69.162 @@ -4837,16 +4837,16 @@ 69.163 69.164 ~G1StringSymbolTableUnlinkTask() { 69.165 guarantee(!_process_strings || !_do_in_parallel || StringTable::parallel_claimed_index() >= _initial_string_table_size, 69.166 - err_msg("claim value "INT32_FORMAT" after unlink less than initial string table size "INT32_FORMAT, 69.167 + err_msg("claim value " INT32_FORMAT " after unlink less than initial string table size " INT32_FORMAT, 69.168 StringTable::parallel_claimed_index(), _initial_string_table_size)); 69.169 guarantee(!_process_symbols || !_do_in_parallel || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size, 69.170 - err_msg("claim value "INT32_FORMAT" after unlink less than initial symbol table size "INT32_FORMAT, 69.171 + err_msg("claim value " INT32_FORMAT " after unlink less than initial symbol table size " INT32_FORMAT, 69.172 SymbolTable::parallel_claimed_index(), _initial_symbol_table_size)); 69.173 69.174 if (G1TraceStringSymbolTableScrubbing) { 69.175 gclog_or_tty->print_cr("Cleaned string and symbol table, " 69.176 - "strings: "SIZE_FORMAT" processed, "SIZE_FORMAT" removed, " 69.177 - "symbols: "SIZE_FORMAT" processed, "SIZE_FORMAT" removed", 69.178 + "strings: " SIZE_FORMAT " processed, " SIZE_FORMAT " removed, " 69.179 + "symbols: " SIZE_FORMAT " processed, " SIZE_FORMAT " removed", 69.180 strings_processed(), strings_removed(), 69.181 symbols_processed(), symbols_removed()); 69.182 } 69.183 @@ -6029,13 +6029,13 @@ 69.184 bool G1CollectedHeap::verify_no_bits_over_tams(const char* bitmap_name, CMBitMapRO* bitmap, 69.185 HeapWord* tams, HeapWord* end) { 69.186 guarantee(tams <= end, 69.187 - err_msg("tams: "PTR_FORMAT" end: "PTR_FORMAT, tams, end)); 69.188 + err_msg("tams: " PTR_FORMAT " end: " PTR_FORMAT, tams, end)); 69.189 HeapWord* result = bitmap->getNextMarkedWordAddress(tams, end); 69.190 if (result < end) { 69.191 gclog_or_tty->cr(); 69.192 - gclog_or_tty->print_cr("## wrong marked address on %s bitmap: "PTR_FORMAT, 69.193 + gclog_or_tty->print_cr("## wrong marked address on %s bitmap: " PTR_FORMAT, 69.194 bitmap_name, result); 69.195 - gclog_or_tty->print_cr("## %s tams: "PTR_FORMAT" end: "PTR_FORMAT, 69.196 + gclog_or_tty->print_cr("## %s tams: " PTR_FORMAT " end: " PTR_FORMAT, 69.197 bitmap_name, tams, end); 69.198 return false; 69.199 } 69.200 @@ -6061,7 +6061,7 @@ 69.201 res_n = verify_no_bits_over_tams("next", next_bitmap, ntams, end); 69.202 } 69.203 if (!res_p || !res_n) { 69.204 - gclog_or_tty->print_cr("#### Bitmap verification failed for "HR_FORMAT, 69.205 + gclog_or_tty->print_cr("#### Bitmap verification failed for " HR_FORMAT, 69.206 HR_FORMAT_PARAMS(hr)); 69.207 gclog_or_tty->print_cr("#### Caller: %s", caller); 69.208 return false; 69.209 @@ -6373,7 +6373,7 @@ 69.210 !r->rem_set()->is_empty()) { 69.211 69.212 if (G1TraceEagerReclaimHumongousObjects) { 69.213 - gclog_or_tty->print_cr("Live humongous region %u size "SIZE_FORMAT" start "PTR_FORMAT" length "UINT32_FORMAT" with remset "SIZE_FORMAT" code roots "SIZE_FORMAT" is marked %d reclaim candidate %d type array %d", 69.214 + gclog_or_tty->print_cr("Live humongous region %u size " SIZE_FORMAT " start " PTR_FORMAT " length " UINT32_FORMAT " with remset " SIZE_FORMAT " code roots " SIZE_FORMAT " is marked %d reclaim candidate %d type array %d", 69.215 region_idx, 69.216 obj->size()*HeapWordSize, 69.217 r->bottom(), 69.218 @@ -6395,7 +6395,7 @@ 69.219 r->bottom())); 69.220 69.221 if (G1TraceEagerReclaimHumongousObjects) { 69.222 - gclog_or_tty->print_cr("Dead humongous region %u size "SIZE_FORMAT" start "PTR_FORMAT" length "UINT32_FORMAT" with remset "SIZE_FORMAT" code roots "SIZE_FORMAT" is marked %d reclaim candidate %d type array %d", 69.223 + gclog_or_tty->print_cr("Dead humongous region %u size " SIZE_FORMAT " start " PTR_FORMAT " length " UINT32_FORMAT " with remset " SIZE_FORMAT " code roots " SIZE_FORMAT " is marked %d reclaim candidate %d type array %d", 69.224 region_idx, 69.225 obj->size()*HeapWordSize, 69.226 r->bottom(), 69.227 @@ -6551,7 +6551,7 @@ 69.228 NoYoungRegionsClosure() : _success(true) { } 69.229 bool doHeapRegion(HeapRegion* r) { 69.230 if (r->is_young()) { 69.231 - gclog_or_tty->print_cr("Region ["PTR_FORMAT", "PTR_FORMAT") tagged as young", 69.232 + gclog_or_tty->print_cr("Region [" PTR_FORMAT ", " PTR_FORMAT ") tagged as young", 69.233 r->bottom(), r->end()); 69.234 _success = false; 69.235 } 69.236 @@ -6680,7 +6680,7 @@ 69.237 } 69.238 assert(_allocator->used_unlocked() == recalculate_used(), 69.239 err_msg("inconsistent _allocator->used_unlocked(), " 69.240 - "value: "SIZE_FORMAT" recalculated: "SIZE_FORMAT, 69.241 + "value: " SIZE_FORMAT " recalculated: " SIZE_FORMAT, 69.242 _allocator->used_unlocked(), recalculate_used())); 69.243 } 69.244 69.245 @@ -6901,8 +6901,8 @@ 69.246 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); 69.247 HeapRegion* hr = _g1h->heap_region_containing(obj); 69.248 assert(!hr->continuesHumongous(), 69.249 - err_msg("trying to add code root "PTR_FORMAT" in continuation of humongous region "HR_FORMAT 69.250 - " starting at "HR_FORMAT, 69.251 + err_msg("trying to add code root " PTR_FORMAT " in continuation of humongous region " HR_FORMAT 69.252 + " starting at " HR_FORMAT, 69.253 _nm, HR_FORMAT_PARAMS(hr), HR_FORMAT_PARAMS(hr->humongous_start_region()))); 69.254 69.255 // HeapRegion::add_strong_code_root_locked() avoids adding duplicate entries. 69.256 @@ -6928,8 +6928,8 @@ 69.257 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); 69.258 HeapRegion* hr = _g1h->heap_region_containing(obj); 69.259 assert(!hr->continuesHumongous(), 69.260 - err_msg("trying to remove code root "PTR_FORMAT" in continuation of humongous region "HR_FORMAT 69.261 - " starting at "HR_FORMAT, 69.262 + err_msg("trying to remove code root " PTR_FORMAT " in continuation of humongous region " HR_FORMAT 69.263 + " starting at " HR_FORMAT, 69.264 _nm, HR_FORMAT_PARAMS(hr), HR_FORMAT_PARAMS(hr->humongous_start_region()))); 69.265 69.266 hr->remove_strong_code_root(_nm);
70.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Fri Jul 27 11:47:10 2018 +0100 70.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Sat Aug 04 12:53:22 2018 +0100 70.3 @@ -81,7 +81,7 @@ 70.4 70.5 inline uint G1CollectedHeap::addr_to_region(HeapWord* addr) const { 70.6 assert(is_in_reserved(addr), 70.7 - err_msg("Cannot calculate region index for address "PTR_FORMAT" that is outside of the heap ["PTR_FORMAT", "PTR_FORMAT")", 70.8 + err_msg("Cannot calculate region index for address " PTR_FORMAT " that is outside of the heap [" PTR_FORMAT ", " PTR_FORMAT ")", 70.9 p2i(addr), p2i(_reserved.start()), p2i(_reserved.end()))); 70.10 return (uint)(pointer_delta(addr, _reserved.start(), sizeof(uint8_t)) >> HeapRegion::LogOfHRGrainBytes); 70.11 } 70.12 @@ -94,7 +94,7 @@ 70.13 inline HeapRegion* G1CollectedHeap::heap_region_containing_raw(const T addr) const { 70.14 assert(addr != NULL, "invariant"); 70.15 assert(is_in_g1_reserved((const void*) addr), 70.16 - err_msg("Address "PTR_FORMAT" is outside of the heap ranging from ["PTR_FORMAT" to "PTR_FORMAT")", 70.17 + err_msg("Address " PTR_FORMAT " is outside of the heap ranging from [" PTR_FORMAT " to " PTR_FORMAT ")", 70.18 p2i((void*)addr), p2i(g1_reserved().start()), p2i(g1_reserved().end()))); 70.19 return _hrm.addr_to_region((HeapWord*) addr); 70.20 }
71.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Fri Jul 27 11:47:10 2018 +0100 71.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Sat Aug 04 12:53:22 2018 +0100 71.3 @@ -199,7 +199,7 @@ 71.4 const size_t region_size = HeapRegion::GrainWords; 71.5 if (YoungPLABSize > region_size || OldPLABSize > region_size) { 71.6 char buffer[128]; 71.7 - jio_snprintf(buffer, sizeof(buffer), "%sPLABSize should be at most "SIZE_FORMAT, 71.8 + jio_snprintf(buffer, sizeof(buffer), "%sPLABSize should be at most " SIZE_FORMAT, 71.9 OldPLABSize > region_size ? "Old" : "Young", region_size); 71.10 vm_exit_during_initialization(buffer); 71.11 } 71.12 @@ -846,7 +846,7 @@ 71.13 update_survivors_policy(); 71.14 71.15 assert(_g1->used() == _g1->recalculate_used(), 71.16 - err_msg("sanity, used: "SIZE_FORMAT" recalculate_used: "SIZE_FORMAT, 71.17 + err_msg("sanity, used: " SIZE_FORMAT " recalculate_used: " SIZE_FORMAT, 71.18 _g1->used(), _g1->recalculate_used())); 71.19 71.20 double s_w_t_ms = (start_time_sec - _stop_world_start) * 1000.0; 71.21 @@ -1231,10 +1231,10 @@ 71.22 (_young_list_target_length * HeapRegion::GrainBytes) - survivor_used_bytes_after_gc; 71.23 71.24 gclog_or_tty->print( 71.25 - " [Eden: "EXT_SIZE_FORMAT"("EXT_SIZE_FORMAT")->"EXT_SIZE_FORMAT"("EXT_SIZE_FORMAT") " 71.26 - "Survivors: "EXT_SIZE_FORMAT"->"EXT_SIZE_FORMAT" " 71.27 - "Heap: "EXT_SIZE_FORMAT"("EXT_SIZE_FORMAT")->" 71.28 - EXT_SIZE_FORMAT"("EXT_SIZE_FORMAT")]", 71.29 + " [Eden: " EXT_SIZE_FORMAT "(" EXT_SIZE_FORMAT ")->" EXT_SIZE_FORMAT "(" EXT_SIZE_FORMAT ") " 71.30 + "Survivors: " EXT_SIZE_FORMAT "->" EXT_SIZE_FORMAT " " 71.31 + "Heap: " EXT_SIZE_FORMAT "(" EXT_SIZE_FORMAT ")->" 71.32 + EXT_SIZE_FORMAT "(" EXT_SIZE_FORMAT ")]", 71.33 EXT_SIZE_PARAMS(_eden_used_bytes_before_gc), 71.34 EXT_SIZE_PARAMS(_eden_capacity_bytes_before_gc), 71.35 EXT_SIZE_PARAMS(eden_used_bytes_after_gc), 71.36 @@ -1851,7 +1851,7 @@ 71.37 while (csr != NULL) { 71.38 HeapRegion* next = csr->next_in_collection_set(); 71.39 assert(csr->in_collection_set(), "bad CS"); 71.40 - st->print_cr(" "HR_FORMAT", P: "PTR_FORMAT "N: "PTR_FORMAT", age: %4d", 71.41 + st->print_cr(" " HR_FORMAT ", P: " PTR_FORMAT "N: " PTR_FORMAT ", age: %4d", 71.42 HR_FORMAT_PARAMS(csr), 71.43 csr->prev_top_at_mark_start(), csr->next_top_at_mark_start(), 71.44 csr->age_in_surv_rate_group_cond());
72.1 --- a/src/share/vm/gc_implementation/g1/g1ErgoVerbose.hpp Fri Jul 27 11:47:10 2018 +0100 72.2 +++ b/src/share/vm/gc_implementation/g1/g1ErgoVerbose.hpp Sat Aug 04 12:53:22 2018 +0100 72.3 @@ -121,15 +121,15 @@ 72.4 // Single parameter format strings 72.5 #define ergo_format_str(_name_) ", " _name_ ": %s" 72.6 #define ergo_format_region(_name_) ", " _name_ ": %u regions" 72.7 -#define ergo_format_byte(_name_) ", " _name_ ": "SIZE_FORMAT" bytes" 72.8 +#define ergo_format_byte(_name_) ", " _name_ ": " SIZE_FORMAT " bytes" 72.9 #define ergo_format_double(_name_) ", " _name_ ": %1.2f" 72.10 #define ergo_format_perc(_name_) ", " _name_ ": %1.2f %%" 72.11 #define ergo_format_ms(_name_) ", " _name_ ": %1.2f ms" 72.12 -#define ergo_format_size(_name_) ", " _name_ ": "SIZE_FORMAT 72.13 +#define ergo_format_size(_name_) ", " _name_ ": " SIZE_FORMAT 72.14 72.15 // Double parameter format strings 72.16 #define ergo_format_byte_perc(_name_) \ 72.17 - ", " _name_ ": "SIZE_FORMAT" bytes (%1.2f %%)" 72.18 + ", " _name_ ": " SIZE_FORMAT " bytes (%1.2f %%)" 72.19 72.20 // Generates the format string 72.21 #define ergo_format(_extra_format_) \
73.1 --- a/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp Fri Jul 27 11:47:10 2018 +0100 73.2 +++ b/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp Sat Aug 04 12:53:22 2018 +0100 73.3 @@ -332,7 +332,7 @@ 73.4 } 73.5 73.6 void G1GCPhaseTimes::print_stats(int level, const char* str, size_t value) { 73.7 - LineBuffer(level).append_and_print_cr("[%s: "SIZE_FORMAT"]", str, value); 73.8 + LineBuffer(level).append_and_print_cr("[%s: " SIZE_FORMAT "]", str, value); 73.9 } 73.10 73.11 void G1GCPhaseTimes::print_stats(int level, const char* str, double value, uint workers) { 73.12 @@ -452,7 +452,7 @@ 73.13 73.14 if (phase->_thread_work_items != NULL) { 73.15 LineBuffer buf2(phase->_thread_work_items->_indent_level); 73.16 - buf2.append_and_print_cr("[%s: "SIZE_FORMAT"]", phase->_thread_work_items->_title, _phase_times->sum_thread_work_items(phase_id)); 73.17 + buf2.append_and_print_cr("[%s: " SIZE_FORMAT "]", phase->_thread_work_items->_title, _phase_times->sum_thread_work_items(phase_id)); 73.18 } 73.19 } 73.20
74.1 --- a/src/share/vm/gc_implementation/g1/g1HRPrinter.cpp Fri Jul 27 11:47:10 2018 +0100 74.2 +++ b/src/share/vm/gc_implementation/g1/g1HRPrinter.cpp Sat Aug 04 12:53:22 2018 +0100 74.3 @@ -84,18 +84,18 @@ 74.4 74.5 if (type_str != NULL) { 74.6 if (top != NULL) { 74.7 - gclog_or_tty->print_cr(G1HR_PREFIX" %s(%s) "PTR_FORMAT" "PTR_FORMAT, 74.8 + gclog_or_tty->print_cr(G1HR_PREFIX " %s(%s) " PTR_FORMAT " " PTR_FORMAT, 74.9 action_str, type_str, bottom, top); 74.10 } else { 74.11 - gclog_or_tty->print_cr(G1HR_PREFIX" %s(%s) "PTR_FORMAT, 74.12 + gclog_or_tty->print_cr(G1HR_PREFIX " %s(%s) " PTR_FORMAT, 74.13 action_str, type_str, bottom); 74.14 } 74.15 } else { 74.16 if (top != NULL) { 74.17 - gclog_or_tty->print_cr(G1HR_PREFIX" %s "PTR_FORMAT" "PTR_FORMAT, 74.18 + gclog_or_tty->print_cr(G1HR_PREFIX " %s " PTR_FORMAT " " PTR_FORMAT, 74.19 action_str, bottom, top); 74.20 } else { 74.21 - gclog_or_tty->print_cr(G1HR_PREFIX" %s "PTR_FORMAT, 74.22 + gclog_or_tty->print_cr(G1HR_PREFIX " %s " PTR_FORMAT, 74.23 action_str, bottom); 74.24 } 74.25 } 74.26 @@ -104,11 +104,11 @@ 74.27 void G1HRPrinter::print(ActionType action, HeapWord* bottom, HeapWord* end) { 74.28 const char* action_str = action_name(action); 74.29 74.30 - gclog_or_tty->print_cr(G1HR_PREFIX" %s ["PTR_FORMAT","PTR_FORMAT"]", 74.31 + gclog_or_tty->print_cr(G1HR_PREFIX " %s [" PTR_FORMAT "," PTR_FORMAT "]", 74.32 action_str, bottom, end); 74.33 } 74.34 74.35 void G1HRPrinter::print(PhaseType phase, size_t phase_num) { 74.36 const char* phase_str = phase_name(phase); 74.37 - gclog_or_tty->print_cr(G1HR_PREFIX" #%s "SIZE_FORMAT, phase_str, phase_num); 74.38 + gclog_or_tty->print_cr(G1HR_PREFIX " #%s " SIZE_FORMAT, phase_str, phase_num); 74.39 }
75.1 --- a/src/share/vm/gc_implementation/g1/g1InCSetState.hpp Fri Jul 27 11:47:10 2018 +0100 75.2 +++ b/src/share/vm/gc_implementation/g1/g1InCSetState.hpp Sat Aug 04 12:53:22 2018 +0100 75.3 @@ -103,7 +103,7 @@ 75.4 public: 75.5 void set_humongous(uintptr_t index) { 75.6 assert(get_by_index(index).is_default(), 75.7 - err_msg("State at index " INTPTR_FORMAT" should be default but is " CSETSTATE_FORMAT, index, get_by_index(index).value())); 75.8 + err_msg("State at index " INTPTR_FORMAT " should be default but is " CSETSTATE_FORMAT, index, get_by_index(index).value())); 75.9 set_by_index(index, InCSetState::Humongous); 75.10 } 75.11 75.12 @@ -113,13 +113,13 @@ 75.13 75.14 void set_in_young(uintptr_t index) { 75.15 assert(get_by_index(index).is_default(), 75.16 - err_msg("State at index " INTPTR_FORMAT" should be default but is " CSETSTATE_FORMAT, index, get_by_index(index).value())); 75.17 + err_msg("State at index " INTPTR_FORMAT " should be default but is " CSETSTATE_FORMAT, index, get_by_index(index).value())); 75.18 set_by_index(index, InCSetState::Young); 75.19 } 75.20 75.21 void set_in_old(uintptr_t index) { 75.22 assert(get_by_index(index).is_default(), 75.23 - err_msg("State at index " INTPTR_FORMAT" should be default but is " CSETSTATE_FORMAT, index, get_by_index(index).value())); 75.24 + err_msg("State at index " INTPTR_FORMAT " should be default but is " CSETSTATE_FORMAT, index, get_by_index(index).value())); 75.25 set_by_index(index, InCSetState::Old); 75.26 } 75.27
76.1 --- a/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Fri Jul 27 11:47:10 2018 +0100 76.2 +++ b/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Sat Aug 04 12:53:22 2018 +0100 76.3 @@ -1,5 +1,5 @@ 76.4 /* 76.5 - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 76.6 + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. 76.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 76.8 * 76.9 * This code is free software; you can redistribute it and/or modify it 76.10 @@ -135,9 +135,16 @@ 76.11 MarkingCodeBlobClosure follow_code_closure(&GenMarkSweep::follow_root_closure, !CodeBlobToOopClosure::FixRelocations); 76.12 { 76.13 G1RootProcessor root_processor(g1h); 76.14 - root_processor.process_strong_roots(&GenMarkSweep::follow_root_closure, 76.15 - &GenMarkSweep::follow_cld_closure, 76.16 - &follow_code_closure); 76.17 + if (ClassUnloading) { 76.18 + root_processor.process_strong_roots(&GenMarkSweep::follow_root_closure, 76.19 + &GenMarkSweep::follow_cld_closure, 76.20 + &follow_code_closure); 76.21 + } else { 76.22 + root_processor.process_all_roots_no_string_table( 76.23 + &GenMarkSweep::follow_root_closure, 76.24 + &GenMarkSweep::follow_cld_closure, 76.25 + &follow_code_closure); 76.26 + } 76.27 } 76.28 76.29 // Process reference objects found during marking 76.30 @@ -158,15 +165,17 @@ 76.31 // This is the point where the entire marking should have completed. 76.32 assert(GenMarkSweep::_marking_stack.is_empty(), "Marking should have completed"); 76.33 76.34 - // Unload classes and purge the SystemDictionary. 76.35 - bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive); 76.36 + if (ClassUnloading) { 76.37 76.38 - // Unload nmethods. 76.39 - CodeCache::do_unloading(&GenMarkSweep::is_alive, purged_class); 76.40 + // Unload classes and purge the SystemDictionary. 76.41 + bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive); 76.42 76.43 - // Prune dead klasses from subklass/sibling/implementor lists. 76.44 - Klass::clean_weak_klass_links(&GenMarkSweep::is_alive); 76.45 + // Unload nmethods. 76.46 + CodeCache::do_unloading(&GenMarkSweep::is_alive, purged_class); 76.47 76.48 + // Prune dead klasses from subklass/sibling/implementor lists. 76.49 + Klass::clean_weak_klass_links(&GenMarkSweep::is_alive); 76.50 + } 76.51 // Delete entries for dead interned string and clean up unreferenced symbols in symbol table. 76.52 G1CollectedHeap::heap()->unlink_string_and_symbol_table(&GenMarkSweep::is_alive); 76.53
77.1 --- a/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Fri Jul 27 11:47:10 2018 +0100 77.2 +++ b/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Sat Aug 04 12:53:22 2018 +0100 77.3 @@ -118,7 +118,7 @@ 77.4 oop obj = oopDesc::load_decode_heap_oop(p); 77.5 if (_cm->verbose_high()) { 77.6 gclog_or_tty->print_cr("[%u] we're looking at location " 77.7 - "*"PTR_FORMAT" = "PTR_FORMAT, 77.8 + "*" PTR_FORMAT " = " PTR_FORMAT, 77.9 _task->worker_id(), p2i(p), p2i((void*) obj)); 77.10 } 77.11 _task->deal_with_reference(obj);
78.1 --- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp Fri Jul 27 11:47:10 2018 +0100 78.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp Sat Aug 04 12:53:22 2018 +0100 78.3 @@ -442,7 +442,7 @@ 78.4 bool G1RemSet::refine_card(jbyte* card_ptr, uint worker_i, 78.5 bool check_for_refs_into_cset) { 78.6 assert(_g1->is_in_exact(_ct_bs->addr_for(card_ptr)), 78.7 - err_msg("Card at "PTR_FORMAT" index "SIZE_FORMAT" representing heap at "PTR_FORMAT" (%u) must be in committed heap", 78.8 + err_msg("Card at " PTR_FORMAT " index " SIZE_FORMAT " representing heap at " PTR_FORMAT " (%u) must be in committed heap", 78.9 p2i(card_ptr), 78.10 _ct_bs->index_for(_ct_bs->addr_for(card_ptr)), 78.11 _ct_bs->addr_for(card_ptr),
79.1 --- a/src/share/vm/gc_implementation/g1/g1RemSetSummary.cpp Fri Jul 27 11:47:10 2018 +0100 79.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSetSummary.cpp Sat Aug 04 12:53:22 2018 +0100 79.3 @@ -183,26 +183,26 @@ 79.4 size_t code_root_elems() const { return _code_root_elems; } 79.5 79.6 void print_rs_mem_info_on(outputStream * out, size_t total) { 79.7 - out->print_cr(" "SIZE_FORMAT_W(8) "%s (%5.1f%%) by "SIZE_FORMAT" %s regions", 79.8 + out->print_cr(" " SIZE_FORMAT_W(8) "%s (%5.1f%%) by " SIZE_FORMAT " %s regions", 79.9 byte_size_in_proper_unit(rs_mem_size()), 79.10 proper_unit_for_byte_size(rs_mem_size()), 79.11 rs_mem_size_percent_of(total), amount(), _name); 79.12 } 79.13 79.14 void print_cards_occupied_info_on(outputStream * out, size_t total) { 79.15 - out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) entries by "SIZE_FORMAT" %s regions", 79.16 + out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) entries by " SIZE_FORMAT " %s regions", 79.17 cards_occupied(), cards_occupied_percent_of(total), amount(), _name); 79.18 } 79.19 79.20 void print_code_root_mem_info_on(outputStream * out, size_t total) { 79.21 - out->print_cr(" "SIZE_FORMAT_W(8) "%s (%5.1f%%) by "SIZE_FORMAT" %s regions", 79.22 + out->print_cr(" " SIZE_FORMAT_W(8) "%s (%5.1f%%) by " SIZE_FORMAT " %s regions", 79.23 byte_size_in_proper_unit(code_root_mem_size()), 79.24 proper_unit_for_byte_size(code_root_mem_size()), 79.25 code_root_mem_size_percent_of(total), amount(), _name); 79.26 } 79.27 79.28 void print_code_root_elems_info_on(outputStream * out, size_t total) { 79.29 - out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) elements by "SIZE_FORMAT" %s regions", 79.30 + out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) elements by " SIZE_FORMAT " %s regions", 79.31 code_root_elems(), code_root_elems_percent_of(total), amount(), _name); 79.32 } 79.33 }; 79.34 @@ -298,7 +298,7 @@ 79.35 byte_size_in_proper_unit(HeapRegionRemSet::fl_mem_size()), 79.36 proper_unit_for_byte_size(HeapRegionRemSet::fl_mem_size())); 79.37 79.38 - out->print_cr(" "SIZE_FORMAT" occupied cards represented.", 79.39 + out->print_cr(" " SIZE_FORMAT " occupied cards represented.", 79.40 total_cards_occupied()); 79.41 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { 79.42 (*current)->print_cards_occupied_info_on(out, total_cards_occupied()); 79.43 @@ -306,8 +306,8 @@ 79.44 79.45 // Largest sized rem set region statistics 79.46 HeapRegionRemSet* rem_set = max_rs_mem_sz_region()->rem_set(); 79.47 - out->print_cr(" Region with largest rem set = "HR_FORMAT", " 79.48 - "size = "SIZE_FORMAT "%s, occupied = "SIZE_FORMAT "%s.", 79.49 + out->print_cr(" Region with largest rem set = " HR_FORMAT ", " 79.50 + "size = " SIZE_FORMAT "%s, occupied = " SIZE_FORMAT "%s.", 79.51 HR_FORMAT_PARAMS(max_rs_mem_sz_region()), 79.52 byte_size_in_proper_unit(rem_set->mem_size()), 79.53 proper_unit_for_byte_size(rem_set->mem_size()), 79.54 @@ -326,14 +326,14 @@ 79.55 (*current)->print_code_root_mem_info_on(out, total_code_root_mem_sz()); 79.56 } 79.57 79.58 - out->print_cr(" "SIZE_FORMAT" code roots represented.", 79.59 + out->print_cr(" " SIZE_FORMAT " code roots represented.", 79.60 total_code_root_elems()); 79.61 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { 79.62 (*current)->print_code_root_elems_info_on(out, total_code_root_elems()); 79.63 } 79.64 79.65 - out->print_cr(" Region with largest amount of code roots = "HR_FORMAT", " 79.66 - "size = "SIZE_FORMAT "%s, num_elems = "SIZE_FORMAT".", 79.67 + out->print_cr(" Region with largest amount of code roots = " HR_FORMAT ", " 79.68 + "size = " SIZE_FORMAT "%s, num_elems = " SIZE_FORMAT ".", 79.69 HR_FORMAT_PARAMS(max_code_root_mem_sz_region()), 79.70 byte_size_in_proper_unit(max_code_root_rem_set->strong_code_roots_mem_size()), 79.71 proper_unit_for_byte_size(max_code_root_rem_set->strong_code_roots_mem_size()), 79.72 @@ -344,16 +344,16 @@ 79.73 79.74 void G1RemSetSummary::print_on(outputStream* out) { 79.75 out->print_cr("\n Recent concurrent refinement statistics"); 79.76 - out->print_cr(" Processed "SIZE_FORMAT" cards", 79.77 + out->print_cr(" Processed " SIZE_FORMAT " cards", 79.78 num_concurrent_refined_cards()); 79.79 - out->print_cr(" Of "SIZE_FORMAT" completed buffers:", num_processed_buf_total()); 79.80 - out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) by concurrent RS threads.", 79.81 + out->print_cr(" Of " SIZE_FORMAT " completed buffers:", num_processed_buf_total()); 79.82 + out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) by concurrent RS threads.", 79.83 num_processed_buf_total(), 79.84 percent_of(num_processed_buf_rs_threads(), num_processed_buf_total())); 79.85 - out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) by mutator threads.", 79.86 + out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) by mutator threads.", 79.87 num_processed_buf_mutator(), 79.88 percent_of(num_processed_buf_mutator(), num_processed_buf_total())); 79.89 - out->print_cr(" Did "SIZE_FORMAT" coarsenings.", num_coarsenings()); 79.90 + out->print_cr(" Did " SIZE_FORMAT " coarsenings.", num_coarsenings()); 79.91 out->print_cr(" Concurrent RS threads times (s)"); 79.92 out->print(" "); 79.93 for (uint i = 0; i < _num_vtimes; i++) {
80.1 --- a/src/share/vm/gc_implementation/g1/g1RootProcessor.cpp Fri Jul 27 11:47:10 2018 +0100 80.2 +++ b/src/share/vm/gc_implementation/g1/g1RootProcessor.cpp Sat Aug 04 12:53:22 2018 +0100 80.3 @@ -1,5 +1,5 @@ 80.4 /* 80.5 - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 80.6 + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. 80.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 80.8 * 80.9 * This code is free software; you can redistribute it and/or modify it 80.10 @@ -156,7 +156,7 @@ 80.11 } 80.12 80.13 process_vm_roots(strong_roots, weak_roots, phase_times, worker_i); 80.14 - 80.15 + process_string_table_roots(weak_roots, phase_times, worker_i); 80.16 { 80.17 // Now the CM ref_processor roots. 80.18 G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CMRefRoots, worker_i); 80.19 @@ -223,18 +223,34 @@ 80.20 80.21 void G1RootProcessor::process_all_roots(OopClosure* oops, 80.22 CLDClosure* clds, 80.23 - CodeBlobClosure* blobs) { 80.24 + CodeBlobClosure* blobs, 80.25 + bool process_string_table) { 80.26 80.27 process_java_roots(oops, NULL, clds, clds, NULL, NULL, 0); 80.28 process_vm_roots(oops, oops, NULL, 0); 80.29 80.30 - if (!_process_strong_tasks.is_task_claimed(G1RP_PS_CodeCache_oops_do)) { 80.31 - CodeCache::blobs_do(blobs); 80.32 - } 80.33 + if (process_string_table) { 80.34 + process_string_table_roots(oops, NULL, 0); 80.35 + } 80.36 + process_code_cache_roots(blobs, NULL, 0); 80.37 80.38 _process_strong_tasks.all_tasks_completed(); 80.39 } 80.40 80.41 +void G1RootProcessor::process_all_roots(OopClosure* oops, 80.42 + CLDClosure* clds, 80.43 + CodeBlobClosure* blobs) { 80.44 + process_all_roots(oops, clds, blobs, true); 80.45 +} 80.46 + 80.47 +void G1RootProcessor::process_all_roots_no_string_table(OopClosure* oops, 80.48 + CLDClosure* clds, 80.49 + CodeBlobClosure* blobs) { 80.50 + assert(!ClassUnloading, "Should only be used when class unloading is disabled"); 80.51 + process_all_roots(oops, clds, blobs, false); 80.52 +} 80.53 + 80.54 + 80.55 void G1RootProcessor::process_java_roots(OopClosure* strong_roots, 80.56 CLDClosure* thread_stack_clds, 80.57 CLDClosure* strong_clds, 80.58 @@ -311,14 +327,23 @@ 80.59 SystemDictionary::roots_oops_do(strong_roots, weak_roots); 80.60 } 80.61 } 80.62 +} 80.63 80.64 - { 80.65 - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::StringTableRoots, worker_i); 80.66 - // All threads execute the following. A specific chunk of buckets 80.67 - // from the StringTable are the individual tasks. 80.68 - if (weak_roots != NULL) { 80.69 - StringTable::possibly_parallel_oops_do(weak_roots); 80.70 - } 80.71 +void G1RootProcessor::process_string_table_roots(OopClosure* weak_roots, G1GCPhaseTimes* phase_times, 80.72 + uint worker_i) { 80.73 + assert(weak_roots != NULL, "Should only be called when all roots are processed"); 80.74 + 80.75 + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::StringTableRoots, worker_i); 80.76 + // All threads execute the following. A specific chunk of buckets 80.77 + // from the StringTable are the individual tasks. 80.78 + StringTable::possibly_parallel_oops_do(weak_roots); 80.79 +} 80.80 + 80.81 +void G1RootProcessor::process_code_cache_roots(CodeBlobClosure* code_closure, 80.82 + G1GCPhaseTimes* phase_times, 80.83 + uint worker_i) { 80.84 + if (!_process_strong_tasks.is_task_claimed(G1RP_PS_CodeCache_oops_do)) { 80.85 + CodeCache::blobs_do(code_closure); 80.86 } 80.87 } 80.88
81.1 --- a/src/share/vm/gc_implementation/g1/g1RootProcessor.hpp Fri Jul 27 11:47:10 2018 +0100 81.2 +++ b/src/share/vm/gc_implementation/g1/g1RootProcessor.hpp Sat Aug 04 12:53:22 2018 +0100 81.3 @@ -1,5 +1,5 @@ 81.4 /* 81.5 - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 81.6 + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. 81.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 81.8 * 81.9 * This code is free software; you can redistribute it and/or modify it 81.10 @@ -34,6 +34,7 @@ 81.11 class G1CollectedHeap; 81.12 class G1GCPhaseTimes; 81.13 class G1ParPushHeapRSClosure; 81.14 +class G1RootClosures; 81.15 class Monitor; 81.16 class OopClosure; 81.17 class SubTasksDone; 81.18 @@ -71,6 +72,11 @@ 81.19 void worker_has_discovered_all_strong_classes(); 81.20 void wait_until_all_strong_classes_discovered(); 81.21 81.22 + void process_all_roots(OopClosure* oops, 81.23 + CLDClosure* clds, 81.24 + CodeBlobClosure* blobs, 81.25 + bool process_string_table); 81.26 + 81.27 void process_java_roots(OopClosure* scan_non_heap_roots, 81.28 CLDClosure* thread_stack_clds, 81.29 CLDClosure* scan_strong_clds, 81.30 @@ -84,6 +90,14 @@ 81.31 G1GCPhaseTimes* phase_times, 81.32 uint worker_i); 81.33 81.34 + void process_string_table_roots(OopClosure* scan_non_heap_weak_roots, 81.35 + G1GCPhaseTimes* phase_times, 81.36 + uint worker_i); 81.37 + 81.38 + void process_code_cache_roots(CodeBlobClosure* code_closure, 81.39 + G1GCPhaseTimes* phase_times, 81.40 + uint worker_i); 81.41 + 81.42 public: 81.43 G1RootProcessor(G1CollectedHeap* g1h); 81.44 81.45 @@ -114,6 +128,13 @@ 81.46 OopClosure* scan_non_heap_weak_roots, 81.47 uint worker_i); 81.48 81.49 + // Apply oops, clds and blobs to strongly and weakly reachable roots in the system, 81.50 + // the only thing different from process_all_roots is that we skip the string table 81.51 + // to avoid keeping every string live when doing class unloading. 81.52 + void process_all_roots_no_string_table(OopClosure* oops, 81.53 + CLDClosure* clds, 81.54 + CodeBlobClosure* blobs); 81.55 + 81.56 // Inform the root processor about the number of worker threads 81.57 void set_num_workers(int active_workers); 81.58 };
82.1 --- a/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp Fri Jul 27 11:47:10 2018 +0100 82.2 +++ b/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp Sat Aug 04 12:53:22 2018 +0100 82.3 @@ -151,7 +151,7 @@ 82.4 void G1StringDedupQueue::print_statistics(outputStream* st) { 82.5 st->print_cr( 82.6 " [Queue]\n" 82.7 - " [Dropped: "UINTX_FORMAT"]", _queue->_dropped); 82.8 + " [Dropped: " UINTX_FORMAT "]", _queue->_dropped); 82.9 } 82.10 82.11 void G1StringDedupQueue::verify() {
83.1 --- a/src/share/vm/gc_implementation/g1/g1StringDedupStat.cpp Fri Jul 27 11:47:10 2018 +0100 83.2 +++ b/src/share/vm/gc_implementation/g1/g1StringDedupStat.cpp Sat Aug 04 12:53:22 2018 +0100 83.3 @@ -80,8 +80,8 @@ 83.4 st->stamp(PrintGCTimeStamps); 83.5 st->print_cr( 83.6 "[GC concurrent-string-deduplication, " 83.7 - G1_STRDEDUP_BYTES_FORMAT_NS"->"G1_STRDEDUP_BYTES_FORMAT_NS"("G1_STRDEDUP_BYTES_FORMAT_NS"), avg " 83.8 - G1_STRDEDUP_PERCENT_FORMAT_NS", "G1_STRDEDUP_TIME_FORMAT"]", 83.9 + G1_STRDEDUP_BYTES_FORMAT_NS "->" G1_STRDEDUP_BYTES_FORMAT_NS "(" G1_STRDEDUP_BYTES_FORMAT_NS "), avg " 83.10 + G1_STRDEDUP_PERCENT_FORMAT_NS ", " G1_STRDEDUP_TIME_FORMAT "]", 83.11 G1_STRDEDUP_BYTES_PARAM(last_stat._new_bytes), 83.12 G1_STRDEDUP_BYTES_PARAM(last_stat._new_bytes - last_stat._deduped_bytes), 83.13 G1_STRDEDUP_BYTES_PARAM(last_stat._deduped_bytes), 83.14 @@ -135,22 +135,22 @@ 83.15 83.16 if (total) { 83.17 st->print_cr( 83.18 - " [Total Exec: "UINTX_FORMAT"/"G1_STRDEDUP_TIME_FORMAT", Idle: "UINTX_FORMAT"/"G1_STRDEDUP_TIME_FORMAT", Blocked: "UINTX_FORMAT"/"G1_STRDEDUP_TIME_FORMAT"]", 83.19 + " [Total Exec: " UINTX_FORMAT "/" G1_STRDEDUP_TIME_FORMAT ", Idle: " UINTX_FORMAT "/" G1_STRDEDUP_TIME_FORMAT ", Blocked: " UINTX_FORMAT "/" G1_STRDEDUP_TIME_FORMAT "]", 83.20 stat._exec, stat._exec_elapsed, stat._idle, stat._idle_elapsed, stat._block, stat._block_elapsed); 83.21 } else { 83.22 st->print_cr( 83.23 - " [Last Exec: "G1_STRDEDUP_TIME_FORMAT", Idle: "G1_STRDEDUP_TIME_FORMAT", Blocked: "UINTX_FORMAT"/"G1_STRDEDUP_TIME_FORMAT"]", 83.24 + " [Last Exec: " G1_STRDEDUP_TIME_FORMAT ", Idle: " G1_STRDEDUP_TIME_FORMAT ", Blocked: " UINTX_FORMAT "/" G1_STRDEDUP_TIME_FORMAT "]", 83.25 stat._exec_elapsed, stat._idle_elapsed, stat._block, stat._block_elapsed); 83.26 } 83.27 st->print_cr( 83.28 - " [Inspected: "G1_STRDEDUP_OBJECTS_FORMAT"]\n" 83.29 - " [Skipped: "G1_STRDEDUP_OBJECTS_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT")]\n" 83.30 - " [Hashed: "G1_STRDEDUP_OBJECTS_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT")]\n" 83.31 - " [Known: "G1_STRDEDUP_OBJECTS_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT")]\n" 83.32 - " [New: "G1_STRDEDUP_OBJECTS_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT") "G1_STRDEDUP_BYTES_FORMAT"]\n" 83.33 - " [Deduplicated: "G1_STRDEDUP_OBJECTS_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT") "G1_STRDEDUP_BYTES_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT")]\n" 83.34 - " [Young: "G1_STRDEDUP_OBJECTS_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT") "G1_STRDEDUP_BYTES_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT")]\n" 83.35 - " [Old: "G1_STRDEDUP_OBJECTS_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT") "G1_STRDEDUP_BYTES_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT")]", 83.36 + " [Inspected: " G1_STRDEDUP_OBJECTS_FORMAT "]\n" 83.37 + " [Skipped: " G1_STRDEDUP_OBJECTS_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ")]\n" 83.38 + " [Hashed: " G1_STRDEDUP_OBJECTS_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ")]\n" 83.39 + " [Known: " G1_STRDEDUP_OBJECTS_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ")]\n" 83.40 + " [New: " G1_STRDEDUP_OBJECTS_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ") " G1_STRDEDUP_BYTES_FORMAT "]\n" 83.41 + " [Deduplicated: " G1_STRDEDUP_OBJECTS_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ") " G1_STRDEDUP_BYTES_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ")]\n" 83.42 + " [Young: " G1_STRDEDUP_OBJECTS_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ") " G1_STRDEDUP_BYTES_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ")]\n" 83.43 + " [Old: " G1_STRDEDUP_OBJECTS_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ") " G1_STRDEDUP_BYTES_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT ")]", 83.44 stat._inspected, 83.45 stat._skipped, skipped_percent, 83.46 stat._hashed, hashed_percent,
84.1 --- a/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Fri Jul 27 11:47:10 2018 +0100 84.2 +++ b/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Sat Aug 04 12:53:22 2018 +0100 84.3 @@ -596,12 +596,12 @@ 84.4 void G1StringDedupTable::print_statistics(outputStream* st) { 84.5 st->print_cr( 84.6 " [Table]\n" 84.7 - " [Memory Usage: "G1_STRDEDUP_BYTES_FORMAT_NS"]\n" 84.8 - " [Size: "SIZE_FORMAT", Min: "SIZE_FORMAT", Max: "SIZE_FORMAT"]\n" 84.9 - " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " UINTX_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n" 84.10 - " [Resize Count: "UINTX_FORMAT", Shrink Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS"), Grow Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS")]\n" 84.11 - " [Rehash Count: "UINTX_FORMAT", Rehash Threshold: "UINTX_FORMAT", Hash Seed: 0x%x]\n" 84.12 - " [Age Threshold: "UINTX_FORMAT"]", 84.13 + " [Memory Usage: " G1_STRDEDUP_BYTES_FORMAT_NS "]\n" 84.14 + " [Size: " SIZE_FORMAT ", Min: " SIZE_FORMAT ", Max: " SIZE_FORMAT "]\n" 84.15 + " [Entries: " UINTX_FORMAT ", Load: " G1_STRDEDUP_PERCENT_FORMAT_NS ", Cached: " UINTX_FORMAT ", Added: " UINTX_FORMAT ", Removed: " UINTX_FORMAT "]\n" 84.16 + " [Resize Count: " UINTX_FORMAT ", Shrink Threshold: " UINTX_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT_NS "), Grow Threshold: " UINTX_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT_NS ")]\n" 84.17 + " [Rehash Count: " UINTX_FORMAT ", Rehash Threshold: " UINTX_FORMAT ", Hash Seed: 0x%x]\n" 84.18 + " [Age Threshold: " UINTX_FORMAT "]", 84.19 G1_STRDEDUP_BYTES_PARAM(_table->_size * sizeof(G1StringDedupEntry*) + (_table->_entries + _entry_cache->size()) * sizeof(G1StringDedupEntry)), 84.20 _table->_size, _min_size, _max_size, 84.21 _table->_entries, (double)_table->_entries / (double)_table->_size * 100.0, _entry_cache->size(), _entries_added, _entries_removed,
85.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.cpp Fri Jul 27 11:47:10 2018 +0100 85.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp Sat Aug 04 12:53:22 2018 +0100 85.3 @@ -333,7 +333,7 @@ 85.4 bool during_conc_mark, 85.5 size_t marked_bytes) { 85.6 assert(0 <= marked_bytes && marked_bytes <= used(), 85.7 - err_msg("marked: "SIZE_FORMAT" used: "SIZE_FORMAT, 85.8 + err_msg("marked: " SIZE_FORMAT " used: " SIZE_FORMAT, 85.9 marked_bytes, used())); 85.10 _prev_top_at_mark_start = top(); 85.11 _prev_marked_bytes = marked_bytes; 85.12 @@ -514,9 +514,9 @@ 85.13 // Object is in the region. Check that its less than top 85.14 if (_hr->top() <= (HeapWord*)obj) { 85.15 // Object is above top 85.16 - gclog_or_tty->print_cr("Object "PTR_FORMAT" in region " 85.17 - "["PTR_FORMAT", "PTR_FORMAT") is above " 85.18 - "top "PTR_FORMAT, 85.19 + gclog_or_tty->print_cr("Object " PTR_FORMAT " in region " 85.20 + "[" PTR_FORMAT ", " PTR_FORMAT ") is above " 85.21 + "top " PTR_FORMAT, 85.22 (void *)obj, _hr->bottom(), _hr->end(), _hr->top()); 85.23 _failures = true; 85.24 return; 85.25 @@ -550,22 +550,22 @@ 85.26 if (nm != NULL) { 85.27 // Verify that the nemthod is live 85.28 if (!nm->is_alive()) { 85.29 - gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] has dead nmethod " 85.30 - PTR_FORMAT" in its strong code roots", 85.31 + gclog_or_tty->print_cr("region [" PTR_FORMAT "," PTR_FORMAT "] has dead nmethod " 85.32 + PTR_FORMAT " in its strong code roots", 85.33 _hr->bottom(), _hr->end(), nm); 85.34 _failures = true; 85.35 } else { 85.36 VerifyStrongCodeRootOopClosure oop_cl(_hr, nm); 85.37 nm->oops_do(&oop_cl); 85.38 if (!oop_cl.has_oops_in_region()) { 85.39 - gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] has nmethod " 85.40 - PTR_FORMAT" in its strong code roots " 85.41 + gclog_or_tty->print_cr("region [" PTR_FORMAT "," PTR_FORMAT "] has nmethod " 85.42 + PTR_FORMAT " in its strong code roots " 85.43 "with no pointers into region", 85.44 _hr->bottom(), _hr->end(), nm); 85.45 _failures = true; 85.46 } else if (oop_cl.failures()) { 85.47 - gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] has other " 85.48 - "failures for nmethod "PTR_FORMAT, 85.49 + gclog_or_tty->print_cr("region [" PTR_FORMAT "," PTR_FORMAT "] has other " 85.50 + "failures for nmethod " PTR_FORMAT, 85.51 _hr->bottom(), _hr->end(), nm); 85.52 _failures = true; 85.53 } 85.54 @@ -599,8 +599,8 @@ 85.55 // on its strong code root list 85.56 if (is_empty()) { 85.57 if (strong_code_roots_length > 0) { 85.58 - gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] is empty " 85.59 - "but has "SIZE_FORMAT" code root entries", 85.60 + gclog_or_tty->print_cr("region [" PTR_FORMAT "," PTR_FORMAT "] is empty " 85.61 + "but has " SIZE_FORMAT " code root entries", 85.62 bottom(), end(), strong_code_roots_length); 85.63 *failures = true; 85.64 } 85.65 @@ -609,8 +609,8 @@ 85.66 85.67 if (continuesHumongous()) { 85.68 if (strong_code_roots_length > 0) { 85.69 - gclog_or_tty->print_cr("region "HR_FORMAT" is a continuation of a humongous " 85.70 - "region but has "SIZE_FORMAT" code root entries", 85.71 + gclog_or_tty->print_cr("region " HR_FORMAT " is a continuation of a humongous " 85.72 + "region but has " SIZE_FORMAT " code root entries", 85.73 HR_FORMAT_PARAMS(this), strong_code_roots_length); 85.74 *failures = true; 85.75 } 85.76 @@ -634,7 +634,7 @@ 85.77 else 85.78 st->print(" "); 85.79 st->print(" TS %5d", _gc_time_stamp); 85.80 - st->print(" PTAMS "PTR_FORMAT" NTAMS "PTR_FORMAT, 85.81 + st->print(" PTAMS " PTR_FORMAT " NTAMS " PTR_FORMAT, 85.82 prev_top_at_mark_start(), next_top_at_mark_start()); 85.83 G1OffsetTableContigSpace::print_on(st); 85.84 } 85.85 @@ -708,25 +708,25 @@ 85.86 } 85.87 if (!_g1h->is_in_closed_subset(obj)) { 85.88 HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); 85.89 - gclog_or_tty->print_cr("Field "PTR_FORMAT 85.90 - " of live obj "PTR_FORMAT" in region " 85.91 - "["PTR_FORMAT", "PTR_FORMAT")", 85.92 + gclog_or_tty->print_cr("Field " PTR_FORMAT 85.93 + " of live obj " PTR_FORMAT " in region " 85.94 + "[" PTR_FORMAT ", " PTR_FORMAT ")", 85.95 p, (void*) _containing_obj, 85.96 from->bottom(), from->end()); 85.97 print_object(gclog_or_tty, _containing_obj); 85.98 - gclog_or_tty->print_cr("points to obj "PTR_FORMAT" not in the heap", 85.99 + gclog_or_tty->print_cr("points to obj " PTR_FORMAT " not in the heap", 85.100 (void*) obj); 85.101 } else { 85.102 HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); 85.103 HeapRegion* to = _g1h->heap_region_containing((HeapWord*)obj); 85.104 - gclog_or_tty->print_cr("Field "PTR_FORMAT 85.105 - " of live obj "PTR_FORMAT" in region " 85.106 - "["PTR_FORMAT", "PTR_FORMAT")", 85.107 + gclog_or_tty->print_cr("Field " PTR_FORMAT 85.108 + " of live obj " PTR_FORMAT " in region " 85.109 + "[" PTR_FORMAT ", " PTR_FORMAT ")", 85.110 p, (void*) _containing_obj, 85.111 from->bottom(), from->end()); 85.112 print_object(gclog_or_tty, _containing_obj); 85.113 - gclog_or_tty->print_cr("points to dead obj "PTR_FORMAT" in region " 85.114 - "["PTR_FORMAT", "PTR_FORMAT")", 85.115 + gclog_or_tty->print_cr("points to dead obj " PTR_FORMAT " in region " 85.116 + "[" PTR_FORMAT ", " PTR_FORMAT ")", 85.117 (void*) obj, to->bottom(), to->end()); 85.118 print_object(gclog_or_tty, obj); 85.119 } 85.120 @@ -784,14 +784,14 @@ 85.121 gclog_or_tty->print_cr("----------"); 85.122 } 85.123 gclog_or_tty->print_cr("Missing rem set entry:"); 85.124 - gclog_or_tty->print_cr("Field "PTR_FORMAT" " 85.125 - "of obj "PTR_FORMAT", " 85.126 - "in region "HR_FORMAT, 85.127 + gclog_or_tty->print_cr("Field " PTR_FORMAT " " 85.128 + "of obj " PTR_FORMAT ", " 85.129 + "in region " HR_FORMAT, 85.130 p, (void*) _containing_obj, 85.131 HR_FORMAT_PARAMS(from)); 85.132 _containing_obj->print_on(gclog_or_tty); 85.133 - gclog_or_tty->print_cr("points to obj "PTR_FORMAT" " 85.134 - "in region "HR_FORMAT, 85.135 + gclog_or_tty->print_cr("points to obj " PTR_FORMAT " " 85.136 + "in region " HR_FORMAT, 85.137 (void*) obj, 85.138 HR_FORMAT_PARAMS(to)); 85.139 if (obj->is_oop()) { 85.140 @@ -830,8 +830,8 @@ 85.141 85.142 if (is_humongous != g1->isHumongous(obj_size) && 85.143 !g1->is_obj_dead(obj, this)) { // Dead objects may have bigger block_size since they span several objects. 85.144 - gclog_or_tty->print_cr("obj "PTR_FORMAT" is of %shumongous size (" 85.145 - SIZE_FORMAT" words) in a %shumongous region", 85.146 + gclog_or_tty->print_cr("obj " PTR_FORMAT " is of %shumongous size (" 85.147 + SIZE_FORMAT " words) in a %shumongous region", 85.148 p, g1->isHumongous(obj_size) ? "" : "non-", 85.149 obj_size, is_humongous ? "" : "non-"); 85.150 *failures = true; 85.151 @@ -854,12 +854,12 @@ 85.152 (vo == VerifyOption_G1UsePrevMarking && 85.153 ClassLoaderDataGraph::unload_list_contains(klass)); 85.154 if (!is_metaspace_object) { 85.155 - gclog_or_tty->print_cr("klass "PTR_FORMAT" of object "PTR_FORMAT" " 85.156 + gclog_or_tty->print_cr("klass " PTR_FORMAT " of object " PTR_FORMAT " " 85.157 "not metadata", klass, (void *)obj); 85.158 *failures = true; 85.159 return; 85.160 } else if (!klass->is_klass()) { 85.161 - gclog_or_tty->print_cr("klass "PTR_FORMAT" of object "PTR_FORMAT" " 85.162 + gclog_or_tty->print_cr("klass " PTR_FORMAT " of object " PTR_FORMAT " " 85.163 "not a klass", klass, (void *)obj); 85.164 *failures = true; 85.165 return; 85.166 @@ -891,7 +891,7 @@ 85.167 } 85.168 } 85.169 } else { 85.170 - gclog_or_tty->print_cr(PTR_FORMAT" not an oop", (void *)obj); 85.171 + gclog_or_tty->print_cr(PTR_FORMAT " not an oop", (void *)obj); 85.172 *failures = true; 85.173 return; 85.174 } 85.175 @@ -901,8 +901,8 @@ 85.176 } 85.177 85.178 if (p != top()) { 85.179 - gclog_or_tty->print_cr("end of last object "PTR_FORMAT" " 85.180 - "does not match top "PTR_FORMAT, p, top()); 85.181 + gclog_or_tty->print_cr("end of last object " PTR_FORMAT " " 85.182 + "does not match top " PTR_FORMAT, p, top()); 85.183 *failures = true; 85.184 return; 85.185 } 85.186 @@ -917,8 +917,8 @@ 85.187 HeapWord* addr_1 = p; 85.188 HeapWord* b_start_1 = _offsets.block_start_const(addr_1); 85.189 if (b_start_1 != p) { 85.190 - gclog_or_tty->print_cr("BOT look up for top: "PTR_FORMAT" " 85.191 - " yielded "PTR_FORMAT", expecting "PTR_FORMAT, 85.192 + gclog_or_tty->print_cr("BOT look up for top: " PTR_FORMAT " " 85.193 + " yielded " PTR_FORMAT ", expecting " PTR_FORMAT, 85.194 addr_1, b_start_1, p); 85.195 *failures = true; 85.196 return; 85.197 @@ -929,8 +929,8 @@ 85.198 if (addr_2 < the_end) { 85.199 HeapWord* b_start_2 = _offsets.block_start_const(addr_2); 85.200 if (b_start_2 != p) { 85.201 - gclog_or_tty->print_cr("BOT look up for top + 1: "PTR_FORMAT" " 85.202 - " yielded "PTR_FORMAT", expecting "PTR_FORMAT, 85.203 + gclog_or_tty->print_cr("BOT look up for top + 1: " PTR_FORMAT " " 85.204 + " yielded " PTR_FORMAT ", expecting " PTR_FORMAT, 85.205 addr_2, b_start_2, p); 85.206 *failures = true; 85.207 return; 85.208 @@ -943,8 +943,8 @@ 85.209 if (addr_3 < the_end) { 85.210 HeapWord* b_start_3 = _offsets.block_start_const(addr_3); 85.211 if (b_start_3 != p) { 85.212 - gclog_or_tty->print_cr("BOT look up for top + diff: "PTR_FORMAT" " 85.213 - " yielded "PTR_FORMAT", expecting "PTR_FORMAT, 85.214 + gclog_or_tty->print_cr("BOT look up for top + diff: " PTR_FORMAT " " 85.215 + " yielded " PTR_FORMAT ", expecting " PTR_FORMAT, 85.216 addr_3, b_start_3, p); 85.217 *failures = true; 85.218 return; 85.219 @@ -955,8 +955,8 @@ 85.220 HeapWord* addr_4 = the_end - 1; 85.221 HeapWord* b_start_4 = _offsets.block_start_const(addr_4); 85.222 if (b_start_4 != p) { 85.223 - gclog_or_tty->print_cr("BOT look up for end - 1: "PTR_FORMAT" " 85.224 - " yielded "PTR_FORMAT", expecting "PTR_FORMAT, 85.225 + gclog_or_tty->print_cr("BOT look up for end - 1: " PTR_FORMAT " " 85.226 + " yielded " PTR_FORMAT ", expecting " PTR_FORMAT, 85.227 addr_4, b_start_4, p); 85.228 *failures = true; 85.229 return; 85.230 @@ -964,8 +964,8 @@ 85.231 } 85.232 85.233 if (is_humongous && object_num > 1) { 85.234 - gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] is humongous " 85.235 - "but has "SIZE_FORMAT", objects", 85.236 + gclog_or_tty->print_cr("region [" PTR_FORMAT "," PTR_FORMAT "] is humongous " 85.237 + "but has " SIZE_FORMAT ", objects", 85.238 bottom(), end(), object_num); 85.239 *failures = true; 85.240 return;
86.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.hpp Fri Jul 27 11:47:10 2018 +0100 86.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp Sat Aug 04 12:53:22 2018 +0100 86.3 @@ -52,7 +52,7 @@ 86.4 class HeapRegionSetBase; 86.5 class nmethod; 86.6 86.7 -#define HR_FORMAT "%u:(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]" 86.8 +#define HR_FORMAT "%u:(%s)[" PTR_FORMAT "," PTR_FORMAT "," PTR_FORMAT "]" 86.9 #define HR_FORMAT_PARAMS(_hr_) \ 86.10 (_hr_)->hrm_index(), \ 86.11 (_hr_)->get_short_type_str(), \ 86.12 @@ -534,8 +534,8 @@ 86.13 void set_containing_set(HeapRegionSetBase* containing_set) { 86.14 assert((containing_set == NULL && _containing_set != NULL) || 86.15 (containing_set != NULL && _containing_set == NULL), 86.16 - err_msg("containing_set: "PTR_FORMAT" " 86.17 - "_containing_set: "PTR_FORMAT, 86.18 + err_msg("containing_set: " PTR_FORMAT " " 86.19 + "_containing_set: " PTR_FORMAT, 86.20 p2i(containing_set), p2i(_containing_set))); 86.21 86.22 _containing_set = containing_set;
87.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.inline.hpp Fri Jul 27 11:47:10 2018 +0100 87.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.inline.hpp Sat Aug 04 12:53:22 2018 +0100 87.3 @@ -112,7 +112,7 @@ 87.4 87.5 assert(ClassUnloadingWithConcurrentMark, 87.6 err_msg("All blocks should be objects if G1 Class Unloading isn't used. " 87.7 - "HR: ["PTR_FORMAT", "PTR_FORMAT", "PTR_FORMAT") " 87.8 + "HR: [" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT ") " 87.9 "addr: " PTR_FORMAT, 87.10 p2i(bottom()), p2i(top()), p2i(end()), p2i(addr))); 87.11
88.1 --- a/src/share/vm/gc_implementation/g1/heapRegionManager.cpp Fri Jul 27 11:47:10 2018 +0100 88.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionManager.cpp Sat Aug 04 12:53:22 2018 +0100 88.3 @@ -432,7 +432,7 @@ 88.4 HeapRegion* hr = _regions.get_by_index(i); 88.5 guarantee(hr != NULL, err_msg("invariant: i: %u", i)); 88.6 guarantee(!prev_committed || hr->bottom() == prev_end, 88.7 - err_msg("invariant i: %u "HR_FORMAT" prev_end: "PTR_FORMAT, 88.8 + err_msg("invariant i: %u " HR_FORMAT " prev_end: " PTR_FORMAT, 88.9 i, HR_FORMAT_PARAMS(hr), p2i(prev_end))); 88.10 guarantee(hr->hrm_index() == i, 88.11 err_msg("invariant: i: %u hrm_index(): %u", i, hr->hrm_index()));
89.1 --- a/src/share/vm/gc_implementation/g1/heapRegionManager.inline.hpp Fri Jul 27 11:47:10 2018 +0100 89.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionManager.inline.hpp Sat Aug 04 12:53:22 2018 +0100 89.3 @@ -31,9 +31,9 @@ 89.4 89.5 inline HeapRegion* HeapRegionManager::addr_to_region(HeapWord* addr) const { 89.6 assert(addr < heap_end(), 89.7 - err_msg("addr: "PTR_FORMAT" end: "PTR_FORMAT, p2i(addr), p2i(heap_end()))); 89.8 + err_msg("addr: " PTR_FORMAT " end: " PTR_FORMAT, p2i(addr), p2i(heap_end()))); 89.9 assert(addr >= heap_bottom(), 89.10 - err_msg("addr: "PTR_FORMAT" bottom: "PTR_FORMAT, p2i(addr), p2i(heap_bottom()))); 89.11 + err_msg("addr: " PTR_FORMAT " bottom: " PTR_FORMAT, p2i(addr), p2i(heap_bottom()))); 89.12 89.13 HeapRegion* hr = _regions.get_by_address(addr); 89.14 return hr;
90.1 --- a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp Fri Jul 27 11:47:10 2018 +0100 90.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp Sat Aug 04 12:53:22 2018 +0100 90.3 @@ -381,7 +381,7 @@ 90.4 90.5 void FromCardCache::invalidate(uint start_idx, size_t new_num_regions) { 90.6 guarantee((size_t)start_idx + new_num_regions <= max_uintx, 90.7 - err_msg("Trying to invalidate beyond maximum region, from %u size "SIZE_FORMAT, 90.8 + err_msg("Trying to invalidate beyond maximum region, from %u size " SIZE_FORMAT, 90.9 start_idx, new_num_regions)); 90.10 for (uint i = 0; i < HeapRegionRemSet::num_par_rem_sets(); i++) { 90.11 uint end_idx = (start_idx + (uint)new_num_regions); 90.12 @@ -396,7 +396,7 @@ 90.13 void FromCardCache::print(outputStream* out) { 90.14 for (uint i = 0; i < HeapRegionRemSet::num_par_rem_sets(); i++) { 90.15 for (uint j = 0; j < _max_regions; j++) { 90.16 - out->print_cr("_from_card_cache["UINT32_FORMAT"]["UINT32_FORMAT"] = "INT32_FORMAT".", 90.17 + out->print_cr("_from_card_cache[" UINT32_FORMAT "][" UINT32_FORMAT "] = " INT32_FORMAT ".", 90.18 i, j, at(i, j)); 90.19 } 90.20 } 90.21 @@ -436,7 +436,7 @@ 90.22 int from_card = (int)(uintptr_t(from) >> CardTableModRefBS::card_shift); 90.23 90.24 if (G1TraceHeapRegionRememberedSet) { 90.25 - gclog_or_tty->print_cr("Table for [" PTR_FORMAT "...): card %d (cache = "INT32_FORMAT")", 90.26 + gclog_or_tty->print_cr("Table for [" PTR_FORMAT "...): card %d (cache = " INT32_FORMAT ")", 90.27 hr()->bottom(), from_card, 90.28 FromCardCache::at((uint)tid, cur_hrm_ind)); 90.29 } 90.30 @@ -650,13 +650,13 @@ 90.31 90.32 assert(_coarse_map.size() == region_bm->size(), "Precondition"); 90.33 if (G1RSScrubVerbose) { 90.34 - gclog_or_tty->print(" Coarse map: before = "SIZE_FORMAT"...", 90.35 + gclog_or_tty->print(" Coarse map: before = " SIZE_FORMAT "...", 90.36 _n_coarse_entries); 90.37 } 90.38 _coarse_map.set_intersection(*region_bm); 90.39 _n_coarse_entries = _coarse_map.count_one_bits(); 90.40 if (G1RSScrubVerbose) { 90.41 - gclog_or_tty->print_cr(" after = "SIZE_FORMAT".", _n_coarse_entries); 90.42 + gclog_or_tty->print_cr(" after = " SIZE_FORMAT ".", _n_coarse_entries); 90.43 } 90.44 90.45 // Now do the fine-grained maps. 90.46 @@ -1052,7 +1052,7 @@ 90.47 90.48 card_index = _cur_region_card_offset + _cur_card_in_prt; 90.49 guarantee(_cur_card_in_prt < HeapRegion::CardsPerRegion, 90.50 - err_msg("Card index "SIZE_FORMAT" must be within the region", _cur_card_in_prt)); 90.51 + err_msg("Card index " SIZE_FORMAT " must be within the region", _cur_card_in_prt)); 90.52 return true; 90.53 } 90.54 90.55 @@ -1221,8 +1221,8 @@ 90.56 90.57 size_t min_prt_size = sizeof(void*) + dummy->bm()->size_in_words() * HeapWordSize; 90.58 assert(dummy->mem_size() > min_prt_size, 90.59 - err_msg("PerRegionTable memory usage is suspiciously small, only has "SIZE_FORMAT" bytes. " 90.60 - "Should be at least "SIZE_FORMAT" bytes.", dummy->mem_size(), min_prt_size)); 90.61 + err_msg("PerRegionTable memory usage is suspiciously small, only has " SIZE_FORMAT " bytes. " 90.62 + "Should be at least " SIZE_FORMAT " bytes.", dummy->mem_size(), min_prt_size)); 90.63 free(dummy); 90.64 guarantee(dummy->mem_size() == fl_mem_size(), "fl_mem_size() does not return the correct element size"); 90.65 // try to reset the state
91.1 --- a/src/share/vm/gc_implementation/g1/heapRegionSet.cpp Fri Jul 27 11:47:10 2018 +0100 91.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionSet.cpp Sat Aug 04 12:53:22 2018 +0100 91.3 @@ -32,7 +32,7 @@ 91.4 uint FreeRegionList::_unrealistically_long_length = 0; 91.5 91.6 void HeapRegionSetBase::fill_in_ext_msg(hrs_ext_msg* msg, const char* message) { 91.7 - msg->append("[%s] %s ln: %u cy: "SIZE_FORMAT, 91.8 + msg->append("[%s] %s ln: %u cy: " SIZE_FORMAT, 91.9 name(), message, length(), total_capacity_bytes()); 91.10 fill_in_ext_msg_extra(msg); 91.11 } 91.12 @@ -84,13 +84,13 @@ 91.13 91.14 void HeapRegionSetBase::print_on(outputStream* out, bool print_contents) { 91.15 out->cr(); 91.16 - out->print_cr("Set: %s ("PTR_FORMAT")", name(), this); 91.17 + out->print_cr("Set: %s (" PTR_FORMAT ")", name(), this); 91.18 out->print_cr(" Region Assumptions"); 91.19 out->print_cr(" humongous : %s", BOOL_TO_STR(regions_humongous())); 91.20 out->print_cr(" free : %s", BOOL_TO_STR(regions_free())); 91.21 out->print_cr(" Attributes"); 91.22 out->print_cr(" length : %14u", length()); 91.23 - out->print_cr(" total capacity : "SIZE_FORMAT_W(14)" bytes", 91.24 + out->print_cr(" total capacity : " SIZE_FORMAT_W(14) " bytes", 91.25 total_capacity_bytes()); 91.26 } 91.27 91.28 @@ -106,7 +106,7 @@ 91.29 } 91.30 91.31 void FreeRegionList::fill_in_ext_msg_extra(hrs_ext_msg* msg) { 91.32 - msg->append(" hd: "PTR_FORMAT" tl: "PTR_FORMAT, _head, _tail); 91.33 + msg->append(" hd: " PTR_FORMAT " tl: " PTR_FORMAT, _head, _tail); 91.34 } 91.35 91.36 void FreeRegionList::remove_all() { 91.37 @@ -277,8 +277,8 @@ 91.38 void FreeRegionList::print_on(outputStream* out, bool print_contents) { 91.39 HeapRegionSetBase::print_on(out, print_contents); 91.40 out->print_cr(" Linking"); 91.41 - out->print_cr(" head : "PTR_FORMAT, _head); 91.42 - out->print_cr(" tail : "PTR_FORMAT, _tail); 91.43 + out->print_cr(" head : " PTR_FORMAT, _head); 91.44 + out->print_cr(" tail : " PTR_FORMAT, _tail); 91.45 91.46 if (print_contents) { 91.47 out->print_cr(" Contents"); 91.48 @@ -306,7 +306,7 @@ 91.49 91.50 count++; 91.51 guarantee(count < _unrealistically_long_length, 91.52 - hrs_err_msg("[%s] the calculated length: %u seems very long, is there maybe a cycle? curr: "PTR_FORMAT" prev0: "PTR_FORMAT" " "prev1: "PTR_FORMAT" length: %u", name(), count, curr, prev0, prev1, length())); 91.53 + hrs_err_msg("[%s] the calculated length: %u seems very long, is there maybe a cycle? curr: " PTR_FORMAT " prev0: " PTR_FORMAT " " "prev1: " PTR_FORMAT " length: %u", name(), count, curr, prev0, prev1, length())); 91.54 91.55 if (curr->next() != NULL) { 91.56 guarantee(curr->next()->prev() == curr, "Next or prev pointers messed up");
92.1 --- a/src/share/vm/gc_implementation/g1/satbQueue.cpp Fri Jul 27 11:47:10 2018 +0100 92.2 +++ b/src/share/vm/gc_implementation/g1/satbQueue.cpp Sat Aug 04 12:53:22 2018 +0100 92.3 @@ -202,8 +202,8 @@ 92.4 92.5 void ObjPtrQueue::print(const char* name, 92.6 void** buf, size_t index, size_t sz) { 92.7 - gclog_or_tty->print_cr(" SATB BUFFER [%s] buf: "PTR_FORMAT" " 92.8 - "index: "SIZE_FORMAT" sz: "SIZE_FORMAT, 92.9 + gclog_or_tty->print_cr(" SATB BUFFER [%s] buf: " PTR_FORMAT " " 92.10 + "index: " SIZE_FORMAT " sz: " SIZE_FORMAT, 92.11 name, buf, index, sz); 92.12 } 92.13 #endif // PRODUCT
93.1 --- a/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp Fri Jul 27 11:47:10 2018 +0100 93.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp Sat Aug 04 12:53:22 2018 +0100 93.3 @@ -1,5 +1,5 @@ 93.4 /* 93.5 - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 93.6 + * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. 93.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 93.8 * 93.9 * This code is free software; you can redistribute it and/or modify it 93.10 @@ -1035,7 +1035,7 @@ 93.11 if (monitor() != NULL) { 93.12 MonitorSupply::release(monitor()); 93.13 } 93.14 - _monitor = (Monitor*) 0xDEAD000F; 93.15 + _monitor = (Monitor*) (uintptr_t) 0xDEAD000F; 93.16 } 93.17 93.18 void WaitForBarrierGCTask::do_it(GCTaskManager* manager, uint which) {
94.1 --- a/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Fri Jul 27 11:47:10 2018 +0100 94.2 +++ b/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Sat Aug 04 12:53:22 2018 +0100 94.3 @@ -86,7 +86,7 @@ 94.4 while (words_left_to_fill > 0) { 94.5 size_t words_to_fill = MIN2(words_left_to_fill, CollectedHeap::filler_array_max_size()); 94.6 assert(words_to_fill >= CollectedHeap::min_fill_size(), 94.7 - err_msg("Remaining size ("SIZE_FORMAT ") is too small to fill (based on " SIZE_FORMAT " and " SIZE_FORMAT ")", 94.8 + err_msg("Remaining size (" SIZE_FORMAT ") is too small to fill (based on " SIZE_FORMAT " and " SIZE_FORMAT ")", 94.9 words_to_fill, words_left_to_fill, CollectedHeap::filler_array_max_size())); 94.10 CollectedHeap::fill_with_object((HeapWord*)cur_top, words_to_fill); 94.11 if (!os::numa_has_static_binding()) {
95.1 --- a/src/share/vm/interpreter/interpreterRuntime.cpp Fri Jul 27 11:47:10 2018 +0100 95.2 +++ b/src/share/vm/interpreter/interpreterRuntime.cpp Sat Aug 04 12:53:22 2018 +0100 95.3 @@ -1,5 +1,5 @@ 95.4 /* 95.5 - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. 95.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 95.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 95.8 * 95.9 * This code is free software; you can redistribute it and/or modify it 95.10 @@ -320,6 +320,8 @@ 95.11 Handle exception = get_preinitialized_exception( 95.12 SystemDictionary::StackOverflowError_klass(), 95.13 CHECK); 95.14 + // Increment counter for hs_err file reporting 95.15 + Atomic::inc(&Exceptions::_stack_overflow_errors); 95.16 THROW_HANDLE(exception); 95.17 IRT_END 95.18
96.1 --- a/src/share/vm/interpreter/oopMapCache.cpp Fri Jul 27 11:47:10 2018 +0100 96.2 +++ b/src/share/vm/interpreter/oopMapCache.cpp Sat Aug 04 12:53:22 2018 +0100 96.3 @@ -1,5 +1,5 @@ 96.4 /* 96.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 96.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 96.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 96.8 * 96.9 * This code is free software; you can redistribute it and/or modify it 96.10 @@ -426,9 +426,9 @@ 96.11 96.12 #ifndef PRODUCT 96.13 96.14 -static long _total_memory_usage = 0; 96.15 +static size_t _total_memory_usage = 0; 96.16 96.17 -long OopMapCache::memory_usage() { 96.18 +size_t OopMapCache::memory_usage() { 96.19 return _total_memory_usage; 96.20 } 96.21
97.1 --- a/src/share/vm/interpreter/oopMapCache.hpp Fri Jul 27 11:47:10 2018 +0100 97.2 +++ b/src/share/vm/interpreter/oopMapCache.hpp Sat Aug 04 12:53:22 2018 +0100 97.3 @@ -1,5 +1,5 @@ 97.4 /* 97.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 97.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 97.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 97.8 * 97.9 * This code is free software; you can redistribute it and/or modify it 97.10 @@ -176,7 +176,7 @@ 97.11 static void compute_one_oop_map(methodHandle method, int bci, InterpreterOopMap* entry); 97.12 97.13 // Returns total no. of bytes allocated as part of OopMapCache's 97.14 - static long memory_usage() PRODUCT_RETURN0; 97.15 + static size_t memory_usage() PRODUCT_RETURN0; 97.16 }; 97.17 97.18 #endif // SHARE_VM_INTERPRETER_OOPMAPCACHE_HPP
98.1 --- a/src/share/vm/memory/allocation.cpp Fri Jul 27 11:47:10 2018 +0100 98.2 +++ b/src/share/vm/memory/allocation.cpp Sat Aug 04 12:53:22 2018 +0100 98.3 @@ -749,7 +749,7 @@ 98.4 julong AllocStats::resource_bytes() { return Arena::_bytes_allocated - start_res_bytes; } 98.5 void AllocStats::print() { 98.6 tty->print_cr(UINT64_FORMAT " mallocs (" UINT64_FORMAT "MB), " 98.7 - UINT64_FORMAT" frees (" UINT64_FORMAT "MB), " UINT64_FORMAT "MB resrc", 98.8 + UINT64_FORMAT " frees (" UINT64_FORMAT "MB), " UINT64_FORMAT "MB resrc", 98.9 num_mallocs(), alloc_bytes()/M, num_frees(), free_bytes()/M, resource_bytes()/M); 98.10 } 98.11
99.1 --- a/src/share/vm/memory/barrierSet.inline.hpp Fri Jul 27 11:47:10 2018 +0100 99.2 +++ b/src/share/vm/memory/barrierSet.inline.hpp Sat Aug 04 12:53:22 2018 +0100 99.3 @@ -69,7 +69,7 @@ 99.4 assert(UseCompressedOops || (aligned_start == start && aligned_end == end), 99.5 "Expected heap word alignment of start and end"); 99.6 #if 0 99.7 - warning("Post:\t" INTPTR_FORMAT "[" SIZE_FORMAT "] : [" INTPTR_FORMAT","INTPTR_FORMAT")\t", 99.8 + warning("Post:\t" INTPTR_FORMAT "[" SIZE_FORMAT "] : [" INTPTR_FORMAT "," INTPTR_FORMAT ")\t", 99.9 start, count, aligned_start, aligned_end); 99.10 #endif 99.11 write_ref_array_work(MemRegion(aligned_start, aligned_end));
100.1 --- a/src/share/vm/memory/blockOffsetTable.cpp Fri Jul 27 11:47:10 2018 +0100 100.2 +++ b/src/share/vm/memory/blockOffsetTable.cpp Sat Aug 04 12:53:22 2018 +0100 100.3 @@ -560,7 +560,7 @@ 100.4 q = n; 100.5 n += _sp->block_size(n); 100.6 assert(n > q, 100.7 - err_msg("Looping at n = " PTR_FORMAT " with last = " PTR_FORMAT"," 100.8 + err_msg("Looping at n = " PTR_FORMAT " with last = " PTR_FORMAT "," 100.9 " while querying blk_start(" PTR_FORMAT ")" 100.10 " on _sp = [" PTR_FORMAT "," PTR_FORMAT ")", 100.11 p2i(n), p2i(last), p2i(addr), p2i(_sp->bottom()), p2i(_sp->end())));
101.1 --- a/src/share/vm/memory/cardTableModRefBS.cpp Fri Jul 27 11:47:10 2018 +0100 101.2 +++ b/src/share/vm/memory/cardTableModRefBS.cpp Sat Aug 04 12:53:22 2018 +0100 101.3 @@ -678,7 +678,7 @@ 101.4 (val_equals) ? "" : "not ", val); 101.5 failures = true; 101.6 } 101.7 - tty->print_cr("== card "PTR_FORMAT" ["PTR_FORMAT","PTR_FORMAT"], " 101.8 + tty->print_cr("== card " PTR_FORMAT " [" PTR_FORMAT "," PTR_FORMAT "], " 101.9 "val: %d", p2i(curr), p2i(addr_for(curr)), 101.10 p2i((HeapWord*) (((size_t) addr_for(curr)) + card_size)), 101.11 (int) curr_val);
102.1 --- a/src/share/vm/memory/cardTableModRefBS.hpp Fri Jul 27 11:47:10 2018 +0100 102.2 +++ b/src/share/vm/memory/cardTableModRefBS.hpp Sat Aug 04 12:53:22 2018 +0100 102.3 @@ -158,8 +158,8 @@ 102.4 // Mapping from address to card marking array entry 102.5 jbyte* byte_for(const void* p) const { 102.6 assert(_whole_heap.contains(p), 102.7 - err_msg("Attempt to access p = "PTR_FORMAT" out of bounds of " 102.8 - " card marking array's _whole_heap = ["PTR_FORMAT","PTR_FORMAT")", 102.9 + err_msg("Attempt to access p = " PTR_FORMAT " out of bounds of " 102.10 + " card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")", 102.11 p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end()))); 102.12 jbyte* result = &byte_map_base[uintptr_t(p) >> card_shift]; 102.13 assert(result >= _byte_map && result < _byte_map + _byte_map_size, 102.14 @@ -436,8 +436,8 @@ 102.15 size_t delta = pointer_delta(p, byte_map_base, sizeof(jbyte)); 102.16 HeapWord* result = (HeapWord*) (delta << card_shift); 102.17 assert(_whole_heap.contains(result), 102.18 - err_msg("Returning result = "PTR_FORMAT" out of bounds of " 102.19 - " card marking array's _whole_heap = ["PTR_FORMAT","PTR_FORMAT")", 102.20 + err_msg("Returning result = " PTR_FORMAT " out of bounds of " 102.21 + " card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")", 102.22 p2i(result), p2i(_whole_heap.start()), p2i(_whole_heap.end()))); 102.23 return result; 102.24 } 102.25 @@ -445,8 +445,8 @@ 102.26 // Mapping from address to card marking array index. 102.27 size_t index_for(void* p) { 102.28 assert(_whole_heap.contains(p), 102.29 - err_msg("Attempt to access p = "PTR_FORMAT" out of bounds of " 102.30 - " card marking array's _whole_heap = ["PTR_FORMAT","PTR_FORMAT")", 102.31 + err_msg("Attempt to access p = " PTR_FORMAT " out of bounds of " 102.32 + " card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")", 102.33 p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end()))); 102.34 return byte_for(p) - _byte_map; 102.35 }
103.1 --- a/src/share/vm/memory/generation.cpp Fri Jul 27 11:47:10 2018 +0100 103.2 +++ b/src/share/vm/memory/generation.cpp Sat Aug 04 12:53:22 2018 +0100 103.3 @@ -187,7 +187,7 @@ 103.4 bool res = (available >= max_promotion_in_bytes); 103.5 if (PrintGC && Verbose) { 103.6 gclog_or_tty->print_cr( 103.7 - "Generation: promo attempt is%s safe: available("SIZE_FORMAT") %s max_promo("SIZE_FORMAT")", 103.8 + "Generation: promo attempt is%s safe: available(" SIZE_FORMAT ") %s max_promo(" SIZE_FORMAT ")", 103.9 res? "":" not", available, res? ">=":"<", 103.10 max_promotion_in_bytes); 103.11 }
104.1 --- a/src/share/vm/memory/guardedMemory.cpp Fri Jul 27 11:47:10 2018 +0100 104.2 +++ b/src/share/vm/memory/guardedMemory.cpp Sat Aug 04 12:53:22 2018 +0100 104.3 @@ -1,5 +1,5 @@ 104.4 /* 104.5 - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 104.6 + * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. 104.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 104.8 * 104.9 * This code is free software; you can redistribute it and/or modify it 104.10 @@ -84,6 +84,8 @@ 104.11 104.12 #ifndef PRODUCT 104.13 104.14 +#define GEN_PURPOSE_TAG ((void *) ((uintptr_t)0xf000f000)) 104.15 + 104.16 static void guarded_memory_test_check(void* p, size_t sz, void* tag) { 104.17 assert(p != NULL, "NULL pointer given to check"); 104.18 u_char* c = (u_char*) p; 104.19 @@ -100,12 +102,12 @@ 104.20 assert(total_sz > 1 && total_sz >= (sizeof(GuardHeader) + 1 + sizeof(Guard)), "Unexpected size"); 104.21 u_char* basep = (u_char*) os::malloc(total_sz, mtInternal); 104.22 104.23 - GuardedMemory guarded(basep, 1, (void*)0xf000f000); 104.24 + GuardedMemory guarded(basep, 1, GEN_PURPOSE_TAG); 104.25 104.26 assert(*basep == badResourceValue, "Expected guard in the form of badResourceValue"); 104.27 u_char* userp = guarded.get_user_ptr(); 104.28 assert(*userp == uninitBlockPad, "Expected uninitialized data in the form of uninitBlockPad"); 104.29 - guarded_memory_test_check(userp, 1, (void*)0xf000f000); 104.30 + guarded_memory_test_check(userp, 1, GEN_PURPOSE_TAG); 104.31 104.32 void* freep = guarded.release_for_freeing(); 104.33 assert((u_char*)freep == basep, "Expected the same pointer guard was ");
105.1 --- a/src/share/vm/memory/metaspace.cpp Fri Jul 27 11:47:10 2018 +0100 105.2 +++ b/src/share/vm/memory/metaspace.cpp Sat Aug 04 12:53:22 2018 +0100 105.3 @@ -3098,13 +3098,24 @@ 105.4 initialize_class_space(metaspace_rs); 105.5 105.6 if (PrintCompressedOopsMode || (PrintMiscellaneous && Verbose)) { 105.7 - gclog_or_tty->print_cr("Narrow klass base: " PTR_FORMAT ", Narrow klass shift: " SIZE_FORMAT, 105.8 - Universe::narrow_klass_base(), Universe::narrow_klass_shift()); 105.9 - gclog_or_tty->print_cr("Compressed class space size: " SIZE_FORMAT " Address: " PTR_FORMAT " Req Addr: " PTR_FORMAT, 105.10 - compressed_class_space_size(), metaspace_rs.base(), requested_addr); 105.11 + print_compressed_class_space(gclog_or_tty, requested_addr); 105.12 } 105.13 } 105.14 105.15 +void Metaspace::print_compressed_class_space(outputStream* st, const char* requested_addr) { 105.16 + st->print_cr("Narrow klass base: " PTR_FORMAT ", Narrow klass shift: %d", 105.17 + p2i(Universe::narrow_klass_base()), Universe::narrow_klass_shift()); 105.18 + if (_class_space_list != NULL) { 105.19 + address base = (address)_class_space_list->current_virtual_space()->bottom(); 105.20 + st->print("Compressed class space size: " SIZE_FORMAT " Address: " PTR_FORMAT, 105.21 + compressed_class_space_size(), p2i(base)); 105.22 + if (requested_addr != 0) { 105.23 + st->print(" Req Addr: " PTR_FORMAT, p2i(requested_addr)); 105.24 + } 105.25 + st->cr(); 105.26 + } 105.27 + } 105.28 + 105.29 // For UseCompressedClassPointers the class space is reserved above the top of 105.30 // the Java heap. The argument passed in is at the base of the compressed space. 105.31 void Metaspace::initialize_class_space(ReservedSpace rs) {
106.1 --- a/src/share/vm/memory/metaspace.hpp Fri Jul 27 11:47:10 2018 +0100 106.2 +++ b/src/share/vm/memory/metaspace.hpp Sat Aug 04 12:53:22 2018 +0100 106.3 @@ -1,5 +1,5 @@ 106.4 /* 106.5 - * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. 106.6 + * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. 106.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 106.8 * 106.9 * This code is free software; you can redistribute it and/or modify it 106.10 @@ -259,6 +259,8 @@ 106.11 // Debugging support 106.12 void verify(); 106.13 106.14 + static void print_compressed_class_space(outputStream* st, const char* requested_addr = 0); 106.15 + 106.16 class AllocRecordClosure : public StackObj { 106.17 public: 106.18 virtual void doit(address ptr, MetaspaceObj::Type type, int byte_size) = 0;
107.1 --- a/src/share/vm/memory/tenuredGeneration.cpp Fri Jul 27 11:47:10 2018 +0100 107.2 +++ b/src/share/vm/memory/tenuredGeneration.cpp Sat Aug 04 12:53:22 2018 +0100 107.3 @@ -294,8 +294,8 @@ 107.4 bool res = (available >= av_promo) || (available >= max_promotion_in_bytes); 107.5 if (PrintGC && Verbose) { 107.6 gclog_or_tty->print_cr( 107.7 - "Tenured: promo attempt is%s safe: available("SIZE_FORMAT") %s av_promo("SIZE_FORMAT")," 107.8 - "max_promo("SIZE_FORMAT")", 107.9 + "Tenured: promo attempt is%s safe: available(" SIZE_FORMAT ") %s av_promo(" SIZE_FORMAT ")," 107.10 + "max_promo(" SIZE_FORMAT ")", 107.11 res? "":" not", available, res? ">=":"<", 107.12 av_promo, max_promotion_in_bytes); 107.13 }
108.1 --- a/src/share/vm/memory/threadLocalAllocBuffer.cpp Fri Jul 27 11:47:10 2018 +0100 108.2 +++ b/src/share/vm/memory/threadLocalAllocBuffer.cpp Sat Aug 04 12:53:22 2018 +0100 108.3 @@ -1,5 +1,5 @@ 108.4 /* 108.5 - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 108.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 108.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 108.8 * 108.9 * This code is free software; you can redistribute it and/or modify it 108.10 @@ -200,7 +200,7 @@ 108.11 108.12 set_desired_size(initial_desired_size()); 108.13 108.14 - // Following check is needed because at startup the main (primordial) 108.15 + // Following check is needed because at startup the main 108.16 // thread is initialized before the heap is. The initialization for 108.17 // this thread is redone in startup_initialization below. 108.18 if (Universe::heap() != NULL) { 108.19 @@ -223,7 +223,7 @@ 108.20 108.21 _global_stats = new GlobalTLABStats(); 108.22 108.23 - // During jvm startup, the main (primordial) thread is initialized 108.24 + // During jvm startup, the main thread is initialized 108.25 // before the heap is initialized. So reinitialize it now. 108.26 guarantee(Thread::current()->is_Java_thread(), "tlab initialization thread not Java thread"); 108.27 Thread::current()->tlab().initialize();
109.1 --- a/src/share/vm/memory/threadLocalAllocBuffer.inline.hpp Fri Jul 27 11:47:10 2018 +0100 109.2 +++ b/src/share/vm/memory/threadLocalAllocBuffer.inline.hpp Sat Aug 04 12:53:22 2018 +0100 109.3 @@ -94,10 +94,10 @@ 109.4 109.5 if (PrintTLAB && Verbose) { 109.6 Thread* thrd = myThread(); 109.7 - gclog_or_tty->print("TLAB: %s thread: "INTPTR_FORMAT" [id: %2d]" 109.8 - " obj: "SIZE_FORMAT 109.9 - " free: "SIZE_FORMAT 109.10 - " waste: "SIZE_FORMAT"\n", 109.11 + gclog_or_tty->print("TLAB: %s thread: " INTPTR_FORMAT " [id: %2d]" 109.12 + " obj: " SIZE_FORMAT 109.13 + " free: " SIZE_FORMAT 109.14 + " waste: " SIZE_FORMAT "\n", 109.15 "slow", p2i(thrd), thrd->osthread()->thread_id(), 109.16 obj_size, free(), refill_waste_limit()); 109.17 }
110.1 --- a/src/share/vm/memory/universe.cpp Fri Jul 27 11:47:10 2018 +0100 110.2 +++ b/src/share/vm/memory/universe.cpp Sat Aug 04 12:53:22 2018 +0100 110.3 @@ -1,5 +1,5 @@ 110.4 /* 110.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 110.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 110.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 110.8 * 110.9 * This code is free software; you can redistribute it and/or modify it 110.10 @@ -882,7 +882,7 @@ 110.11 Universe::set_narrow_ptrs_base(Universe::narrow_oop_base()); 110.12 110.13 if (PrintCompressedOopsMode || (PrintMiscellaneous && Verbose)) { 110.14 - Universe::print_compressed_oops_mode(); 110.15 + Universe::print_compressed_oops_mode(tty); 110.16 } 110.17 } 110.18 // Universe::narrow_oop_base() is one page below the heap. 110.19 @@ -904,29 +904,27 @@ 110.20 return JNI_OK; 110.21 } 110.22 110.23 -void Universe::print_compressed_oops_mode() { 110.24 - tty->cr(); 110.25 - tty->print("heap address: " PTR_FORMAT ", size: " SIZE_FORMAT " MB", 110.26 +void Universe::print_compressed_oops_mode(outputStream* st) { 110.27 + st->print("heap address: " PTR_FORMAT ", size: " SIZE_FORMAT " MB", 110.28 Universe::heap()->base(), Universe::heap()->reserved_region().byte_size()/M); 110.29 110.30 - tty->print(", Compressed Oops mode: %s", narrow_oop_mode_to_string(narrow_oop_mode())); 110.31 + st->print(", Compressed Oops mode: %s", narrow_oop_mode_to_string(narrow_oop_mode())); 110.32 110.33 if (Universe::narrow_oop_base() != 0) { 110.34 - tty->print(":" PTR_FORMAT, Universe::narrow_oop_base()); 110.35 + st->print(":" PTR_FORMAT, Universe::narrow_oop_base()); 110.36 } 110.37 110.38 if (Universe::narrow_oop_shift() != 0) { 110.39 - tty->print(", Oop shift amount: %d", Universe::narrow_oop_shift()); 110.40 + st->print(", Oop shift amount: %d", Universe::narrow_oop_shift()); 110.41 } 110.42 110.43 - tty->cr(); 110.44 - tty->cr(); 110.45 + st->cr(); 110.46 } 110.47 110.48 // Reserve the Java heap, which is now the same for all GCs. 110.49 ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) { 110.50 assert(alignment <= Arguments::conservative_max_heap_alignment(), 110.51 - err_msg("actual alignment "SIZE_FORMAT" must be within maximum heap alignment "SIZE_FORMAT, 110.52 + err_msg("actual alignment " SIZE_FORMAT " must be within maximum heap alignment " SIZE_FORMAT, 110.53 alignment, Arguments::conservative_max_heap_alignment())); 110.54 size_t total_reserved = align_size_up(heap_size, alignment); 110.55 assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())),
111.1 --- a/src/share/vm/memory/universe.hpp Fri Jul 27 11:47:10 2018 +0100 111.2 +++ b/src/share/vm/memory/universe.hpp Sat Aug 04 12:53:22 2018 +0100 111.3 @@ -1,5 +1,5 @@ 111.4 /* 111.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 111.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 111.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 111.8 * 111.9 * This code is free software; you can redistribute it and/or modify it 111.10 @@ -375,7 +375,7 @@ 111.11 static void set_narrow_ptrs_base(address a) { _narrow_ptrs_base = a; } 111.12 static address narrow_ptrs_base() { return _narrow_ptrs_base; } 111.13 111.14 - static void print_compressed_oops_mode(); 111.15 + static void print_compressed_oops_mode(outputStream* st); 111.16 111.17 // this is set in vm_version on sparc (and then reset in universe afaict) 111.18 static void set_narrow_oop_shift(int shift) {
112.1 --- a/src/share/vm/oops/constantPool.cpp Fri Jul 27 11:47:10 2018 +0100 112.2 +++ b/src/share/vm/oops/constantPool.cpp Sat Aug 04 12:53:22 2018 +0100 112.3 @@ -1,5 +1,5 @@ 112.4 /* 112.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 112.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 112.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 112.8 * 112.9 * This code is free software; you can redistribute it and/or modify it 112.10 @@ -109,6 +109,16 @@ 112.11 return (objArrayOop)JNIHandles::resolve(_resolved_references); 112.12 } 112.13 112.14 +// Called from outside constant pool resolution where a resolved_reference array 112.15 +// may not be present. 112.16 +objArrayOop ConstantPool::resolved_references_or_null() const { 112.17 + if (_cache == NULL) { 112.18 + return NULL; 112.19 + } else { 112.20 + return (objArrayOop)JNIHandles::resolve(_resolved_references); 112.21 + } 112.22 +} 112.23 + 112.24 // Create resolved_references array and mapping array for original cp indexes 112.25 // The ldc bytecode was rewritten to have the resolved reference array index so need a way 112.26 // to map it back for resolving and some unlikely miscellaneous uses. 112.27 @@ -1494,7 +1504,7 @@ 112.28 } 112.29 case JVM_CONSTANT_Long: { 112.30 u8 val = Bytes::get_Java_u8(bytes); 112.31 - printf("long "INT64_FORMAT, (int64_t) *(jlong *) &val); 112.32 + printf("long " INT64_FORMAT, (int64_t) *(jlong *) &val); 112.33 ent_size = 8; 112.34 idx++; // Long takes two cpool slots 112.35 break;
113.1 --- a/src/share/vm/oops/constantPool.hpp Fri Jul 27 11:47:10 2018 +0100 113.2 +++ b/src/share/vm/oops/constantPool.hpp Sat Aug 04 12:53:22 2018 +0100 113.3 @@ -1,5 +1,5 @@ 113.4 /* 113.5 - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. 113.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 113.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 113.8 * 113.9 * This code is free software; you can redistribute it and/or modify it 113.10 @@ -200,6 +200,7 @@ 113.11 113.12 // resolved strings, methodHandles and callsite objects from the constant pool 113.13 objArrayOop resolved_references() const; 113.14 + objArrayOop resolved_references_or_null() const; 113.15 // mapping resolved object array indexes to cp indexes and back. 113.16 int object_to_cp_index(int index) { return _reference_map->at(index); } 113.17 int cp_to_object_index(int index);
114.1 --- a/src/share/vm/oops/cpCache.cpp Fri Jul 27 11:47:10 2018 +0100 114.2 +++ b/src/share/vm/oops/cpCache.cpp Sat Aug 04 12:53:22 2018 +0100 114.3 @@ -314,7 +314,7 @@ 114.4 adapter->size_of_parameters()); 114.5 114.6 if (TraceInvokeDynamic) { 114.7 - tty->print_cr("set_method_handle bc=%d appendix="PTR_FORMAT"%s method_type="PTR_FORMAT"%s method="PTR_FORMAT" ", 114.8 + tty->print_cr("set_method_handle bc=%d appendix=" PTR_FORMAT "%s method_type=" PTR_FORMAT "%s method=" PTR_FORMAT " ", 114.9 invoke_code, 114.10 (void *)appendix(), (has_appendix ? "" : " (unused)"), 114.11 (void *)method_type(), (has_method_type ? "" : " (unused)"), 114.12 @@ -528,12 +528,12 @@ 114.13 // print separator 114.14 if (index == 0) st->print_cr(" -------------"); 114.15 // print entry 114.16 - st->print("%3d ("PTR_FORMAT") ", index, (intptr_t)this); 114.17 + st->print("%3d (" PTR_FORMAT ") ", index, (intptr_t)this); 114.18 st->print_cr("[%02x|%02x|%5d]", bytecode_2(), bytecode_1(), 114.19 constant_pool_index()); 114.20 - st->print_cr(" [ "PTR_FORMAT"]", (intptr_t)_f1); 114.21 - st->print_cr(" [ "PTR_FORMAT"]", (intptr_t)_f2); 114.22 - st->print_cr(" [ "PTR_FORMAT"]", (intptr_t)_flags); 114.23 + st->print_cr(" [ " PTR_FORMAT "]", (intptr_t)_f1); 114.24 + st->print_cr(" [ " PTR_FORMAT "]", (intptr_t)_f2); 114.25 + st->print_cr(" [ " PTR_FORMAT "]", (intptr_t)_flags); 114.26 st->print_cr(" -------------"); 114.27 } 114.28
115.1 --- a/src/share/vm/oops/markOop.cpp Fri Jul 27 11:47:10 2018 +0100 115.2 +++ b/src/share/vm/oops/markOop.cpp Sat Aug 04 12:53:22 2018 +0100 115.3 @@ -49,7 +49,7 @@ 115.4 st->print("monitor=NULL"); 115.5 else { 115.6 BasicLock * bl = (BasicLock *) mon->owner(); 115.7 - st->print("monitor={count="INTPTR_FORMAT",waiters="INTPTR_FORMAT",recursions="INTPTR_FORMAT",owner="INTPTR_FORMAT"}", 115.8 + st->print("monitor={count=" INTPTR_FORMAT ",waiters=" INTPTR_FORMAT ",recursions=" INTPTR_FORMAT ",owner=" INTPTR_FORMAT "}", 115.9 mon->count(), mon->waiters(), mon->recursions(), p2i(bl)); 115.10 } 115.11 } else {
116.1 --- a/src/share/vm/oops/method.cpp Fri Jul 27 11:47:10 2018 +0100 116.2 +++ b/src/share/vm/oops/method.cpp Sat Aug 04 12:53:22 2018 +0100 116.3 @@ -1969,9 +1969,9 @@ 116.4 assert(is_method(), "must be method"); 116.5 st->print_cr("%s", internal_name()); 116.6 // get the effect of PrintOopAddress, always, for methods: 116.7 - st->print_cr(" - this oop: "INTPTR_FORMAT, (intptr_t)this); 116.8 + st->print_cr(" - this oop: " INTPTR_FORMAT, (intptr_t)this); 116.9 st->print (" - method holder: "); method_holder()->print_value_on(st); st->cr(); 116.10 - st->print (" - constants: "INTPTR_FORMAT" ", (address)constants()); 116.11 + st->print (" - constants: " INTPTR_FORMAT " ", (address)constants()); 116.12 constants()->print_value_on(st); st->cr(); 116.13 st->print (" - access: 0x%x ", access_flags().as_int()); access_flags().print_on(st); st->cr(); 116.14 st->print (" - name: "); name()->print_value_on(st); st->cr();
117.1 --- a/src/share/vm/oops/objArrayKlass.cpp Fri Jul 27 11:47:10 2018 +0100 117.2 +++ b/src/share/vm/oops/objArrayKlass.cpp Sat Aug 04 12:53:22 2018 +0100 117.3 @@ -657,7 +657,7 @@ 117.4 if (i > max_objArray_print_length) { 117.5 st->print("..."); break; 117.6 } 117.7 - st->print(" "INTPTR_FORMAT, (intptr_t)(void*)objArrayOop(obj)->obj_at(i)); 117.8 + st->print(" " INTPTR_FORMAT, (intptr_t)(void*)objArrayOop(obj)->obj_at(i)); 117.9 } 117.10 st->print(" }"); 117.11 }
118.1 --- a/src/share/vm/oops/oop.cpp Fri Jul 27 11:47:10 2018 +0100 118.2 +++ b/src/share/vm/oops/oop.cpp Sat Aug 04 12:53:22 2018 +0100 118.3 @@ -46,7 +46,7 @@ 118.4 118.5 void oopDesc::print_address_on(outputStream* st) const { 118.6 if (PrintOopAddress) { 118.7 - st->print("{"INTPTR_FORMAT"}", this); 118.8 + st->print("{" INTPTR_FORMAT "}", this); 118.9 } 118.10 } 118.11
119.1 --- a/src/share/vm/oops/oopsHierarchy.hpp Fri Jul 27 11:47:10 2018 +0100 119.2 +++ b/src/share/vm/oops/oopsHierarchy.hpp Sat Aug 04 12:53:22 2018 +0100 119.3 @@ -1,5 +1,5 @@ 119.4 /* 119.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 119.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 119.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 119.8 * 119.9 * This code is free software; you can redistribute it and/or modify it 119.10 @@ -112,9 +112,7 @@ 119.11 119.12 // Assignment 119.13 oop& operator=(const oop& o) { _o = o.obj(); return *this; } 119.14 -#ifndef SOLARIS 119.15 volatile oop& operator=(const oop& o) volatile { _o = o.obj(); return *this; } 119.16 -#endif 119.17 volatile oop& operator=(const volatile oop& o) volatile { _o = o.obj(); return *this; } 119.18 119.19 // Explict user conversions 119.20 @@ -123,11 +121,10 @@ 119.21 operator void* () const volatile { return (void *)obj(); } 119.22 #endif 119.23 operator HeapWord* () const { return (HeapWord*)obj(); } 119.24 - operator oopDesc* () const { return obj(); } 119.25 + operator oopDesc* () const volatile { return obj(); } 119.26 operator intptr_t* () const { return (intptr_t*)obj(); } 119.27 operator PromotedObject* () const { return (PromotedObject*)obj(); } 119.28 - operator markOop () const { return markOop(obj()); } 119.29 - 119.30 + operator markOop () const volatile { return markOop(obj()); } 119.31 operator address () const { return (address)obj(); } 119.32 119.33 // from javaCalls.cpp 119.34 @@ -161,11 +158,10 @@ 119.35 oop::operator=(o); \ 119.36 return *this; \ 119.37 } \ 119.38 - NOT_SOLARIS( \ 119.39 volatile type##Oop& operator=(const type##Oop& o) volatile { \ 119.40 (void)const_cast<oop&>(oop::operator=(o)); \ 119.41 return *this; \ 119.42 - }) \ 119.43 + } \ 119.44 volatile type##Oop& operator=(const volatile type##Oop& o) volatile {\ 119.45 (void)const_cast<oop&>(oop::operator=(o)); \ 119.46 return *this; \
120.1 --- a/src/share/vm/oops/typeArrayOop.hpp Fri Jul 27 11:47:10 2018 +0100 120.2 +++ b/src/share/vm/oops/typeArrayOop.hpp Sat Aug 04 12:53:22 2018 +0100 120.3 @@ -129,7 +129,7 @@ 120.4 Metadata* metadata_at(int which) const { 120.5 return (Metadata*)*long_at_addr(which); } 120.6 void metadata_at_put(int which, Metadata* contents) { 120.7 - *long_at_addr(which) = (long)contents; 120.8 + *long_at_addr(which) = (jlong)contents; 120.9 } 120.10 #else 120.11 Metadata* metadata_at(int which) const {
121.1 --- a/src/share/vm/opto/buildOopMap.cpp Fri Jul 27 11:47:10 2018 +0100 121.2 +++ b/src/share/vm/opto/buildOopMap.cpp Sat Aug 04 12:53:22 2018 +0100 121.3 @@ -1,5 +1,5 @@ 121.4 /* 121.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 121.6 + * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. 121.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 121.8 * 121.9 * This code is free software; you can redistribute it and/or modify it 121.10 @@ -629,7 +629,7 @@ 121.11 // last block as his only undone child, we can move the OopFlow from the 121.12 // pred to this block. Otherwise we have to grab a new OopFlow. 121.13 OopFlow *flow = NULL; // Flag for finding optimized flow 121.14 - Block *pred = (Block*)0xdeadbeef; 121.15 + Block *pred = (Block*)((intptr_t)0xdeadbeef); 121.16 // Scan this block's preds to find a done predecessor 121.17 for (uint j = 1; j < b->num_preds(); j++) { 121.18 Block* p = _cfg->get_block_for_node(b->pred(j));
122.1 --- a/src/share/vm/opto/callnode.cpp Fri Jul 27 11:47:10 2018 +0100 122.2 +++ b/src/share/vm/opto/callnode.cpp Sat Aug 04 12:53:22 2018 +0100 122.3 @@ -340,7 +340,7 @@ 122.4 const Type *t = n->bottom_type(); 122.5 switch (t->base()) { 122.6 case Type::Int: 122.7 - st->print(" %s%d]=#"INT32_FORMAT,msg,i,t->is_int()->get_con()); 122.8 + st->print(" %s%d]=#" INT32_FORMAT,msg,i,t->is_int()->get_con()); 122.9 break; 122.10 case Type::AnyPtr: 122.11 assert( t == TypePtr::NULL_PTR || n->in_dump(), "" ); 122.12 @@ -369,7 +369,7 @@ 122.13 st->print(" %s%d]=#%fF",msg,i,t->is_float_constant()->_f); 122.14 break; 122.15 case Type::Long: 122.16 - st->print(" %s%d]=#"INT64_FORMAT,msg,i,(int64_t)(t->is_long()->get_con())); 122.17 + st->print(" %s%d]=#" INT64_FORMAT,msg,i,(int64_t)(t->is_long()->get_con())); 122.18 break; 122.19 case Type::Half: 122.20 case Type::Top:
123.1 --- a/src/share/vm/opto/chaitin.cpp Fri Jul 27 11:47:10 2018 +0100 123.2 +++ b/src/share/vm/opto/chaitin.cpp Sat Aug 04 12:53:22 2018 +0100 123.3 @@ -1,5 +1,5 @@ 123.4 /* 123.5 - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 123.6 + * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. 123.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 123.8 * 123.9 * This code is free software; you can redistribute it and/or modify it 123.10 @@ -755,7 +755,7 @@ 123.11 const RegMask &rm = n->out_RegMask(); 123.12 lrg.AND( rm ); 123.13 123.14 - int ireg = n->ideal_reg(); 123.15 + uint ireg = n->ideal_reg(); 123.16 assert( !n->bottom_type()->isa_oop_ptr() || ireg == Op_RegP, 123.17 "oops must be in Op_RegP's" ); 123.18 123.19 @@ -961,7 +961,7 @@ 123.20 123.21 // Check for bound register masks 123.22 const RegMask &lrgmask = lrg.mask(); 123.23 - int kreg = n->in(k)->ideal_reg(); 123.24 + uint kreg = n->in(k)->ideal_reg(); 123.25 bool is_vect = RegMask::is_vector(kreg); 123.26 assert(n->in(k)->bottom_type()->isa_vect() == NULL || 123.27 is_vect || kreg == Op_RegD || kreg == Op_RegL,
124.1 --- a/src/share/vm/opto/compile.cpp Fri Jul 27 11:47:10 2018 +0100 124.2 +++ b/src/share/vm/opto/compile.cpp Sat Aug 04 12:53:22 2018 +0100 124.3 @@ -1,5 +1,5 @@ 124.4 /* 124.5 - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 124.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 124.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 124.8 * 124.9 * This code is free software; you can redistribute it and/or modify it 124.10 @@ -2392,8 +2392,8 @@ 124.11 print_method(PHASE_FINAL_CODE); 124.12 124.13 // He's dead, Jim. 124.14 - _cfg = (PhaseCFG*)0xdeadbeef; 124.15 - _regalloc = (PhaseChaitin*)0xdeadbeef; 124.16 + _cfg = (PhaseCFG*)((intptr_t)0xdeadbeef); 124.17 + _regalloc = (PhaseChaitin*)((intptr_t)0xdeadbeef); 124.18 } 124.19 124.20 124.21 @@ -3480,7 +3480,7 @@ 124.22 _root->verify_edges(visited); 124.23 if (no_dead_code) { 124.24 // Now make sure that no visited node is used by an unvisited node. 124.25 - bool dead_nodes = 0; 124.26 + bool dead_nodes = false; 124.27 Unique_Node_List checked(area); 124.28 while (visited.size() > 0) { 124.29 Node* n = visited.pop(); 124.30 @@ -3491,14 +3491,16 @@ 124.31 if (visited.member(use)) continue; // already in the graph 124.32 if (use->is_Con()) continue; // a dead ConNode is OK 124.33 // At this point, we have found a dead node which is DU-reachable. 124.34 - if (dead_nodes++ == 0) 124.35 + if (!dead_nodes) { 124.36 tty->print_cr("*** Dead nodes reachable via DU edges:"); 124.37 + dead_nodes = true; 124.38 + } 124.39 use->dump(2); 124.40 tty->print_cr("---"); 124.41 checked.push(use); // No repeats; pretend it is now checked. 124.42 } 124.43 } 124.44 - assert(dead_nodes == 0, "using nodes must be reachable from root"); 124.45 + assert(!dead_nodes, "using nodes must be reachable from root"); 124.46 } 124.47 } 124.48 }
125.1 --- a/src/share/vm/opto/escape.cpp Fri Jul 27 11:47:10 2018 +0100 125.2 +++ b/src/share/vm/opto/escape.cpp Sat Aug 04 12:53:22 2018 +0100 125.3 @@ -2016,8 +2016,10 @@ 125.4 // Check for unsafe oop field access 125.5 for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) { 125.6 int opcode = n->fast_out(i)->Opcode(); 125.7 - if (opcode == Op_StoreP || opcode == Op_LoadP || 125.8 - opcode == Op_StoreN || opcode == Op_LoadN) { 125.9 + if (opcode == Op_StoreP || opcode == Op_StoreN || 125.10 + opcode == Op_LoadP || opcode == Op_LoadN || 125.11 + opcode == Op_GetAndSetP || opcode == Op_GetAndSetN || 125.12 + opcode == Op_CompareAndSwapP || opcode == Op_CompareAndSwapN) { 125.13 bt = T_OBJECT; 125.14 (*unsafe) = true; 125.15 break; 125.16 @@ -2037,8 +2039,10 @@ 125.17 // Allocation initialization, ThreadLocal field access, unsafe access 125.18 for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) { 125.19 int opcode = n->fast_out(i)->Opcode(); 125.20 - if (opcode == Op_StoreP || opcode == Op_LoadP || 125.21 - opcode == Op_StoreN || opcode == Op_LoadN) { 125.22 + if (opcode == Op_StoreP || opcode == Op_StoreN || 125.23 + opcode == Op_LoadP || opcode == Op_LoadN || 125.24 + opcode == Op_GetAndSetP || opcode == Op_GetAndSetN || 125.25 + opcode == Op_CompareAndSwapP || opcode == Op_CompareAndSwapN) { 125.26 bt = T_OBJECT; 125.27 break; 125.28 }
126.1 --- a/src/share/vm/opto/gcm.cpp Fri Jul 27 11:47:10 2018 +0100 126.2 +++ b/src/share/vm/opto/gcm.cpp Sat Aug 04 12:53:22 2018 +0100 126.3 @@ -1,5 +1,5 @@ 126.4 /* 126.5 - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 126.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 126.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 126.8 * 126.9 * This code is free software; you can redistribute it and/or modify it 126.10 @@ -1375,7 +1375,7 @@ 126.11 } 126.12 #endif 126.13 // Dead. 126.14 - _node_latency = (GrowableArray<uint> *)0xdeadbeef; 126.15 + _node_latency = (GrowableArray<uint> *)((intptr_t)0xdeadbeef); 126.16 } 126.17 126.18 bool PhaseCFG::do_global_code_motion() {
127.1 --- a/src/share/vm/opto/idealGraphPrinter.cpp Fri Jul 27 11:47:10 2018 +0100 127.2 +++ b/src/share/vm/opto/idealGraphPrinter.cpp Sat Aug 04 12:53:22 2018 +0100 127.3 @@ -1,5 +1,5 @@ 127.4 /* 127.5 - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. 127.6 + * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. 127.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 127.8 * 127.9 * This code is free software; you can redistribute it and/or modify it 127.10 @@ -612,7 +612,7 @@ 127.11 } 127.12 #endif 127.13 127.14 - if (_chaitin && _chaitin != (PhaseChaitin *)0xdeadbeef) { 127.15 + if (_chaitin && _chaitin != (PhaseChaitin *)((intptr_t)0xdeadbeef)) { 127.16 buffer[0] = 0; 127.17 _chaitin->dump_register(node, buffer); 127.18 print_prop("reg", buffer);
128.1 --- a/src/share/vm/opto/macro.cpp Fri Jul 27 11:47:10 2018 +0100 128.2 +++ b/src/share/vm/opto/macro.cpp Sat Aug 04 12:53:22 2018 +0100 128.3 @@ -1,5 +1,5 @@ 128.4 /* 128.5 - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 128.6 + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. 128.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 128.8 * 128.9 * This code is free software; you can redistribute it and/or modify it 128.10 @@ -1775,7 +1775,7 @@ 128.11 i_o = pf_phi_abio; 128.12 } else if( UseTLAB && AllocatePrefetchStyle == 3 ) { 128.13 // Insert a prefetch for each allocation. 128.14 - // This code is used for Sparc with BIS. 128.15 + // This code is used to generate 1 prefetch instruction per cache line. 128.16 Node *pf_region = new (C) RegionNode(3); 128.17 Node *pf_phi_rawmem = new (C) PhiNode( pf_region, Type::MEMORY, 128.18 TypeRawPtr::BOTTOM ); 128.19 @@ -1791,6 +1791,8 @@ 128.20 transform_later(cache_adr); 128.21 cache_adr = new (C) CastP2XNode(needgc_false, cache_adr); 128.22 transform_later(cache_adr); 128.23 + // Address is aligned to execute prefetch to the beginning of cache line size 128.24 + // (it is important when BIS instruction is used on SPARC as prefetch). 128.25 Node* mask = _igvn.MakeConX(~(intptr_t)(step_size-1)); 128.26 cache_adr = new (C) AndXNode(cache_adr, mask); 128.27 transform_later(cache_adr);
129.1 --- a/src/share/vm/opto/matcher.cpp Fri Jul 27 11:47:10 2018 +0100 129.2 +++ b/src/share/vm/opto/matcher.cpp Sat Aug 04 12:53:22 2018 +0100 129.3 @@ -1,5 +1,5 @@ 129.4 /* 129.5 - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 129.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 129.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 129.8 * 129.9 * This code is free software; you can redistribute it and/or modify it 129.10 @@ -193,7 +193,7 @@ 129.11 const TypeTuple *range = C->tf()->range(); 129.12 if( range->cnt() > TypeFunc::Parms ) { // If not a void function 129.13 // Get ideal-register return type 129.14 - int ireg = range->field_at(TypeFunc::Parms)->ideal_reg(); 129.15 + uint ireg = range->field_at(TypeFunc::Parms)->ideal_reg(); 129.16 // Get machine return register 129.17 uint sop = C->start()->Opcode(); 129.18 OptoRegPair regs = return_value(ireg, false);
130.1 --- a/src/share/vm/opto/matcher.hpp Fri Jul 27 11:47:10 2018 +0100 130.2 +++ b/src/share/vm/opto/matcher.hpp Sat Aug 04 12:53:22 2018 +0100 130.3 @@ -1,5 +1,5 @@ 130.4 /* 130.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 130.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 130.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 130.8 * 130.9 * This code is free software; you can redistribute it and/or modify it 130.10 @@ -283,8 +283,8 @@ 130.11 } 130.12 130.13 // Vector ideal reg 130.14 - static const int vector_ideal_reg(int len); 130.15 - static const int vector_shift_count_ideal_reg(int len); 130.16 + static const uint vector_ideal_reg(int len); 130.17 + static const uint vector_shift_count_ideal_reg(int len); 130.18 130.19 // CPU supports misaligned vectors store/load. 130.20 static const bool misaligned_vectors_ok(); 130.21 @@ -326,8 +326,8 @@ 130.22 virtual OptoReg::Name return_addr() const; 130.23 RegMask _return_addr_mask; 130.24 // Return value register. On Intel it is EAX. On Sparc i0/o0. 130.25 - static OptoRegPair return_value(int ideal_reg, bool is_outgoing); 130.26 - static OptoRegPair c_return_value(int ideal_reg, bool is_outgoing); 130.27 + static OptoRegPair return_value(uint ideal_reg, bool is_outgoing); 130.28 + static OptoRegPair c_return_value(uint ideal_reg, bool is_outgoing); 130.29 RegMask _return_value_mask; 130.30 // Inline Cache Register 130.31 static OptoReg::Name inline_cache_reg();
131.1 --- a/src/share/vm/opto/output.cpp Fri Jul 27 11:47:10 2018 +0100 131.2 +++ b/src/share/vm/opto/output.cpp Sat Aug 04 12:53:22 2018 +0100 131.3 @@ -1,5 +1,5 @@ 131.4 /* 131.5 - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 131.6 + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. 131.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 131.8 * 131.9 * This code is free software; you can redistribute it and/or modify it 131.10 @@ -2687,7 +2687,7 @@ 131.11 } 131.12 131.13 Node *kill = def; // Rename 'def' to more descriptive 'kill' 131.14 - debug_only( def = (Node*)0xdeadbeef; ) 131.15 + debug_only( def = (Node*)((intptr_t)0xdeadbeef); ) 131.16 131.17 // After some number of kills there _may_ be a later def 131.18 Node *later_def = NULL;
132.1 --- a/src/share/vm/opto/reg_split.cpp Fri Jul 27 11:47:10 2018 +0100 132.2 +++ b/src/share/vm/opto/reg_split.cpp Sat Aug 04 12:53:22 2018 +0100 132.3 @@ -1,5 +1,5 @@ 132.4 /* 132.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 132.6 + * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. 132.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 132.8 * 132.9 * This code is free software; you can redistribute it and/or modify it 132.10 @@ -59,7 +59,7 @@ 132.11 // If ideal reg doesn't exist we've got a bad schedule happening 132.12 // that is forcing us to spill something that isn't spillable. 132.13 // Bail rather than abort 132.14 - int ireg = def->ideal_reg(); 132.15 + uint ireg = def->ideal_reg(); 132.16 if( ireg == 0 || ireg == Op_RegFlags ) { 132.17 assert(false, "attempted to spill a non-spillable item"); 132.18 C->record_method_not_compilable("attempted to spill a non-spillable item"); 132.19 @@ -1163,7 +1163,7 @@ 132.20 // Grab UP info for DEF 132.21 const RegMask &dmask = n->out_RegMask(); 132.22 bool defup = dmask.is_UP(); 132.23 - int ireg = n->ideal_reg(); 132.24 + uint ireg = n->ideal_reg(); 132.25 bool is_vect = RegMask::is_vector(ireg); 132.26 // Only split at Def if this is a HRP block or bound (and spilled once) 132.27 if( !n->rematerialize() &&
133.1 --- a/src/share/vm/opto/split_if.cpp Fri Jul 27 11:47:10 2018 +0100 133.2 +++ b/src/share/vm/opto/split_if.cpp Sat Aug 04 12:53:22 2018 +0100 133.3 @@ -1,5 +1,5 @@ 133.4 /* 133.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 133.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. 133.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 133.8 * 133.9 * This code is free software; you can redistribute it and/or modify it 133.10 @@ -255,7 +255,7 @@ 133.11 Node *PhaseIdealLoop::spinup( Node *iff_dom, Node *new_false, Node *new_true, Node *use_blk, Node *def, small_cache *cache ) { 133.12 if (use_blk->is_top()) // Handle dead uses 133.13 return use_blk; 133.14 - Node *prior_n = (Node*)0xdeadbeef; 133.15 + Node *prior_n = (Node*)((intptr_t)0xdeadbeef); 133.16 Node *n = use_blk; // Get path input 133.17 assert( use_blk != iff_dom, "" ); 133.18 // Here's the "spinup" the dominator tree loop. Do a cache-check 133.19 @@ -302,7 +302,7 @@ 133.20 } 133.21 133.22 // Update cache everywhere 133.23 - prior_n = (Node*)0xdeadbeef; // Reset IDOM walk 133.24 + prior_n = (Node*)((intptr_t)0xdeadbeef); // Reset IDOM walk 133.25 n = use_blk; // Get path input 133.26 // Spin-up the idom tree again, basically doing path-compression. 133.27 // Insert cache entries along the way, so that if we ever hit this
134.1 --- a/src/share/vm/opto/type.cpp Fri Jul 27 11:47:10 2018 +0100 134.2 +++ b/src/share/vm/opto/type.cpp Sat Aug 04 12:53:22 2018 +0100 134.3 @@ -1,5 +1,5 @@ 134.4 /* 134.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 134.6 + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. 134.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 134.8 * 134.9 * This code is free software; you can redistribute it and/or modify it 134.10 @@ -51,7 +51,7 @@ 134.11 Dict* Type::_shared_type_dict = NULL; 134.12 134.13 // Array which maps compiler types to Basic Types 134.14 -Type::TypeInfo Type::_type_info[Type::lastype] = { 134.15 +const Type::TypeInfo Type::_type_info[Type::lastype] = { 134.16 { Bad, T_ILLEGAL, "bad", false, Node::NotAMachineReg, relocInfo::none }, // Bad 134.17 { Control, T_ILLEGAL, "control", false, 0, relocInfo::none }, // Control 134.18 { Bottom, T_VOID, "top", false, 0, relocInfo::none }, // Top
135.1 --- a/src/share/vm/opto/type.hpp Fri Jul 27 11:47:10 2018 +0100 135.2 +++ b/src/share/vm/opto/type.hpp Sat Aug 04 12:53:22 2018 +0100 135.3 @@ -1,5 +1,5 @@ 135.4 /* 135.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 135.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 135.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 135.8 * 135.9 * This code is free software; you can redistribute it and/or modify it 135.10 @@ -130,17 +130,17 @@ 135.11 135.12 private: 135.13 typedef struct { 135.14 - const TYPES dual_type; 135.15 - const BasicType basic_type; 135.16 - const char* msg; 135.17 - const bool isa_oop; 135.18 - const int ideal_reg; 135.19 - const relocInfo::relocType reloc; 135.20 + TYPES dual_type; 135.21 + BasicType basic_type; 135.22 + const char* msg; 135.23 + bool isa_oop; 135.24 + uint ideal_reg; 135.25 + relocInfo::relocType reloc; 135.26 } TypeInfo; 135.27 135.28 // Dictionary of types shared among compilations. 135.29 static Dict* _shared_type_dict; 135.30 - static TypeInfo _type_info[]; 135.31 + static const TypeInfo _type_info[]; 135.32 135.33 static int uhash( const Type *const t ); 135.34 // Structural equality check. Assumes that cmp() has already compared 135.35 @@ -407,7 +407,7 @@ 135.36 135.37 // Mapping from compiler type to VM BasicType 135.38 BasicType basic_type() const { return _type_info[_base].basic_type; } 135.39 - int ideal_reg() const { return _type_info[_base].ideal_reg; } 135.40 + uint ideal_reg() const { return _type_info[_base].ideal_reg; } 135.41 const char* msg() const { return _type_info[_base].msg; } 135.42 bool isa_oop_ptr() const { return _type_info[_base].isa_oop; } 135.43 relocInfo::relocType reloc() const { return _type_info[_base].reloc; }
136.1 --- a/src/share/vm/prims/jvmtiTagMap.cpp Fri Jul 27 11:47:10 2018 +0100 136.2 +++ b/src/share/vm/prims/jvmtiTagMap.cpp Sat Aug 04 12:53:22 2018 +0100 136.3 @@ -1,5 +1,5 @@ 136.4 /* 136.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 136.6 + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. 136.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 136.8 * 136.9 * This code is free software; you can redistribute it and/or modify it 136.10 @@ -47,6 +47,7 @@ 136.11 #include "services/serviceUtil.hpp" 136.12 #include "utilities/macros.hpp" 136.13 #if INCLUDE_ALL_GCS 136.14 +#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" 136.15 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" 136.16 #endif // INCLUDE_ALL_GCS 136.17 136.18 @@ -1519,6 +1520,14 @@ 136.19 if (_tags[i] == entry->tag()) { 136.20 oop o = entry->object(); 136.21 assert(o != NULL && Universe::heap()->is_in_reserved(o), "sanity check"); 136.22 +#if INCLUDE_ALL_GCS 136.23 + if (UseG1GC) { 136.24 + // The reference in this tag map could be the only (implicitly weak) 136.25 + // reference to that object. If we hand it out, we need to keep it live wrt 136.26 + // SATB marking similar to other j.l.ref.Reference referents. 136.27 + G1SATBCardTableModRefBS::enqueue(o); 136.28 + } 136.29 +#endif 136.30 jobject ref = JNIHandles::make_local(JavaThread::current(), o); 136.31 _object_results->append(ref); 136.32 _tag_results->append((uint64_t)entry->tag());
137.1 --- a/src/share/vm/prims/methodHandles.cpp Fri Jul 27 11:47:10 2018 +0100 137.2 +++ b/src/share/vm/prims/methodHandles.cpp Sat Aug 04 12:53:22 2018 +0100 137.3 @@ -1329,40 +1329,40 @@ 137.4 #define LANG "Ljava/lang/" 137.5 #define JLINV "Ljava/lang/invoke/" 137.6 137.7 -#define OBJ LANG"Object;" 137.8 -#define CLS LANG"Class;" 137.9 -#define STRG LANG"String;" 137.10 -#define CS JLINV"CallSite;" 137.11 -#define MT JLINV"MethodType;" 137.12 -#define MH JLINV"MethodHandle;" 137.13 -#define MEM JLINV"MemberName;" 137.14 +#define OBJ LANG "Object;" 137.15 +#define CLS LANG "Class;" 137.16 +#define STRG LANG "String;" 137.17 +#define CS JLINV "CallSite;" 137.18 +#define MT JLINV "MethodType;" 137.19 +#define MH JLINV "MethodHandle;" 137.20 +#define MEM JLINV "MemberName;" 137.21 137.22 #define CC (char*) /*cast a literal from (const char*)*/ 137.23 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &f) 137.24 137.25 // These are the native methods on java.lang.invoke.MethodHandleNatives. 137.26 static JNINativeMethod MHN_methods[] = { 137.27 - {CC"init", CC"("MEM""OBJ")V", FN_PTR(MHN_init_Mem)}, 137.28 - {CC"expand", CC"("MEM")V", FN_PTR(MHN_expand_Mem)}, 137.29 - {CC"resolve", CC"("MEM""CLS")"MEM, FN_PTR(MHN_resolve_Mem)}, 137.30 - {CC"getConstant", CC"(I)I", FN_PTR(MHN_getConstant)}, 137.31 + {CC "init", CC "(" MEM "" OBJ ")V", FN_PTR(MHN_init_Mem)}, 137.32 + {CC"expand", CC "(" MEM ")V", FN_PTR(MHN_expand_Mem)}, 137.33 + {CC "resolve", CC "(" MEM "" CLS ")" MEM, FN_PTR(MHN_resolve_Mem)}, 137.34 + {CC "getConstant", CC "(I)I", FN_PTR(MHN_getConstant)}, 137.35 // static native int getNamedCon(int which, Object[] name) 137.36 - {CC"getNamedCon", CC"(I["OBJ")I", FN_PTR(MHN_getNamedCon)}, 137.37 + {CC "getNamedCon", CC "(I[" OBJ ")I", FN_PTR(MHN_getNamedCon)}, 137.38 // static native int getMembers(Class<?> defc, String matchName, String matchSig, 137.39 // int matchFlags, Class<?> caller, int skip, MemberName[] results); 137.40 - {CC"getMembers", CC"("CLS""STRG""STRG"I"CLS"I["MEM")I", FN_PTR(MHN_getMembers)}, 137.41 - {CC"objectFieldOffset", CC"("MEM")J", FN_PTR(MHN_objectFieldOffset)}, 137.42 - {CC"setCallSiteTargetNormal", CC"("CS""MH")V", FN_PTR(MHN_setCallSiteTargetNormal)}, 137.43 - {CC"setCallSiteTargetVolatile", CC"("CS""MH")V", FN_PTR(MHN_setCallSiteTargetVolatile)}, 137.44 - {CC"staticFieldOffset", CC"("MEM")J", FN_PTR(MHN_staticFieldOffset)}, 137.45 - {CC"staticFieldBase", CC"("MEM")"OBJ, FN_PTR(MHN_staticFieldBase)}, 137.46 - {CC"getMemberVMInfo", CC"("MEM")"OBJ, FN_PTR(MHN_getMemberVMInfo)} 137.47 + {CC "getMembers", CC "(" CLS "" STRG "" STRG "I" CLS "I[" MEM ")I", FN_PTR(MHN_getMembers)}, 137.48 + {CC "objectFieldOffset", CC "(" MEM ")J", FN_PTR(MHN_objectFieldOffset)}, 137.49 + {CC "setCallSiteTargetNormal", CC "(" CS "" MH ")V", FN_PTR(MHN_setCallSiteTargetNormal)}, 137.50 + {CC "setCallSiteTargetVolatile", CC "(" CS "" MH ")V", FN_PTR(MHN_setCallSiteTargetVolatile)}, 137.51 + {CC "staticFieldOffset", CC "(" MEM ")J", FN_PTR(MHN_staticFieldOffset)}, 137.52 + {CC "staticFieldBase", CC "(" MEM ")" OBJ, FN_PTR(MHN_staticFieldBase)}, 137.53 + {CC "getMemberVMInfo", CC "(" MEM ")" OBJ, FN_PTR(MHN_getMemberVMInfo)} 137.54 }; 137.55 137.56 static JNINativeMethod MH_methods[] = { 137.57 // UnsupportedOperationException throwers 137.58 - {CC"invoke", CC"(["OBJ")"OBJ, FN_PTR(MH_invoke_UOE)}, 137.59 - {CC"invokeExact", CC"(["OBJ")"OBJ, FN_PTR(MH_invokeExact_UOE)} 137.60 + {CC "invoke", CC "([" OBJ ")" OBJ, FN_PTR(MH_invoke_UOE)}, 137.61 + {CC "invokeExact", CC "([" OBJ ")" OBJ, FN_PTR(MH_invokeExact_UOE)} 137.62 }; 137.63 137.64 /**
138.1 --- a/src/share/vm/prims/perf.cpp Fri Jul 27 11:47:10 2018 +0100 138.2 +++ b/src/share/vm/prims/perf.cpp Sat Aug 04 12:53:22 2018 +0100 138.3 @@ -290,17 +290,17 @@ 138.4 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &f) 138.5 #define BB "Ljava/nio/ByteBuffer;" 138.6 #define JLS "Ljava/lang/String;" 138.7 -#define CL_ARGS CC"("JLS"IIJ)"BB 138.8 -#define CBA_ARGS CC"("JLS"II[BI)"BB 138.9 +#define CL_ARGS CC "(" JLS "IIJ)" BB 138.10 +#define CBA_ARGS CC "(" JLS "II[BI)" BB 138.11 138.12 static JNINativeMethod perfmethods[] = { 138.13 138.14 - {CC"attach", CC"("JLS"II)"BB, FN_PTR(Perf_Attach)}, 138.15 - {CC"detach", CC"("BB")V", FN_PTR(Perf_Detach)}, 138.16 - {CC"createLong", CL_ARGS, FN_PTR(Perf_CreateLong)}, 138.17 - {CC"createByteArray", CBA_ARGS, FN_PTR(Perf_CreateByteArray)}, 138.18 - {CC"highResCounter", CC"()J", FN_PTR(Perf_HighResCounter)}, 138.19 - {CC"highResFrequency", CC"()J", FN_PTR(Perf_HighResFrequency)} 138.20 + {CC "attach", CC "(" JLS "II)" BB, FN_PTR(Perf_Attach)}, 138.21 + {CC "detach", CC "(" BB ")V", FN_PTR(Perf_Detach)}, 138.22 + {CC "createLong", CL_ARGS, FN_PTR(Perf_CreateLong)}, 138.23 + {CC "createByteArray", CBA_ARGS, FN_PTR(Perf_CreateByteArray)}, 138.24 + {CC "highResCounter", CC "()J", FN_PTR(Perf_HighResCounter)}, 138.25 + {CC "highResFrequency", CC "()J", FN_PTR(Perf_HighResFrequency)} 138.26 }; 138.27 138.28 #undef CBA_ARGS
139.1 --- a/src/share/vm/prims/unsafe.cpp Fri Jul 27 11:47:10 2018 +0100 139.2 +++ b/src/share/vm/prims/unsafe.cpp Sat Aug 04 12:53:22 2018 +0100 139.3 @@ -199,37 +199,40 @@ 139.4 139.5 // Get/SetObject must be special-cased, since it works with handles. 139.6 139.7 +// We could be accessing the referent field in a reference 139.8 +// object. If G1 is enabled then we need to register non-null 139.9 +// referent with the SATB barrier. 139.10 + 139.11 +#if INCLUDE_ALL_GCS 139.12 +static bool is_java_lang_ref_Reference_access(oop o, jlong offset) { 139.13 + if (offset == java_lang_ref_Reference::referent_offset && o != NULL) { 139.14 + Klass* k = o->klass(); 139.15 + if (InstanceKlass::cast(k)->reference_type() != REF_NONE) { 139.16 + assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity"); 139.17 + return true; 139.18 + } 139.19 + } 139.20 + return false; 139.21 +} 139.22 +#endif 139.23 + 139.24 +static void ensure_satb_referent_alive(oop o, jlong offset, oop v) { 139.25 +#if INCLUDE_ALL_GCS 139.26 + if (UseG1GC && v != NULL && is_java_lang_ref_Reference_access(o, offset)) { 139.27 + G1SATBCardTableModRefBS::enqueue(v); 139.28 + } 139.29 +#endif 139.30 +} 139.31 + 139.32 // The xxx140 variants for backward compatibility do not allow a full-width offset. 139.33 UNSAFE_ENTRY(jobject, Unsafe_GetObject140(JNIEnv *env, jobject unsafe, jobject obj, jint offset)) 139.34 UnsafeWrapper("Unsafe_GetObject"); 139.35 if (obj == NULL) THROW_0(vmSymbols::java_lang_NullPointerException()); 139.36 GET_OOP_FIELD(obj, offset, v) 139.37 - jobject ret = JNIHandles::make_local(env, v); 139.38 -#if INCLUDE_ALL_GCS 139.39 - // We could be accessing the referent field in a reference 139.40 - // object. If G1 is enabled then we need to register a non-null 139.41 - // referent with the SATB barrier. 139.42 - if (UseG1GC) { 139.43 - bool needs_barrier = false; 139.44 139.45 - if (ret != NULL) { 139.46 - if (offset == java_lang_ref_Reference::referent_offset) { 139.47 - oop o = JNIHandles::resolve_non_null(obj); 139.48 - Klass* k = o->klass(); 139.49 - if (InstanceKlass::cast(k)->reference_type() != REF_NONE) { 139.50 - assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity"); 139.51 - needs_barrier = true; 139.52 - } 139.53 - } 139.54 - } 139.55 + ensure_satb_referent_alive(p, offset, v); 139.56 139.57 - if (needs_barrier) { 139.58 - oop referent = JNIHandles::resolve(ret); 139.59 - G1SATBCardTableModRefBS::enqueue(referent); 139.60 - } 139.61 - } 139.62 -#endif // INCLUDE_ALL_GCS 139.63 - return ret; 139.64 + return JNIHandles::make_local(env, v); 139.65 UNSAFE_END 139.66 139.67 UNSAFE_ENTRY(void, Unsafe_SetObject140(JNIEnv *env, jobject unsafe, jobject obj, jint offset, jobject x_h)) 139.68 @@ -262,32 +265,10 @@ 139.69 UNSAFE_ENTRY(jobject, Unsafe_GetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset)) 139.70 UnsafeWrapper("Unsafe_GetObject"); 139.71 GET_OOP_FIELD(obj, offset, v) 139.72 - jobject ret = JNIHandles::make_local(env, v); 139.73 -#if INCLUDE_ALL_GCS 139.74 - // We could be accessing the referent field in a reference 139.75 - // object. If G1 is enabled then we need to register non-null 139.76 - // referent with the SATB barrier. 139.77 - if (UseG1GC) { 139.78 - bool needs_barrier = false; 139.79 139.80 - if (ret != NULL) { 139.81 - if (offset == java_lang_ref_Reference::referent_offset && obj != NULL) { 139.82 - oop o = JNIHandles::resolve(obj); 139.83 - Klass* k = o->klass(); 139.84 - if (InstanceKlass::cast(k)->reference_type() != REF_NONE) { 139.85 - assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity"); 139.86 - needs_barrier = true; 139.87 - } 139.88 - } 139.89 - } 139.90 + ensure_satb_referent_alive(p, offset, v); 139.91 139.92 - if (needs_barrier) { 139.93 - oop referent = JNIHandles::resolve(ret); 139.94 - G1SATBCardTableModRefBS::enqueue(referent); 139.95 - } 139.96 - } 139.97 -#endif // INCLUDE_ALL_GCS 139.98 - return ret; 139.99 + return JNIHandles::make_local(env, v); 139.100 UNSAFE_END 139.101 139.102 UNSAFE_ENTRY(void, Unsafe_SetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject x_h)) 139.103 @@ -312,6 +293,9 @@ 139.104 } else { 139.105 (void)const_cast<oop&>(v = *(volatile oop*) addr); 139.106 } 139.107 + 139.108 + ensure_satb_referent_alive(p, offset, v); 139.109 + 139.110 OrderAccess::acquire(); 139.111 return JNIHandles::make_local(env, v); 139.112 UNSAFE_END 139.113 @@ -1366,47 +1350,47 @@ 139.114 139.115 #define LANG "Ljava/lang/" 139.116 139.117 -#define OBJ LANG"Object;" 139.118 -#define CLS LANG"Class;" 139.119 -#define CTR LANG"reflect/Constructor;" 139.120 -#define FLD LANG"reflect/Field;" 139.121 -#define MTH LANG"reflect/Method;" 139.122 -#define THR LANG"Throwable;" 139.123 +#define OBJ LANG "Object;" 139.124 +#define CLS LANG "Class;" 139.125 +#define CTR LANG "reflect/Constructor;" 139.126 +#define FLD LANG "reflect/Field;" 139.127 +#define MTH LANG "reflect/Method;" 139.128 +#define THR LANG "Throwable;" 139.129 139.130 -#define DC0_Args LANG"String;[BII" 139.131 -#define DC_Args DC0_Args LANG"ClassLoader;" "Ljava/security/ProtectionDomain;" 139.132 +#define DC0_Args LANG "String;[BII" 139.133 +#define DC_Args DC0_Args LANG "ClassLoader;" "Ljava/security/ProtectionDomain;" 139.134 139.135 #define CC (char*) /*cast a literal from (const char*)*/ 139.136 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &f) 139.137 139.138 // define deprecated accessors for compabitility with 1.4.0 139.139 #define DECLARE_GETSETOOP_140(Boolean, Z) \ 139.140 - {CC"get"#Boolean, CC"("OBJ"I)"#Z, FN_PTR(Unsafe_Get##Boolean##140)}, \ 139.141 - {CC"put"#Boolean, CC"("OBJ"I"#Z")V", FN_PTR(Unsafe_Set##Boolean##140)} 139.142 + {CC "get" #Boolean, CC "(" OBJ "I)" #Z, FN_PTR(Unsafe_Get##Boolean##140)}, \ 139.143 + {CC "put" #Boolean, CC "(" OBJ "I" #Z ")V", FN_PTR(Unsafe_Set##Boolean##140)} 139.144 139.145 // Note: In 1.4.1, getObject and kin take both int and long offsets. 139.146 #define DECLARE_GETSETOOP_141(Boolean, Z) \ 139.147 - {CC"get"#Boolean, CC"("OBJ"J)"#Z, FN_PTR(Unsafe_Get##Boolean)}, \ 139.148 - {CC"put"#Boolean, CC"("OBJ"J"#Z")V", FN_PTR(Unsafe_Set##Boolean)} 139.149 + {CC "get" #Boolean, CC "(" OBJ "J)" #Z, FN_PTR(Unsafe_Get##Boolean)}, \ 139.150 + {CC "put" #Boolean, CC "(" OBJ "J" #Z ")V", FN_PTR(Unsafe_Set##Boolean)} 139.151 139.152 // Note: In 1.5.0, there are volatile versions too 139.153 #define DECLARE_GETSETOOP(Boolean, Z) \ 139.154 - {CC"get"#Boolean, CC"("OBJ"J)"#Z, FN_PTR(Unsafe_Get##Boolean)}, \ 139.155 - {CC"put"#Boolean, CC"("OBJ"J"#Z")V", FN_PTR(Unsafe_Set##Boolean)}, \ 139.156 - {CC"get"#Boolean"Volatile", CC"("OBJ"J)"#Z, FN_PTR(Unsafe_Get##Boolean##Volatile)}, \ 139.157 - {CC"put"#Boolean"Volatile", CC"("OBJ"J"#Z")V", FN_PTR(Unsafe_Set##Boolean##Volatile)} 139.158 + {CC "get" #Boolean, CC "(" OBJ "J)" #Z, FN_PTR(Unsafe_Get##Boolean)}, \ 139.159 + {CC "put" #Boolean, CC "(" OBJ "J" #Z ")V", FN_PTR(Unsafe_Set##Boolean)}, \ 139.160 + {CC "get" #Boolean "Volatile", CC "(" OBJ "J)" #Z, FN_PTR(Unsafe_Get##Boolean##Volatile)}, \ 139.161 + {CC "put" #Boolean "Volatile", CC "(" OBJ "J" #Z ")V", FN_PTR(Unsafe_Set##Boolean##Volatile)} 139.162 139.163 139.164 #define DECLARE_GETSETNATIVE(Byte, B) \ 139.165 - {CC"get"#Byte, CC"("ADR")"#B, FN_PTR(Unsafe_GetNative##Byte)}, \ 139.166 - {CC"put"#Byte, CC"("ADR#B")V", FN_PTR(Unsafe_SetNative##Byte)} 139.167 + {CC "get" #Byte, CC "(" ADR ")" #B, FN_PTR(Unsafe_GetNative##Byte)}, \ 139.168 + {CC "put" #Byte, CC "(" ADR#B ")V", FN_PTR(Unsafe_SetNative##Byte)} 139.169 139.170 139.171 139.172 // These are the methods for 1.4.0 139.173 static JNINativeMethod methods_140[] = { 139.174 - {CC"getObject", CC"("OBJ"I)"OBJ"", FN_PTR(Unsafe_GetObject140)}, 139.175 - {CC"putObject", CC"("OBJ"I"OBJ")V", FN_PTR(Unsafe_SetObject140)}, 139.176 + {CC "getObject", CC "(" OBJ "I)" OBJ "", FN_PTR(Unsafe_GetObject140)}, 139.177 + {CC "putObject", CC "(" OBJ "I" OBJ ")V", FN_PTR(Unsafe_SetObject140)}, 139.178 139.179 DECLARE_GETSETOOP_140(Boolean, Z), 139.180 DECLARE_GETSETOOP_140(Byte, B), 139.181 @@ -1425,33 +1409,33 @@ 139.182 DECLARE_GETSETNATIVE(Float, F), 139.183 DECLARE_GETSETNATIVE(Double, D), 139.184 139.185 - {CC"getAddress", CC"("ADR")"ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.186 - {CC"putAddress", CC"("ADR""ADR")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.187 + {CC "getAddress", CC "(" ADR ")" ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.188 + {CC "putAddress", CC "(" ADR "" ADR ")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.189 139.190 - {CC"allocateMemory", CC"(J)"ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.191 - {CC"reallocateMemory", CC"("ADR"J)"ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.192 - {CC"freeMemory", CC"("ADR")V", FN_PTR(Unsafe_FreeMemory)}, 139.193 + {CC "allocateMemory", CC "(J)" ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.194 + {CC "reallocateMemory", CC "(" ADR "J)" ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.195 + {CC "freeMemory", CC "(" ADR ")V", FN_PTR(Unsafe_FreeMemory)}, 139.196 139.197 - {CC"fieldOffset", CC"("FLD")I", FN_PTR(Unsafe_FieldOffset)}, 139.198 - {CC"staticFieldBase", CC"("CLS")"OBJ, FN_PTR(Unsafe_StaticFieldBaseFromClass)}, 139.199 - {CC"ensureClassInitialized",CC"("CLS")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.200 - {CC"arrayBaseOffset", CC"("CLS")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.201 - {CC"arrayIndexScale", CC"("CLS")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.202 - {CC"addressSize", CC"()I", FN_PTR(Unsafe_AddressSize)}, 139.203 - {CC"pageSize", CC"()I", FN_PTR(Unsafe_PageSize)}, 139.204 + {CC "fieldOffset", CC "(" FLD ")I", FN_PTR(Unsafe_FieldOffset)}, 139.205 + {CC "staticFieldBase", CC "(" CLS ")" OBJ, FN_PTR(Unsafe_StaticFieldBaseFromClass)}, 139.206 + {CC "ensureClassInitialized",CC "(" CLS ")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.207 + {CC "arrayBaseOffset", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.208 + {CC "arrayIndexScale", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.209 + {CC "addressSize", CC "()I", FN_PTR(Unsafe_AddressSize)}, 139.210 + {CC "pageSize", CC "()I", FN_PTR(Unsafe_PageSize)}, 139.211 139.212 - {CC"defineClass", CC"("DC0_Args")"CLS, FN_PTR(Unsafe_DefineClass0)}, 139.213 - {CC"defineClass", CC"("DC_Args")"CLS, FN_PTR(Unsafe_DefineClass)}, 139.214 - {CC"allocateInstance", CC"("CLS")"OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.215 - {CC"monitorEnter", CC"("OBJ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.216 - {CC"monitorExit", CC"("OBJ")V", FN_PTR(Unsafe_MonitorExit)}, 139.217 - {CC"throwException", CC"("THR")V", FN_PTR(Unsafe_ThrowException)} 139.218 + {CC "defineClass", CC "(" DC0_Args ")" CLS, FN_PTR(Unsafe_DefineClass0)}, 139.219 + {CC "defineClass", CC "(" DC_Args ")" CLS, FN_PTR(Unsafe_DefineClass)}, 139.220 + {CC "allocateInstance", CC "(" CLS ")" OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.221 + {CC "monitorEnter", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.222 + {CC "monitorExit", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorExit)}, 139.223 + {CC "throwException", CC "(" THR ")V", FN_PTR(Unsafe_ThrowException)} 139.224 }; 139.225 139.226 // These are the methods prior to the JSR 166 changes in 1.5.0 139.227 static JNINativeMethod methods_141[] = { 139.228 - {CC"getObject", CC"("OBJ"J)"OBJ"", FN_PTR(Unsafe_GetObject)}, 139.229 - {CC"putObject", CC"("OBJ"J"OBJ")V", FN_PTR(Unsafe_SetObject)}, 139.230 + {CC "getObject", CC "(" OBJ "J)" OBJ "", FN_PTR(Unsafe_GetObject)}, 139.231 + {CC "putObject", CC "(" OBJ "J" OBJ ")V", FN_PTR(Unsafe_SetObject)}, 139.232 139.233 DECLARE_GETSETOOP_141(Boolean, Z), 139.234 DECLARE_GETSETOOP_141(Byte, B), 139.235 @@ -1470,37 +1454,37 @@ 139.236 DECLARE_GETSETNATIVE(Float, F), 139.237 DECLARE_GETSETNATIVE(Double, D), 139.238 139.239 - {CC"getAddress", CC"("ADR")"ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.240 - {CC"putAddress", CC"("ADR""ADR")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.241 + {CC "getAddress", CC "(" ADR ")" ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.242 + {CC "putAddress", CC "(" ADR "" ADR ")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.243 139.244 - {CC"allocateMemory", CC"(J)"ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.245 - {CC"reallocateMemory", CC"("ADR"J)"ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.246 - {CC"freeMemory", CC"("ADR")V", FN_PTR(Unsafe_FreeMemory)}, 139.247 + {CC "allocateMemory", CC "(J)" ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.248 + {CC "reallocateMemory", CC "(" ADR "J)" ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.249 + {CC "freeMemory", CC "(" ADR ")V", FN_PTR(Unsafe_FreeMemory)}, 139.250 139.251 - {CC"objectFieldOffset", CC"("FLD")J", FN_PTR(Unsafe_ObjectFieldOffset)}, 139.252 - {CC"staticFieldOffset", CC"("FLD")J", FN_PTR(Unsafe_StaticFieldOffset)}, 139.253 - {CC"staticFieldBase", CC"("FLD")"OBJ, FN_PTR(Unsafe_StaticFieldBaseFromField)}, 139.254 - {CC"ensureClassInitialized",CC"("CLS")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.255 - {CC"arrayBaseOffset", CC"("CLS")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.256 - {CC"arrayIndexScale", CC"("CLS")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.257 - {CC"addressSize", CC"()I", FN_PTR(Unsafe_AddressSize)}, 139.258 - {CC"pageSize", CC"()I", FN_PTR(Unsafe_PageSize)}, 139.259 + {CC "objectFieldOffset", CC "(" FLD ")J", FN_PTR(Unsafe_ObjectFieldOffset)}, 139.260 + {CC "staticFieldOffset", CC "(" FLD ")J", FN_PTR(Unsafe_StaticFieldOffset)}, 139.261 + {CC "staticFieldBase", CC "(" FLD ")" OBJ, FN_PTR(Unsafe_StaticFieldBaseFromField)}, 139.262 + {CC "ensureClassInitialized",CC "(" CLS ")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.263 + {CC "arrayBaseOffset", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.264 + {CC "arrayIndexScale", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.265 + {CC "addressSize", CC "()I", FN_PTR(Unsafe_AddressSize)}, 139.266 + {CC "pageSize", CC "()I", FN_PTR(Unsafe_PageSize)}, 139.267 139.268 - {CC"defineClass", CC"("DC0_Args")"CLS, FN_PTR(Unsafe_DefineClass0)}, 139.269 - {CC"defineClass", CC"("DC_Args")"CLS, FN_PTR(Unsafe_DefineClass)}, 139.270 - {CC"allocateInstance", CC"("CLS")"OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.271 - {CC"monitorEnter", CC"("OBJ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.272 - {CC"monitorExit", CC"("OBJ")V", FN_PTR(Unsafe_MonitorExit)}, 139.273 - {CC"throwException", CC"("THR")V", FN_PTR(Unsafe_ThrowException)} 139.274 + {CC "defineClass", CC "(" DC0_Args ")" CLS, FN_PTR(Unsafe_DefineClass0)}, 139.275 + {CC "defineClass", CC "(" DC_Args ")" CLS, FN_PTR(Unsafe_DefineClass)}, 139.276 + {CC "allocateInstance", CC "(" CLS ")" OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.277 + {CC "monitorEnter", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.278 + {CC "monitorExit", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorExit)}, 139.279 + {CC "throwException", CC "(" THR ")V", FN_PTR(Unsafe_ThrowException)} 139.280 139.281 }; 139.282 139.283 // These are the methods prior to the JSR 166 changes in 1.6.0 139.284 static JNINativeMethod methods_15[] = { 139.285 - {CC"getObject", CC"("OBJ"J)"OBJ"", FN_PTR(Unsafe_GetObject)}, 139.286 - {CC"putObject", CC"("OBJ"J"OBJ")V", FN_PTR(Unsafe_SetObject)}, 139.287 - {CC"getObjectVolatile",CC"("OBJ"J)"OBJ"", FN_PTR(Unsafe_GetObjectVolatile)}, 139.288 - {CC"putObjectVolatile",CC"("OBJ"J"OBJ")V", FN_PTR(Unsafe_SetObjectVolatile)}, 139.289 + {CC "getObject", CC "(" OBJ "J)" OBJ "", FN_PTR(Unsafe_GetObject)}, 139.290 + {CC "putObject", CC "(" OBJ "J" OBJ ")V", FN_PTR(Unsafe_SetObject)}, 139.291 + {CC "getObjectVolatile",CC "(" OBJ "J)" OBJ "", FN_PTR(Unsafe_GetObjectVolatile)}, 139.292 + {CC "putObjectVolatile",CC "(" OBJ "J" OBJ ")V", FN_PTR(Unsafe_SetObjectVolatile)}, 139.293 139.294 139.295 DECLARE_GETSETOOP(Boolean, Z), 139.296 @@ -1520,42 +1504,42 @@ 139.297 DECLARE_GETSETNATIVE(Float, F), 139.298 DECLARE_GETSETNATIVE(Double, D), 139.299 139.300 - {CC"getAddress", CC"("ADR")"ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.301 - {CC"putAddress", CC"("ADR""ADR")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.302 + {CC "getAddress", CC "(" ADR ")" ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.303 + {CC "putAddress", CC "(" ADR "" ADR ")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.304 139.305 - {CC"allocateMemory", CC"(J)"ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.306 - {CC"reallocateMemory", CC"("ADR"J)"ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.307 - {CC"freeMemory", CC"("ADR")V", FN_PTR(Unsafe_FreeMemory)}, 139.308 + {CC "allocateMemory", CC "(J)" ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.309 + {CC "reallocateMemory", CC "(" ADR "J)" ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.310 + {CC "freeMemory", CC "(" ADR ")V", FN_PTR(Unsafe_FreeMemory)}, 139.311 139.312 - {CC"objectFieldOffset", CC"("FLD")J", FN_PTR(Unsafe_ObjectFieldOffset)}, 139.313 - {CC"staticFieldOffset", CC"("FLD")J", FN_PTR(Unsafe_StaticFieldOffset)}, 139.314 - {CC"staticFieldBase", CC"("FLD")"OBJ, FN_PTR(Unsafe_StaticFieldBaseFromField)}, 139.315 - {CC"ensureClassInitialized",CC"("CLS")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.316 - {CC"arrayBaseOffset", CC"("CLS")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.317 - {CC"arrayIndexScale", CC"("CLS")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.318 - {CC"addressSize", CC"()I", FN_PTR(Unsafe_AddressSize)}, 139.319 - {CC"pageSize", CC"()I", FN_PTR(Unsafe_PageSize)}, 139.320 + {CC "objectFieldOffset", CC "(" FLD ")J", FN_PTR(Unsafe_ObjectFieldOffset)}, 139.321 + {CC "staticFieldOffset", CC "(" FLD ")J", FN_PTR(Unsafe_StaticFieldOffset)}, 139.322 + {CC "staticFieldBase", CC "(" FLD ")" OBJ, FN_PTR(Unsafe_StaticFieldBaseFromField)}, 139.323 + {CC "ensureClassInitialized",CC "(" CLS ")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.324 + {CC "arrayBaseOffset", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.325 + {CC "arrayIndexScale", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.326 + {CC "addressSize", CC "()I", FN_PTR(Unsafe_AddressSize)}, 139.327 + {CC "pageSize", CC "()I", FN_PTR(Unsafe_PageSize)}, 139.328 139.329 - {CC"defineClass", CC"("DC0_Args")"CLS, FN_PTR(Unsafe_DefineClass0)}, 139.330 - {CC"defineClass", CC"("DC_Args")"CLS, FN_PTR(Unsafe_DefineClass)}, 139.331 - {CC"allocateInstance", CC"("CLS")"OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.332 - {CC"monitorEnter", CC"("OBJ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.333 - {CC"monitorExit", CC"("OBJ")V", FN_PTR(Unsafe_MonitorExit)}, 139.334 - {CC"throwException", CC"("THR")V", FN_PTR(Unsafe_ThrowException)}, 139.335 - {CC"compareAndSwapObject", CC"("OBJ"J"OBJ""OBJ")Z", FN_PTR(Unsafe_CompareAndSwapObject)}, 139.336 - {CC"compareAndSwapInt", CC"("OBJ"J""I""I"")Z", FN_PTR(Unsafe_CompareAndSwapInt)}, 139.337 - {CC"compareAndSwapLong", CC"("OBJ"J""J""J"")Z", FN_PTR(Unsafe_CompareAndSwapLong)}, 139.338 - {CC"park", CC"(ZJ)V", FN_PTR(Unsafe_Park)}, 139.339 - {CC"unpark", CC"("OBJ")V", FN_PTR(Unsafe_Unpark)} 139.340 + {CC "defineClass", CC "(" DC0_Args ")" CLS, FN_PTR(Unsafe_DefineClass0)}, 139.341 + {CC "defineClass", CC "(" DC_Args ")" CLS, FN_PTR(Unsafe_DefineClass)}, 139.342 + {CC "allocateInstance", CC "(" CLS ")" OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.343 + {CC "monitorEnter", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.344 + {CC "monitorExit", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorExit)}, 139.345 + {CC "throwException", CC "(" THR ")V", FN_PTR(Unsafe_ThrowException)}, 139.346 + {CC "compareAndSwapObject", CC "(" OBJ "J" OBJ "" OBJ ")Z", FN_PTR(Unsafe_CompareAndSwapObject)}, 139.347 + {CC "compareAndSwapInt", CC "(" OBJ "J""I""I"")Z", FN_PTR(Unsafe_CompareAndSwapInt)}, 139.348 + {CC "compareAndSwapLong", CC "(" OBJ "J""J""J"")Z", FN_PTR(Unsafe_CompareAndSwapLong)}, 139.349 + {CC "park", CC "(ZJ)V", FN_PTR(Unsafe_Park)}, 139.350 + {CC "unpark", CC "(" OBJ ")V", FN_PTR(Unsafe_Unpark)} 139.351 139.352 }; 139.353 139.354 // These are the methods for 1.6.0 and 1.7.0 139.355 static JNINativeMethod methods_16[] = { 139.356 - {CC"getObject", CC"("OBJ"J)"OBJ"", FN_PTR(Unsafe_GetObject)}, 139.357 - {CC"putObject", CC"("OBJ"J"OBJ")V", FN_PTR(Unsafe_SetObject)}, 139.358 - {CC"getObjectVolatile",CC"("OBJ"J)"OBJ"", FN_PTR(Unsafe_GetObjectVolatile)}, 139.359 - {CC"putObjectVolatile",CC"("OBJ"J"OBJ")V", FN_PTR(Unsafe_SetObjectVolatile)}, 139.360 + {CC "getObject", CC "(" OBJ "J)" OBJ "", FN_PTR(Unsafe_GetObject)}, 139.361 + {CC "putObject", CC "(" OBJ "J" OBJ ")V", FN_PTR(Unsafe_SetObject)}, 139.362 + {CC "getObjectVolatile",CC "(" OBJ "J)" OBJ "", FN_PTR(Unsafe_GetObjectVolatile)}, 139.363 + {CC "putObjectVolatile",CC "(" OBJ "J" OBJ ")V", FN_PTR(Unsafe_SetObjectVolatile)}, 139.364 139.365 DECLARE_GETSETOOP(Boolean, Z), 139.366 DECLARE_GETSETOOP(Byte, B), 139.367 @@ -1574,45 +1558,45 @@ 139.368 DECLARE_GETSETNATIVE(Float, F), 139.369 DECLARE_GETSETNATIVE(Double, D), 139.370 139.371 - {CC"getAddress", CC"("ADR")"ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.372 - {CC"putAddress", CC"("ADR""ADR")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.373 + {CC "getAddress", CC "(" ADR ")" ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.374 + {CC "putAddress", CC "(" ADR "" ADR ")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.375 139.376 - {CC"allocateMemory", CC"(J)"ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.377 - {CC"reallocateMemory", CC"("ADR"J)"ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.378 - {CC"freeMemory", CC"("ADR")V", FN_PTR(Unsafe_FreeMemory)}, 139.379 + {CC "allocateMemory", CC "(J)" ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.380 + {CC "reallocateMemory", CC "(" ADR "J)" ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.381 + {CC "freeMemory", CC "(" ADR ")V", FN_PTR(Unsafe_FreeMemory)}, 139.382 139.383 - {CC"objectFieldOffset", CC"("FLD")J", FN_PTR(Unsafe_ObjectFieldOffset)}, 139.384 - {CC"staticFieldOffset", CC"("FLD")J", FN_PTR(Unsafe_StaticFieldOffset)}, 139.385 - {CC"staticFieldBase", CC"("FLD")"OBJ, FN_PTR(Unsafe_StaticFieldBaseFromField)}, 139.386 - {CC"ensureClassInitialized",CC"("CLS")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.387 - {CC"arrayBaseOffset", CC"("CLS")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.388 - {CC"arrayIndexScale", CC"("CLS")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.389 - {CC"addressSize", CC"()I", FN_PTR(Unsafe_AddressSize)}, 139.390 - {CC"pageSize", CC"()I", FN_PTR(Unsafe_PageSize)}, 139.391 + {CC "objectFieldOffset", CC "(" FLD ")J", FN_PTR(Unsafe_ObjectFieldOffset)}, 139.392 + {CC "staticFieldOffset", CC "(" FLD ")J", FN_PTR(Unsafe_StaticFieldOffset)}, 139.393 + {CC "staticFieldBase", CC "(" FLD ")" OBJ, FN_PTR(Unsafe_StaticFieldBaseFromField)}, 139.394 + {CC "ensureClassInitialized",CC "(" CLS ")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.395 + {CC "arrayBaseOffset", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.396 + {CC "arrayIndexScale", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.397 + {CC "addressSize", CC "()I", FN_PTR(Unsafe_AddressSize)}, 139.398 + {CC "pageSize", CC "()I", FN_PTR(Unsafe_PageSize)}, 139.399 139.400 - {CC"defineClass", CC"("DC0_Args")"CLS, FN_PTR(Unsafe_DefineClass0)}, 139.401 - {CC"defineClass", CC"("DC_Args")"CLS, FN_PTR(Unsafe_DefineClass)}, 139.402 - {CC"allocateInstance", CC"("CLS")"OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.403 - {CC"monitorEnter", CC"("OBJ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.404 - {CC"monitorExit", CC"("OBJ")V", FN_PTR(Unsafe_MonitorExit)}, 139.405 - {CC"tryMonitorEnter", CC"("OBJ")Z", FN_PTR(Unsafe_TryMonitorEnter)}, 139.406 - {CC"throwException", CC"("THR")V", FN_PTR(Unsafe_ThrowException)}, 139.407 - {CC"compareAndSwapObject", CC"("OBJ"J"OBJ""OBJ")Z", FN_PTR(Unsafe_CompareAndSwapObject)}, 139.408 - {CC"compareAndSwapInt", CC"("OBJ"J""I""I"")Z", FN_PTR(Unsafe_CompareAndSwapInt)}, 139.409 - {CC"compareAndSwapLong", CC"("OBJ"J""J""J"")Z", FN_PTR(Unsafe_CompareAndSwapLong)}, 139.410 - {CC"putOrderedObject", CC"("OBJ"J"OBJ")V", FN_PTR(Unsafe_SetOrderedObject)}, 139.411 - {CC"putOrderedInt", CC"("OBJ"JI)V", FN_PTR(Unsafe_SetOrderedInt)}, 139.412 - {CC"putOrderedLong", CC"("OBJ"JJ)V", FN_PTR(Unsafe_SetOrderedLong)}, 139.413 - {CC"park", CC"(ZJ)V", FN_PTR(Unsafe_Park)}, 139.414 - {CC"unpark", CC"("OBJ")V", FN_PTR(Unsafe_Unpark)} 139.415 + {CC "defineClass", CC "(" DC0_Args ")" CLS, FN_PTR(Unsafe_DefineClass0)}, 139.416 + {CC "defineClass", CC "(" DC_Args ")" CLS, FN_PTR(Unsafe_DefineClass)}, 139.417 + {CC "allocateInstance", CC "(" CLS ")" OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.418 + {CC "monitorEnter", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.419 + {CC "monitorExit", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorExit)}, 139.420 + {CC "tryMonitorEnter", CC "(" OBJ ")Z", FN_PTR(Unsafe_TryMonitorEnter)}, 139.421 + {CC "throwException", CC "(" THR ")V", FN_PTR(Unsafe_ThrowException)}, 139.422 + {CC "compareAndSwapObject", CC "(" OBJ "J" OBJ "" OBJ ")Z", FN_PTR(Unsafe_CompareAndSwapObject)}, 139.423 + {CC "compareAndSwapInt", CC "(" OBJ "J""I""I"")Z", FN_PTR(Unsafe_CompareAndSwapInt)}, 139.424 + {CC "compareAndSwapLong", CC "(" OBJ "J""J""J"")Z", FN_PTR(Unsafe_CompareAndSwapLong)}, 139.425 + {CC "putOrderedObject", CC "(" OBJ "J" OBJ ")V", FN_PTR(Unsafe_SetOrderedObject)}, 139.426 + {CC "putOrderedInt", CC "(" OBJ "JI)V", FN_PTR(Unsafe_SetOrderedInt)}, 139.427 + {CC "putOrderedLong", CC "(" OBJ "JJ)V", FN_PTR(Unsafe_SetOrderedLong)}, 139.428 + {CC "park", CC "(ZJ)V", FN_PTR(Unsafe_Park)}, 139.429 + {CC "unpark", CC "(" OBJ ")V", FN_PTR(Unsafe_Unpark)} 139.430 }; 139.431 139.432 // These are the methods for 1.8.0 139.433 static JNINativeMethod methods_18[] = { 139.434 - {CC"getObject", CC"("OBJ"J)"OBJ"", FN_PTR(Unsafe_GetObject)}, 139.435 - {CC"putObject", CC"("OBJ"J"OBJ")V", FN_PTR(Unsafe_SetObject)}, 139.436 - {CC"getObjectVolatile",CC"("OBJ"J)"OBJ"", FN_PTR(Unsafe_GetObjectVolatile)}, 139.437 - {CC"putObjectVolatile",CC"("OBJ"J"OBJ")V", FN_PTR(Unsafe_SetObjectVolatile)}, 139.438 + {CC "getObject", CC "(" OBJ "J)" OBJ "", FN_PTR(Unsafe_GetObject)}, 139.439 + {CC "putObject", CC "(" OBJ "J" OBJ ")V", FN_PTR(Unsafe_SetObject)}, 139.440 + {CC "getObjectVolatile",CC "(" OBJ "J)" OBJ "", FN_PTR(Unsafe_GetObjectVolatile)}, 139.441 + {CC "putObjectVolatile",CC "(" OBJ "J" OBJ ")V", FN_PTR(Unsafe_SetObjectVolatile)}, 139.442 139.443 DECLARE_GETSETOOP(Boolean, Z), 139.444 DECLARE_GETSETOOP(Byte, B), 139.445 @@ -1631,71 +1615,71 @@ 139.446 DECLARE_GETSETNATIVE(Float, F), 139.447 DECLARE_GETSETNATIVE(Double, D), 139.448 139.449 - {CC"getAddress", CC"("ADR")"ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.450 - {CC"putAddress", CC"("ADR""ADR")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.451 + {CC "getAddress", CC "(" ADR ")" ADR, FN_PTR(Unsafe_GetNativeAddress)}, 139.452 + {CC "putAddress", CC "(" ADR "" ADR ")V", FN_PTR(Unsafe_SetNativeAddress)}, 139.453 139.454 - {CC"allocateMemory", CC"(J)"ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.455 - {CC"reallocateMemory", CC"("ADR"J)"ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.456 - {CC"freeMemory", CC"("ADR")V", FN_PTR(Unsafe_FreeMemory)}, 139.457 + {CC "allocateMemory", CC "(J)" ADR, FN_PTR(Unsafe_AllocateMemory)}, 139.458 + {CC "reallocateMemory", CC "(" ADR "J)" ADR, FN_PTR(Unsafe_ReallocateMemory)}, 139.459 + {CC "freeMemory", CC "(" ADR ")V", FN_PTR(Unsafe_FreeMemory)}, 139.460 139.461 - {CC"objectFieldOffset", CC"("FLD")J", FN_PTR(Unsafe_ObjectFieldOffset)}, 139.462 - {CC"staticFieldOffset", CC"("FLD")J", FN_PTR(Unsafe_StaticFieldOffset)}, 139.463 - {CC"staticFieldBase", CC"("FLD")"OBJ, FN_PTR(Unsafe_StaticFieldBaseFromField)}, 139.464 - {CC"ensureClassInitialized",CC"("CLS")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.465 - {CC"arrayBaseOffset", CC"("CLS")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.466 - {CC"arrayIndexScale", CC"("CLS")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.467 - {CC"addressSize", CC"()I", FN_PTR(Unsafe_AddressSize)}, 139.468 - {CC"pageSize", CC"()I", FN_PTR(Unsafe_PageSize)}, 139.469 + {CC "objectFieldOffset", CC "(" FLD ")J", FN_PTR(Unsafe_ObjectFieldOffset)}, 139.470 + {CC "staticFieldOffset", CC "(" FLD ")J", FN_PTR(Unsafe_StaticFieldOffset)}, 139.471 + {CC "staticFieldBase", CC "(" FLD ")" OBJ, FN_PTR(Unsafe_StaticFieldBaseFromField)}, 139.472 + {CC "ensureClassInitialized",CC "(" CLS ")V", FN_PTR(Unsafe_EnsureClassInitialized)}, 139.473 + {CC "arrayBaseOffset", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayBaseOffset)}, 139.474 + {CC "arrayIndexScale", CC "(" CLS ")I", FN_PTR(Unsafe_ArrayIndexScale)}, 139.475 + {CC "addressSize", CC "()I", FN_PTR(Unsafe_AddressSize)}, 139.476 + {CC "pageSize", CC "()I", FN_PTR(Unsafe_PageSize)}, 139.477 139.478 - {CC"defineClass", CC"("DC_Args")"CLS, FN_PTR(Unsafe_DefineClass)}, 139.479 - {CC"allocateInstance", CC"("CLS")"OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.480 - {CC"monitorEnter", CC"("OBJ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.481 - {CC"monitorExit", CC"("OBJ")V", FN_PTR(Unsafe_MonitorExit)}, 139.482 - {CC"tryMonitorEnter", CC"("OBJ")Z", FN_PTR(Unsafe_TryMonitorEnter)}, 139.483 - {CC"throwException", CC"("THR")V", FN_PTR(Unsafe_ThrowException)}, 139.484 - {CC"compareAndSwapObject", CC"("OBJ"J"OBJ""OBJ")Z", FN_PTR(Unsafe_CompareAndSwapObject)}, 139.485 - {CC"compareAndSwapInt", CC"("OBJ"J""I""I"")Z", FN_PTR(Unsafe_CompareAndSwapInt)}, 139.486 - {CC"compareAndSwapLong", CC"("OBJ"J""J""J"")Z", FN_PTR(Unsafe_CompareAndSwapLong)}, 139.487 - {CC"putOrderedObject", CC"("OBJ"J"OBJ")V", FN_PTR(Unsafe_SetOrderedObject)}, 139.488 - {CC"putOrderedInt", CC"("OBJ"JI)V", FN_PTR(Unsafe_SetOrderedInt)}, 139.489 - {CC"putOrderedLong", CC"("OBJ"JJ)V", FN_PTR(Unsafe_SetOrderedLong)}, 139.490 - {CC"park", CC"(ZJ)V", FN_PTR(Unsafe_Park)}, 139.491 - {CC"unpark", CC"("OBJ")V", FN_PTR(Unsafe_Unpark)} 139.492 + {CC "defineClass", CC "(" DC_Args ")" CLS, FN_PTR(Unsafe_DefineClass)}, 139.493 + {CC "allocateInstance", CC "(" CLS ")" OBJ, FN_PTR(Unsafe_AllocateInstance)}, 139.494 + {CC "monitorEnter", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorEnter)}, 139.495 + {CC "monitorExit", CC "(" OBJ ")V", FN_PTR(Unsafe_MonitorExit)}, 139.496 + {CC "tryMonitorEnter", CC "(" OBJ ")Z", FN_PTR(Unsafe_TryMonitorEnter)}, 139.497 + {CC "throwException", CC "(" THR ")V", FN_PTR(Unsafe_ThrowException)}, 139.498 + {CC "compareAndSwapObject", CC "(" OBJ "J" OBJ "" OBJ ")Z", FN_PTR(Unsafe_CompareAndSwapObject)}, 139.499 + {CC "compareAndSwapInt", CC "(" OBJ "J""I""I"")Z", FN_PTR(Unsafe_CompareAndSwapInt)}, 139.500 + {CC "compareAndSwapLong", CC "(" OBJ "J""J""J"")Z", FN_PTR(Unsafe_CompareAndSwapLong)}, 139.501 + {CC "putOrderedObject", CC "(" OBJ "J" OBJ ")V", FN_PTR(Unsafe_SetOrderedObject)}, 139.502 + {CC "putOrderedInt", CC "(" OBJ "JI)V", FN_PTR(Unsafe_SetOrderedInt)}, 139.503 + {CC "putOrderedLong", CC "(" OBJ "JJ)V", FN_PTR(Unsafe_SetOrderedLong)}, 139.504 + {CC "park", CC "(ZJ)V", FN_PTR(Unsafe_Park)}, 139.505 + {CC "unpark", CC "(" OBJ ")V", FN_PTR(Unsafe_Unpark)} 139.506 }; 139.507 139.508 JNINativeMethod loadavg_method[] = { 139.509 - {CC"getLoadAverage", CC"([DI)I", FN_PTR(Unsafe_Loadavg)} 139.510 + {CC "getLoadAverage", CC "([DI)I", FN_PTR(Unsafe_Loadavg)} 139.511 }; 139.512 139.513 JNINativeMethod prefetch_methods[] = { 139.514 - {CC"prefetchRead", CC"("OBJ"J)V", FN_PTR(Unsafe_PrefetchRead)}, 139.515 - {CC"prefetchWrite", CC"("OBJ"J)V", FN_PTR(Unsafe_PrefetchWrite)}, 139.516 - {CC"prefetchReadStatic", CC"("OBJ"J)V", FN_PTR(Unsafe_PrefetchRead)}, 139.517 - {CC"prefetchWriteStatic",CC"("OBJ"J)V", FN_PTR(Unsafe_PrefetchWrite)} 139.518 + {CC "prefetchRead", CC "(" OBJ "J)V", FN_PTR(Unsafe_PrefetchRead)}, 139.519 + {CC "prefetchWrite", CC "(" OBJ "J)V", FN_PTR(Unsafe_PrefetchWrite)}, 139.520 + {CC "prefetchReadStatic", CC "(" OBJ "J)V", FN_PTR(Unsafe_PrefetchRead)}, 139.521 + {CC "prefetchWriteStatic",CC "(" OBJ "J)V", FN_PTR(Unsafe_PrefetchWrite)} 139.522 }; 139.523 139.524 JNINativeMethod memcopy_methods_17[] = { 139.525 - {CC"copyMemory", CC"("OBJ"J"OBJ"JJ)V", FN_PTR(Unsafe_CopyMemory2)}, 139.526 - {CC"setMemory", CC"("OBJ"JJB)V", FN_PTR(Unsafe_SetMemory2)} 139.527 + {CC "copyMemory", CC "(" OBJ "J" OBJ "JJ)V", FN_PTR(Unsafe_CopyMemory2)}, 139.528 + {CC "setMemory", CC "(" OBJ "JJB)V", FN_PTR(Unsafe_SetMemory2)} 139.529 }; 139.530 139.531 JNINativeMethod memcopy_methods_15[] = { 139.532 - {CC"setMemory", CC"("ADR"JB)V", FN_PTR(Unsafe_SetMemory)}, 139.533 - {CC"copyMemory", CC"("ADR ADR"J)V", FN_PTR(Unsafe_CopyMemory)} 139.534 + {CC "setMemory", CC "(" ADR "JB)V", FN_PTR(Unsafe_SetMemory)}, 139.535 + {CC "copyMemory", CC "(" ADR ADR "J)V", FN_PTR(Unsafe_CopyMemory)} 139.536 }; 139.537 139.538 JNINativeMethod anonk_methods[] = { 139.539 - {CC"defineAnonymousClass", CC"("DAC_Args")"CLS, FN_PTR(Unsafe_DefineAnonymousClass)}, 139.540 + {CC "defineAnonymousClass", CC "(" DAC_Args ")" CLS, FN_PTR(Unsafe_DefineAnonymousClass)}, 139.541 }; 139.542 139.543 JNINativeMethod lform_methods[] = { 139.544 - {CC"shouldBeInitialized",CC"("CLS")Z", FN_PTR(Unsafe_ShouldBeInitialized)}, 139.545 + {CC "shouldBeInitialized",CC "(" CLS ")Z", FN_PTR(Unsafe_ShouldBeInitialized)}, 139.546 }; 139.547 139.548 JNINativeMethod fence_methods[] = { 139.549 - {CC"loadFence", CC"()V", FN_PTR(Unsafe_LoadFence)}, 139.550 - {CC"storeFence", CC"()V", FN_PTR(Unsafe_StoreFence)}, 139.551 - {CC"fullFence", CC"()V", FN_PTR(Unsafe_FullFence)}, 139.552 + {CC "loadFence", CC "()V", FN_PTR(Unsafe_LoadFence)}, 139.553 + {CC "storeFence", CC "()V", FN_PTR(Unsafe_StoreFence)}, 139.554 + {CC "fullFence", CC "()V", FN_PTR(Unsafe_FullFence)}, 139.555 }; 139.556 139.557 #undef CC
140.1 --- a/src/share/vm/prims/whitebox.cpp Fri Jul 27 11:47:10 2018 +0100 140.2 +++ b/src/share/vm/prims/whitebox.cpp Sat Aug 04 12:53:22 2018 +0100 140.3 @@ -169,8 +169,8 @@ 140.4 140.5 WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) { 140.6 CollectorPolicy * p = Universe::heap()->collector_policy(); 140.7 - gclog_or_tty->print_cr("Minimum heap "SIZE_FORMAT" Initial heap " 140.8 - SIZE_FORMAT" Maximum heap "SIZE_FORMAT" Min alignment "SIZE_FORMAT" Max alignment "SIZE_FORMAT, 140.9 + gclog_or_tty->print_cr("Minimum heap " SIZE_FORMAT " Initial heap " 140.10 + SIZE_FORMAT" Maximum heap " SIZE_FORMAT " Min alignment " SIZE_FORMAT " Max alignment " SIZE_FORMAT, 140.11 p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(), 140.12 p->space_alignment(), p->heap_alignment()); 140.13 } 140.14 @@ -205,8 +205,8 @@ 140.15 Universe::narrow_oop_use_implicit_null_checks() )) { 140.16 tty->print_cr("WB_ReadFromNoaccessArea method is useless:\n " 140.17 "\tUseCompressedOops is %d\n" 140.18 - "\trhs.base() is "PTR_FORMAT"\n" 140.19 - "\tUniverse::narrow_oop_base() is "PTR_FORMAT"\n" 140.20 + "\trhs.base() is " PTR_FORMAT "\n" 140.21 + "\tUniverse::narrow_oop_base() is " PTR_FORMAT "\n" 140.22 "\tUniverse::narrow_oop_use_implicit_null_checks() is %d", 140.23 UseCompressedOops, 140.24 rhs.base(), 140.25 @@ -259,8 +259,8 @@ 140.26 140.27 WB_ENTRY(jint, WB_StressVirtualSpaceResize(JNIEnv* env, jobject o, 140.28 jlong reserved_space_size, jlong magnitude, jlong iterations)) 140.29 - tty->print_cr("reservedSpaceSize="JLONG_FORMAT", magnitude="JLONG_FORMAT", " 140.30 - "iterations="JLONG_FORMAT"\n", reserved_space_size, magnitude, 140.31 + tty->print_cr("reservedSpaceSize=" JLONG_FORMAT ", magnitude=" JLONG_FORMAT ", " 140.32 + "iterations=" JLONG_FORMAT "\n", reserved_space_size, magnitude, 140.33 iterations); 140.34 if (reserved_space_size < 0 || magnitude < 0 || iterations < 0) { 140.35 tty->print_cr("One of variables printed above is negative. Can't proceed.\n");
141.1 --- a/src/share/vm/runtime/arguments.cpp Fri Jul 27 11:47:10 2018 +0100 141.2 +++ b/src/share/vm/runtime/arguments.cpp Sat Aug 04 12:53:22 2018 +0100 141.3 @@ -1377,11 +1377,6 @@ 141.4 CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight); 141.5 } 141.6 141.7 - if (!ClassUnloading) { 141.8 - FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false); 141.9 - FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false); 141.10 - } 141.11 - 141.12 if (PrintGCDetails && Verbose) { 141.13 tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk", 141.14 (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K)); 141.15 @@ -1748,6 +1743,13 @@ 141.16 // Keeping the heap 100% free is hard ;-) so limit it to 99%. 141.17 FLAG_SET_ERGO(uintx, MinHeapFreeRatio, 99); 141.18 } 141.19 + 141.20 + // If class unloading is disabled, also disable concurrent class unloading. 141.21 + if (!ClassUnloading) { 141.22 + FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false); 141.23 + FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false); 141.24 + FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false); 141.25 + } 141.26 #else // INCLUDE_ALL_GCS 141.27 assert(verify_serial_gc_flags(), "SerialGC unset"); 141.28 #endif // INCLUDE_ALL_GCS
142.1 --- a/src/share/vm/runtime/deoptimization.cpp Fri Jul 27 11:47:10 2018 +0100 142.2 +++ b/src/share/vm/runtime/deoptimization.cpp Sat Aug 04 12:53:22 2018 +0100 142.3 @@ -1373,7 +1373,7 @@ 142.4 ttyLocker ttyl; 142.5 char buf[100]; 142.6 if (xtty != NULL) { 142.7 - xtty->begin_head("uncommon_trap thread='" UINTX_FORMAT"' %s", 142.8 + xtty->begin_head("uncommon_trap thread='" UINTX_FORMAT "' %s", 142.9 os::current_thread_id(), 142.10 format_trap_request(buf, sizeof(buf), trap_request)); 142.11 nm->log_identity(xtty);
143.1 --- a/src/share/vm/runtime/globals.hpp Fri Jul 27 11:47:10 2018 +0100 143.2 +++ b/src/share/vm/runtime/globals.hpp Sat Aug 04 12:53:22 2018 +0100 143.3 @@ -1,5 +1,5 @@ 143.4 /* 143.5 - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. 143.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 143.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 143.8 * 143.9 * This code is free software; you can redistribute it and/or modify it 143.10 @@ -1124,6 +1124,10 @@ 143.11 "Use detached threads that are recycled upon termination " \ 143.12 "(for Solaris only)") \ 143.13 \ 143.14 + experimental(bool, DisablePrimordialThreadGuardPages, false, \ 143.15 + "Disable the use of stack guard pages if the JVM is loaded " \ 143.16 + "on the primordial process thread") \ 143.17 + \ 143.18 product(bool, UseLWPSynchronization, true, \ 143.19 "Use LWP-based instead of libthread-based synchronization " \ 143.20 "(SPARC only)") \
144.1 --- a/src/share/vm/runtime/memprofiler.cpp Fri Jul 27 11:47:10 2018 +0100 144.2 +++ b/src/share/vm/runtime/memprofiler.cpp Sat Aug 04 12:53:22 2018 +0100 144.3 @@ -1,5 +1,5 @@ 144.4 /* 144.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 144.6 + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. 144.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 144.8 * 144.9 * This code is free software; you can redistribute it and/or modify it 144.10 @@ -126,7 +126,7 @@ 144.11 144.12 fprintf(_log_fp, UINTX_FORMAT_W(6) ",", CodeCache::capacity() / K); 144.13 144.14 - fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",%6ld\n", 144.15 + fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) "\n", 144.16 handles_memory_usage / K, 144.17 resource_memory_usage / K, 144.18 OopMapCache::memory_usage() / K);
145.1 --- a/src/share/vm/runtime/os.cpp Fri Jul 27 11:47:10 2018 +0100 145.2 +++ b/src/share/vm/runtime/os.cpp Sat Aug 04 12:53:22 2018 +0100 145.3 @@ -1,5 +1,5 @@ 145.4 /* 145.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 145.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 145.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 145.8 * 145.9 * This code is free software; you can redistribute it and/or modify it 145.10 @@ -96,6 +96,18 @@ 145.11 os::init_globals(); 145.12 } 145.13 145.14 +static time_t get_timezone(const struct tm* time_struct) { 145.15 +#if defined(_ALLBSD_SOURCE) 145.16 + return time_struct->tm_gmtoff; 145.17 +#elif defined(_WINDOWS) 145.18 + long zone; 145.19 + _get_timezone(&zone); 145.20 + return static_cast<time_t>(zone); 145.21 +#else 145.22 + return timezone; 145.23 +#endif 145.24 +} 145.25 + 145.26 // Fill in buffer with current local time as an ISO-8601 string. 145.27 // E.g., yyyy-mm-ddThh:mm:ss-zzzz. 145.28 // Returns buffer, or NULL if it failed. 145.29 @@ -134,11 +146,7 @@ 145.30 assert(false, "Failed localtime_pd"); 145.31 return NULL; 145.32 } 145.33 -#if defined(_ALLBSD_SOURCE) 145.34 - const time_t zone = (time_t) time_struct.tm_gmtoff; 145.35 -#else 145.36 - const time_t zone = timezone; 145.37 -#endif 145.38 + const time_t zone = get_timezone(&time_struct); 145.39 145.40 // If daylight savings time is in effect, 145.41 // we are 1 hour East of our time zone 145.42 @@ -847,7 +855,7 @@ 145.43 pd_print_cpu_info(st); 145.44 } 145.45 145.46 -void os::print_date_and_time(outputStream *st) { 145.47 +void os::print_date_and_time(outputStream *st, char* buf, size_t buflen) { 145.48 const int secs_per_day = 86400; 145.49 const int secs_per_hour = 3600; 145.50 const int secs_per_min = 60; 145.51 @@ -856,6 +864,12 @@ 145.52 (void)time(&tloc); 145.53 st->print("time: %s", ctime(&tloc)); // ctime adds newline. 145.54 145.55 + struct tm tz; 145.56 + if (localtime_pd(&tloc, &tz) != NULL) { 145.57 + ::strftime(buf, buflen, "%Z", &tz); 145.58 + st->print_cr("timezone: %s", buf); 145.59 + } 145.60 + 145.61 double t = os::elapsedTime(); 145.62 // NOTE: It tends to crash after a SEGV if we want to printf("%f",...) in 145.63 // Linux. Must be a bug in glibc ? Workaround is to round "t" to int
146.1 --- a/src/share/vm/runtime/os.hpp Fri Jul 27 11:47:10 2018 +0100 146.2 +++ b/src/share/vm/runtime/os.hpp Sat Aug 04 12:53:22 2018 +0100 146.3 @@ -1,5 +1,5 @@ 146.4 /* 146.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 146.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 146.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 146.8 * 146.9 * This code is free software; you can redistribute it and/or modify it 146.10 @@ -457,7 +457,24 @@ 146.11 static bool create_thread(Thread* thread, 146.12 ThreadType thr_type, 146.13 size_t stack_size = 0); 146.14 + 146.15 + // The "main thread", also known as "starting thread", is the thread 146.16 + // that loads/creates the JVM via JNI_CreateJavaVM. 146.17 static bool create_main_thread(JavaThread* thread); 146.18 + 146.19 + // The primordial thread is the initial process thread. The java 146.20 + // launcher never uses the primordial thread as the main thread, but 146.21 + // applications that host the JVM directly may do so. Some platforms 146.22 + // need special-case handling of the primordial thread if it attaches 146.23 + // to the VM. 146.24 + static bool is_primordial_thread(void) 146.25 +#if defined(_WINDOWS) || defined(BSD) 146.26 + // No way to identify the primordial thread. 146.27 + { return false; } 146.28 +#else 146.29 + ; 146.30 +#endif 146.31 + 146.32 static bool create_attached_thread(JavaThread* thread); 146.33 static void pd_start_thread(Thread* thread); 146.34 static void start_thread(Thread* thread); 146.35 @@ -612,7 +629,7 @@ 146.36 static void print_register_info(outputStream* st, void* context); 146.37 static void print_siginfo(outputStream* st, void* siginfo); 146.38 static void print_signal_handlers(outputStream* st, char* buf, size_t buflen); 146.39 - static void print_date_and_time(outputStream* st); 146.40 + static void print_date_and_time(outputStream* st, char* buf, size_t buflen); 146.41 146.42 static void print_location(outputStream* st, intptr_t x, bool verbose = false); 146.43 static size_t lasterror(char *buf, size_t len);
147.1 --- a/src/share/vm/runtime/safepoint.cpp Fri Jul 27 11:47:10 2018 +0100 147.2 +++ b/src/share/vm/runtime/safepoint.cpp Sat Aug 04 12:53:22 2018 +0100 147.3 @@ -914,7 +914,7 @@ 147.4 147.5 case _running: 147.6 default: 147.7 - tty->print_cr("restart thread "INTPTR_FORMAT" with state %d", 147.8 + tty->print_cr("restart thread " INTPTR_FORMAT " with state %d", 147.9 _thread, _type); 147.10 _thread->print(); 147.11 ShouldNotReachHere(); 147.12 @@ -1213,7 +1213,7 @@ 147.13 sstats = &_safepoint_stats[index]; 147.14 tty->print("%.3f: ", sstats->_time_stamp); 147.15 tty->print("%-26s [" 147.16 - INT32_FORMAT_W(8)INT32_FORMAT_W(11)INT32_FORMAT_W(15) 147.17 + INT32_FORMAT_W(8) INT32_FORMAT_W(11) INT32_FORMAT_W(15) 147.18 " ] ", 147.19 sstats->_vmop_type == -1 ? "no vm operation" : 147.20 VM_Operation::name(sstats->_vmop_type), 147.21 @@ -1222,9 +1222,9 @@ 147.22 sstats->_nof_threads_wait_to_block); 147.23 // "/ MICROUNITS " is to convert the unit from nanos to millis. 147.24 tty->print(" [" 147.25 - INT64_FORMAT_W(6)INT64_FORMAT_W(6) 147.26 - INT64_FORMAT_W(6)INT64_FORMAT_W(6) 147.27 - INT64_FORMAT_W(6)" ] ", 147.28 + INT64_FORMAT_W(6) INT64_FORMAT_W(6) 147.29 + INT64_FORMAT_W(6) INT64_FORMAT_W(6) 147.30 + INT64_FORMAT_W(6) " ] ", 147.31 sstats->_time_to_spin / MICROUNITS, 147.32 sstats->_time_to_wait_to_block / MICROUNITS, 147.33 sstats->_time_to_sync / MICROUNITS, 147.34 @@ -1232,9 +1232,9 @@ 147.35 sstats->_time_to_exec_vmop / MICROUNITS); 147.36 147.37 if (need_to_track_page_armed_status) { 147.38 - tty->print(INT32_FORMAT" ", sstats->_page_armed); 147.39 + tty->print(INT32_FORMAT " ", sstats->_page_armed); 147.40 } 147.41 - tty->print_cr(INT32_FORMAT" ", sstats->_nof_threads_hit_page_trap); 147.42 + tty->print_cr(INT32_FORMAT " ", sstats->_nof_threads_hit_page_trap); 147.43 } 147.44 } 147.45 147.46 @@ -1271,17 +1271,17 @@ 147.47 147.48 for (int index = 0; index < VM_Operation::VMOp_Terminating; index++) { 147.49 if (_safepoint_reasons[index] != 0) { 147.50 - tty->print_cr("%-26s"UINT64_FORMAT_W(10), VM_Operation::name(index), 147.51 + tty->print_cr("%-26s" UINT64_FORMAT_W(10), VM_Operation::name(index), 147.52 _safepoint_reasons[index]); 147.53 } 147.54 } 147.55 147.56 - tty->print_cr(UINT64_FORMAT_W(5)" VM operations coalesced during safepoint", 147.57 + tty->print_cr(UINT64_FORMAT_W(5) " VM operations coalesced during safepoint", 147.58 _coalesced_vmop_count); 147.59 - tty->print_cr("Maximum sync time "INT64_FORMAT_W(5)" ms", 147.60 + tty->print_cr("Maximum sync time " INT64_FORMAT_W(5) " ms", 147.61 _max_sync_time / MICROUNITS); 147.62 tty->print_cr("Maximum vm operation time (except for Exit VM operation) " 147.63 - INT64_FORMAT_W(5)" ms", 147.64 + INT64_FORMAT_W(5) " ms", 147.65 _max_vmop_time / MICROUNITS); 147.66 } 147.67
148.1 --- a/src/share/vm/runtime/sharedRuntime.cpp Fri Jul 27 11:47:10 2018 +0100 148.2 +++ b/src/share/vm/runtime/sharedRuntime.cpp Sat Aug 04 12:53:22 2018 +0100 148.3 @@ -1,5 +1,5 @@ 148.4 /* 148.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 148.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 148.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 148.8 * 148.9 * This code is free software; you can redistribute it and/or modify it 148.10 @@ -759,6 +759,8 @@ 148.11 if (StackTraceInThrowable) { 148.12 java_lang_Throwable::fill_in_stack_trace(exception); 148.13 } 148.14 + // Increment counter for hs_err file reporting 148.15 + Atomic::inc(&Exceptions::_stack_overflow_errors); 148.16 throw_and_post_jvmti_exception(thread, exception); 148.17 JRT_END 148.18
149.1 --- a/src/share/vm/runtime/stubCodeGenerator.cpp Fri Jul 27 11:47:10 2018 +0100 149.2 +++ b/src/share/vm/runtime/stubCodeGenerator.cpp Sat Aug 04 12:53:22 2018 +0100 149.3 @@ -34,12 +34,12 @@ 149.4 149.5 // Implementation of StubCodeDesc 149.6 149.7 -StubCodeDesc* StubCodeDesc::_list = NULL; 149.8 -int StubCodeDesc::_count = 0; 149.9 +StubCodeDesc* volatile StubCodeDesc::_list = NULL; 149.10 +int StubCodeDesc::_count = 0; 149.11 149.12 149.13 StubCodeDesc* StubCodeDesc::desc_for(address pc) { 149.14 - StubCodeDesc* p = _list; 149.15 + StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); 149.16 while (p != NULL && !p->contains(pc)) p = p->_next; 149.17 // p == NULL || p->contains(pc) 149.18 return p; 149.19 @@ -47,7 +47,7 @@ 149.20 149.21 149.22 StubCodeDesc* StubCodeDesc::desc_for_index(int index) { 149.23 - StubCodeDesc* p = _list; 149.24 + StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); 149.25 while (p != NULL && p->index() != index) p = p->_next; 149.26 return p; 149.27 }
150.1 --- a/src/share/vm/runtime/stubCodeGenerator.hpp Fri Jul 27 11:47:10 2018 +0100 150.2 +++ b/src/share/vm/runtime/stubCodeGenerator.hpp Sat Aug 04 12:53:22 2018 +0100 150.3 @@ -38,7 +38,7 @@ 150.4 150.5 class StubCodeDesc: public CHeapObj<mtCode> { 150.6 protected: 150.7 - static StubCodeDesc* _list; // the list of all descriptors 150.8 + static StubCodeDesc* volatile _list; // the list of all descriptors 150.9 static int _count; // length of list 150.10 150.11 StubCodeDesc* _next; // the next element in the linked list 150.12 @@ -69,13 +69,13 @@ 150.13 150.14 StubCodeDesc(const char* group, const char* name, address begin) { 150.15 assert(name != NULL, "no name specified"); 150.16 - _next = _list; 150.17 + _next = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); 150.18 _group = group; 150.19 _name = name; 150.20 _index = ++_count; // (never zero) 150.21 _begin = begin; 150.22 _end = NULL; 150.23 - _list = this; 150.24 + OrderAccess::release_store_ptr(&_list, this); 150.25 }; 150.26 150.27 const char* group() const { return _group; }
151.1 --- a/src/share/vm/runtime/thread.cpp Fri Jul 27 11:47:10 2018 +0100 151.2 +++ b/src/share/vm/runtime/thread.cpp Sat Aug 04 12:53:22 2018 +0100 151.3 @@ -1,5 +1,5 @@ 151.4 /* 151.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 151.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 151.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 151.8 * 151.9 * This code is free software; you can redistribute it and/or modify it 151.10 @@ -1451,7 +1451,7 @@ 151.11 _in_deopt_handler = 0; 151.12 _doing_unsafe_access = false; 151.13 _stack_guard_state = stack_guard_unused; 151.14 - (void)const_cast<oop&>(_exception_oop = NULL); 151.15 + (void)const_cast<oop&>(_exception_oop = oop(NULL)); 151.16 _exception_pc = 0; 151.17 _exception_handler_pc = 0; 151.18 _is_method_handle_return = 0; 151.19 @@ -2485,7 +2485,15 @@ 151.20 } 151.21 151.22 void JavaThread::create_stack_guard_pages() { 151.23 - if (! os::uses_stack_guard_pages() || _stack_guard_state != stack_guard_unused) return; 151.24 + if (!os::uses_stack_guard_pages() || 151.25 + _stack_guard_state != stack_guard_unused || 151.26 + (DisablePrimordialThreadGuardPages && os::is_primordial_thread())) { 151.27 + if (TraceThreadEvents) { 151.28 + tty->print_cr("Stack guard page creation for thread " 151.29 + UINTX_FORMAT " disabled", os::current_thread_id()); 151.30 + } 151.31 + return; 151.32 + } 151.33 address low_addr = stack_base() - stack_size(); 151.34 size_t len = (StackYellowPages + StackRedPages) * os::vm_page_size(); 151.35
152.1 --- a/src/share/vm/runtime/thread.hpp Fri Jul 27 11:47:10 2018 +0100 152.2 +++ b/src/share/vm/runtime/thread.hpp Sat Aug 04 12:53:22 2018 +0100 152.3 @@ -1,5 +1,5 @@ 152.4 /* 152.5 - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 152.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 152.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 152.8 * 152.9 * This code is free software; you can redistribute it and/or modify it 152.10 @@ -1799,7 +1799,8 @@ 152.11 152.12 inline bool JavaThread::stack_yellow_zone_enabled() { 152.13 #ifdef ASSERT 152.14 - if (os::uses_stack_guard_pages()) { 152.15 + if (os::uses_stack_guard_pages() && 152.16 + !(DisablePrimordialThreadGuardPages && os::is_primordial_thread())) { 152.17 assert(_stack_guard_state != stack_guard_unused, "guard pages must be in use"); 152.18 } 152.19 #endif
153.1 --- a/src/share/vm/runtime/unhandledOops.cpp Fri Jul 27 11:47:10 2018 +0100 153.2 +++ b/src/share/vm/runtime/unhandledOops.cpp Sat Aug 04 12:53:22 2018 +0100 153.3 @@ -105,7 +105,7 @@ 153.4 _level --; 153.5 if (unhandled_oop_print) { 153.6 for (int i=0; i<_level; i++) tty->print(" "); 153.7 - tty->print_cr("u "INTPTR_FORMAT, op); 153.8 + tty->print_cr("u " INTPTR_FORMAT, op); 153.9 } 153.10 153.11 int i = _oop_list->find_from_end(op, match_oop_entry);
154.1 --- a/src/share/vm/runtime/vm_version.cpp Fri Jul 27 11:47:10 2018 +0100 154.2 +++ b/src/share/vm/runtime/vm_version.cpp Sat Aug 04 12:53:22 2018 +0100 154.3 @@ -218,6 +218,12 @@ 154.4 #define HOTSPOT_BUILD_COMPILER "MS VC++ 10.0 (VS2010)" 154.5 #elif _MSC_VER == 1700 154.6 #define HOTSPOT_BUILD_COMPILER "MS VC++ 11.0 (VS2012)" 154.7 + #elif _MSC_VER == 1800 154.8 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 12.0 (VS2013)" 154.9 + #elif _MSC_VER == 1900 154.10 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 14.0 (VS2015)" 154.11 + #elif _MSC_VER == 1912 154.12 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.5 (VS2017)" 154.13 #else 154.14 #define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER) 154.15 #endif
155.1 --- a/src/share/vm/services/attachListener.cpp Fri Jul 27 11:47:10 2018 +0100 155.2 +++ b/src/share/vm/services/attachListener.cpp Sat Aug 04 12:53:22 2018 +0100 155.3 @@ -466,15 +466,39 @@ 155.4 } 155.5 } 155.6 155.7 +bool AttachListener::has_init_error(TRAPS) { 155.8 + if (HAS_PENDING_EXCEPTION) { 155.9 + tty->print_cr("Exception in VM (AttachListener::init) : "); 155.10 + java_lang_Throwable::print(PENDING_EXCEPTION, tty); 155.11 + tty->cr(); 155.12 + 155.13 + CLEAR_PENDING_EXCEPTION; 155.14 + 155.15 + return true; 155.16 + } else { 155.17 + return false; 155.18 + } 155.19 +} 155.20 + 155.21 // Starts the Attach Listener thread 155.22 void AttachListener::init() { 155.23 EXCEPTION_MARK; 155.24 - Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, CHECK); 155.25 + Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, THREAD); 155.26 + if (has_init_error(THREAD)) { 155.27 + return; 155.28 + } 155.29 + 155.30 instanceKlassHandle klass (THREAD, k); 155.31 - instanceHandle thread_oop = klass->allocate_instance_handle(CHECK); 155.32 + instanceHandle thread_oop = klass->allocate_instance_handle(THREAD); 155.33 + if (has_init_error(THREAD)) { 155.34 + return; 155.35 + } 155.36 155.37 const char thread_name[] = "Attach Listener"; 155.38 - Handle string = java_lang_String::create_from_str(thread_name, CHECK); 155.39 + Handle string = java_lang_String::create_from_str(thread_name, THREAD); 155.40 + if (has_init_error(THREAD)) { 155.41 + return; 155.42 + } 155.43 155.44 // Initialize thread_oop to put it into the system threadGroup 155.45 Handle thread_group (THREAD, Universe::system_thread_group()); 155.46 @@ -487,13 +511,7 @@ 155.47 string, 155.48 THREAD); 155.49 155.50 - if (HAS_PENDING_EXCEPTION) { 155.51 - tty->print_cr("Exception in VM (AttachListener::init) : "); 155.52 - java_lang_Throwable::print(PENDING_EXCEPTION, tty); 155.53 - tty->cr(); 155.54 - 155.55 - CLEAR_PENDING_EXCEPTION; 155.56 - 155.57 + if (has_init_error(THREAD)) { 155.58 return; 155.59 } 155.60 155.61 @@ -505,14 +523,7 @@ 155.62 vmSymbols::thread_void_signature(), 155.63 thread_oop, // ARG 1 155.64 THREAD); 155.65 - 155.66 - if (HAS_PENDING_EXCEPTION) { 155.67 - tty->print_cr("Exception in VM (AttachListener::init) : "); 155.68 - java_lang_Throwable::print(PENDING_EXCEPTION, tty); 155.69 - tty->cr(); 155.70 - 155.71 - CLEAR_PENDING_EXCEPTION; 155.72 - 155.73 + if (has_init_error(THREAD)) { 155.74 return; 155.75 } 155.76
156.1 --- a/src/share/vm/services/attachListener.hpp Fri Jul 27 11:47:10 2018 +0100 156.2 +++ b/src/share/vm/services/attachListener.hpp Sat Aug 04 12:53:22 2018 +0100 156.3 @@ -94,6 +94,9 @@ 156.4 // dequeue the next operation 156.5 static AttachOperation* dequeue(); 156.6 #endif // !INCLUDE_SERVICES 156.7 + 156.8 + private: 156.9 + static bool has_init_error(TRAPS); 156.10 }; 156.11 156.12 #if INCLUDE_SERVICES
157.1 --- a/src/share/vm/services/diagnosticArgument.cpp Fri Jul 27 11:47:10 2018 +0100 157.2 +++ b/src/share/vm/services/diagnosticArgument.cpp Sat Aug 04 12:53:22 2018 +0100 157.3 @@ -89,7 +89,7 @@ 157.4 size_t len, TRAPS) { 157.5 int scanned = -1; 157.6 if (str == NULL 157.7 - || sscanf(str, JLONG_FORMAT"%n", &_value, &scanned) != 1 157.8 + || sscanf(str, JLONG_FORMAT "%n", &_value, &scanned) != 1 157.9 || (size_t)scanned != len) 157.10 { 157.11 ResourceMark rm;
158.1 --- a/src/share/vm/services/heapDumper.cpp Fri Jul 27 11:47:10 2018 +0100 158.2 +++ b/src/share/vm/services/heapDumper.cpp Sat Aug 04 12:53:22 2018 +0100 158.3 @@ -1,5 +1,5 @@ 158.4 /* 158.5 - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 158.6 + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. 158.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 158.8 * 158.9 * This code is free software; you can redistribute it and/or modify it 158.10 @@ -815,6 +815,28 @@ 158.11 for (FieldStream fldc(ikh, true, true); !fldc.eos(); fldc.next()) { 158.12 if (fldc.access_flags().is_static()) field_count++; 158.13 } 158.14 + // Add in resolved_references which is referenced by the cpCache 158.15 + // The resolved_references is an array per InstanceKlass holding the 158.16 + // strings and other oops resolved from the constant pool. 158.17 + oop resolved_references = ikh->constants()->resolved_references_or_null(); 158.18 + if (resolved_references != NULL) { 158.19 + field_count++; 158.20 + 158.21 + // Add in the resolved_references of the used previous versions of the class 158.22 + // in the case of RedefineClasses 158.23 + InstanceKlass* prev = ikh->previous_versions(); 158.24 + while (prev != NULL && prev->constants()->resolved_references_or_null() != NULL) { 158.25 + field_count++; 158.26 + prev = prev->previous_versions(); 158.27 + } 158.28 + } 158.29 + 158.30 + // Also provide a pointer to the init_lock if present, so there aren't unreferenced int[0] 158.31 + // arrays. 158.32 + oop init_lock = ikh->init_lock(); 158.33 + if (init_lock != NULL) { 158.34 + field_count++; 158.35 + } 158.36 158.37 writer->write_u2(field_count); 158.38 158.39 @@ -833,6 +855,29 @@ 158.40 dump_field_value(writer, sig->byte_at(0), addr); 158.41 } 158.42 } 158.43 + 158.44 + // Add resolved_references for each class that has them 158.45 + if (resolved_references != NULL) { 158.46 + writer->write_symbolID(vmSymbols::resolved_references_name()); // name 158.47 + writer->write_u1(sig2tag(vmSymbols::object_array_signature())); // type 158.48 + writer->write_objectID(resolved_references); 158.49 + 158.50 + // Also write any previous versions 158.51 + InstanceKlass* prev = ikh->previous_versions(); 158.52 + while (prev != NULL && prev->constants()->resolved_references_or_null() != NULL) { 158.53 + writer->write_symbolID(vmSymbols::resolved_references_name()); // name 158.54 + writer->write_u1(sig2tag(vmSymbols::object_array_signature())); // type 158.55 + writer->write_objectID(prev->constants()->resolved_references()); 158.56 + prev = prev->previous_versions(); 158.57 + } 158.58 + } 158.59 + 158.60 + // Add init lock to the end if the class is not yet initialized 158.61 + if (init_lock != NULL) { 158.62 + writer->write_symbolID(vmSymbols::init_lock_name()); // name 158.63 + writer->write_u1(sig2tag(vmSymbols::int_array_signature())); // type 158.64 + writer->write_objectID(init_lock); 158.65 + } 158.66 } 158.67 158.68 // dump the raw values of the instance fields of the given object 158.69 @@ -868,7 +913,7 @@ 158.70 if (!fld.access_flags().is_static()) { 158.71 Symbol* sig = fld.signature(); 158.72 158.73 - writer->write_symbolID(fld.name()); // name 158.74 + writer->write_symbolID(fld.name()); // name 158.75 writer->write_u1(sig2tag(sig)); // type 158.76 } 158.77 } 158.78 @@ -1758,6 +1803,8 @@ 158.79 // HPROF_GC_ROOT_JNI_GLOBAL 158.80 JNIGlobalsDumper jni_dumper(writer()); 158.81 JNIHandles::oops_do(&jni_dumper); 158.82 + Universe::oops_do(&jni_dumper); // technically not jni roots, but global roots 158.83 + // for things like preallocated throwable backtraces 158.84 check_segment_length(); 158.85 158.86 // HPROF_GC_ROOT_STICKY_CLASS
159.1 --- a/src/share/vm/services/mallocSiteTable.cpp Fri Jul 27 11:47:10 2018 +0100 159.2 +++ b/src/share/vm/services/mallocSiteTable.cpp Sat Aug 04 12:53:22 2018 +0100 159.3 @@ -136,7 +136,7 @@ 159.4 MallocSite* MallocSiteTable::lookup_or_add(const NativeCallStack& key, size_t* bucket_idx, 159.5 size_t* pos_idx, MEMFLAGS flags) { 159.6 assert(flags != mtNone, "Should have a real memory type"); 159.7 - int index = hash_to_index(key.hash()); 159.8 + unsigned int index = hash_to_index(key.hash()); 159.9 assert(index >= 0, "Negative index"); 159.10 *bucket_idx = (size_t)index; 159.11 *pos_idx = 0;
160.1 --- a/src/share/vm/services/mallocSiteTable.hpp Fri Jul 27 11:47:10 2018 +0100 160.2 +++ b/src/share/vm/services/mallocSiteTable.hpp Sat Aug 04 12:53:22 2018 +0100 160.3 @@ -245,8 +245,7 @@ 160.4 static MallocSite* malloc_site(size_t bucket_idx, size_t pos_idx); 160.5 static bool walk(MallocSiteWalker* walker); 160.6 160.7 - static inline int hash_to_index(int hash) { 160.8 - hash = (hash > 0) ? hash : (-hash); 160.9 + static inline unsigned int hash_to_index(unsigned int hash) { 160.10 return (hash % table_size); 160.11 } 160.12
161.1 --- a/src/share/vm/services/memoryManager.cpp Fri Jul 27 11:47:10 2018 +0100 161.2 +++ b/src/share/vm/services/memoryManager.cpp Sat Aug 04 12:53:22 2018 +0100 161.3 @@ -1,5 +1,5 @@ 161.4 /* 161.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 161.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 161.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 161.8 * 161.9 * This code is free software; you can redistribute it and/or modify it 161.10 @@ -46,7 +46,7 @@ 161.11 161.12 MemoryManager::MemoryManager() { 161.13 _num_pools = 0; 161.14 - (void)const_cast<instanceOop&>(_memory_mgr_obj = NULL); 161.15 + (void)const_cast<instanceOop&>(_memory_mgr_obj = instanceOop(NULL)); 161.16 } 161.17 161.18 void MemoryManager::add_pool(MemoryPool* pool) {
162.1 --- a/src/share/vm/services/memoryPool.cpp Fri Jul 27 11:47:10 2018 +0100 162.2 +++ b/src/share/vm/services/memoryPool.cpp Sat Aug 04 12:53:22 2018 +0100 162.3 @@ -1,5 +1,5 @@ 162.4 /* 162.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 162.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 162.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 162.8 * 162.9 * This code is free software; you can redistribute it and/or modify it 162.10 @@ -46,7 +46,7 @@ 162.11 _name = name; 162.12 _initial_size = init_size; 162.13 _max_size = max_size; 162.14 - (void)const_cast<instanceOop&>(_memory_pool_obj = NULL); 162.15 + (void)const_cast<instanceOop&>(_memory_pool_obj = instanceOop(NULL)); 162.16 _available_for_allocation = true; 162.17 _num_managers = 0; 162.18 _type = type;
163.1 --- a/src/share/vm/services/threadService.cpp Fri Jul 27 11:47:10 2018 +0100 163.2 +++ b/src/share/vm/services/threadService.cpp Sat Aug 04 12:53:22 2018 +0100 163.3 @@ -889,7 +889,7 @@ 163.4 st->print(" waiting to lock monitor " INTPTR_FORMAT, waitingToLockMonitor); 163.5 oop obj = (oop)waitingToLockMonitor->object(); 163.6 if (obj != NULL) { 163.7 - st->print(" (object "INTPTR_FORMAT ", a %s)", (address)obj, 163.8 + st->print(" (object " INTPTR_FORMAT ", a %s)", (address)obj, 163.9 (InstanceKlass::cast(obj->klass()))->external_name()); 163.10 163.11 if (!currentThread->current_pending_monitor_is_from_java()) {
164.1 --- a/src/share/vm/trace/traceStream.hpp Fri Jul 27 11:47:10 2018 +0100 164.2 +++ b/src/share/vm/trace/traceStream.hpp Sat Aug 04 12:53:22 2018 +0100 164.3 @@ -40,31 +40,31 @@ 164.4 TraceStream(outputStream& stream): _st(stream) {} 164.5 164.6 void print_val(const char* label, u1 val) { 164.7 - _st.print("%s = "UINT32_FORMAT, label, val); 164.8 + _st.print("%s = " UINT32_FORMAT, label, val); 164.9 } 164.10 164.11 void print_val(const char* label, u2 val) { 164.12 - _st.print("%s = "UINT32_FORMAT, label, val); 164.13 + _st.print("%s = " UINT32_FORMAT, label, val); 164.14 } 164.15 164.16 void print_val(const char* label, s2 val) { 164.17 - _st.print("%s = "INT32_FORMAT, label, val); 164.18 + _st.print("%s = " INT32_FORMAT, label, val); 164.19 } 164.20 164.21 void print_val(const char* label, u4 val) { 164.22 - _st.print("%s = "UINT32_FORMAT, label, val); 164.23 + _st.print("%s = " UINT32_FORMAT, label, val); 164.24 } 164.25 164.26 void print_val(const char* label, s4 val) { 164.27 - _st.print("%s = "INT32_FORMAT, label, val); 164.28 + _st.print("%s = " INT32_FORMAT, label, val); 164.29 } 164.30 164.31 void print_val(const char* label, u8 val) { 164.32 - _st.print("%s = "UINT64_FORMAT, label, val); 164.33 + _st.print("%s = " UINT64_FORMAT, label, val); 164.34 } 164.35 164.36 void print_val(const char* label, s8 val) { 164.37 - _st.print("%s = "INT64_FORMAT, label, (int64_t) val); 164.38 + _st.print("%s = " INT64_FORMAT, label, (int64_t) val); 164.39 } 164.40 164.41 void print_val(const char* label, bool val) {
165.1 --- a/src/share/vm/utilities/exceptions.cpp Fri Jul 27 11:47:10 2018 +0100 165.2 +++ b/src/share/vm/utilities/exceptions.cpp Sat Aug 04 12:53:22 2018 +0100 165.3 @@ -1,5 +1,5 @@ 165.4 /* 165.5 - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 165.6 + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. 165.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 165.8 * 165.9 * This code is free software; you can redistribute it and/or modify it 165.10 @@ -154,6 +154,10 @@ 165.11 return; 165.12 } 165.13 165.14 + if (h_exception->is_a(SystemDictionary::OutOfMemoryError_klass())) { 165.15 + count_out_of_memory_exceptions(h_exception); 165.16 + } 165.17 + 165.18 assert(h_exception->is_a(SystemDictionary::Throwable_klass()), "exception is not a subclass of java/lang/Throwable"); 165.19 165.20 // set the pending exception 165.21 @@ -228,6 +232,8 @@ 165.22 if (StackTraceInThrowable) { 165.23 java_lang_Throwable::fill_in_stack_trace(exception, method()); 165.24 } 165.25 + // Increment counter for hs_err file reporting 165.26 + Atomic::inc(&Exceptions::_stack_overflow_errors); 165.27 } else { 165.28 // if prior exception, throw that one instead 165.29 exception = Handle(THREAD, THREAD->pending_exception()); 165.30 @@ -404,6 +410,44 @@ 165.31 h_prot, to_utf8_safe); 165.32 } 165.33 165.34 + 165.35 +// Exception counting for hs_err file 165.36 +volatile int Exceptions::_stack_overflow_errors = 0; 165.37 +volatile int Exceptions::_out_of_memory_error_java_heap_errors = 0; 165.38 +volatile int Exceptions::_out_of_memory_error_metaspace_errors = 0; 165.39 +volatile int Exceptions::_out_of_memory_error_class_metaspace_errors = 0; 165.40 + 165.41 +void Exceptions::count_out_of_memory_exceptions(Handle exception) { 165.42 + if (exception() == Universe::out_of_memory_error_metaspace()) { 165.43 + Atomic::inc(&_out_of_memory_error_metaspace_errors); 165.44 + } else if (exception() == Universe::out_of_memory_error_class_metaspace()) { 165.45 + Atomic::inc(&_out_of_memory_error_class_metaspace_errors); 165.46 + } else { 165.47 + // everything else reported as java heap OOM 165.48 + Atomic::inc(&_out_of_memory_error_java_heap_errors); 165.49 + } 165.50 +} 165.51 + 165.52 +void print_oom_count(outputStream* st, const char *err, int count) { 165.53 + if (count > 0) { 165.54 + st->print_cr("OutOfMemoryError %s=%d", err, count); 165.55 + } 165.56 +} 165.57 + 165.58 +bool Exceptions::has_exception_counts() { 165.59 + return (_stack_overflow_errors + _out_of_memory_error_java_heap_errors + 165.60 + _out_of_memory_error_metaspace_errors + _out_of_memory_error_class_metaspace_errors) > 0; 165.61 +} 165.62 + 165.63 +void Exceptions::print_exception_counts_on_error(outputStream* st) { 165.64 + print_oom_count(st, "java_heap_errors", _out_of_memory_error_java_heap_errors); 165.65 + print_oom_count(st, "metaspace_errors", _out_of_memory_error_metaspace_errors); 165.66 + print_oom_count(st, "class_metaspace_errors", _out_of_memory_error_class_metaspace_errors); 165.67 + if (_stack_overflow_errors > 0) { 165.68 + st->print_cr("StackOverflowErrors=%d", _stack_overflow_errors); 165.69 + } 165.70 +} 165.71 + 165.72 // Implementation of ExceptionMark 165.73 165.74 ExceptionMark::ExceptionMark(Thread*& thread) {
166.1 --- a/src/share/vm/utilities/exceptions.hpp Fri Jul 27 11:47:10 2018 +0100 166.2 +++ b/src/share/vm/utilities/exceptions.hpp Sat Aug 04 12:53:22 2018 +0100 166.3 @@ -1,5 +1,5 @@ 166.4 /* 166.5 - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 166.6 + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. 166.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 166.8 * 166.9 * This code is free software; you can redistribute it and/or modify it 166.10 @@ -102,6 +102,11 @@ 166.11 class Exceptions { 166.12 static bool special_exception(Thread *thread, const char* file, int line, Handle exception); 166.13 static bool special_exception(Thread* thread, const char* file, int line, Symbol* name, const char* message); 166.14 + 166.15 + // Count out of memory errors that are interesting in error diagnosis 166.16 + static volatile int _out_of_memory_error_java_heap_errors; 166.17 + static volatile int _out_of_memory_error_metaspace_errors; 166.18 + static volatile int _out_of_memory_error_class_metaspace_errors; 166.19 public: 166.20 // this enum is defined to indicate whether it is safe to 166.21 // ignore the encoding scheme of the original message string. 166.22 @@ -160,6 +165,14 @@ 166.23 166.24 static void throw_stack_overflow_exception(Thread* thread, const char* file, int line, methodHandle method); 166.25 166.26 + // Exception counting for error files of interesting exceptions that may have 166.27 + // caused a problem for the jvm 166.28 + static volatile int _stack_overflow_errors; 166.29 + 166.30 + static bool has_exception_counts(); 166.31 + static void count_out_of_memory_exceptions(Handle exception); 166.32 + static void print_exception_counts_on_error(outputStream* st); 166.33 + 166.34 // for AbortVMOnException flag 166.35 NOT_PRODUCT(static void debug_check_abort(Handle exception, const char* message = NULL);) 166.36 NOT_PRODUCT(static void debug_check_abort(const char *value_string, const char* message = NULL);)
167.1 --- a/src/share/vm/utilities/globalDefinitions.hpp Fri Jul 27 11:47:10 2018 +0100 167.2 +++ b/src/share/vm/utilities/globalDefinitions.hpp Sat Aug 04 12:53:22 2018 +0100 167.3 @@ -1038,8 +1038,8 @@ 167.4 // Special constants for debugging 167.5 167.6 const jint badInt = -3; // generic "bad int" value 167.7 -const long badAddressVal = -2; // generic "bad address" value 167.8 -const long badOopVal = -1; // generic "bad oop" value 167.9 +const intptr_t badAddressVal = -2; // generic "bad address" value 167.10 +const intptr_t badOopVal = -1; // generic "bad oop" value 167.11 const intptr_t badHeapOopVal = (intptr_t) CONST64(0x2BAD4B0BBAADBABE); // value used to zap heap after GC 167.12 const int badHandleValue = 0xBC; // value used to zap vm handle area 167.13 const int badResourceValue = 0xAB; // value used to zap resource area
168.1 --- a/src/share/vm/utilities/nativeCallStack.cpp Fri Jul 27 11:47:10 2018 +0100 168.2 +++ b/src/share/vm/utilities/nativeCallStack.cpp Sat Aug 04 12:53:22 2018 +0100 168.3 @@ -55,6 +55,7 @@ 168.4 for (; index < NMT_TrackingStackDepth; index ++) { 168.5 _stack[index] = NULL; 168.6 } 168.7 + _hash_value = 0; 168.8 } 168.9 168.10 // number of stack frames captured 168.11 @@ -69,19 +70,16 @@ 168.12 } 168.13 168.14 // Hash code. Any better algorithm? 168.15 -int NativeCallStack::hash() const { 168.16 - long hash_val = _hash_value; 168.17 +unsigned int NativeCallStack::hash() const { 168.18 + uintptr_t hash_val = _hash_value; 168.19 if (hash_val == 0) { 168.20 - long pc; 168.21 - int index; 168.22 - for (index = 0; index < NMT_TrackingStackDepth; index ++) { 168.23 - pc = (long)_stack[index]; 168.24 - if (pc == 0) break; 168.25 - hash_val += pc; 168.26 + for (int index = 0; index < NMT_TrackingStackDepth; index++) { 168.27 + if (_stack[index] == NULL) break; 168.28 + hash_val += (uintptr_t)_stack[index]; 168.29 } 168.30 168.31 NativeCallStack* p = const_cast<NativeCallStack*>(this); 168.32 - p->_hash_value = (int)(hash_val & 0xFFFFFFFF); 168.33 + p->_hash_value = (unsigned int)(hash_val & 0xFFFFFFFF); 168.34 } 168.35 return _hash_value; 168.36 }
169.1 --- a/src/share/vm/utilities/nativeCallStack.hpp Fri Jul 27 11:47:10 2018 +0100 169.2 +++ b/src/share/vm/utilities/nativeCallStack.hpp Sat Aug 04 12:53:22 2018 +0100 169.3 @@ -56,8 +56,8 @@ 169.4 static const NativeCallStack EMPTY_STACK; 169.5 169.6 private: 169.7 - address _stack[NMT_TrackingStackDepth]; 169.8 - int _hash_value; 169.9 + address _stack[NMT_TrackingStackDepth]; 169.10 + unsigned int _hash_value; 169.11 169.12 public: 169.13 NativeCallStack(int toSkip = 0, bool fillStack = false); 169.14 @@ -89,7 +89,7 @@ 169.15 } 169.16 169.17 // Hash code. Any better algorithm? 169.18 - int hash() const; 169.19 + unsigned int hash() const; 169.20 169.21 void print_on(outputStream* out) const; 169.22 void print_on(outputStream* out, int indent) const;
170.1 --- a/src/share/vm/utilities/ostream.cpp Fri Jul 27 11:47:10 2018 +0100 170.2 +++ b/src/share/vm/utilities/ostream.cpp Sat Aug 04 12:53:22 2018 +0100 170.3 @@ -277,7 +277,7 @@ 170.4 size_t limit = (len + 16) / 16 * 16; 170.5 for (size_t i = 0; i < limit; ++i) { 170.6 if (i % 16 == 0) { 170.7 - indent().print(SIZE_FORMAT_HEX_W(07)":", i); 170.8 + indent().print(SIZE_FORMAT_HEX_W(07) ":", i); 170.9 } 170.10 if (i % 2 == 0) { 170.11 print(" "); 170.12 @@ -945,7 +945,7 @@ 170.13 // %%% Should be: jlong time_ms = os::start_time_milliseconds(), if 170.14 // we ever get round to introduce that method on the os class 170.15 xs->head("hotspot_log version='%d %d'" 170.16 - " process='%d' time_ms='"INT64_FORMAT"'", 170.17 + " process='%d' time_ms='" INT64_FORMAT "'", 170.18 LOG_MAJOR_VERSION, LOG_MINOR_VERSION, 170.19 os::current_process_id(), (int64_t)time_ms); 170.20 // Write VM version header immediately.
171.1 --- a/src/share/vm/utilities/stack.hpp Fri Jul 27 11:47:10 2018 +0100 171.2 +++ b/src/share/vm/utilities/stack.hpp Sat Aug 04 12:53:22 2018 +0100 171.3 @@ -96,11 +96,16 @@ 171.4 public: 171.5 friend class StackIterator<E, F>; 171.6 171.7 + // Number of elements that fit in 4K bytes minus the size of two pointers 171.8 + // (link field and malloc header). 171.9 + static const size_t _default_segment_size = (4096 - 2 * sizeof(E*)) / sizeof(E); 171.10 + static size_t default_segment_size() { return _default_segment_size; } 171.11 + 171.12 // segment_size: number of items per segment 171.13 // max_cache_size: maxmium number of *segments* to cache 171.14 // max_size: maximum number of items allowed, rounded to a multiple of 171.15 // the segment size (0 == unlimited) 171.16 - inline Stack(size_t segment_size = default_segment_size(), 171.17 + inline Stack(size_t segment_size = _default_segment_size, 171.18 size_t max_cache_size = 4, size_t max_size = 0); 171.19 inline ~Stack() { clear(true); } 171.20 171.21 @@ -122,8 +127,6 @@ 171.22 // clear_cache is true, also release any cached segments. 171.23 void clear(bool clear_cache = false); 171.24 171.25 - static inline size_t default_segment_size(); 171.26 - 171.27 protected: 171.28 // Each segment includes space for _seg_size elements followed by a link 171.29 // (pointer) to the previous segment; the space is allocated as a single block
172.1 --- a/src/share/vm/utilities/stack.inline.hpp Fri Jul 27 11:47:10 2018 +0100 172.2 +++ b/src/share/vm/utilities/stack.inline.hpp Sat Aug 04 12:53:22 2018 +0100 172.3 @@ -86,14 +86,6 @@ 172.4 } 172.5 172.6 template <class E, MEMFLAGS F> 172.7 -size_t Stack<E, F>::default_segment_size() 172.8 -{ 172.9 - // Number of elements that fit in 4K bytes minus the size of two pointers 172.10 - // (link field and malloc header). 172.11 - return (4096 - 2 * sizeof(E*)) / sizeof(E); 172.12 -} 172.13 - 172.14 -template <class E, MEMFLAGS F> 172.15 size_t Stack<E, F>::adjust_segment_size(size_t seg_size) 172.16 { 172.17 const size_t elem_sz = sizeof(E);
173.1 --- a/src/share/vm/utilities/vmError.cpp Fri Jul 27 11:47:10 2018 +0100 173.2 +++ b/src/share/vm/utilities/vmError.cpp Sat Aug 04 12:53:22 2018 +0100 173.3 @@ -1,5 +1,5 @@ 173.4 /* 173.5 - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. 173.6 + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. 173.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 173.8 * 173.9 * This code is free software; you can redistribute it and/or modify it 173.10 @@ -304,6 +304,47 @@ 173.11 #endif // ZERO 173.12 } 173.13 173.14 +static void print_oom_reasons(outputStream* st) { 173.15 + st->print_cr("# Possible reasons:"); 173.16 + st->print_cr("# The system is out of physical RAM or swap space"); 173.17 + if (UseCompressedOops) { 173.18 + st->print_cr("# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap"); 173.19 + } 173.20 + if (LogBytesPerWord == 2) { 173.21 + st->print_cr("# In 32 bit mode, the process size limit was hit"); 173.22 + } 173.23 + st->print_cr("# Possible solutions:"); 173.24 + st->print_cr("# Reduce memory load on the system"); 173.25 + st->print_cr("# Increase physical memory or swap space"); 173.26 + st->print_cr("# Check if swap backing store is full"); 173.27 + if (LogBytesPerWord == 2) { 173.28 + st->print_cr("# Use 64 bit Java on a 64 bit OS"); 173.29 + } 173.30 + st->print_cr("# Decrease Java heap size (-Xmx/-Xms)"); 173.31 + st->print_cr("# Decrease number of Java threads"); 173.32 + st->print_cr("# Decrease Java thread stack sizes (-Xss)"); 173.33 + st->print_cr("# Set larger code cache with -XX:ReservedCodeCacheSize="); 173.34 + if (UseCompressedOops) { 173.35 + switch (Universe::narrow_oop_mode()) { 173.36 + case Universe::UnscaledNarrowOop: 173.37 + st->print_cr("# JVM is running with Unscaled Compressed Oops mode in which the Java heap is"); 173.38 + st->print_cr("# placed in the first 4GB address space. The Java Heap base address is the"); 173.39 + st->print_cr("# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress"); 173.40 + st->print_cr("# to set the Java Heap base and to place the Java Heap above 4GB virtual address."); 173.41 + break; 173.42 + case Universe::ZeroBasedNarrowOop: 173.43 + st->print_cr("# JVM is running with Zero Based Compressed Oops mode in which the Java heap is"); 173.44 + st->print_cr("# placed in the first 32GB address space. The Java Heap base address is the"); 173.45 + st->print_cr("# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress"); 173.46 + st->print_cr("# to set the Java Heap base and to place the Java Heap above 32GB virtual address."); 173.47 + break; 173.48 + default: 173.49 + break; 173.50 + } 173.51 + } 173.52 + st->print_cr("# This output file may be truncated or incomplete."); 173.53 +} 173.54 + 173.55 // This is the main function to report a fatal error. Only one thread can 173.56 // call this function, so we don't need to worry about MT-safety. But it's 173.57 // possible that the error handler itself may crash or die on an internal 173.58 @@ -375,19 +416,7 @@ 173.59 } 173.60 // In error file give some solutions 173.61 if (_verbose) { 173.62 - st->print_cr("# Possible reasons:"); 173.63 - st->print_cr("# The system is out of physical RAM or swap space"); 173.64 - st->print_cr("# In 32 bit mode, the process size limit was hit"); 173.65 - st->print_cr("# Possible solutions:"); 173.66 - st->print_cr("# Reduce memory load on the system"); 173.67 - st->print_cr("# Increase physical memory or swap space"); 173.68 - st->print_cr("# Check if swap backing store is full"); 173.69 - st->print_cr("# Use 64 bit Java on a 64 bit OS"); 173.70 - st->print_cr("# Decrease Java heap size (-Xmx/-Xms)"); 173.71 - st->print_cr("# Decrease number of Java threads"); 173.72 - st->print_cr("# Decrease Java thread stack sizes (-Xss)"); 173.73 - st->print_cr("# Set larger code cache with -XX:ReservedCodeCacheSize="); 173.74 - st->print_cr("# This output file may be truncated or incomplete."); 173.75 + print_oom_reasons(st); 173.76 } else { 173.77 return; // that's enough for the screen 173.78 } 173.79 @@ -675,6 +704,24 @@ 173.80 st->cr(); 173.81 } 173.82 173.83 + STEP(182, "(printing number of OutOfMemoryError and StackOverflow exceptions)") 173.84 + 173.85 + if (_verbose && Exceptions::has_exception_counts()) { 173.86 + st->print_cr("OutOfMemory and StackOverflow Exception counts:"); 173.87 + Exceptions::print_exception_counts_on_error(st); 173.88 + st->cr(); 173.89 + } 173.90 + 173.91 + STEP(185, "(printing compressed oops mode") 173.92 + 173.93 + if (_verbose && UseCompressedOops) { 173.94 + Universe::print_compressed_oops_mode(st); 173.95 + if (UseCompressedClassPointers) { 173.96 + Metaspace::print_compressed_class_space(st); 173.97 + } 173.98 + st->cr(); 173.99 + } 173.100 + 173.101 STEP(190, "(printing heap information)" ) 173.102 173.103 if (_verbose && Universe::is_fully_initialized()) { 173.104 @@ -780,7 +827,7 @@ 173.105 STEP(280, "(printing date and time)" ) 173.106 173.107 if (_verbose) { 173.108 - os::print_date_and_time(st); 173.109 + os::print_date_and_time(st, buf, sizeof(buf)); 173.110 st->cr(); 173.111 } 173.112
174.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 174.2 +++ b/test/compiler/gcbarriers/PreserveFPRegistersTest.java Sat Aug 04 12:53:22 2018 +0100 174.3 @@ -0,0 +1,120 @@ 174.4 +/* 174.5 + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. 174.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 174.7 + * 174.8 + * This code is free software; you can redistribute it and/or modify it 174.9 + * under the terms of the GNU General Public License version 2 only, as 174.10 + * published by the Free Software Foundation. 174.11 + * 174.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 174.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 174.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 174.15 + * version 2 for more details (a copy is included in the LICENSE file that 174.16 + * accompanied this code). 174.17 + * 174.18 + * You should have received a copy of the GNU General Public License version 174.19 + * 2 along with this work; if not, write to the Free Software Foundation, 174.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 174.21 + * 174.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 174.23 + * or visit www.oracle.com if you need additional information or have any 174.24 + * questions. 174.25 + * 174.26 + */ 174.27 + 174.28 +/** 174.29 + * @test 174.30 + * @bug 8148175 174.31 + * @requires vm.gc=="G1" | vm.gc=="null" 174.32 + * @library /testlibrary /testlibrary/whitebox 174.33 + * @run main/bootclasspath/othervm -Xbatch -XX:+UnlockDiagnosticVMOptions 174.34 + * -XX:+WhiteBoxAPI -Xmx300m -XX:+UseG1GC PreserveFPRegistersTest 174.35 + */ 174.36 + 174.37 +import sun.hotspot.WhiteBox; 174.38 + 174.39 +public class PreserveFPRegistersTest { 174.40 + 174.41 + public static void main(String... args) throws InterruptedException { 174.42 + new PreserveFPRegistersTest().go(); 174.43 + } 174.44 + 174.45 + private static WhiteBox wb = WhiteBox.getWhiteBox(); 174.46 + 174.47 + public final Object[][] storage; 174.48 + 174.49 + /** 174.50 + * Number of objects per region. 174.51 + */ 174.52 + public final int K = 10; 174.53 + 174.54 + /** 174.55 + * Length of object array: sizeOf(Object[N]) ~= regionSize / K . 174.56 + */ 174.57 + public final int N; 174.58 + 174.59 + /** 174.60 + * How many regions involved into testing. 174.61 + */ 174.62 + public final int regionCount; 174.63 + 174.64 + PreserveFPRegistersTest() { 174.65 + long regionSize = wb.g1RegionSize(); 174.66 + Runtime rt = Runtime.getRuntime(); 174.67 + long used = rt.totalMemory() - rt.freeMemory(); 174.68 + long totalFree = rt.maxMemory() - used; 174.69 + regionCount = (int) ( (totalFree / regionSize) * 0.9); 174.70 + int refSize = wb.getHeapOopSize(); 174.71 + N = (int) ((regionSize / K ) / refSize) - 5; 174.72 + 174.73 + System.out.println("%% Memory"); 174.74 + System.out.println("%% used : " + used / 1024 + "M"); 174.75 + System.out.println("%% available : " + totalFree / 1024 + "M"); 174.76 + System.out.println("%% G1 Region Size: " + regionSize / 1024 + "M"); 174.77 + System.out.println("%% region count : " + regionCount); 174.78 + 174.79 + System.out.println("%% Objects storage"); 174.80 + System.out.println("%% N (array length) : " + N); 174.81 + System.out.println("%% K (objects in regions): " + K); 174.82 + System.out.println("%% Reference size : " + refSize); 174.83 + 174.84 + try { 174.85 + storage = new Object[regionCount * K][]; 174.86 + for (int i = 0; i < storage.length; i++) { 174.87 + storage[i] = new Object[N]; 174.88 + } 174.89 + } catch(OutOfMemoryError e) { 174.90 + throw new AssertionError("Test Failed with unexpected OutOfMemoryError exception"); 174.91 + } 174.92 + } 174.93 + 174.94 + public void go() throws InterruptedException { 174.95 + final float FINAL = getValue(); 174.96 + 174.97 + for (int to = 0; to < regionCount; to++) { 174.98 + Object celebrity = storage[to * K]; 174.99 + for (int from = 0; from < regionCount; from++) { 174.100 + for (int rn = 0; rn != 100; rn++) { 174.101 + storage[getY(to, from, rn)][getX(to, from, rn)] = celebrity; 174.102 + } 174.103 + if (FINAL != getValue()) { 174.104 + throw new AssertionError("Final value has changed: " + FINAL + " != " + getValue()); 174.105 + } 174.106 + } 174.107 + } 174.108 + 174.109 + System.out.println("TEST PASSED"); 174.110 + } 174.111 + 174.112 + public float getValue() { 174.113 + return 6; 174.114 + } 174.115 + 174.116 + private int getX(int to, int from, int rn) { 174.117 + return (rn*regionCount + to) % N; 174.118 + } 174.119 + 174.120 + private int getY(int to, int from, int rn) { 174.121 + return ((rn*regionCount + to) / N + from * K) % (regionCount*K) ; 174.122 + } 174.123 +}
175.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 175.2 +++ b/test/gc/class_unloading/TestClassUnloadingDisabled.java Sat Aug 04 12:53:22 2018 +0100 175.3 @@ -0,0 +1,116 @@ 175.4 +/* 175.5 + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. 175.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 175.7 + * 175.8 + * This code is free software; you can redistribute it and/or modify it 175.9 + * under the terms of the GNU General Public License version 2 only, as 175.10 + * published by the Free Software Foundation. 175.11 + * 175.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 175.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 175.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 175.15 + * version 2 for more details (a copy is included in the LICENSE file that 175.16 + * accompanied this code). 175.17 + * 175.18 + * You should have received a copy of the GNU General Public License version 175.19 + * 2 along with this work; if not, write to the Free Software Foundation, 175.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 175.21 + * 175.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 175.23 + * or visit www.oracle.com if you need additional information or have any 175.24 + * questions. 175.25 + */ 175.26 + 175.27 +/* 175.28 + * @test 175.29 + * @key gc 175.30 + * @bug 8114823 175.31 + * @requires vm.gc == null 175.32 + * @requires vm.opt.ExplicitGCInvokesConcurrent != true 175.33 + * @requires vm.opt.ClassUnloading != true 175.34 + * @library /testlibrary /testlibrary/whitebox 175.35 + * @build sun.hotspot.WhiteBox 175.36 + * @run main ClassFileInstaller sun.hotspot.WhiteBox 175.37 + * sun.hotspot.WhiteBox$WhiteBoxPermission 175.38 + * 175.39 + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 175.40 + * -XX:-ClassUnloading -XX:+UseG1GC TestClassUnloadingDisabled 175.41 + * 175.42 + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 175.43 + * -XX:-ClassUnloading -XX:+UseSerialGC TestClassUnloadingDisabled 175.44 + * 175.45 + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 175.46 + * -XX:-ClassUnloading -XX:+UseParallelGC TestClassUnloadingDisabled 175.47 + * 175.48 + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 175.49 + * -XX:-ClassUnloading -XX:+UseConcMarkSweepGC TestClassUnloadingDisabled 175.50 + */ 175.51 + 175.52 +import java.io.File; 175.53 +import java.io.IOException; 175.54 +import java.nio.file.Files; 175.55 +import java.nio.file.Path; 175.56 +import java.nio.file.Paths; 175.57 + 175.58 +import sun.hotspot.WhiteBox; 175.59 + 175.60 +import com.oracle.java.testlibrary.Asserts; 175.61 + 175.62 +public class TestClassUnloadingDisabled { 175.63 + public static void main(String args[]) throws Exception { 175.64 + final WhiteBox wb = WhiteBox.getWhiteBox(); 175.65 + // Fetch the dir where the test class and the class 175.66 + // to be loaded resides. 175.67 + String classDir = TestClassUnloadingDisabled.class.getProtectionDomain().getCodeSource().getLocation().getPath(); 175.68 + String className = "ClassToLoadUnload"; 175.69 + 175.70 + Asserts.assertFalse(wb.isClassAlive(className), "Should not be loaded yet"); 175.71 + 175.72 + // The NoPDClassLoader handles loading classes in the test directory 175.73 + // and loads them without a protection domain, which in some cases 175.74 + // keeps the class live regardless of marking state. 175.75 + NoPDClassLoader nopd = new NoPDClassLoader(classDir); 175.76 + nopd.loadClass(className); 175.77 + 175.78 + Asserts.assertTrue(wb.isClassAlive(className), "Class should be loaded"); 175.79 + 175.80 + // Clear the class-loader, class and object references to make 175.81 + // class unloading possible. 175.82 + nopd = null; 175.83 + 175.84 + System.gc(); 175.85 + Asserts.assertTrue(wb.isClassAlive(className), "Class should not have ben unloaded"); 175.86 + } 175.87 +} 175.88 + 175.89 +class NoPDClassLoader extends ClassLoader { 175.90 + String path; 175.91 + 175.92 + NoPDClassLoader(String path) { 175.93 + this.path = path; 175.94 + } 175.95 + 175.96 + public Class<?> loadClass(String name) throws ClassNotFoundException { 175.97 + byte[] cls = null; 175.98 + File f = new File(path,name + ".class"); 175.99 + 175.100 + // Delegate class loading if class not present in the given 175.101 + // directory. 175.102 + if (!f.exists()) { 175.103 + return super.loadClass(name); 175.104 + } 175.105 + 175.106 + try { 175.107 + Path path = Paths.get(f.getAbsolutePath()); 175.108 + cls = Files.readAllBytes(path); 175.109 + } catch (IOException e) { 175.110 + throw new ClassNotFoundException(name); 175.111 + } 175.112 + 175.113 + // Define class with no protection domain and resolve it. 175.114 + return defineClass(name, cls, 0, cls.length, null); 175.115 + } 175.116 +} 175.117 + 175.118 +class ClassToLoadUnload { 175.119 +}