Merge
This commit is contained in:
commit
8a34049f04
@ -33,14 +33,8 @@ Obj_Files += solaris_x86_64.o
|
|||||||
#
|
#
|
||||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
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
|
# Temporary until SS10 C++ compiler is fixed
|
||||||
OPT_CFLAGS/generateOptoStub.o = -xO2
|
OPT_CFLAGS/generateOptoStub.o = -xO2
|
||||||
OPT_CFLAGS/thread.o = -xO2
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
@ -36,15 +36,15 @@ OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
|
|||||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||||
OPT_CFLAGS/SLOWER = -xO2
|
OPT_CFLAGS/SLOWER = -xO2
|
||||||
|
|
||||||
# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876)
|
|
||||||
ifeq ($(COMPILER_REV_NUMERIC), 509)
|
ifeq ($(COMPILER_REV_NUMERIC), 509)
|
||||||
# To avoid jvm98 crash
|
# To avoid jvm98 crash
|
||||||
OPT_CFLAGS/instanceKlass.o = $(OPT_CFLAGS/SLOWER)
|
OPT_CFLAGS/instanceKlass.o = $(OPT_CFLAGS/SLOWER)
|
||||||
# Not clear this workaround could be skipped in some cases.
|
endif # COMPILER_NUMERIC_REV == 509
|
||||||
OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER)
|
|
||||||
OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER)
|
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
|
||||||
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER)
|
# dtrace cannot handle tail call optimization (6672627, 6693876)
|
||||||
endif
|
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT)
|
||||||
|
endif # COMPILER_NUMERIC_REV >= 509
|
||||||
|
|
||||||
ifeq ($(COMPILER_REV_NUMERIC), 505)
|
ifeq ($(COMPILER_REV_NUMERIC), 505)
|
||||||
# CC 5.5 has bug 4908364 with -xO4 (Fixed in 5.6)
|
# CC 5.5 has bug 4908364 with -xO4 (Fixed in 5.6)
|
||||||
|
@ -32,25 +32,6 @@ Obj_Files += solaris_x86_32.o
|
|||||||
#
|
#
|
||||||
# Special case flags for compilers and compiler versions on i486.
|
# 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")
|
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||||
# ILD is gone as of SS11 (5.8), not supported in SS10 (5.7)
|
# ILD is gone as of SS11 (5.8), not supported in SS10 (5.7)
|
||||||
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \< 507), 1)
|
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \< 507), 1)
|
||||||
|
@ -80,15 +80,12 @@ launcher.c:
|
|||||||
} > $@
|
} > $@
|
||||||
|
|
||||||
$(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
|
$(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
|
||||||
|
ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
|
||||||
|
@echo Linking launcher...
|
||||||
|
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
|
||||||
$(QUIETLY) \
|
$(QUIETLY) \
|
||||||
case "$(CFLAGS_BROWSE)" in \
|
$(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER)
|
||||||
-sbfast|-xsbfast) \
|
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
|
||||||
;; \
|
[ -f $(LAUNCHER_G) ] || ln -s $@ $(LAUNCHER_G)
|
||||||
*) \
|
endif # filter -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
|
|
||||||
|
@ -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)
|
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
|
||||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||||
|
|
||||||
# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876)
|
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
|
||||||
ifeq ($(COMPILER_REV_NUMERIC),509)
|
# dtrace cannot handle tail call optimization (6672627, 6693876)
|
||||||
# Not clear this workaround could be skipped in some cases.
|
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT)
|
||||||
OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER) -g
|
endif # COMPILER_NUMERIC_REV >= 509
|
||||||
OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER) -g
|
|
||||||
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER) -g
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
|
# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
|
||||||
ifeq ($(COMPILER_REV_NUMERIC),508)
|
ifeq ($(COMPILER_REV_NUMERIC),508)
|
||||||
|
@ -40,13 +40,10 @@ endif
|
|||||||
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
|
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
|
||||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||||
|
|
||||||
# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876)
|
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
|
||||||
ifeq ($(COMPILER_REV_NUMERIC),509)
|
# dtrace cannot handle tail call optimization (6672627, 6693876)
|
||||||
# Not clear this workaround could be skipped in some cases.
|
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT)
|
||||||
OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER) -g
|
endif # COMPILER_NUMERIC_REV >= 509
|
||||||
OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER) -g
|
|
||||||
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER) -g
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
|
# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
|
||||||
ifeq ($(COMPILER_REV_NUMERIC),508)
|
ifeq ($(COMPILER_REV_NUMERIC),508)
|
||||||
|
@ -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
|
# Pick which compiler is validated
|
||||||
ifeq ($(JRE_RELEASE_VER),1.6.0)
|
ifeq ($(JRE_RELEASE_VER),1.6.0)
|
||||||
# Validated compiler for JDK6 is SS11 (5.8)
|
# Validated compiler for JDK6 is SS11 (5.8)
|
||||||
VALIDATED_COMPILER_REV := 5.8
|
VALIDATED_COMPILER_REVS := 5.8
|
||||||
VALIDATED_C_COMPILER_REV := 5.8
|
VALIDATED_C_COMPILER_REVS := 5.8
|
||||||
else
|
else
|
||||||
# Validated compiler for JDK7 is SS12 (5.9)
|
# Validated compilers for JDK7 are SS12 (5.9) or SS12 update 1 (5.10)
|
||||||
VALIDATED_COMPILER_REV := 5.9
|
VALIDATED_COMPILER_REVS := 5.9 5.10
|
||||||
VALIDATED_C_COMPILER_REV := 5.9
|
VALIDATED_C_COMPILER_REVS := 5.9 5.10
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Warning messages about not using the above validated version
|
# Warning messages about not using the above validated versions
|
||||||
ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := ${VALIDATED_COMPILER_REV}
|
ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS})
|
||||||
ifneq (${COMPILER_REV},${ENFORCE_COMPILER_REV})
|
ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),)
|
||||||
dummy_target_to_enforce_compiler_rev:=\
|
PRINTABLE_CC_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_COMPILER_REV})
|
||||||
$(shell echo >&2 WARNING: You are using CC version ${COMPILER_REV} \
|
dummy_var_to_enforce_compiler_rev := $(shell \
|
||||||
and should be using version ${ENFORCE_COMPILER_REV}. Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this warning.)
|
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
|
endif
|
||||||
|
|
||||||
ENFORCE_C_COMPILER_REV${ENFORCE_C_COMPILER_REV} := ${VALIDATED_C_COMPILER_REV}
|
ENFORCE_C_COMPILER_REV${ENFORCE_C_COMPILER_REV} := $(strip ${VALIDATED_C_COMPILER_REVS})
|
||||||
ifneq (${C_COMPILER_REV},${ENFORCE_C_COMPILER_REV})
|
ifeq ($(filter ${ENFORCE_C_COMPILER_REV},${C_COMPILER_REV}),)
|
||||||
dummy_target_to_enforce_c_compiler_rev:=\
|
PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_C_COMPILER_REV})
|
||||||
$(shell echo >&2 WARNING: You are using cc version ${C_COMPILER_REV} \
|
dummy_var_to_enforce_c_compiler_rev := $(shell \
|
||||||
and should be using version ${ENFORCE_C_COMPILER_REV}. Set ENFORCE_C_COMPILER_REV=${C_COMPILER_REV} to avoid this warning.)
|
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
|
endif
|
||||||
|
|
||||||
COMPILER_REV_NUMERIC := $(shell echo $(COMPILER_REV) | awk -F. '{ print $$1 * 100 + $$2 }')
|
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/O2=-xO2
|
||||||
OPT_CFLAGS/NOOPT=-xO1
|
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 #
|
# Begin current (>=5.6) Forte compiler options #
|
||||||
#################################################
|
#################################################
|
||||||
@ -181,10 +194,7 @@ endif # sparc
|
|||||||
|
|
||||||
ifeq ("${Platform_arch_model}", "x86_32")
|
ifeq ("${Platform_arch_model}", "x86_32")
|
||||||
|
|
||||||
OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS)
|
OPT_CFLAGS=-xtarget=pentium -xO4 $(EXTRA_OPT_CFLAGS)
|
||||||
|
|
||||||
# UBE (CC 5.5) has bug 4923569 with -xO4
|
|
||||||
OPT_CFLAGS+=-xO3
|
|
||||||
|
|
||||||
endif # 32bit x86
|
endif # 32bit x86
|
||||||
|
|
||||||
@ -461,7 +471,7 @@ FASTDEBUG_CFLAGS = -g0
|
|||||||
# The -g0 setting allows the C++ frontend to inline, which is a big win.
|
# The -g0 setting allows the C++ frontend to inline, which is a big win.
|
||||||
|
|
||||||
# Special global options for SS12
|
# 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
|
# 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.
|
# 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%.
|
# Note that this needs to be used in optimized compiles too to be 100%.
|
||||||
|
@ -174,19 +174,16 @@ LINK_VM = $(LINK_LIB.CC)
|
|||||||
endif
|
endif
|
||||||
# making the library:
|
# making the library:
|
||||||
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE)
|
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE)
|
||||||
$(QUIETLY) \
|
ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
|
||||||
case "$(CFLAGS_BROWSE)" in \
|
@echo Linking vm...
|
||||||
-sbfast|-xsbfast) \
|
$(QUIETLY) $(LINK_LIB.CC/PRE_HOOK)
|
||||||
;; \
|
$(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM)
|
||||||
*) \
|
$(QUIETLY) $(LINK_LIB.CC/POST_HOOK)
|
||||||
echo Linking vm...; \
|
$(QUIETLY) rm -f $@.1 && ln -s $@ $@.1
|
||||||
$(LINK_LIB.CC/PRE_HOOK) \
|
$(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G)
|
||||||
$(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \
|
$(QUIETLY) [ -f $(LIBJVM_G).1 ] || ln -s $@.1 $(LIBJVM_G).1
|
||||||
$(LINK_LIB.CC/POST_HOOK) \
|
endif # filter -sbfast -xsbfast
|
||||||
rm -f $@.1; ln -s $@ $@.1; \
|
|
||||||
[ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
|
|
||||||
;; \
|
|
||||||
esac
|
|
||||||
|
|
||||||
DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM)
|
DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM)
|
||||||
|
|
||||||
|
@ -2233,7 +2233,7 @@ public:
|
|||||||
AddressLiteral constant_oop_address(jobject obj); // find_index
|
AddressLiteral constant_oop_address(jobject obj); // find_index
|
||||||
inline void set_oop (jobject obj, Register d); // uses allocate_oop_address
|
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_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 );
|
void set_narrow_oop( jobject obj, Register d );
|
||||||
|
|
||||||
|
@ -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");
|
assert(obj_addr.rspec().type() == relocInfo::oop_type, "must be an oop reloc");
|
||||||
set(obj_addr, d);
|
set(obj_addr, d);
|
||||||
}
|
}
|
||||||
|
@ -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 Sun Studio - implementation is in solaris_x86_[32/64].il.
|
||||||
// For gcc - implementation is just below.
|
// For gcc - implementation is just below.
|
||||||
|
|
||||||
extern "C" jint _Atomic_add(jint add_value, volatile jint* dest, int mp);
|
// The lock prefix can be omitted for certain instructions on uniprocessors; to
|
||||||
extern "C" jint _Atomic_xchg(jint exchange_value, volatile jint* dest);
|
// facilitate this, os::is_MP() is passed as an additional argument. 64-bit
|
||||||
extern "C" jint _Atomic_cmpxchg(jint exchange_value, volatile jint* dest, jint compare_value, int mp);
|
// processors are assumed to be multi-threaded and/or multi-core, so the extra
|
||||||
extern "C" jlong _Atomic_cmpxchg_long(jlong exchange_value, volatile jlong* dest, jlong compare_value, int mp);
|
// 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) {
|
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) {
|
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) {
|
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
|
#ifdef AMD64
|
||||||
inline void Atomic::store (jlong store_value, jlong* dest) { *dest = store_value; }
|
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; }
|
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);
|
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) {
|
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) {
|
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());
|
return (void*)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest);
|
||||||
}
|
|
||||||
|
|
||||||
inline jint Atomic::xchg (jint exchange_value, volatile jint* dest) {
|
|
||||||
return _Atomic_xchg(exchange_value, dest);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* 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) {
|
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) {
|
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; }
|
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);
|
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) {
|
inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
|
||||||
return (intptr_t)xchg((jint)exchange_value, (volatile jint*)dest);
|
return (intptr_t)xchg((jint)exchange_value, (volatile jint*)dest);
|
||||||
}
|
}
|
||||||
@ -179,9 +188,6 @@ extern "C" {
|
|||||||
#endif // AMD64
|
#endif // AMD64
|
||||||
|
|
||||||
inline jint _Atomic_xchg(jint exchange_value, volatile jint* dest) {
|
inline jint _Atomic_xchg(jint exchange_value, volatile jint* dest) {
|
||||||
|
|
||||||
// 32bit version originally did nothing!!
|
|
||||||
|
|
||||||
__asm__ __volatile__ ("xchgl (%2),%0"
|
__asm__ __volatile__ ("xchgl (%2),%0"
|
||||||
: "=r" (exchange_value)
|
: "=r" (exchange_value)
|
||||||
: "0" (exchange_value), "r" (dest)
|
: "0" (exchange_value), "r" (dest)
|
||||||
|
@ -50,10 +50,12 @@
|
|||||||
movl 4(%esp), %edx // dest
|
movl 4(%esp), %edx // dest
|
||||||
movl %eax, %ecx
|
movl %eax, %ecx
|
||||||
cmpl $0, 8(%esp) // MP test
|
cmpl $0, 8(%esp) // MP test
|
||||||
je 1f
|
jne 1f
|
||||||
lock
|
xaddl %eax, (%edx)
|
||||||
1: xaddl %eax, (%edx)
|
jmp 2f
|
||||||
addl %ecx, %eax
|
1: lock
|
||||||
|
xaddl %eax, (%edx)
|
||||||
|
2: addl %ecx, %eax
|
||||||
.end
|
.end
|
||||||
|
|
||||||
// Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest).
|
// Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest).
|
||||||
@ -72,9 +74,12 @@
|
|||||||
movl 0(%esp), %ecx // exchange_value
|
movl 0(%esp), %ecx // exchange_value
|
||||||
movl 4(%esp), %edx // dest
|
movl 4(%esp), %edx // dest
|
||||||
cmp $0, 12(%esp) // MP test
|
cmp $0, 12(%esp) // MP test
|
||||||
je 1f
|
jne 1f
|
||||||
lock
|
cmpxchgl %ecx, (%edx)
|
||||||
1: cmpxchgl %ecx, (%edx)
|
jmp 2f
|
||||||
|
1: lock
|
||||||
|
cmpxchgl %ecx, (%edx)
|
||||||
|
2:
|
||||||
.end
|
.end
|
||||||
|
|
||||||
// Support for jlong Atomic::cmpxchg(jlong exchange_value,
|
// Support for jlong Atomic::cmpxchg(jlong exchange_value,
|
||||||
@ -90,10 +95,12 @@
|
|||||||
movl 8(%esp), %ebx // exchange_value (low)
|
movl 8(%esp), %ebx // exchange_value (low)
|
||||||
movl 12(%esp), %ecx // exchange_high (high)
|
movl 12(%esp), %ecx // exchange_high (high)
|
||||||
cmp $0, 28(%esp) // MP test
|
cmp $0, 28(%esp) // MP test
|
||||||
je 1f
|
jne 1f
|
||||||
lock
|
cmpxchg8b (%edi)
|
||||||
1: cmpxchg8b (%edi)
|
jmp 2f
|
||||||
popl %edi
|
1: lock
|
||||||
|
cmpxchg8b (%edi)
|
||||||
|
2: popl %edi
|
||||||
popl %ebx
|
popl %ebx
|
||||||
.end
|
.end
|
||||||
|
|
||||||
|
@ -37,24 +37,18 @@
|
|||||||
.end
|
.end
|
||||||
|
|
||||||
// Support for jint Atomic::add(jint add_value, volatile jint* dest)
|
// 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,2
|
||||||
.inline _Atomic_add,3
|
|
||||||
movl %edi, %eax // save add_value for return
|
movl %edi, %eax // save add_value for return
|
||||||
testl %edx, %edx // MP test
|
|
||||||
je 1f
|
|
||||||
lock
|
lock
|
||||||
1: xaddl %edi, (%rsi)
|
xaddl %edi, (%rsi)
|
||||||
addl %edi, %eax
|
addl %edi, %eax
|
||||||
.end
|
.end
|
||||||
|
|
||||||
// Support for jlong Atomic::add(jlong add_value, volatile jlong* dest)
|
// 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,2
|
||||||
.inline _Atomic_add_long,3
|
|
||||||
movq %rdi, %rax // save add_value for return
|
movq %rdi, %rax // save add_value for return
|
||||||
testq %rdx, %rdx // MP test
|
|
||||||
je 1f
|
|
||||||
lock
|
lock
|
||||||
1: xaddq %rdi, (%rsi)
|
xaddq %rdi, (%rsi)
|
||||||
addq %rdi, %rax
|
addq %rdi, %rax
|
||||||
.end
|
.end
|
||||||
|
|
||||||
@ -73,25 +67,19 @@
|
|||||||
// Support for jint Atomic::cmpxchg(jint exchange_value,
|
// Support for jint Atomic::cmpxchg(jint exchange_value,
|
||||||
// volatile jint *dest,
|
// volatile jint *dest,
|
||||||
// jint compare_value)
|
// jint compare_value)
|
||||||
// An additional bool (os::is_MP()) is passed as the last argument.
|
.inline _Atomic_cmpxchg,3
|
||||||
.inline _Atomic_cmpxchg,4
|
|
||||||
movl %edx, %eax // compare_value
|
movl %edx, %eax // compare_value
|
||||||
testl %ecx, %ecx // MP test
|
|
||||||
je 1f
|
|
||||||
lock
|
lock
|
||||||
1: cmpxchgl %edi, (%rsi)
|
cmpxchgl %edi, (%rsi)
|
||||||
.end
|
.end
|
||||||
|
|
||||||
// Support for jlong Atomic::cmpxchg(jlong exchange_value,
|
// Support for jlong Atomic::cmpxchg(jlong exchange_value,
|
||||||
// volatile jlong* dest,
|
// volatile jlong* dest,
|
||||||
// jlong compare_value)
|
// jlong compare_value)
|
||||||
// An additional bool (os::is_MP()) is passed as the last argument.
|
.inline _Atomic_cmpxchg_long,3
|
||||||
.inline _Atomic_cmpxchg_long,6
|
|
||||||
movq %rdx, %rax // compare_value
|
movq %rdx, %rax // compare_value
|
||||||
testq %rcx, %rcx // MP test
|
|
||||||
je 1f
|
|
||||||
lock
|
lock
|
||||||
1: cmpxchgq %rdi, (%rsi)
|
cmpxchgq %rdi, (%rsi)
|
||||||
.end
|
.end
|
||||||
|
|
||||||
// Support for OrderAccess::acquire()
|
// Support for OrderAccess::acquire()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -32,30 +32,75 @@ class PromotedObject VALUE_OBJ_CLASS_SPEC {
|
|||||||
displaced_mark = nth_bit(2), // i.e. 0x4
|
displaced_mark = nth_bit(2), // i.e. 0x4
|
||||||
next_mask = ~(right_n_bits(3)) // i.e. ~(0x7)
|
next_mask = ~(right_n_bits(3)) // i.e. ~(0x7)
|
||||||
};
|
};
|
||||||
intptr_t _next;
|
|
||||||
|
// Below, we want _narrow_next in the "higher" 32 bit slot,
|
||||||
|
// whose position will depend on endian-ness of the platform.
|
||||||
|
// This is so that there is no interference with the
|
||||||
|
// cms_free_bit occupying bit position 7 (lsb == 0)
|
||||||
|
// when we are using compressed oops; see FreeChunk::isFree().
|
||||||
|
// We cannot move the cms_free_bit down because currently
|
||||||
|
// biased locking code assumes that age bits are contiguous
|
||||||
|
// with the lock bits. Even if that assumption were relaxed,
|
||||||
|
// the least position we could move this bit to would be
|
||||||
|
// to bit position 3, which would require 16 byte alignment.
|
||||||
|
typedef struct {
|
||||||
|
#ifdef VM_LITTLE_ENDIAN
|
||||||
|
LP64_ONLY(narrowOop _pad;)
|
||||||
|
narrowOop _narrow_next;
|
||||||
|
#else
|
||||||
|
narrowOop _narrow_next;
|
||||||
|
LP64_ONLY(narrowOop _pad;)
|
||||||
|
#endif
|
||||||
|
} Data;
|
||||||
|
|
||||||
|
union {
|
||||||
|
intptr_t _next;
|
||||||
|
Data _data;
|
||||||
|
};
|
||||||
public:
|
public:
|
||||||
inline PromotedObject* next() const {
|
inline PromotedObject* next() const {
|
||||||
return (PromotedObject*)(_next & next_mask);
|
assert(!((FreeChunk*)this)->isFree(), "Error");
|
||||||
|
PromotedObject* res;
|
||||||
|
if (UseCompressedOops) {
|
||||||
|
// The next pointer is a compressed oop stored in the top 32 bits
|
||||||
|
res = (PromotedObject*)oopDesc::decode_heap_oop(_data._narrow_next);
|
||||||
|
} else {
|
||||||
|
res = (PromotedObject*)(_next & next_mask);
|
||||||
|
}
|
||||||
|
assert(oop(res)->is_oop_or_null(true /* ignore mark word */), "Not an oop?");
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
inline void setNext(PromotedObject* x) {
|
inline void setNext(PromotedObject* x) {
|
||||||
assert(((intptr_t)x & ~next_mask) == 0,
|
assert(((intptr_t)x & ~next_mask) == 0, "Conflict in bit usage, "
|
||||||
"Conflict in bit usage, "
|
"or insufficient alignment of objects");
|
||||||
" or insufficient alignment of objects");
|
if (UseCompressedOops) {
|
||||||
_next |= (intptr_t)x;
|
assert(_data._narrow_next == 0, "Overwrite?");
|
||||||
|
_data._narrow_next = oopDesc::encode_heap_oop(oop(x));
|
||||||
|
} else {
|
||||||
|
_next |= (intptr_t)x;
|
||||||
|
}
|
||||||
|
assert(!((FreeChunk*)this)->isFree(), "Error");
|
||||||
}
|
}
|
||||||
inline void setPromotedMark() {
|
inline void setPromotedMark() {
|
||||||
_next |= promoted_mask;
|
_next |= promoted_mask;
|
||||||
|
assert(!((FreeChunk*)this)->isFree(), "Error");
|
||||||
}
|
}
|
||||||
inline bool hasPromotedMark() const {
|
inline bool hasPromotedMark() const {
|
||||||
|
assert(!((FreeChunk*)this)->isFree(), "Error");
|
||||||
return (_next & promoted_mask) == promoted_mask;
|
return (_next & promoted_mask) == promoted_mask;
|
||||||
}
|
}
|
||||||
inline void setDisplacedMark() {
|
inline void setDisplacedMark() {
|
||||||
_next |= displaced_mark;
|
_next |= displaced_mark;
|
||||||
|
assert(!((FreeChunk*)this)->isFree(), "Error");
|
||||||
}
|
}
|
||||||
inline bool hasDisplacedMark() const {
|
inline bool hasDisplacedMark() const {
|
||||||
|
assert(!((FreeChunk*)this)->isFree(), "Error");
|
||||||
return (_next & displaced_mark) != 0;
|
return (_next & displaced_mark) != 0;
|
||||||
}
|
}
|
||||||
inline void clearNext() { _next = 0; }
|
inline void clearNext() {
|
||||||
|
_next = 0;
|
||||||
|
assert(!((FreeChunk*)this)->isFree(), "Error");
|
||||||
|
}
|
||||||
debug_only(void *next_addr() { return (void *) &_next; })
|
debug_only(void *next_addr() { return (void *) &_next; })
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -766,10 +766,12 @@ void ConcurrentMark::checkpointRootsInitialPre() {
|
|||||||
|
|
||||||
_has_aborted = false;
|
_has_aborted = false;
|
||||||
|
|
||||||
|
#ifndef PRODUCT
|
||||||
if (G1PrintReachableAtInitialMark) {
|
if (G1PrintReachableAtInitialMark) {
|
||||||
print_reachable("at-cycle-start",
|
print_reachable("at-cycle-start",
|
||||||
true /* use_prev_marking */, true /* all */);
|
true /* use_prev_marking */, true /* all */);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Initialise marking structures. This has to be done in a STW phase.
|
// Initialise marking structures. This has to be done in a STW phase.
|
||||||
reset();
|
reset();
|
||||||
|
@ -471,21 +471,23 @@ HeapRegion* G1CollectedHeap::newAllocRegion_work(size_t word_size,
|
|||||||
res->zero_fill_state() == HeapRegion::Allocated)),
|
res->zero_fill_state() == HeapRegion::Allocated)),
|
||||||
"Alloc Regions must be zero filled (and non-H)");
|
"Alloc Regions must be zero filled (and non-H)");
|
||||||
}
|
}
|
||||||
if (res != NULL && res->is_empty()) _free_regions--;
|
if (res != NULL) {
|
||||||
assert(res == NULL ||
|
if (res->is_empty()) {
|
||||||
(!res->isHumongous() &&
|
_free_regions--;
|
||||||
(!zero_filled ||
|
}
|
||||||
res->zero_fill_state() == HeapRegion::Allocated)),
|
assert(!res->isHumongous() &&
|
||||||
"Non-young alloc Regions must be zero filled (and non-H)");
|
(!zero_filled || res->zero_fill_state() == HeapRegion::Allocated),
|
||||||
|
err_msg("Non-young alloc Regions must be zero filled (and non-H):"
|
||||||
if (G1PrintHeapRegions) {
|
" res->isHumongous()=%d, zero_filled=%d, res->zero_fill_state()=%d",
|
||||||
if (res != NULL) {
|
res->isHumongous(), zero_filled, res->zero_fill_state()));
|
||||||
|
assert(!res->is_on_unclean_list(),
|
||||||
|
"Alloc Regions must not be on the unclean list");
|
||||||
|
if (G1PrintHeapRegions) {
|
||||||
gclog_or_tty->print_cr("new alloc region %d:["PTR_FORMAT", "PTR_FORMAT"], "
|
gclog_or_tty->print_cr("new alloc region %d:["PTR_FORMAT", "PTR_FORMAT"], "
|
||||||
"top "PTR_FORMAT,
|
"top "PTR_FORMAT,
|
||||||
res->hrs_index(), res->bottom(), res->end(), res->top());
|
res->hrs_index(), res->bottom(), res->end(), res->top());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2338,10 +2340,12 @@ void G1CollectedHeap::verify(bool allow_dirty,
|
|||||||
gclog_or_tty->print_cr("Heap:");
|
gclog_or_tty->print_cr("Heap:");
|
||||||
print_on(gclog_or_tty, true /* extended */);
|
print_on(gclog_or_tty, true /* extended */);
|
||||||
gclog_or_tty->print_cr("");
|
gclog_or_tty->print_cr("");
|
||||||
|
#ifndef PRODUCT
|
||||||
if (VerifyDuringGC && G1VerifyDuringGCPrintReachable) {
|
if (VerifyDuringGC && G1VerifyDuringGCPrintReachable) {
|
||||||
concurrent_mark()->print_reachable("at-verification-failure",
|
concurrent_mark()->print_reachable("at-verification-failure",
|
||||||
use_prev_marking, false /* all */);
|
use_prev_marking, false /* all */);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
gclog_or_tty->flush();
|
gclog_or_tty->flush();
|
||||||
}
|
}
|
||||||
guarantee(!failures, "there should not have been any failures");
|
guarantee(!failures, "there should not have been any failures");
|
||||||
@ -4600,6 +4604,15 @@ void G1CollectedHeap::wait_for_cleanup_complete_locked() {
|
|||||||
void
|
void
|
||||||
G1CollectedHeap::put_region_on_unclean_list_locked(HeapRegion* r) {
|
G1CollectedHeap::put_region_on_unclean_list_locked(HeapRegion* r) {
|
||||||
assert(ZF_mon->owned_by_self(), "precondition.");
|
assert(ZF_mon->owned_by_self(), "precondition.");
|
||||||
|
#ifdef ASSERT
|
||||||
|
if (r->is_gc_alloc_region()) {
|
||||||
|
ResourceMark rm;
|
||||||
|
stringStream region_str;
|
||||||
|
print_on(®ion_str);
|
||||||
|
assert(!r->is_gc_alloc_region(), err_msg("Unexpected GC allocation region: %s",
|
||||||
|
region_str.as_string()));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
_unclean_region_list.insert_before_head(r);
|
_unclean_region_list.insert_before_head(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,11 +554,19 @@ HeapWord* HeapRegion::allocate(size_t size) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void HeapRegion::set_zero_fill_state_work(ZeroFillState zfs) {
|
void HeapRegion::set_zero_fill_state_work(ZeroFillState zfs) {
|
||||||
assert(top() == bottom() || zfs == Allocated,
|
|
||||||
"Region must be empty, or we must be setting it to allocated.");
|
|
||||||
assert(ZF_mon->owned_by_self() ||
|
assert(ZF_mon->owned_by_self() ||
|
||||||
Universe::heap()->is_gc_active(),
|
Universe::heap()->is_gc_active(),
|
||||||
"Must hold the lock or be a full GC to modify.");
|
"Must hold the lock or be a full GC to modify.");
|
||||||
|
#ifdef ASSERT
|
||||||
|
if (top() != bottom() && zfs != Allocated) {
|
||||||
|
ResourceMark rm;
|
||||||
|
stringStream region_str;
|
||||||
|
print_on(®ion_str);
|
||||||
|
assert(top() == bottom() || zfs == Allocated,
|
||||||
|
err_msg("Region must be empty, or we must be setting it to allocated. "
|
||||||
|
"_zfs=%d, zfs=%d, region: %s", _zfs, zfs, region_str.as_string()));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
_zfs = zfs;
|
_zfs = zfs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class SpaceMangler: public CHeapObj {
|
|||||||
// is fully constructed. Also is used when a generation is expanded
|
// is fully constructed. Also is used when a generation is expanded
|
||||||
// and possibly before the spaces have been reshaped to to the new
|
// and possibly before the spaces have been reshaped to to the new
|
||||||
// size of the generation.
|
// size of the generation.
|
||||||
static void mangle_region(MemRegion mr);
|
static void mangle_region(MemRegion mr) PRODUCT_RETURN;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ContiguousSpace;
|
class ContiguousSpace;
|
||||||
|
@ -32,10 +32,12 @@ HS_DTRACE_PROBE_DECL(hotspot, gc__end);
|
|||||||
// for the other file anymore. The dtrace probes have to remain stable.
|
// for the other file anymore. The dtrace probes have to remain stable.
|
||||||
void VM_GC_Operation::notify_gc_begin(bool full) {
|
void VM_GC_Operation::notify_gc_begin(bool full) {
|
||||||
HS_DTRACE_PROBE1(hotspot, gc__begin, full);
|
HS_DTRACE_PROBE1(hotspot, gc__begin, full);
|
||||||
|
HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VM_GC_Operation::notify_gc_end() {
|
void VM_GC_Operation::notify_gc_end() {
|
||||||
HS_DTRACE_PROBE(hotspot, gc__end);
|
HS_DTRACE_PROBE(hotspot, gc__end);
|
||||||
|
HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VM_GC_Operation::acquire_pending_list_lock() {
|
void VM_GC_Operation::acquire_pending_list_lock() {
|
||||||
|
@ -65,7 +65,7 @@ CollectedHeap::CollectedHeap()
|
|||||||
void CollectedHeap::pre_initialize() {
|
void CollectedHeap::pre_initialize() {
|
||||||
// Used for ReduceInitialCardMarks (when COMPILER2 is used);
|
// Used for ReduceInitialCardMarks (when COMPILER2 is used);
|
||||||
// otherwise remains unused.
|
// otherwise remains unused.
|
||||||
#ifdef COMPLER2
|
#ifdef COMPILER2
|
||||||
_defer_initial_card_mark = ReduceInitialCardMarks && can_elide_tlab_store_barriers()
|
_defer_initial_card_mark = ReduceInitialCardMarks && can_elide_tlab_store_barriers()
|
||||||
&& (DeferInitialCardMark || card_mark_must_follow_store());
|
&& (DeferInitialCardMark || card_mark_must_follow_store());
|
||||||
#else
|
#else
|
||||||
@ -309,7 +309,7 @@ void CollectedHeap::fill_with_objects(HeapWord* start, size_t words, bool zap)
|
|||||||
DEBUG_ONLY(fill_args_check(start, words);)
|
DEBUG_ONLY(fill_args_check(start, words);)
|
||||||
HandleMark hm; // Free handles before leaving.
|
HandleMark hm; // Free handles before leaving.
|
||||||
|
|
||||||
#ifdef LP64
|
#ifdef _LP64
|
||||||
// A single array can fill ~8G, so multiple objects are needed only in 64-bit.
|
// A single array can fill ~8G, so multiple objects are needed only in 64-bit.
|
||||||
// First fill with arrays, ensuring that any remaining space is big enough to
|
// First fill with arrays, ensuring that any remaining space is big enough to
|
||||||
// fill. The remainder is filled with a single object.
|
// fill. The remainder is filled with a single object.
|
||||||
|
@ -27,12 +27,26 @@
|
|||||||
// Note that the mark is not a real oop but just a word.
|
// Note that the mark is not a real oop but just a word.
|
||||||
// It is placed in the oop hierarchy for historical reasons.
|
// It is placed in the oop hierarchy for historical reasons.
|
||||||
//
|
//
|
||||||
// Bit-format of an object header (most significant first):
|
// Bit-format of an object header (most significant first, big endian layout below):
|
||||||
//
|
//
|
||||||
// 32 bits: unused:0 hash:25 age:4 biased_lock:1 lock:2
|
// 32 bits:
|
||||||
// 64 bits: unused:24 hash:31 cms:2 age:4 biased_lock:1 lock:2
|
// --------
|
||||||
// unused:20 size:35 cms:2 age:4 biased_lock:1 lock:2 (if cms
|
// hash:25 ------------>| age:4 biased_lock:1 lock:2 (normal object)
|
||||||
// free chunk)
|
// JavaThread*:23 epoch:2 age:4 biased_lock:1 lock:2 (biased object)
|
||||||
|
// size:32 ------------------------------------------>| (CMS free block)
|
||||||
|
// PromotedObject*:29 ---------->| promo_bits:3 ----->| (CMS promoted object)
|
||||||
|
//
|
||||||
|
// 64 bits:
|
||||||
|
// --------
|
||||||
|
// unused:25 hash:31 -->| unused:1 age:4 biased_lock:1 lock:2 (normal object)
|
||||||
|
// JavaThread*:54 epoch:2 unused:1 age:4 biased_lock:1 lock:2 (biased object)
|
||||||
|
// PromotedObject*:61 --------------------->| promo_bits:3 ----->| (CMS promoted object)
|
||||||
|
// size:64 ----------------------------------------------------->| (CMS free block)
|
||||||
|
//
|
||||||
|
// unused:25 hash:31 -->| cms_free:1 age:4 biased_lock:1 lock:2 (COOPs && normal object)
|
||||||
|
// JavaThread*:54 epoch:2 cms_free:1 age:4 biased_lock:1 lock:2 (COOPs && biased object)
|
||||||
|
// narrowOop:32 unused:24 cms_free:1 unused:4 promo_bits:3 ----->| (COOPs && CMS promoted object)
|
||||||
|
// unused:21 size:35 -->| cms_free:1 unused:7 ------------------>| (COOPs && CMS free block)
|
||||||
//
|
//
|
||||||
// - hash contains the identity hash value: largest value is
|
// - hash contains the identity hash value: largest value is
|
||||||
// 31 bits, see os::random(). Also, 64-bit vm's require
|
// 31 bits, see os::random(). Also, 64-bit vm's require
|
||||||
@ -61,8 +75,9 @@
|
|||||||
// significant fraction of the eden semispaces and were not
|
// significant fraction of the eden semispaces and were not
|
||||||
// promoted promptly, causing an increase in the amount of copying
|
// promoted promptly, causing an increase in the amount of copying
|
||||||
// performed. The runtime system aligns all JavaThread* pointers to
|
// performed. The runtime system aligns all JavaThread* pointers to
|
||||||
// a very large value (currently 128 bytes) to make room for the
|
// a very large value (currently 128 bytes (32bVM) or 256 bytes (64bVM))
|
||||||
// age bits when biased locking is enabled.
|
// to make room for the age bits & the epoch bits (used in support of
|
||||||
|
// biased locking), and for the CMS "freeness" bit in the 64bVM (+COOPs).
|
||||||
//
|
//
|
||||||
// [JavaThread* | epoch | age | 1 | 01] lock is biased toward given thread
|
// [JavaThread* | epoch | age | 1 | 01] lock is biased toward given thread
|
||||||
// [0 | epoch | age | 1 | 01] lock is anonymously biased
|
// [0 | epoch | age | 1 | 01] lock is anonymously biased
|
||||||
|
@ -470,6 +470,7 @@ void vm_exit(int code) {
|
|||||||
void notify_vm_shutdown() {
|
void notify_vm_shutdown() {
|
||||||
// For now, just a dtrace probe.
|
// For now, just a dtrace probe.
|
||||||
HS_DTRACE_PROBE(hotspot, vm__shutdown);
|
HS_DTRACE_PROBE(hotspot, vm__shutdown);
|
||||||
|
HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
void vm_direct_exit(int code) {
|
void vm_direct_exit(int code) {
|
||||||
|
@ -101,8 +101,8 @@ GrowableArray<MonitorInfo*>* javaVFrame::locked_monitors() {
|
|||||||
bool found_first_monitor = false;
|
bool found_first_monitor = false;
|
||||||
ObjectMonitor *pending_monitor = thread()->current_pending_monitor();
|
ObjectMonitor *pending_monitor = thread()->current_pending_monitor();
|
||||||
ObjectMonitor *waiting_monitor = thread()->current_waiting_monitor();
|
ObjectMonitor *waiting_monitor = thread()->current_waiting_monitor();
|
||||||
oop pending_obj = (pending_monitor != NULL ? (oop) pending_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() : NULL);
|
oop waiting_obj = (waiting_monitor != NULL ? (oop) waiting_monitor->object() : (oop) NULL);
|
||||||
|
|
||||||
for (int index = (mons->length()-1); index >= 0; index--) {
|
for (int index = (mons->length()-1); index >= 0; index--) {
|
||||||
MonitorInfo* monitor = mons->at(index);
|
MonitorInfo* monitor = mons->at(index);
|
||||||
|
@ -190,6 +190,8 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
|
|||||||
#define HOTSPOT_BUILD_COMPILER "Workshop 5.8"
|
#define HOTSPOT_BUILD_COMPILER "Workshop 5.8"
|
||||||
#elif __SUNPRO_CC == 0x590
|
#elif __SUNPRO_CC == 0x590
|
||||||
#define HOTSPOT_BUILD_COMPILER "Workshop 5.9"
|
#define HOTSPOT_BUILD_COMPILER "Workshop 5.9"
|
||||||
|
#elif __SUNPRO_CC == 0x5100
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "Sun Studio 12u1"
|
||||||
#else
|
#else
|
||||||
#define HOTSPOT_BUILD_COMPILER "unknown Workshop:" XSTR(__SUNPRO_CC)
|
#define HOTSPOT_BUILD_COMPILER "unknown Workshop:" XSTR(__SUNPRO_CC)
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,6 +29,10 @@
|
|||||||
#define DTRACE_ONLY(x) x
|
#define DTRACE_ONLY(x) x
|
||||||
#define NOT_DTRACE(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
|
#else // ndef SOLARIS || ndef DTRACE_ENABLED
|
||||||
|
|
||||||
#define DTRACE_ONLY(x)
|
#define DTRACE_ONLY(x)
|
||||||
@ -41,6 +45,8 @@
|
|||||||
#define DTRACE_PROBE4(a,b,c,d,e,f) {;}
|
#define DTRACE_PROBE4(a,b,c,d,e,f) {;}
|
||||||
#define DTRACE_PROBE5(a,b,c,d,e,f,g) {;}
|
#define DTRACE_PROBE5(a,b,c,d,e,f,g) {;}
|
||||||
|
|
||||||
|
#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HS_DTRACE_PROBE_FN(provider,name)\
|
#define HS_DTRACE_PROBE_FN(provider,name)\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user