diff --git a/make/solaris/makefiles/amd64.make b/make/solaris/makefiles/amd64.make index b05414dbd083453b25158607395f6f0de12ae518..5165b25ab057abd9bd8781bbec51974dd69b00d9 100644 --- a/make/solaris/makefiles/amd64.make +++ b/make/solaris/makefiles/amd64.make @@ -33,14 +33,8 @@ Obj_Files += solaris_x86_64.o # ifeq ("${Platform_compiler}", "sparcWorks") -# Temporary until C++ compiler is fixed - -# _lwp_create_interpose must have a frame -OPT_CFLAGS/os_solaris_x86_64.o = -xO1 - # Temporary until SS10 C++ compiler is fixed OPT_CFLAGS/generateOptoStub.o = -xO2 -OPT_CFLAGS/thread.o = -xO2 else diff --git a/make/solaris/makefiles/fastdebug.make b/make/solaris/makefiles/fastdebug.make index 4edeb373f9ece52ed0bfc2773c68801cc02a3f0c..0f8732a0206b2597b5028f7d71755ae199215db2 100644 --- a/make/solaris/makefiles/fastdebug.make +++ b/make/solaris/makefiles/fastdebug.make @@ -36,15 +36,15 @@ OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@)) ifeq ("${Platform_compiler}", "sparcWorks") OPT_CFLAGS/SLOWER = -xO2 -# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876) ifeq ($(COMPILER_REV_NUMERIC), 509) - # To avoid jvm98 crash - OPT_CFLAGS/instanceKlass.o = $(OPT_CFLAGS/SLOWER) - # Not clear this workaround could be skipped in some cases. - OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER) - OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER) - OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER) -endif +# To avoid jvm98 crash +OPT_CFLAGS/instanceKlass.o = $(OPT_CFLAGS/SLOWER) +endif # COMPILER_NUMERIC_REV == 509 + +ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) +# dtrace cannot handle tail call optimization (6672627, 6693876) +OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT) +endif # COMPILER_NUMERIC_REV >= 509 ifeq ($(COMPILER_REV_NUMERIC), 505) # CC 5.5 has bug 4908364 with -xO4 (Fixed in 5.6) diff --git a/make/solaris/makefiles/i486.make b/make/solaris/makefiles/i486.make index 320035fd4d1d35da041ed0c5d50c1cf98e25b679..4dc418767427ecf5fdb9efdb80d19f0890afb783 100644 --- a/make/solaris/makefiles/i486.make +++ b/make/solaris/makefiles/i486.make @@ -32,25 +32,6 @@ Obj_Files += solaris_x86_32.o # # Special case flags for compilers and compiler versions on i486. # -ifeq ("${Platform_compiler}", "sparcWorks") - -# _lwp_create_interpose must have a frame -OPT_CFLAGS/os_solaris_x86.o = -xO1 -else - -ifeq ("${Platform_compiler}", "gcc") -# gcc -# _lwp_create_interpose must have a frame -OPT_CFLAGS/os_solaris_x86.o = -fno-omit-frame-pointer -# -else -# error -_JUNK2_ := $(shell echo >&2 \ - "*** ERROR: this compiler is not yet supported by this code base!") - @exit 1 -endif -endif - ifeq ("${Platform_compiler}", "sparcWorks") # ILD is gone as of SS11 (5.8), not supported in SS10 (5.7) ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \< 507), 1) diff --git a/make/solaris/makefiles/launcher.make b/make/solaris/makefiles/launcher.make index bf32444c5c380f6e5cb14ef0a591d49db97236c1..088d2b639d9006a9f0632dc38ab9d0dc69e60ca3 100644 --- a/make/solaris/makefiles/launcher.make +++ b/make/solaris/makefiles/launcher.make @@ -80,15 +80,12 @@ launcher.c: } > $@ $(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE) +ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),) + @echo Linking launcher... + $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK) $(QUIETLY) \ - case "$(CFLAGS_BROWSE)" in \ - -sbfast|-xsbfast) \ - ;; \ - *) \ - echo Linking launcher...; \ - $(LINK_LAUNCHER/PRE_HOOK) \ - $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER); \ - $(LINK_LAUNCHER/POST_HOOK) \ - [ -f $(LAUNCHER_G) ] || { ln -s $@ $(LAUNCHER_G); }; \ - ;; \ - esac + $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER) + $(QUIETLY) $(LINK_LAUNCHER/POST_HOOK) + [ -f $(LAUNCHER_G) ] || ln -s $@ $(LAUNCHER_G) +endif # filter -sbfast -xsbfast + diff --git a/make/solaris/makefiles/optimized.make b/make/solaris/makefiles/optimized.make index d3cf526f60c89af4ef2bc42a8723ad6daecf2d01..d9353e11e7df84eeba67ca74973c77b37b2b8fb6 100644 --- a/make/solaris/makefiles/optimized.make +++ b/make/solaris/makefiles/optimized.make @@ -32,13 +32,10 @@ OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@)) # (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files) ifeq ("${Platform_compiler}", "sparcWorks") -# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876) -ifeq ($(COMPILER_REV_NUMERIC),509) - # Not clear this workaround could be skipped in some cases. - OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER) -g - OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER) -g - OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER) -g -endif +ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) +# dtrace cannot handle tail call optimization (6672627, 6693876) +OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT) +endif # COMPILER_NUMERIC_REV >= 509 # Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12) ifeq ($(COMPILER_REV_NUMERIC),508) diff --git a/make/solaris/makefiles/product.make b/make/solaris/makefiles/product.make index 10c6b4568c995b67dfc3d78105a7c5717027a342..ef32ea3e13f100a6e43924d2ba96ea4b3675c524 100644 --- a/make/solaris/makefiles/product.make +++ b/make/solaris/makefiles/product.make @@ -40,13 +40,10 @@ endif # (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files) ifeq ("${Platform_compiler}", "sparcWorks") -# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876) -ifeq ($(COMPILER_REV_NUMERIC),509) - # Not clear this workaround could be skipped in some cases. - OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER) -g - OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER) -g - OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER) -g -endif +ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) +# dtrace cannot handle tail call optimization (6672627, 6693876) +OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT) +endif # COMPILER_NUMERIC_REV >= 509 # Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12) ifeq ($(COMPILER_REV_NUMERIC),508) diff --git a/make/solaris/makefiles/sparcWorks.make b/make/solaris/makefiles/sparcWorks.make index acab5192183475d067bcc50c27f4b2f4ae69c3cb..7b3acc7979d3fa4e6aa1a5cdc457bd2cce31fcd5 100644 --- a/make/solaris/makefiles/sparcWorks.make +++ b/make/solaris/makefiles/sparcWorks.make @@ -48,27 +48,33 @@ $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p' # Pick which compiler is validated ifeq ($(JRE_RELEASE_VER),1.6.0) # Validated compiler for JDK6 is SS11 (5.8) - VALIDATED_COMPILER_REV := 5.8 - VALIDATED_C_COMPILER_REV := 5.8 + VALIDATED_COMPILER_REVS := 5.8 + VALIDATED_C_COMPILER_REVS := 5.8 else - # Validated compiler for JDK7 is SS12 (5.9) - VALIDATED_COMPILER_REV := 5.9 - VALIDATED_C_COMPILER_REV := 5.9 + # Validated compilers for JDK7 are SS12 (5.9) or SS12 update 1 (5.10) + VALIDATED_COMPILER_REVS := 5.9 5.10 + VALIDATED_C_COMPILER_REVS := 5.9 5.10 endif -# Warning messages about not using the above validated version -ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := ${VALIDATED_COMPILER_REV} -ifneq (${COMPILER_REV},${ENFORCE_COMPILER_REV}) -dummy_target_to_enforce_compiler_rev:=\ -$(shell echo >&2 WARNING: You are using CC version ${COMPILER_REV} \ -and should be using version ${ENFORCE_COMPILER_REV}. Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this warning.) +# Warning messages about not using the above validated versions +ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS}) +ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),) +PRINTABLE_CC_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_COMPILER_REV}) +dummy_var_to_enforce_compiler_rev := $(shell \ + echo >&2 WARNING: You are using CC version ${COMPILER_REV} and \ + should be using version ${PRINTABLE_CC_REVS}.; \ + echo >&2 Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this \ + warning.) endif -ENFORCE_C_COMPILER_REV${ENFORCE_C_COMPILER_REV} := ${VALIDATED_C_COMPILER_REV} -ifneq (${C_COMPILER_REV},${ENFORCE_C_COMPILER_REV}) -dummy_target_to_enforce_c_compiler_rev:=\ -$(shell echo >&2 WARNING: You are using cc version ${C_COMPILER_REV} \ -and should be using version ${ENFORCE_C_COMPILER_REV}. Set ENFORCE_C_COMPILER_REV=${C_COMPILER_REV} to avoid this warning.) +ENFORCE_C_COMPILER_REV${ENFORCE_C_COMPILER_REV} := $(strip ${VALIDATED_C_COMPILER_REVS}) +ifeq ($(filter ${ENFORCE_C_COMPILER_REV},${C_COMPILER_REV}),) +PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_C_COMPILER_REV}) +dummy_var_to_enforce_c_compiler_rev := $(shell \ + echo >&2 WARNING: You are using cc version ${C_COMPILER_REV} and \ + should be using version ${PRINTABLE_C_REVS}.; \ + echo >&2 Set ENFORCE_C_COMPILER_REV=${C_COMPILER_REV} to avoid this \ + warning.) endif COMPILER_REV_NUMERIC := $(shell echo $(COMPILER_REV) | awk -F. '{ print $$1 * 100 + $$2 }') @@ -139,6 +145,13 @@ OPT_CFLAGS/SLOWER=-xO3 OPT_CFLAGS/O2=-xO2 OPT_CFLAGS/NOOPT=-xO1 +ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) +ifeq ($(Platform_arch), x86) +OPT_CFLAGS/NO_TAIL_CALL_OPT = -Wu,-O~yz +OPT_CCFLAGS/NO_TAIL_CALL_OPT = -Qoption ube -O~yz +endif # Platform_arch == x86 +endif # COMPILER_REV_NUMERIC >= 509 + ################################################# # Begin current (>=5.6) Forte compiler options # ################################################# @@ -181,10 +194,7 @@ endif # sparc ifeq ("${Platform_arch_model}", "x86_32") -OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS) - -# UBE (CC 5.5) has bug 4923569 with -xO4 -OPT_CFLAGS+=-xO3 +OPT_CFLAGS=-xtarget=pentium -xO4 $(EXTRA_OPT_CFLAGS) endif # 32bit x86 @@ -461,7 +471,7 @@ FASTDEBUG_CFLAGS = -g0 # The -g0 setting allows the C++ frontend to inline, which is a big win. # Special global options for SS12 -ifeq ($(COMPILER_REV_NUMERIC),509) +ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) # There appears to be multiple issues with the new Dwarf2 debug format, so # we tell the compiler to use the older 'stabs' debug format all the time. # Note that this needs to be used in optimized compiles too to be 100%. diff --git a/make/solaris/makefiles/vm.make b/make/solaris/makefiles/vm.make index 058bb6bd7e413746b7f4154dc92ef02b177f675e..6a47aa10b59ed13bce0bff193a15b480fa2eb0ea 100644 --- a/make/solaris/makefiles/vm.make +++ b/make/solaris/makefiles/vm.make @@ -174,19 +174,16 @@ LINK_VM = $(LINK_LIB.CC) endif # making the library: $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) - $(QUIETLY) \ - case "$(CFLAGS_BROWSE)" in \ - -sbfast|-xsbfast) \ - ;; \ - *) \ - echo Linking vm...; \ - $(LINK_LIB.CC/PRE_HOOK) \ - $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \ - $(LINK_LIB.CC/POST_HOOK) \ - rm -f $@.1; ln -s $@ $@.1; \ - [ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \ - ;; \ - esac +ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),) + @echo Linking vm... + $(QUIETLY) $(LINK_LIB.CC/PRE_HOOK) + $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM) + $(QUIETLY) $(LINK_LIB.CC/POST_HOOK) + $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1 + $(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G) + $(QUIETLY) [ -f $(LIBJVM_G).1 ] || ln -s $@.1 $(LIBJVM_G).1 +endif # filter -sbfast -xsbfast + DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM) diff --git a/src/cpu/sparc/vm/assembler_sparc.hpp b/src/cpu/sparc/vm/assembler_sparc.hpp index f56cdf5857013e30e61b8a5254dbb4973595efd7..6982e9a58d985c1610f587637830f66684c3ce93 100644 --- a/src/cpu/sparc/vm/assembler_sparc.hpp +++ b/src/cpu/sparc/vm/assembler_sparc.hpp @@ -2233,7 +2233,7 @@ public: AddressLiteral constant_oop_address(jobject obj); // find_index inline void set_oop (jobject obj, Register d); // uses allocate_oop_address inline void set_oop_constant (jobject obj, Register d); // uses constant_oop_address - inline void set_oop (AddressLiteral& obj_addr, Register d); // same as load_address + inline void set_oop (const AddressLiteral& obj_addr, Register d); // same as load_address void set_narrow_oop( jobject obj, Register d ); diff --git a/src/cpu/sparc/vm/assembler_sparc.inline.hpp b/src/cpu/sparc/vm/assembler_sparc.inline.hpp index d769f7111259f5979214f1c83be68480a36fa3f9..a85018d2ce77674f78493d7f971fd0f3ac0026d0 100644 --- a/src/cpu/sparc/vm/assembler_sparc.inline.hpp +++ b/src/cpu/sparc/vm/assembler_sparc.inline.hpp @@ -712,7 +712,7 @@ inline void MacroAssembler::set_oop_constant(jobject obj, Register d) { } -inline void MacroAssembler::set_oop(AddressLiteral& obj_addr, Register d) { +inline void MacroAssembler::set_oop(const AddressLiteral& obj_addr, Register d) { assert(obj_addr.rspec().type() == relocInfo::oop_type, "must be an oop reloc"); set(obj_addr, d); } diff --git a/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp b/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp index f270c3d1da74ff93899738c6cf3798fd2b3cde9c..35c3d9507175f575d180faa9759db717d510a8ba 100644 --- a/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp +++ b/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp @@ -47,40 +47,56 @@ inline void Atomic::dec_ptr(volatile void* dest) { (void)add_ptr(-1, dest); // For Sun Studio - implementation is in solaris_x86_[32/64].il. // For gcc - implementation is just below. -extern "C" jint _Atomic_add(jint add_value, volatile jint* dest, int mp); -extern "C" jint _Atomic_xchg(jint exchange_value, volatile jint* dest); -extern "C" jint _Atomic_cmpxchg(jint exchange_value, volatile jint* dest, jint compare_value, int mp); -extern "C" jlong _Atomic_cmpxchg_long(jlong exchange_value, volatile jlong* dest, jlong compare_value, int mp); +// The lock prefix can be omitted for certain instructions on uniprocessors; to +// facilitate this, os::is_MP() is passed as an additional argument. 64-bit +// processors are assumed to be multi-threaded and/or multi-core, so the extra +// argument is unnecessary. +#ifndef _LP64 +#define IS_MP_DECL() , int is_mp +#define IS_MP_ARG() , (int) os::is_MP() +#else +#define IS_MP_DECL() +#define IS_MP_ARG() +#endif // _LP64 + +extern "C" { + jint _Atomic_add(jint add_value, volatile jint* dest IS_MP_DECL()); + jint _Atomic_xchg(jint exchange_value, volatile jint* dest); + jint _Atomic_cmpxchg(jint exchange_value, volatile jint* dest, + jint compare_value IS_MP_DECL()); + jlong _Atomic_cmpxchg_long(jlong exchange_value, volatile jlong* dest, + jlong compare_value IS_MP_DECL()); +} inline jint Atomic::add (jint add_value, volatile jint* dest) { - return _Atomic_add(add_value, dest, (int) os::is_MP()); + return _Atomic_add(add_value, dest IS_MP_ARG()); +} + +inline jint Atomic::xchg (jint exchange_value, volatile jint* dest) { + return _Atomic_xchg(exchange_value, dest); } inline jint Atomic::cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value) { - return _Atomic_cmpxchg(exchange_value, dest, compare_value, (int) os::is_MP()); + return _Atomic_cmpxchg(exchange_value, dest, compare_value IS_MP_ARG()); } inline jlong Atomic::cmpxchg (jlong exchange_value, volatile jlong* dest, jlong compare_value) { - return _Atomic_cmpxchg_long(exchange_value, dest, compare_value, (int) os::is_MP()); + return _Atomic_cmpxchg_long(exchange_value, dest, compare_value IS_MP_ARG()); } #ifdef AMD64 inline void Atomic::store (jlong store_value, jlong* dest) { *dest = store_value; } inline void Atomic::store (jlong store_value, volatile jlong* dest) { *dest = store_value; } -extern "C" jlong _Atomic_add_long(jlong add_value, volatile jlong* dest, int mp); +extern "C" jlong _Atomic_add_long(jlong add_value, volatile jlong* dest); extern "C" jlong _Atomic_xchg_long(jlong exchange_value, volatile jlong* dest); inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) { - return (intptr_t)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest, (int) os::is_MP()); + return (intptr_t)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest); } inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) { - return (void*)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest, (int) os::is_MP()); -} - -inline jint Atomic::xchg (jint exchange_value, volatile jint* dest) { - return _Atomic_xchg(exchange_value, dest); + return (void*)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest); } inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) { @@ -92,11 +108,11 @@ inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* des } inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value) { - return (intptr_t)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value, (int) os::is_MP()); + return (intptr_t)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value); } inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value) { - return (void*)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value, (int) os::is_MP()); + return (void*)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value); } inline jlong Atomic::load(volatile jlong* src) { return *src; } @@ -111,13 +127,6 @@ inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) { return (void*)add((jint)add_value, (volatile jint*)dest); } -inline jint Atomic::xchg (jint exchange_value, volatile jint* dest) { - // We noticed a CC5.5 bug (4894807), so keep calling the stub just to be safe. - // Will use the inline template version after 4894807 is fixed. - // return _Atomic_xchg(exchange_value, dest); - return (*os::atomic_xchg_func)(exchange_value, dest); -} - inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) { return (intptr_t)xchg((jint)exchange_value, (volatile jint*)dest); } @@ -179,9 +188,6 @@ extern "C" { #endif // AMD64 inline jint _Atomic_xchg(jint exchange_value, volatile jint* dest) { - - // 32bit version originally did nothing!! - __asm__ __volatile__ ("xchgl (%2),%0" : "=r" (exchange_value) : "0" (exchange_value), "r" (dest) diff --git a/src/os_cpu/solaris_x86/vm/solaris_x86_32.il b/src/os_cpu/solaris_x86/vm/solaris_x86_32.il index 0ffd87d85c38b490265a22926675ee9fee6596f0..8e1c8fccd6d2a430e74715fe216e826263f93409 100644 --- a/src/os_cpu/solaris_x86/vm/solaris_x86_32.il +++ b/src/os_cpu/solaris_x86/vm/solaris_x86_32.il @@ -50,10 +50,12 @@ movl 4(%esp), %edx // dest movl %eax, %ecx cmpl $0, 8(%esp) // MP test - je 1f - lock -1: xaddl %eax, (%edx) - addl %ecx, %eax + jne 1f + xaddl %eax, (%edx) + jmp 2f +1: lock + xaddl %eax, (%edx) +2: addl %ecx, %eax .end // Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest). @@ -72,9 +74,12 @@ movl 0(%esp), %ecx // exchange_value movl 4(%esp), %edx // dest cmp $0, 12(%esp) // MP test - je 1f - lock -1: cmpxchgl %ecx, (%edx) + jne 1f + cmpxchgl %ecx, (%edx) + jmp 2f +1: lock + cmpxchgl %ecx, (%edx) +2: .end // Support for jlong Atomic::cmpxchg(jlong exchange_value, @@ -90,10 +95,12 @@ movl 8(%esp), %ebx // exchange_value (low) movl 12(%esp), %ecx // exchange_high (high) cmp $0, 28(%esp) // MP test - je 1f - lock -1: cmpxchg8b (%edi) - popl %edi + jne 1f + cmpxchg8b (%edi) + jmp 2f +1: lock + cmpxchg8b (%edi) +2: popl %edi popl %ebx .end diff --git a/src/os_cpu/solaris_x86/vm/solaris_x86_64.il b/src/os_cpu/solaris_x86/vm/solaris_x86_64.il index 6b4c23a342f735a5da0d3aee4bda77d7508e48fb..f0eb6b18bd3874ef63a473f9fb71fb1186dc6e55 100644 --- a/src/os_cpu/solaris_x86/vm/solaris_x86_64.il +++ b/src/os_cpu/solaris_x86/vm/solaris_x86_64.il @@ -37,24 +37,18 @@ .end // Support for jint Atomic::add(jint add_value, volatile jint* dest) - // An additional bool (os::is_MP()) is passed as the last argument. - .inline _Atomic_add,3 + .inline _Atomic_add,2 movl %edi, %eax // save add_value for return - testl %edx, %edx // MP test - je 1f lock -1: xaddl %edi, (%rsi) + xaddl %edi, (%rsi) addl %edi, %eax .end // Support for jlong Atomic::add(jlong add_value, volatile jlong* dest) - // An additional bool (os::is_MP()) is passed as the last argument. - .inline _Atomic_add_long,3 + .inline _Atomic_add_long,2 movq %rdi, %rax // save add_value for return - testq %rdx, %rdx // MP test - je 1f lock -1: xaddq %rdi, (%rsi) + xaddq %rdi, (%rsi) addq %rdi, %rax .end @@ -73,25 +67,19 @@ // Support for jint Atomic::cmpxchg(jint exchange_value, // volatile jint *dest, // jint compare_value) - // An additional bool (os::is_MP()) is passed as the last argument. - .inline _Atomic_cmpxchg,4 + .inline _Atomic_cmpxchg,3 movl %edx, %eax // compare_value - testl %ecx, %ecx // MP test - je 1f lock -1: cmpxchgl %edi, (%rsi) + cmpxchgl %edi, (%rsi) .end // Support for jlong Atomic::cmpxchg(jlong exchange_value, // volatile jlong* dest, // jlong compare_value) - // An additional bool (os::is_MP()) is passed as the last argument. - .inline _Atomic_cmpxchg_long,6 + .inline _Atomic_cmpxchg_long,3 movq %rdx, %rax // compare_value - testq %rcx, %rcx // MP test - je 1f lock -1: cmpxchgq %rdi, (%rsi) + cmpxchgq %rdi, (%rsi) .end // Support for OrderAccess::acquire() diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm/gc_implementation/g1/concurrentMark.cpp index d26f47c248f8c8e4f74885760369044a1ff7b6e2..feee1bbad9d89442125db3a0745fa7dcd5bde50d 100644 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -766,10 +766,12 @@ void ConcurrentMark::checkpointRootsInitialPre() { _has_aborted = false; +#ifndef PRODUCT if (G1PrintReachableAtInitialMark) { print_reachable("at-cycle-start", true /* use_prev_marking */, true /* all */); } +#endif // Initialise marking structures. This has to be done in a STW phase. reset(); diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index 5d3a4e54a811810cfcdb2fccb787c159d41bd10f..963cca83689f03341afafdbf965b2ab79aea8902 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -2340,10 +2340,12 @@ void G1CollectedHeap::verify(bool allow_dirty, gclog_or_tty->print_cr("Heap:"); print_on(gclog_or_tty, true /* extended */); gclog_or_tty->print_cr(""); +#ifndef PRODUCT if (VerifyDuringGC && G1VerifyDuringGCPrintReachable) { concurrent_mark()->print_reachable("at-verification-failure", use_prev_marking, false /* all */); } +#endif gclog_or_tty->flush(); } guarantee(!failures, "there should not have been any failures"); diff --git a/src/share/vm/gc_implementation/shared/spaceDecorator.hpp b/src/share/vm/gc_implementation/shared/spaceDecorator.hpp index 9566512cbafa3202532d769045859f3871a1d9d4..4edb7a0f22ff6ebdbdb60995166055a8ecb18089 100644 --- a/src/share/vm/gc_implementation/shared/spaceDecorator.hpp +++ b/src/share/vm/gc_implementation/shared/spaceDecorator.hpp @@ -109,7 +109,7 @@ class SpaceMangler: public CHeapObj { // is fully constructed. Also is used when a generation is expanded // and possibly before the spaces have been reshaped to to the new // size of the generation. - static void mangle_region(MemRegion mr); + static void mangle_region(MemRegion mr) PRODUCT_RETURN; }; class ContiguousSpace; diff --git a/src/share/vm/gc_implementation/shared/vmGCOperations.cpp b/src/share/vm/gc_implementation/shared/vmGCOperations.cpp index 17d18db32da54433ebf9d26edfa1a78fc1a6ba14..08a32b9a824b2a6b93d59a21492fd33c98d02492 100644 --- a/src/share/vm/gc_implementation/shared/vmGCOperations.cpp +++ b/src/share/vm/gc_implementation/shared/vmGCOperations.cpp @@ -32,10 +32,12 @@ HS_DTRACE_PROBE_DECL(hotspot, gc__end); // for the other file anymore. The dtrace probes have to remain stable. void VM_GC_Operation::notify_gc_begin(bool full) { HS_DTRACE_PROBE1(hotspot, gc__begin, full); + HS_DTRACE_WORKAROUND_TAIL_CALL_BUG(); } void VM_GC_Operation::notify_gc_end() { HS_DTRACE_PROBE(hotspot, gc__end); + HS_DTRACE_WORKAROUND_TAIL_CALL_BUG(); } void VM_GC_Operation::acquire_pending_list_lock() { diff --git a/src/share/vm/runtime/java.cpp b/src/share/vm/runtime/java.cpp index ad992664a9770bb3ae31e3d1e2af924c7aac9e7d..8efea9a66e9e5abda576856626c4dc3fd294775a 100644 --- a/src/share/vm/runtime/java.cpp +++ b/src/share/vm/runtime/java.cpp @@ -470,6 +470,7 @@ void vm_exit(int code) { void notify_vm_shutdown() { // For now, just a dtrace probe. HS_DTRACE_PROBE(hotspot, vm__shutdown); + HS_DTRACE_WORKAROUND_TAIL_CALL_BUG(); } void vm_direct_exit(int code) { diff --git a/src/share/vm/runtime/vframe.cpp b/src/share/vm/runtime/vframe.cpp index a4d25b20f0991b179ad585b35bb1dcc52b4a6abd..ba3ac85da5ee1d1cd47b941034012411dd304b76 100644 --- a/src/share/vm/runtime/vframe.cpp +++ b/src/share/vm/runtime/vframe.cpp @@ -101,8 +101,8 @@ GrowableArray* javaVFrame::locked_monitors() { bool found_first_monitor = false; ObjectMonitor *pending_monitor = thread()->current_pending_monitor(); ObjectMonitor *waiting_monitor = thread()->current_waiting_monitor(); - oop pending_obj = (pending_monitor != NULL ? (oop) pending_monitor->object() : NULL); - oop waiting_obj = (waiting_monitor != NULL ? (oop) waiting_monitor->object() : NULL); + oop pending_obj = (pending_monitor != NULL ? (oop) pending_monitor->object() : (oop) NULL); + oop waiting_obj = (waiting_monitor != NULL ? (oop) waiting_monitor->object() : (oop) NULL); for (int index = (mons->length()-1); index >= 0; index--) { MonitorInfo* monitor = mons->at(index); diff --git a/src/share/vm/runtime/vm_version.cpp b/src/share/vm/runtime/vm_version.cpp index 39c08fc7fa1bb4da040a9beb7e2b3f28746af28d..a053668356bb399e93722dfda89ddb34825f9387 100644 --- a/src/share/vm/runtime/vm_version.cpp +++ b/src/share/vm/runtime/vm_version.cpp @@ -190,6 +190,8 @@ const char* Abstract_VM_Version::internal_vm_info_string() { #define HOTSPOT_BUILD_COMPILER "Workshop 5.8" #elif __SUNPRO_CC == 0x590 #define HOTSPOT_BUILD_COMPILER "Workshop 5.9" + #elif __SUNPRO_CC == 0x5100 + #define HOTSPOT_BUILD_COMPILER "Sun Studio 12u1" #else #define HOTSPOT_BUILD_COMPILER "unknown Workshop:" XSTR(__SUNPRO_CC) #endif diff --git a/src/share/vm/utilities/dtrace.hpp b/src/share/vm/utilities/dtrace.hpp index e4e9f03a492e4de13cb2aa78d64af9d73f32fe1b..f06b2fcac5b969f050135d0861e4277a028b81da 100644 --- a/src/share/vm/utilities/dtrace.hpp +++ b/src/share/vm/utilities/dtrace.hpp @@ -29,6 +29,10 @@ #define DTRACE_ONLY(x) x #define NOT_DTRACE(x) +// Work around dtrace tail call bug 6672627 until it is fixed in solaris 10. +#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \ + do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0) + #else // ndef SOLARIS || ndef DTRACE_ENABLED #define DTRACE_ONLY(x) @@ -41,6 +45,8 @@ #define DTRACE_PROBE4(a,b,c,d,e,f) {;} #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;} +#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() + #endif #define HS_DTRACE_PROBE_FN(provider,name)\