This commit is contained in:
Lana Steuck 2014-09-25 16:21:54 -07:00
commit e20499314f
140 changed files with 6741 additions and 6577 deletions

View File

@ -107,7 +107,6 @@ public class VM {
private Runtime1 runtime1; private Runtime1 runtime1;
/** These constants come from globalDefinitions.hpp */ /** These constants come from globalDefinitions.hpp */
private int invocationEntryBCI; private int invocationEntryBCI;
private int invalidOSREntryBCI;
private ReversePtrs revPtrs; private ReversePtrs revPtrs;
private VMRegImpl vmregImpl; private VMRegImpl vmregImpl;
private int reserveForAllocationPrefetch; private int reserveForAllocationPrefetch;
@ -295,7 +294,6 @@ public class VM {
stackBias = db.lookupIntConstant("STACK_BIAS").intValue(); stackBias = db.lookupIntConstant("STACK_BIAS").intValue();
invocationEntryBCI = db.lookupIntConstant("InvocationEntryBci").intValue(); invocationEntryBCI = db.lookupIntConstant("InvocationEntryBci").intValue();
invalidOSREntryBCI = db.lookupIntConstant("InvalidOSREntryBci").intValue();
// We infer the presence of C1 or C2 from a couple of fields we // We infer the presence of C1 or C2 from a couple of fields we
// already have present in the type database // already have present in the type database
@ -733,11 +731,6 @@ public class VM {
return invocationEntryBCI; return invocationEntryBCI;
} }
/** FIXME: figure out where to stick this */
public int getInvalidOSREntryBCI() {
return invalidOSREntryBCI;
}
// FIXME: figure out where to stick this // FIXME: figure out where to stick this
public boolean wizardMode() { public boolean wizardMode() {
return true; return true;

View File

@ -106,7 +106,7 @@ GENERATEDFILES = $(GENERATEDNAMES:%=$(OUTDIR)/%)
all: $(EXEC) all: $(EXEC)
$(EXEC) : $(OBJECTS) $(EXEC) : $(OBJECTS)
@echo Making adlc @echo $(LOG_INFO) Making adlc
$(QUIETLY) $(HOST.LINK_NOPROF.CXX) -o $(EXEC) $(OBJECTS) $(QUIETLY) $(HOST.LINK_NOPROF.CXX) -o $(EXEC) $(OBJECTS)
# Random dependencies: # Random dependencies:
@ -189,7 +189,7 @@ refresh_adfiles: $(EXEC) $(SOURCE.AD) $(ADLC_UPDATER)
$(QUIETLY) ./$(ADLC_UPDATER) adGlobals_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR) $(QUIETLY) ./$(ADLC_UPDATER) adGlobals_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR)
$(QUIETLY) ./$(ADLC_UPDATER) dfa_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR) $(QUIETLY) ./$(ADLC_UPDATER) dfa_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR)
$(QUIETLY) [ -f $(TEMPDIR)/made-change ] \ $(QUIETLY) [ -f $(TEMPDIR)/made-change ] \
|| echo "Rescanned $(SOURCE.AD) but encountered no changes." || echo $(LOG_INFO) "Rescanned $(SOURCE.AD) but encountered no changes."
$(QUIETLY) rm -rf $(TEMPDIR) $(QUIETLY) rm -rf $(TEMPDIR)
@ -207,14 +207,14 @@ PROCESS_AD_FILES = awk '{ \
print }' print }'
$(OUTDIR)/%.o: %.cpp $(OUTDIR)/%.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)
# Some object files are given a prefix, to disambiguate # Some object files are given a prefix, to disambiguate
# them from objects of the same name built for the VM. # them from objects of the same name built for the VM.
$(OUTDIR)/adlc-%.o: %.cpp $(OUTDIR)/adlc-%.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)

View File

@ -195,7 +195,7 @@ DATA_MODE/ppc64 = 64
DATA_MODE = $(DATA_MODE/$(BUILDARCH)) DATA_MODE = $(DATA_MODE/$(BUILDARCH))
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -282,7 +282,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
) > $@ ) > $@
flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -290,7 +290,7 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
) > $@ ) > $@
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
@echo Creating directory list $@ @echo $(LOG_INFO) Creating directory list $@
$(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \ $(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
find $(HS_ALT_SRC)/share/vm/* -prune \ find $(HS_ALT_SRC)/share/vm/* -prune \
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
@ -301,7 +301,7 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@ \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
Makefile: $(BUILDTREE_MAKE) Makefile: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -311,7 +311,7 @@ Makefile: $(BUILDTREE_MAKE)
) > $@ ) > $@
vm.make: $(BUILDTREE_MAKE) vm.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -322,7 +322,7 @@ vm.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
adlc.make: $(BUILDTREE_MAKE) adlc.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -332,7 +332,7 @@ adlc.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
jvmti.make: $(BUILDTREE_MAKE) jvmti.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -342,7 +342,7 @@ jvmti.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
trace.make: $(BUILDTREE_MAKE) trace.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -352,7 +352,7 @@ trace.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
sa.make: $(BUILDTREE_MAKE) sa.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \

View File

@ -29,6 +29,12 @@
SLASH_JAVA ?= /java SLASH_JAVA ?= /java
define print_info
ifneq ($$(LOG_LEVEL), warn)
$$(shell echo >&2 "INFO: $1")
endif
endef
# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
#ARCH:=$(shell uname -m) #ARCH:=$(shell uname -m)
PATH_SEP = : PATH_SEP = :
@ -122,8 +128,7 @@ ifeq ($(JDK6_OR_EARLIER),0)
# debug variants always get Full Debug Symbols (if available) # debug variants always get Full Debug Symbols (if available)
ENABLE_FULL_DEBUG_SYMBOLS = 1 ENABLE_FULL_DEBUG_SYMBOLS = 1
endif endif
_JUNK_ := $(shell \ $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
@ -138,19 +143,16 @@ ifeq ($(JDK6_OR_EARLIER),0)
endif endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),) ifneq ($(ALT_OBJCOPY),)
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif endif
ifeq ($(OBJCOPY),) ifeq ($(OBJCOPY),)
_JUNK_ := $(shell \ $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY.")
ENABLE_FULL_DEBUG_SYMBOLS=0 ENABLE_FULL_DEBUG_SYMBOLS=0
_JUNK_ := $(shell \ $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
else else
_JUNK_ := $(shell \ $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
# Library stripping policies for .debuginfo configs: # Library stripping policies for .debuginfo configs:
# all_strip - strips everything from the library # all_strip - strips everything from the library
@ -164,13 +166,11 @@ ifeq ($(JDK6_OR_EARLIER),0)
# #
STRIP_POLICY ?= min_strip STRIP_POLICY ?= min_strip
_JUNK_ := $(shell \ $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
ZIP_DEBUGINFO_FILES ?= 1 ZIP_DEBUGINFO_FILES ?= 1
_JUNK_ := $(shell \ $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
endif endif
endif # ENABLE_FULL_DEBUG_SYMBOLS=1 endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif # BUILD_FLAVOR endif # BUILD_FLAVOR
@ -227,5 +227,3 @@ ADD_SA_BINARIES/ppc64 =
ADD_SA_BINARIES/zero = ADD_SA_BINARIES/zero =
EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH)) EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))

View File

@ -55,7 +55,7 @@ ifeq ($(DEBUG_BINARIES), true)
endif endif
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib... @echo $(LOG_INFO) Making signal interposition lib...
$(QUIETLY) $(CXX) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ $(QUIETLY) $(CXX) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
$(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl

View File

@ -76,34 +76,34 @@ $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource) $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti
$(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp: $(JvmtiGenClass) $(InterpreterSrcDir)/bytecodeInterpreter.cpp $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp: $(JvmtiGenClass) $(InterpreterSrcDir)/bytecodeInterpreter.cpp $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml -XSL $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl -OUT $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp $(XSLT) -IN $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml -XSL $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl -OUT $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp
$(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace
$(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass) $(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass)
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp
$(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp
$(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl $(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp
$(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl $(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h
jvmtidocs: $(JvmtiOutDir)/jvmti.html jvmtidocs: $(JvmtiOutDir)/jvmti.html
$(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl $(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html
# ######################################################################### # #########################################################################
@ -115,4 +115,3 @@ cleanall :
rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles) rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles)
# ######################################################################### # #########################################################################

View File

@ -146,12 +146,12 @@ include $(GAMMADIR)/make/altsrc.make
# The non-PIC object files are only generated for 32 bit platforms. # The non-PIC object files are only generated for 32 bit platforms.
ifdef LP64 ifdef LP64
%.o: %.cpp %.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
else else
%.o: %.cpp %.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
$(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ $(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
@ -159,18 +159,18 @@ else
endif endif
%.o: %.s %.o: %.s
@echo Assembling $< @echo $(LOG_INFO) Assembling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
%.s: %.cpp %.s: %.cpp
@echo Generating assembly for $< @echo $(LOG_INFO) Generating assembly for $<
$(QUIETLY) $(GENASM.CXX) -o $@ $< $(QUIETLY) $(GENASM.CXX) -o $@ $<
$(QUIETLY) $(DEMANGLE) $(COMPILE_DONE) $(QUIETLY) $(DEMANGLE) $(COMPILE_DONE)
# Intermediate files (for debugging macros) # Intermediate files (for debugging macros)
%.i: %.cpp %.i: %.cpp
@echo Preprocessing $< to $@ @echo $(LOG_INFO) Preprocessing $< to $@
$(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE) $(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE)
# Override gnumake built-in rules which do sccs get operations badly. # Override gnumake built-in rules which do sccs get operations badly.

View File

@ -66,7 +66,7 @@ all:
fi fi
$(GENERATED)/sa-jdi.jar: $(AGENT_FILES) $(GENERATED)/sa-jdi.jar: $(AGENT_FILES)
$(QUIETLY) echo "Making $@" $(QUIETLY) echo $(LOG_INFO) "Making $@"
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \ exit 1; \

View File

@ -73,7 +73,7 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \ exit 1; \
fi fi
@echo Making SA debugger back-end... @echo $(LOG_INFO) Making SA debugger back-end...
$(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \ $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \
-D_FILE_OFFSET_BITS=64 \ -D_FILE_OFFSET_BITS=64 \
$(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \

View File

@ -81,7 +81,7 @@ endif
all: $(TraceGeneratedFiles) all: $(TraceGeneratedFiles)
GENERATE_CODE= \ GENERATE_CODE= \
$(QUIETLY) echo Generating $@; \ $(QUIETLY) echo $(LOG_INFO) Generating $@; \
$(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \ $(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \
test -f $@ test -f $@
@ -116,5 +116,3 @@ endif
clean cleanall: clean cleanall:
rm $(TraceGeneratedFiles) rm $(TraceGeneratedFiles)

View File

@ -269,7 +269,7 @@ LFLAGS_VM += -bloadmap:libjvm.loadmap
# rule for building precompiled header # rule for building precompiled header
$(PRECOMPILED_HEADER): $(PRECOMPILED_HEADER):
$(QUIETLY) echo Generating precompiled header $@ $(QUIETLY) echo $(LOG_INFO) Generating precompiled header $@
$(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR) $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)
$(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE) $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE)
@ -300,7 +300,7 @@ endif
# details in bug 6538311. # details in bug 6538311.
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT) $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
$(QUIETLY) { \ $(QUIETLY) { \
echo Linking vm...; \ echo $(LOG_INFO) Linking vm...; \
$(LINK_LIB.CXX/PRE_HOOK) \ $(LINK_LIB.CXX/PRE_HOOK) \
$(LINK_VM) $(LD_SCRIPT_FLAG) \ $(LINK_VM) $(LD_SCRIPT_FLAG) \
$(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \ $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \

View File

@ -108,7 +108,7 @@ GENERATEDFILES = $(GENERATEDNAMES:%=$(OUTDIR)/%)
all: $(EXEC) all: $(EXEC)
$(EXEC) : $(OBJECTS) $(EXEC) : $(OBJECTS)
@echo Making adlc @echo $(LOG_INFO) Making adlc
$(QUIETLY) $(HOST.LINK_NOPROF.CXX) -o $(EXEC) $(OBJECTS) $(QUIETLY) $(HOST.LINK_NOPROF.CXX) -o $(EXEC) $(OBJECTS)
# Random dependencies: # Random dependencies:
@ -191,7 +191,7 @@ refresh_adfiles: $(EXEC) $(SOURCE.AD) $(ADLC_UPDATER)
$(QUIETLY) ./$(ADLC_UPDATER) adGlobals_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR) $(QUIETLY) ./$(ADLC_UPDATER) adGlobals_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR)
$(QUIETLY) ./$(ADLC_UPDATER) dfa_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR) $(QUIETLY) ./$(ADLC_UPDATER) dfa_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR)
$(QUIETLY) [ -f $(TEMPDIR)/made-change ] \ $(QUIETLY) [ -f $(TEMPDIR)/made-change ] \
|| echo "Rescanned $(SOURCE.AD) but encountered no changes." || echo $(LOG_INFO) "Rescanned $(SOURCE.AD) but encountered no changes."
$(QUIETLY) rm -rf $(TEMPDIR) $(QUIETLY) rm -rf $(TEMPDIR)
@ -209,14 +209,14 @@ PROCESS_AD_FILES = awk '{ \
print }' print }'
$(OUTDIR)/%.o: %.cpp $(OUTDIR)/%.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)
# Some object files are given a prefix, to disambiguate # Some object files are given a prefix, to disambiguate
# them from objects of the same name built for the VM. # them from objects of the same name built for the VM.
$(OUTDIR)/adlc-%.o: %.cpp $(OUTDIR)/adlc-%.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)

View File

@ -201,7 +201,7 @@ DATA_MODE/amd64 = 64
DATA_MODE = $(DATA_MODE/$(BUILDARCH)) DATA_MODE = $(DATA_MODE/$(BUILDARCH))
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -286,7 +286,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
) > $@ ) > $@
flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -294,7 +294,7 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
) > $@ ) > $@
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
@echo Creating directory list $@ @echo $(LOG_INFO) Creating directory list $@
$(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \ $(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
find $(HS_ALT_SRC)/share/vm/* -prune \ find $(HS_ALT_SRC)/share/vm/* -prune \
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
@ -305,7 +305,7 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@ \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
Makefile: $(BUILDTREE_MAKE) Makefile: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -315,7 +315,7 @@ Makefile: $(BUILDTREE_MAKE)
) > $@ ) > $@
vm.make: $(BUILDTREE_MAKE) vm.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -326,7 +326,7 @@ vm.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
adlc.make: $(BUILDTREE_MAKE) adlc.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -336,7 +336,7 @@ adlc.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
jvmti.make: $(BUILDTREE_MAKE) jvmti.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -346,7 +346,7 @@ jvmti.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
trace.make: $(BUILDTREE_MAKE) trace.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -356,7 +356,7 @@ trace.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
sa.make: $(BUILDTREE_MAKE) sa.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -366,7 +366,7 @@ sa.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
dtrace.make: $(BUILDTREE_MAKE) dtrace.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \

View File

@ -28,6 +28,12 @@
SLASH_JAVA ?= /java SLASH_JAVA ?= /java
define print_info
ifneq ($$(LOG_LEVEL), warn)
$$(shell echo >&2 "INFO: $1")
endif
endef
# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
ARCH:=$(shell uname -m) ARCH:=$(shell uname -m)
PATH_SEP = : PATH_SEP = :
@ -187,8 +193,7 @@ ifeq ($(JDK6_OR_EARLIER),0)
# debug variants always get Full Debug Symbols (if available) # debug variants always get Full Debug Symbols (if available)
ENABLE_FULL_DEBUG_SYMBOLS = 1 ENABLE_FULL_DEBUG_SYMBOLS = 1
endif endif
_JUNK_ := $(shell \ $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
@ -209,22 +214,18 @@ ifeq ($(JDK6_OR_EARLIER),0)
endif endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),) ifneq ($(ALT_OBJCOPY),)
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif endif
ifeq ($(OBJCOPY),) ifeq ($(OBJCOPY),)
_JUNK_ := $(shell \ $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo" \
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo" \ "files. You may need to set ALT_OBJCOPY."))
"files. You may need to set ALT_OBJCOPY.")
ENABLE_FULL_DEBUG_SYMBOLS=0 ENABLE_FULL_DEBUG_SYMBOLS=0
_JUNK_ := $(shell \ $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
echo >&2 "INFO:" \
"ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
else else
_JUNK_ := $(shell \ $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo" \
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo" \ "files."))
"files.")
# Library stripping policies for .debuginfo configs: # Library stripping policies for .debuginfo configs:
# all_strip - strips everything from the library # all_strip - strips everything from the library
@ -241,14 +242,12 @@ ifeq ($(JDK6_OR_EARLIER),0)
# #
STRIP_POLICY ?= min_strip STRIP_POLICY ?= min_strip
_JUNK_ := $(shell \ $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
ZIP_DEBUGINFO_FILES ?= 1 ZIP_DEBUGINFO_FILES ?= 1
endif endif
_JUNK_ := $(shell \ $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
endif endif
endif # ENABLE_FULL_DEBUG_SYMBOLS=1 endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif # BUILD_FLAVOR endif # BUILD_FLAVOR

View File

@ -92,7 +92,7 @@ XLIBJVM_DTRACE_DEBUGINFO = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DEBUGINFO)
XLIBJVM_DTRACE_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DIZ) XLIBJVM_DTRACE_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DIZ)
$(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE) $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
@echo Making $@ @echo $(LOG_INFO) Making $@
$(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \ $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \
$(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. -I$(GENERATED) \ $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. -I$(GENERATED) \
$(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c #-lc $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c #-lc
@ -128,7 +128,7 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
endif endif
$(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) $(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
@echo Making $@ @echo $(LOG_INFO) Making $@
$(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \ $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \
$(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. \ $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. \
$(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c #-lc -lthread -ldoor $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c #-lc -lthread -ldoor
@ -202,7 +202,7 @@ $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp
$(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp $(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp
$(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE) $(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE)
@echo Making $@ @echo $(LOG_INFO) Making $@
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \
$(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -Wall # -lc $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -Wall # -lc
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
@ -231,7 +231,7 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
endif endif
$(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) $(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
@echo Making $@ @echo $(LOG_INFO) Making $@
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \
$(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c #-lc -lthread -ldoor $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c #-lc -lthread -ldoor
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
@ -296,13 +296,13 @@ CFLAGS += -DDTRACE_ENABLED #$(DTRACE_INCL)
dtraceCheck: dtraceCheck:
dtrace_stuff: dtrace_gen_headers dtrace_stuff: dtrace_gen_headers
$(QUIETLY) echo "dtrace headers generated" $(QUIETLY) echo $(LOG_INFO) "dtrace headers generated"
else # manually disabled else # manually disabled
dtraceCheck: dtraceCheck:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled via environment variable" $(QUIETLY) echo $(LOG_INFO) "**NOTICE** Dtrace support disabled via environment variable"
dtrace_stuff: dtrace_stuff:
@ -311,7 +311,7 @@ endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
else # No dtrace program found else # No dtrace program found
dtraceCheck: dtraceCheck:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled: not supported by system" $(QUIETLY) echo $(LOG_INFO) "**NOTICE** Dtrace support disabled: not supported by system"
dtrace_stuff: dtrace_stuff:
@ -323,6 +323,6 @@ endif # ifeq ($(OS_VENDOR), Darwin)
else # CORE build else # CORE build
dtraceCheck: dtraceCheck:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled for CORE builds" $(QUIETLY) echo $(LOG_INFO) "**NOTICE** Dtrace support disabled for CORE builds"
endif # ifneq ("${TYPE}", "CORE") endif # ifneq ("${TYPE}", "CORE")

View File

@ -60,7 +60,7 @@ ifeq ($(DEBUG_BINARIES), true)
endif endif
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib... @echo $(LOG_INFO) Making signal interposition lib...
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
$(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $<
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)

View File

@ -75,34 +75,34 @@ $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource) $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti
$(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp: $(JvmtiGenClass) $(InterpreterSrcDir)/bytecodeInterpreter.cpp $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp: $(JvmtiGenClass) $(InterpreterSrcDir)/bytecodeInterpreter.cpp $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml -XSL $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl -OUT $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp $(XSLT) -IN $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml -XSL $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl -OUT $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp
$(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace
$(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass) $(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass)
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp
$(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp
$(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl $(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp
$(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl $(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h
jvmtidocs: $(JvmtiOutDir)/jvmti.html jvmtidocs: $(JvmtiOutDir)/jvmti.html
$(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl $(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html
# ######################################################################### # #########################################################################
@ -114,4 +114,3 @@ cleanall :
rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles) rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles)
# ######################################################################### # #########################################################################

View File

@ -146,12 +146,12 @@ include $(GAMMADIR)/make/altsrc.make
# The non-PIC object files are only generated for 32 bit platforms. # The non-PIC object files are only generated for 32 bit platforms.
ifdef LP64 ifdef LP64
%.o: %.cpp %.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
else else
%.o: %.cpp %.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
$(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ $(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
@ -159,18 +159,18 @@ else
endif endif
%.o: %.s %.o: %.s
@echo Assembling $< @echo $(LOG_INFO) Assembling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
%.s: %.cpp %.s: %.cpp
@echo Generating assembly for $< @echo $(LOG_INFO) Generating assembly for $<
$(QUIETLY) $(GENASM.CXX) -o $@ $< $(QUIETLY) $(GENASM.CXX) -o $@ $<
$(QUIETLY) $(DEMANGLE) $(COMPILE_DONE) $(QUIETLY) $(DEMANGLE) $(COMPILE_DONE)
# Intermediate files (for debugging macros) # Intermediate files (for debugging macros)
%.i: %.cpp %.i: %.cpp
@echo Preprocessing $< to $@ @echo $(LOG_INFO) Preprocessing $< to $@
$(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE) $(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE)
# Override gnumake built-in rules which do sccs get operations badly. # Override gnumake built-in rules which do sccs get operations badly.

View File

@ -25,6 +25,12 @@
# This makefile (sa.make) is included from the sa.make in the # This makefile (sa.make) is included from the sa.make in the
# build directories. # build directories.
define print_info
ifneq ($$(LOG_LEVEL), warn)
$$(shell echo >&2 "INFO: $1")
endif
endef
# This makefile is used to build Serviceability Agent java code # This makefile is used to build Serviceability Agent java code
# and generate JNI header file for native methods. # and generate JNI header file for native methods.
@ -53,7 +59,7 @@ ifeq ($(ALT_SA_CLASSPATH),)
endif endif
endif endif
else else
_JUNK_ := $(shell echo >&2 "INFO: ALT_SA_CLASSPATH=$(ALT_SA_CLASSPATH)") $(eval $(call print_info, "ALT_SA_CLASSPATH=$(ALT_SA_CLASSPATH)"))
SA_CLASSPATH=$(shell test -f $(ALT_SA_CLASSPATH) && echo $(ALT_SA_CLASSPATH)) SA_CLASSPATH=$(shell test -f $(ALT_SA_CLASSPATH) && echo $(ALT_SA_CLASSPATH))
endif endif
@ -80,7 +86,7 @@ all:
fi fi
$(GENERATED)/sa-jdi.jar: $(AGENT_FILES) $(GENERATED)/sa-jdi.jar: $(AGENT_FILES)
$(QUIETLY) echo "Making $@" $(QUIETLY) echo $(LOG_INFO) "Making $@"
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \ exit 1; \

View File

@ -122,7 +122,7 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \ exit 1; \
fi fi
@echo Making SA debugger back-end... @echo $(LOG_INFO) Making SA debugger back-end...
$(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \ $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \
$(SA_SYSROOT_FLAGS) \ $(SA_SYSROOT_FLAGS) \
$(SYMFLAG) $(SAARCH) $(SHARED_FLAG) $(PICFLAG) \ $(SYMFLAG) $(SAARCH) $(SHARED_FLAG) $(PICFLAG) \

View File

@ -82,7 +82,7 @@ endif
all: $(TraceGeneratedFiles) all: $(TraceGeneratedFiles)
GENERATE_CODE= \ GENERATE_CODE= \
$(QUIETLY) echo Generating $@; \ $(QUIETLY) echo $(LOG_INFO) Generating $@; \
$(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \ $(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \
test -f $@ test -f $@
@ -118,4 +118,3 @@ endif
clean cleanall: clean cleanall:
rm $(TraceGeneratedFiles) rm $(TraceGeneratedFiles)

View File

@ -291,7 +291,7 @@ endif
# rule for building precompiled header # rule for building precompiled header
$(PRECOMPILED_HEADER): $(PRECOMPILED_HEADER):
$(QUIETLY) echo Generating precompiled header $@ $(QUIETLY) echo $(LOG_INFO) Generating precompiled header $@
$(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR) $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)
$(QUIETLY) rm -f $@ $(QUIETLY) rm -f $@
$(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE) $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE)
@ -318,7 +318,7 @@ endif
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT) $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
$(QUIETLY) { \ $(QUIETLY) { \
echo Linking vm...; \ echo $(LOG_INFO) Linking vm...; \
$(LINK_LIB.CXX/PRE_HOOK) \ $(LINK_LIB.CXX/PRE_HOOK) \
$(LINK_VM) $(LD_SCRIPT_FLAG) \ $(LINK_VM) $(LD_SCRIPT_FLAG) \
$(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \ $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \

View File

@ -29,6 +29,12 @@ ifneq ($(SPEC),)
include $(SPEC) include $(SPEC)
endif endif
ifeq ($(LOG_LEVEL),warn)
LOG_INFO := > /dev/null
else
LOG_INFO :=
endif
# Directory paths and user name # Directory paths and user name
# Unless GAMMADIR is set on the command line, search upward from # Unless GAMMADIR is set on the command line, search upward from
# the current directory for a parent directory containing "src/share/vm". # the current directory for a parent directory containing "src/share/vm".

View File

@ -106,7 +106,7 @@ GENERATEDFILES = $(GENERATEDNAMES:%=$(OUTDIR)/%)
all: $(EXEC) all: $(EXEC)
$(EXEC) : $(OBJECTS) $(EXEC) : $(OBJECTS)
@echo Making adlc @echo $(LOG_INFO) Making adlc
$(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.LINK_NOPROF.CXX)) -o $(EXEC) $(OBJECTS) $(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.LINK_NOPROF.CXX)) -o $(EXEC) $(OBJECTS)
# Random dependencies: # Random dependencies:
@ -191,7 +191,7 @@ refresh_adfiles: $(EXEC) $(SOURCE.AD) $(ADLC_UPDATER)
$(QUIETLY) ./$(ADLC_UPDATER) adGlobals_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR) $(QUIETLY) ./$(ADLC_UPDATER) adGlobals_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR)
$(QUIETLY) ./$(ADLC_UPDATER) dfa_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR) $(QUIETLY) ./$(ADLC_UPDATER) dfa_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR)
$(QUIETLY) [ -f $(TEMPDIR)/made-change ] \ $(QUIETLY) [ -f $(TEMPDIR)/made-change ] \
|| echo "Rescanned $(SOURCE.AD) but encountered no changes." || echo $(LOG_INFO) "Rescanned $(SOURCE.AD) but encountered no changes."
$(QUIETLY) rm -rf $(TEMPDIR) $(QUIETLY) rm -rf $(TEMPDIR)
@ -209,14 +209,14 @@ PROCESS_AD_FILES = awk '{ \
print }' print }'
$(OUTDIR)/%.o: %.cpp $(OUTDIR)/%.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.COMPILE.CXX)) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.COMPILE.CXX)) -o $@ $< $(COMPILE_DONE)
# Some object files are given a prefix, to disambiguate # Some object files are given a prefix, to disambiguate
# them from objects of the same name built for the VM. # them from objects of the same name built for the VM.
$(OUTDIR)/adlc-%.o: %.cpp $(OUTDIR)/adlc-%.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.COMPILE.CXX)) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.COMPILE.CXX)) -o $@ $< $(COMPILE_DONE)

View File

@ -198,7 +198,7 @@ DATA_MODE/ppc64 = 64
DATA_MODE = $(DATA_MODE/$(BUILDARCH)) DATA_MODE = $(DATA_MODE/$(BUILDARCH))
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -285,7 +285,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
) > $@ ) > $@
flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -293,7 +293,7 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
) > $@ ) > $@
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
@echo Creating directory list $@ @echo $(LOG_INFO) Creating directory list $@
$(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \ $(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
find $(HS_ALT_SRC)/share/vm/* -prune \ find $(HS_ALT_SRC)/share/vm/* -prune \
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
@ -304,7 +304,7 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@ \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
Makefile: $(BUILDTREE_MAKE) Makefile: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -314,7 +314,7 @@ Makefile: $(BUILDTREE_MAKE)
) > $@ ) > $@
vm.make: $(BUILDTREE_MAKE) vm.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -325,7 +325,7 @@ vm.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
adlc.make: $(BUILDTREE_MAKE) adlc.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -335,7 +335,7 @@ adlc.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
jvmti.make: $(BUILDTREE_MAKE) jvmti.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -345,7 +345,7 @@ jvmti.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
trace.make: $(BUILDTREE_MAKE) trace.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -355,7 +355,7 @@ trace.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
sa.make: $(BUILDTREE_MAKE) sa.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -365,7 +365,7 @@ sa.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
dtrace.make: $(BUILDTREE_MAKE) dtrace.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \

View File

@ -28,6 +28,12 @@
SLASH_JAVA ?= /java SLASH_JAVA ?= /java
define print_info
ifneq ($$(LOG_LEVEL), warn)
$$(shell echo >&2 "INFO: $1")
endif
endef
# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
# ARCH can be set explicitly in spec.gmk # ARCH can be set explicitly in spec.gmk
@ -185,8 +191,7 @@ ifeq ($(JDK6_OR_EARLIER),0)
# debug variants always get Full Debug Symbols (if available) # debug variants always get Full Debug Symbols (if available)
ENABLE_FULL_DEBUG_SYMBOLS = 1 ENABLE_FULL_DEBUG_SYMBOLS = 1
endif endif
_JUNK_ := $(shell \ $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
@ -201,19 +206,16 @@ ifeq ($(JDK6_OR_EARLIER),0)
endif endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),) ifneq ($(ALT_OBJCOPY),)
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif endif
ifeq ($(OBJCOPY),) ifeq ($(OBJCOPY),)
_JUNK_ := $(shell \ $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY.")
ENABLE_FULL_DEBUG_SYMBOLS=0 ENABLE_FULL_DEBUG_SYMBOLS=0
_JUNK_ := $(shell \ $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
else else
_JUNK_ := $(shell \ $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
# Library stripping policies for .debuginfo configs: # Library stripping policies for .debuginfo configs:
# all_strip - strips everything from the library # all_strip - strips everything from the library
@ -227,13 +229,11 @@ ifeq ($(JDK6_OR_EARLIER),0)
# #
STRIP_POLICY ?= min_strip STRIP_POLICY ?= min_strip
_JUNK_ := $(shell \ $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
ZIP_DEBUGINFO_FILES ?= 1 ZIP_DEBUGINFO_FILES ?= 1
_JUNK_ := $(shell \ $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
endif endif
endif # ENABLE_FULL_DEBUG_SYMBOLS=1 endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif # BUILD_FLAVOR endif # BUILD_FLAVOR

View File

@ -78,13 +78,13 @@ CFLAGS += -DDTRACE_ENABLED
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
else else
dtrace_gen_headers: dtrace_gen_headers:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)" $(QUIETLY) $(LOG_INFO) echo "**NOTICE** Dtrace support disabled: $(REASON)"
endif endif
# Phony target used in vm.make build target to check whether enabled. # Phony target used in vm.make build target to check whether enabled.
ifeq ($(DTRACE_ENABLED),) ifeq ($(DTRACE_ENABLED),)
dtraceCheck: dtraceCheck:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)" $(QUIETLY) $(LOG_INFO) echo "**NOTICE** Dtrace support disabled: $(REASON)"
else else
dtraceCheck: dtraceCheck:
endif endif

View File

@ -52,7 +52,7 @@ ifeq ($(DEBUG_BINARIES), true)
endif endif
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib... @echo $(LOG_INFO) Making signal interposition lib...
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
$(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)

View File

@ -75,34 +75,34 @@ $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource) $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti
$(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp: $(JvmtiGenClass) $(InterpreterSrcDir)/bytecodeInterpreter.cpp $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp: $(JvmtiGenClass) $(InterpreterSrcDir)/bytecodeInterpreter.cpp $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml -XSL $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl -OUT $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp $(XSLT) -IN $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml -XSL $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl -OUT $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp
$(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace
$(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass) $(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass)
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp
$(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp
$(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl $(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp
$(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl $(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h
jvmtidocs: $(JvmtiOutDir)/jvmti.html jvmtidocs: $(JvmtiOutDir)/jvmti.html
$(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl $(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html
# ######################################################################### # #########################################################################

View File

@ -146,12 +146,12 @@ include $(GAMMADIR)/make/altsrc.make
# The non-PIC object files are only generated for 32 bit platforms. # The non-PIC object files are only generated for 32 bit platforms.
ifdef LP64 ifdef LP64
%.o: %.cpp %.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
else else
%.o: %.cpp %.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
$(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ $(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
@ -159,18 +159,18 @@ else
endif endif
%.o: %.s %.o: %.s
@echo Assembling $< @echo $(LOG_INFO) Assembling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
%.s: %.cpp %.s: %.cpp
@echo Generating assembly for $< @echo $(LOG_INFO) Generating assembly for $<
$(QUIETLY) $(GENASM.CXX) -o $@ $< $(QUIETLY) $(GENASM.CXX) -o $@ $<
$(QUIETLY) $(DEMANGLE) $(COMPILE_DONE) $(QUIETLY) $(DEMANGLE) $(COMPILE_DONE)
# Intermediate files (for debugging macros) # Intermediate files (for debugging macros)
%.i: %.cpp %.i: %.cpp
@echo Preprocessing $< to $@ @echo $(LOG_INFO) Preprocessing $< to $@
$(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE) $(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE)
# Override gnumake built-in rules which do sccs get operations badly. # Override gnumake built-in rules which do sccs get operations badly.

View File

@ -67,7 +67,7 @@ all:
fi fi
$(GENERATED)/sa-jdi.jar:: $(AGENT_FILES) $(GENERATED)/sa-jdi.jar:: $(AGENT_FILES)
$(QUIETLY) echo "Making $@" $(QUIETLY) echo $(LOG_INFO) "Making $@"
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \ exit 1; \

View File

@ -80,7 +80,7 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \ exit 1; \
fi fi
@echo Making SA debugger back-end... @echo $(LOG_INFO) Making SA debugger back-end...
$(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \ $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \
-D_FILE_OFFSET_BITS=64 \ -D_FILE_OFFSET_BITS=64 \
$(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \

View File

@ -81,7 +81,7 @@ endif
all: $(TraceGeneratedFiles) all: $(TraceGeneratedFiles)
GENERATE_CODE= \ GENERATE_CODE= \
$(QUIETLY) echo Generating $@; \ $(QUIETLY) echo $(LOG_INFO) Generating $@; \
$(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \ $(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \
test -f $@ test -f $@

View File

@ -286,7 +286,7 @@ LINK_VM = $(LINK_LIB.CC)
# rule for building precompiled header # rule for building precompiled header
$(PRECOMPILED_HEADER): $(PRECOMPILED_HEADER):
$(QUIETLY) echo Generating precompiled header $@ $(QUIETLY) echo $(LOG_INFO) Generating precompiled header $@
$(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR) $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)
$(QUIETLY) rm -f $@ $(QUIETLY) rm -f $@
$(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE) $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE)
@ -318,7 +318,7 @@ endif
# details in bug 6538311. # details in bug 6538311.
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT) $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
$(QUIETLY) { \ $(QUIETLY) { \
echo Linking vm...; \ echo $(LOG_INFO) Linking vm...; \
$(LINK_LIB.CXX/PRE_HOOK) \ $(LINK_LIB.CXX/PRE_HOOK) \
$(LINK_VM) $(LD_SCRIPT_FLAG) \ $(LINK_VM) $(LD_SCRIPT_FLAG) \
$(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \ $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \

View File

@ -127,7 +127,7 @@ GENERATEDFILES = $(GENERATEDNAMES:%=$(OUTDIR)/%)
all: $(EXEC) all: $(EXEC)
$(EXEC) : $(OBJECTS) $(EXEC) : $(OBJECTS)
@echo Making adlc @echo $(LOG_INFO) Making adlc
$(QUIETLY) $(LINK_NOPROF.CXX) -o $(EXEC) $(OBJECTS) $(QUIETLY) $(LINK_NOPROF.CXX) -o $(EXEC) $(OBJECTS)
# Random dependencies: # Random dependencies:
@ -206,7 +206,7 @@ refresh_adfiles: $(EXEC) $(SOURCE.AD) $(ADLC_UPDATER)
$(QUIETLY) ./$(ADLC_UPDATER) adGlobals_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR) $(QUIETLY) ./$(ADLC_UPDATER) adGlobals_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR)
$(QUIETLY) ./$(ADLC_UPDATER) dfa_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR) $(QUIETLY) ./$(ADLC_UPDATER) dfa_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR)
$(QUIETLY) [ -f $(TEMPDIR)/made-change ] \ $(QUIETLY) [ -f $(TEMPDIR)/made-change ] \
|| echo "Rescanned $(SOURCE.AD) but encountered no changes." || echo $(LOG_INFO) "Rescanned $(SOURCE.AD) but encountered no changes."
$(QUIETLY) rm -rf $(TEMPDIR) $(QUIETLY) rm -rf $(TEMPDIR)
@ -224,14 +224,14 @@ PROCESS_AD_FILES = awk '{ \
print }' print }'
$(OUTDIR)/%.o: %.cpp $(OUTDIR)/%.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(COMPILE.CXX) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(COMPILE.CXX) -o $@ $< $(COMPILE_DONE)
# Some object files are given a prefix, to disambiguate # Some object files are given a prefix, to disambiguate
# them from objects of the same name built for the VM. # them from objects of the same name built for the VM.
$(OUTDIR)/adlc-%.o: %.cpp $(OUTDIR)/adlc-%.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(COMPILE.CXX) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(COMPILE.CXX) -o $@ $< $(COMPILE_DONE)

View File

@ -190,7 +190,7 @@ DATA_MODE/amd64 = 64
DATA_MODE = $(DATA_MODE/$(BUILDARCH)) DATA_MODE = $(DATA_MODE/$(BUILDARCH))
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -272,7 +272,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
) > $@ ) > $@
flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -280,7 +280,7 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
) > $@ ) > $@
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
@echo Creating directory list $@ @echo $(LOG_INFO) Creating directory list $@
$(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \ $(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
find $(HS_ALT_SRC)/share/vm/* -prune \ find $(HS_ALT_SRC)/share/vm/* -prune \
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
@ -291,7 +291,7 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@ \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
Makefile: $(BUILDTREE_MAKE) Makefile: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -301,7 +301,7 @@ Makefile: $(BUILDTREE_MAKE)
) > $@ ) > $@
vm.make: $(BUILDTREE_MAKE) vm.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -312,7 +312,7 @@ vm.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
adlc.make: $(BUILDTREE_MAKE) adlc.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -322,7 +322,7 @@ adlc.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
jvmti.make: $(BUILDTREE_MAKE) jvmti.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -332,7 +332,7 @@ jvmti.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
trace.make: $(BUILDTREE_MAKE) trace.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -342,7 +342,7 @@ trace.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
sa.make: $(BUILDTREE_MAKE) sa.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \
@ -352,7 +352,7 @@ sa.make: $(BUILDTREE_MAKE)
) > $@ ) > $@
dtrace.make: $(BUILDTREE_MAKE) dtrace.make: $(BUILDTREE_MAKE)
@echo Creating $@ ... @echo $(LOG_INFO) Creating $@ ...
$(QUIETLY) ( \ $(QUIETLY) ( \
$(BUILDTREE_COMMENT); \ $(BUILDTREE_COMMENT); \
echo; \ echo; \

View File

@ -26,6 +26,12 @@
# Include the top level defs.make under make directory instead of this one. # Include the top level defs.make under make directory instead of this one.
# This file is included into make/defs.make. # This file is included into make/defs.make.
define print_info
ifneq ($$(LOG_LEVEL), warn)
$$(shell echo >&2 "INFO: $1")
endif
endef
# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
SLASH_JAVA ?= /java SLASH_JAVA ?= /java
ARCH:=$(shell uname -p) ARCH:=$(shell uname -p)
@ -120,8 +126,7 @@ ifeq ($(JDK6_OR_EARLIER),0)
# debug variants always get Full Debug Symbols (if available) # debug variants always get Full Debug Symbols (if available)
ENABLE_FULL_DEBUG_SYMBOLS = 1 ENABLE_FULL_DEBUG_SYMBOLS = 1
endif endif
_JUNK_ := $(shell \ $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
@ -129,19 +134,16 @@ ifeq ($(JDK6_OR_EARLIER),0)
DEF_OBJCOPY=/usr/sfw/bin/gobjcopy DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),) ifneq ($(ALT_OBJCOPY),)
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif endif
ifeq ($(OBJCOPY),) ifeq ($(OBJCOPY),)
_JUNK_ := $(shell \ $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files."))
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
ENABLE_FULL_DEBUG_SYMBOLS=0 ENABLE_FULL_DEBUG_SYMBOLS=0
_JUNK_ := $(shell \ $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
else else
_JUNK_ := $(shell \ $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
# Library stripping policies for .debuginfo configs: # Library stripping policies for .debuginfo configs:
# all_strip - strips everything from the library # all_strip - strips everything from the library
@ -155,13 +157,11 @@ ifeq ($(JDK6_OR_EARLIER),0)
# #
STRIP_POLICY ?= min_strip STRIP_POLICY ?= min_strip
_JUNK_ := $(shell \ $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
ZIP_DEBUGINFO_FILES ?= 1 ZIP_DEBUGINFO_FILES ?= 1
_JUNK_ := $(shell \ $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
endif endif
endif # ENABLE_FULL_DEBUG_SYMBOLS=1 endif # ENABLE_FULL_DEBUG_SYMBOLS=1
endif # BUILD_FLAVOR endif # BUILD_FLAVOR

View File

@ -32,7 +32,7 @@ ifneq ("${TYPE}", "CORE")
ifdef USE_GCC ifdef USE_GCC
dtraceCheck: dtraceCheck:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled for gcc builds" $(QUIETLY) echo $(LOG_INFO) "**NOTICE** Dtrace support disabled for gcc builds"
else else
@ -102,7 +102,7 @@ XLIBJVM_DTRACE_DEBUGINFO = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DEBUGINFO)
XLIBJVM_DTRACE_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DIZ) XLIBJVM_DTRACE_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DIZ)
$(XLIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE) $(XLIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
@echo Making $@ @echo $(LOG_INFO) Making $@
$(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \ $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \
$(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \ $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \
$(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc
@ -137,7 +137,7 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
endif endif
$(XLIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) $(XLIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
@echo Making $@ @echo $(LOG_INFO) Making $@
$(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \ $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \
$(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \ $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \
$(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor
@ -207,7 +207,7 @@ $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp
$(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp $(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp
$(LIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE) $(LIBJVM_DB): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE)
@echo Making $@ @echo $(LOG_INFO) Making $@
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \
$(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
@ -232,7 +232,7 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
endif endif
$(LIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) $(LIBJVM_DTRACE): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
@echo Making $@ @echo $(LOG_INFO) Making $@
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \
$(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
@ -286,7 +286,7 @@ DTraced_Files = ciEnv.o \
# Dtrace is available, so we build $(DTRACE.o) # Dtrace is available, so we build $(DTRACE.o)
$(DTRACE.o): $(DTRACE).d $(DTraced_Files) $(DTRACE.o): $(DTRACE).d $(DTraced_Files)
@echo Compiling $(DTRACE).d @echo $(LOG_INFO) Compiling $(DTRACE).d
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \ $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
$(DTraced_Files) ||\ $(DTraced_Files) ||\
@ -352,7 +352,7 @@ dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(Dt
# The jhelper.d and hotspot probes are separated into two different SUNW_dof sections. # The jhelper.d and hotspot probes are separated into two different SUNW_dof sections.
# Now the jhelper.d is built without the -Xlazyload flag. # Now the jhelper.d is built without the -Xlazyload flag.
$(DTRACE_JHELPER.o) : $(DTRACE_JHELPER).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTRACE_JHELPER.o) : $(DTRACE_JHELPER).d $(JVMOFFS).h $(JVMOFFS)Index.h
@echo Compiling $(DTRACE_JHELPER).d @echo $(LOG_INFO) Compiling $(DTRACE_JHELPER).d
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -o $@ -s $(DTRACE_JHELPER).d $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -o $@ -s $(DTRACE_JHELPER).d
.PHONY: dtraceCheck .PHONY: dtraceCheck
@ -391,14 +391,14 @@ dtraceCheck:
else # manually disabled else # manually disabled
dtraceCheck: dtraceCheck:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled via environment variable" $(QUIETLY) echo $(LOG_INFO) "**NOTICE** Dtrace support disabled via environment variable"
endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "") endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
else # No dtrace program found else # No dtrace program found
dtraceCheck: dtraceCheck:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled: not supported by system" $(QUIETLY) echo $(LOG_INFO) "**NOTICE** Dtrace support disabled: not supported by system"
endif # ifneq ("${dtraceFound}", "") endif # ifneq ("${dtraceFound}", "")
@ -407,6 +407,6 @@ endif # ifdef USE_GCC
else # CORE build else # CORE build
dtraceCheck: dtraceCheck:
$(QUIETLY) echo "**NOTICE** Dtrace support disabled for CORE builds" $(QUIETLY) echo $(LOG_INFO) "**NOTICE** Dtrace support disabled for CORE builds"
endif # ifneq ("${TYPE}", "CORE") endif # ifneq ("${TYPE}", "CORE")

View File

@ -48,7 +48,7 @@ LFLAGS_JSIG += -mt -xnolib
endif endif
$(LIBJSIG): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) $(LIBJSIG): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib... @echo $(LOG_INFO) Making signal interposition lib...
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
$(LFLAGS_JSIG) -o $@ $(JSIGSRCDIR)/jsig.c -ldl $(LFLAGS_JSIG) -o $@ $(JSIGSRCDIR)/jsig.c -ldl
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)

View File

@ -74,34 +74,34 @@ $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
$(QUIETLY) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource) $(QUIETLY) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti
$(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp: $(JvmtiGenClass) $(InterpreterSrcDir)/bytecodeInterpreter.cpp $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp: $(JvmtiGenClass) $(InterpreterSrcDir)/bytecodeInterpreter.cpp $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml -XSL $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl -OUT $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp $(XSLT) -IN $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml -XSL $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl -OUT $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp
$(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace
$(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass) $(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass)
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp
$(QUIETLY) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp $(QUIETLY) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp
$(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl $(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp
$(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl $(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h
jvmtidocs: $(JvmtiOutDir)/jvmti.html jvmtidocs: $(JvmtiOutDir)/jvmti.html
$(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl $(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl
@echo Generating $@ @echo $(LOG_INFO) Generating $@
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html
# ######################################################################### # #########################################################################
@ -113,4 +113,3 @@ cleanall :
rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles) rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles)
# ######################################################################### # #########################################################################

View File

@ -138,12 +138,12 @@ include $(GAMMADIR)/make/altsrc.make
# Sun compiler for 64 bit Solaris does not support building non-PIC object files. # Sun compiler for 64 bit Solaris does not support building non-PIC object files.
ifdef LP64 ifdef LP64
%.o: %.cpp %.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
else else
%.o: %.cpp %.o: %.cpp
@echo Compiling $< @echo $(LOG_INFO) Compiling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
$(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ $(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
@ -151,18 +151,18 @@ else
endif endif
%.o: %.s %.o: %.s
@echo Assembling $< @echo $(LOG_INFO) Assembling $<
$(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(AS.S) -o $@ $< $(COMPILE_DONE) $(QUIETLY) $(AS.S) -o $@ $< $(COMPILE_DONE)
%.s: %.cpp %.s: %.cpp
@echo Generating assembly for $< @echo $(LOG_INFO) Generating assembly for $<
$(QUIETLY) $(GENASM.CXX) -o $@ $< $(QUIETLY) $(GENASM.CXX) -o $@ $<
$(QUIETLY) $(DEMANGLE) $(COMPILE_DONE) $(QUIETLY) $(DEMANGLE) $(COMPILE_DONE)
# Intermediate files (for debugging macros) # Intermediate files (for debugging macros)
%.i: %.cpp %.i: %.cpp
@echo Preprocessing $< to $@ @echo $(LOG_INFO) Preprocessing $< to $@
$(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE) $(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE)
# Override gnumake built-in rules which do sccs get operations badly. # Override gnumake built-in rules which do sccs get operations badly.

View File

@ -58,7 +58,7 @@ all:
fi fi
$(GENERATED)/sa-jdi.jar: $(AGENT_FILES) $(GENERATED)/sa-jdi.jar: $(AGENT_FILES)
$(QUIETLY) echo "Making $@"; $(QUIETLY) echo $(LOG_INFO) "Making $@";
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \ exit 1; \

View File

@ -95,7 +95,7 @@ $(LIBSAPROC): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(SASRCFILES) $(SA
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \ exit 1; \
fi fi
@echo Making SA debugger back-end... @echo $(LOG_INFO) Making SA debugger back-end...
$(QUIETLY) $(CXX) \ $(QUIETLY) $(CXX) \
$(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
-I$(SASRCDIR) \ -I$(SASRCDIR) \

View File

@ -77,7 +77,7 @@ endif
all: $(TraceGeneratedFiles) all: $(TraceGeneratedFiles)
GENERATE_CODE= \ GENERATE_CODE= \
$(QUIETLY) echo Generating $@; \ $(QUIETLY) echo $(LOG_INFO) Generating $@; \
$(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \ $(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \
test -f $@ test -f $@
@ -112,5 +112,3 @@ endif
clean cleanall: clean cleanall:
rm $(TraceGeneratedFiles) rm $(TraceGeneratedFiles)

View File

@ -295,7 +295,7 @@ endif
# making the library: # making the library:
$(LIBJVM): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LIBJVM): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(LIBJVM.o) $(LIBJVM_MAPFILE)
ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),) ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
@echo Linking vm... @echo $(LOG_INFO) Linking vm...
$(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK) $(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK)
$(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM) $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM)
$(QUIETLY) $(LINK_LIB.CXX/POST_HOOK) $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK)

View File

@ -31,12 +31,8 @@
ProjectCreatorSources=\ ProjectCreatorSources=\
$(WorkSpace)\src\share\tools\ProjectCreator\ProjectCreator.java \ $(WorkSpace)\src\share\tools\ProjectCreator\ProjectCreator.java \
$(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreator.java \ $(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreator.java \
$(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreatorVC7.java \
$(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreatorVC10.java \ $(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreatorVC10.java \
$(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatform.java \ $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatform.java \
$(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC7.java \
$(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC8.java \
$(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC9.java \
$(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC10.java \ $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC10.java \
$(WorkSpace)\src\share\tools\ProjectCreator\Util.java \ $(WorkSpace)\src\share\tools\ProjectCreator\Util.java \
$(WorkSpace)\src\share\tools\ProjectCreator\BuildConfig.java \ $(WorkSpace)\src\share\tools\ProjectCreator\BuildConfig.java \

View File

@ -1166,9 +1166,9 @@ void InterpreterMacroAssembler::test_backedge_count_for_osr(Register backedge_co
beq(CCR0, overflow_with_error); beq(CCR0, overflow_with_error);
// Has the nmethod been invalidated already? // Has the nmethod been invalidated already?
lwz(Rtmp, nmethod::entry_bci_offset(), R3_RET); lbz(Rtmp, nmethod::state_offset(), R3_RET);
cmpwi(CCR0, Rtmp, InvalidOSREntryBci); cmpwi(CCR0, Rtmp, nmethod::in_use);
beq(CCR0, overflow_with_error); bne(CCR0, overflow_with_error);
// Migrate the interpreter frame off of the stack. // Migrate the interpreter frame off of the stack.
// We can use all registers because we will not return to interpreter from this point. // We can use all registers because we will not return to interpreter from this point.

View File

@ -1674,9 +1674,9 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
__ beq(CCR0, Lforward); __ beq(CCR0, Lforward);
// Has the nmethod been invalidated already? // Has the nmethod been invalidated already?
__ lwz(R0, nmethod::entry_bci_offset(), R3_RET); __ lbz(R0, nmethod::state_offset(), R3_RET);
__ cmpwi(CCR0, R0, InvalidOSREntryBci); __ cmpwi(CCR0, R0, nmethod::in_use);
__ beq(CCR0, Lforward); __ bne(CCR0, Lforward);
// Migrate the interpreter frame off of the stack. // Migrate the interpreter frame off of the stack.
// We can use all registers because we will not return to interpreter from this point. // We can use all registers because we will not return to interpreter from this point.

View File

@ -2407,8 +2407,8 @@ void InterpreterMacroAssembler::test_backedge_count_for_osr( Register backedge_c
br_null_short(O0, Assembler::pn, overflow_with_error); br_null_short(O0, Assembler::pn, overflow_with_error);
// Has the nmethod been invalidated already? // Has the nmethod been invalidated already?
ld(O0, nmethod::entry_bci_offset(), O2); ldub(O0, nmethod::state_offset(), O2);
cmp_and_br_short(O2, InvalidOSREntryBci, Assembler::equal, Assembler::pn, overflow_with_error); cmp_and_br_short(O2, nmethod::in_use, Assembler::notEqual, Assembler::pn, overflow_with_error);
// migrate the interpreter frame off of the stack // migrate the interpreter frame off of the stack

View File

@ -1636,8 +1636,8 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
__ br_null_short(O0, Assembler::pn, Lforward); __ br_null_short(O0, Assembler::pn, Lforward);
// Has the nmethod been invalidated already? // Has the nmethod been invalidated already?
__ ld(O0, nmethod::entry_bci_offset(), O2); __ ldub(O0, nmethod::state_offset(), O2);
__ cmp_and_br_short(O2, InvalidOSREntryBci, Assembler::equal, Assembler::pn, Lforward); __ cmp_and_br_short(O2, nmethod::in_use, Assembler::notEqual, Assembler::pn, Lforward);
// migrate the interpreter frame off of the stack // migrate the interpreter frame off of the stack

View File

@ -1724,9 +1724,8 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
__ testptr(rax, rax); // test result __ testptr(rax, rax); // test result
__ jcc(Assembler::zero, dispatch); // no osr if null __ jcc(Assembler::zero, dispatch); // no osr if null
// nmethod may have been invalidated (VM may block upon call_VM return) // nmethod may have been invalidated (VM may block upon call_VM return)
__ movl(rcx, Address(rax, nmethod::entry_bci_offset())); __ cmpb(Address(rax, nmethod::state_offset()), nmethod::in_use);
__ cmpl(rcx, InvalidOSREntryBci); __ jcc(Assembler::notEqual, dispatch);
__ jcc(Assembler::equal, dispatch);
// We have the address of an on stack replacement routine in rax, // We have the address of an on stack replacement routine in rax,
// We need to prepare to execute the OSR method. First we must // We need to prepare to execute the OSR method. First we must
@ -1734,8 +1733,7 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
__ mov(rbx, rax); // save the nmethod __ mov(rbx, rax); // save the nmethod
const Register thread = rcx; __ get_thread(rcx);
__ get_thread(thread);
call_VM(noreg, CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin)); call_VM(noreg, CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin));
// rax, is OSR buffer, move it to expected parameter location // rax, is OSR buffer, move it to expected parameter location
__ mov(rcx, rax); __ mov(rcx, rax);

View File

@ -1751,9 +1751,8 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
__ testptr(rax, rax); // test result __ testptr(rax, rax); // test result
__ jcc(Assembler::zero, dispatch); // no osr if null __ jcc(Assembler::zero, dispatch); // no osr if null
// nmethod may have been invalidated (VM may block upon call_VM return) // nmethod may have been invalidated (VM may block upon call_VM return)
__ movl(rcx, Address(rax, nmethod::entry_bci_offset())); __ cmpb(Address(rax, nmethod::state_offset()), nmethod::in_use);
__ cmpl(rcx, InvalidOSREntryBci); __ jcc(Assembler::notEqual, dispatch);
__ jcc(Assembler::equal, dispatch);
// We have the address of an on stack replacement routine in eax // We have the address of an on stack replacement routine in eax
// We need to prepare to execute the OSR method. First we must // We need to prepare to execute the OSR method. First we must

View File

@ -4002,10 +4002,6 @@ bool os::check_heap(bool force) {
return true; return true;
} }
// int local_vsnprintf(char* buf, size_t count, const char* format, va_list args) {
// return ::vsnprintf(buf, count, format, args);
// }
// Is a (classpath) directory empty? // Is a (classpath) directory empty?
bool os::dir_is_empty(const char* path) { bool os::dir_is_empty(const char* path) {
DIR *dir = NULL; DIR *dir = NULL;

View File

@ -269,4 +269,8 @@ inline bool os::supports_monotonic_clock() {
return true; return true;
} }
inline void os::exit(int num) {
::exit(num);
}
#endif // OS_AIX_VM_OS_AIX_INLINE_HPP #endif // OS_AIX_VM_OS_AIX_INLINE_HPP

View File

@ -255,6 +255,7 @@ int generateJvmOffsets(GEN_variant gen_variant) {
printf("\n"); printf("\n");
GEN_OFFS(nmethod, _method); GEN_OFFS(nmethod, _method);
GEN_OFFS(nmethod, _dependencies_offset);
GEN_OFFS(nmethod, _oops_offset); GEN_OFFS(nmethod, _oops_offset);
GEN_OFFS(nmethod, _scopes_data_offset); GEN_OFFS(nmethod, _scopes_data_offset);
GEN_OFFS(nmethod, _scopes_pcs_offset); GEN_OFFS(nmethod, _scopes_pcs_offset);

View File

@ -595,7 +595,7 @@ static int nmethod_info(Nmethod_t *N)
/* scopes_pcs */ /* scopes_pcs */
err = ps_pread(J->P, nm + OFFSET_nmethod_scopes_pcs_offset, &N->scopes_pcs_beg, SZ32); err = ps_pread(J->P, nm + OFFSET_nmethod_scopes_pcs_offset, &N->scopes_pcs_beg, SZ32);
CHECK_FAIL(err); CHECK_FAIL(err);
err = ps_pread(J->P, nm + OFFSET_nmethod_handler_table_offset, &N->scopes_pcs_end, SZ32); err = ps_pread(J->P, nm + OFFSET_nmethod_dependencies_offset, &N->scopes_pcs_end, SZ32);
CHECK_FAIL(err); CHECK_FAIL(err);
/* scopes_data */ /* scopes_data */

File diff suppressed because it is too large Load Diff

View File

@ -30,8 +30,8 @@
// Information about the protection of the page at address '0' on this os. // Information about the protection of the page at address '0' on this os.
static bool zero_page_read_protected() { return true; } static bool zero_page_read_protected() { return true; }
/* pthread_getattr_np comes with BsdThreads-0.9-7 on RedHat 7.1 */ // pthread_getattr_np comes with BsdThreads-0.9-7 on RedHat 7.1
typedef int (*pthread_getattr_func_type) (pthread_t, pthread_attr_t *); typedef int (*pthread_getattr_func_type)(pthread_t, pthread_attr_t *);
#ifdef __APPLE__ #ifdef __APPLE__
// Mac OS X doesn't support clock_gettime. Stub out the type, it is // Mac OS X doesn't support clock_gettime. Stub out the type, it is
@ -108,7 +108,7 @@ class Bsd {
// that file provides extensions to the os class and not the // that file provides extensions to the os class and not the
// Bsd class. // Bsd class.
static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc, static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc,
intptr_t** ret_sp, intptr_t** ret_fp); intptr_t** ret_sp, intptr_t** ret_fp);
// This boolean allows users to forward their own non-matching signals // This boolean allows users to forward their own non-matching signals
// to JVM_handle_bsd_signal, harmlessly. // to JVM_handle_bsd_signal, harmlessly.
@ -147,7 +147,7 @@ class Bsd {
// BsdThreads work-around for 6292965 // BsdThreads work-around for 6292965
static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime); static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime);
private: private:
typedef int (*sched_getcpu_func_t)(void); typedef int (*sched_getcpu_func_t)(void);
typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen); typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen);
typedef int (*numa_max_node_func_t)(void); typedef int (*numa_max_node_func_t)(void);
@ -170,7 +170,7 @@ private:
static void set_numa_tonode_memory(numa_tonode_memory_func_t func) { _numa_tonode_memory = func; } static void set_numa_tonode_memory(numa_tonode_memory_func_t func) { _numa_tonode_memory = func; }
static void set_numa_interleave_memory(numa_interleave_memory_func_t func) { _numa_interleave_memory = func; } static void set_numa_interleave_memory(numa_interleave_memory_func_t func) { _numa_interleave_memory = func; }
static void set_numa_all_nodes(unsigned long* ptr) { _numa_all_nodes = ptr; } static void set_numa_all_nodes(unsigned long* ptr) { _numa_all_nodes = ptr; }
public: public:
static int sched_getcpu() { return _sched_getcpu != NULL ? _sched_getcpu() : -1; } static int sched_getcpu() { return _sched_getcpu != NULL ? _sched_getcpu() : -1; }
static int numa_node_to_cpus(int node, unsigned long *buffer, int bufferlen) { static int numa_node_to_cpus(int node, unsigned long *buffer, int bufferlen) {
return _numa_node_to_cpus != NULL ? _numa_node_to_cpus(node, buffer, bufferlen) : -1; return _numa_node_to_cpus != NULL ? _numa_node_to_cpus(node, buffer, bufferlen) : -1;
@ -190,55 +190,55 @@ public:
class PlatformEvent : public CHeapObj<mtInternal> { class PlatformEvent : public CHeapObj<mtInternal> {
private: private:
double CachePad[4]; // increase odds that _mutex is sole occupant of cache line double CachePad[4]; // increase odds that _mutex is sole occupant of cache line
volatile int _Event; volatile int _Event;
volatile int _nParked; volatile int _nParked;
pthread_mutex_t _mutex[1]; pthread_mutex_t _mutex[1];
pthread_cond_t _cond[1]; pthread_cond_t _cond[1];
double PostPad[2]; double PostPad[2];
Thread * _Assoc; Thread * _Assoc;
public: // TODO-FIXME: make dtor private public: // TODO-FIXME: make dtor private
~PlatformEvent() { guarantee(0, "invariant"); } ~PlatformEvent() { guarantee(0, "invariant"); }
public: public:
PlatformEvent() { PlatformEvent() {
int status; int status;
status = pthread_cond_init (_cond, NULL); status = pthread_cond_init(_cond, NULL);
assert_status(status == 0, status, "cond_init"); assert_status(status == 0, status, "cond_init");
status = pthread_mutex_init (_mutex, NULL); status = pthread_mutex_init(_mutex, NULL);
assert_status(status == 0, status, "mutex_init"); assert_status(status == 0, status, "mutex_init");
_Event = 0; _Event = 0;
_nParked = 0; _nParked = 0;
_Assoc = NULL; _Assoc = NULL;
} }
// Use caution with reset() and fired() -- they may require MEMBARs // Use caution with reset() and fired() -- they may require MEMBARs
void reset() { _Event = 0; } void reset() { _Event = 0; }
int fired() { return _Event; } int fired() { return _Event; }
void park(); void park();
void unpark(); void unpark();
int park(jlong millis); int park(jlong millis);
void SetAssociation(Thread * a) { _Assoc = a; } void SetAssociation(Thread * a) { _Assoc = a; }
}; };
class PlatformParker : public CHeapObj<mtInternal> { class PlatformParker : public CHeapObj<mtInternal> {
protected: protected:
pthread_mutex_t _mutex[1]; pthread_mutex_t _mutex[1];
pthread_cond_t _cond[1]; pthread_cond_t _cond[1];
public: // TODO-FIXME: make dtor private public: // TODO-FIXME: make dtor private
~PlatformParker() { guarantee(0, "invariant"); } ~PlatformParker() { guarantee(0, "invariant"); }
public: public:
PlatformParker() { PlatformParker() {
int status; int status;
status = pthread_cond_init (_cond, NULL); status = pthread_cond_init(_cond, NULL);
assert_status(status == 0, status, "cond_init"); assert_status(status == 0, status, "cond_init");
status = pthread_mutex_init (_mutex, NULL); status = pthread_mutex_init(_mutex, NULL);
assert_status(status == 0, status, "mutex_init"); assert_status(status == 0, status, "mutex_init");
} }
}; };
#endif // OS_BSD_VM_OS_BSD_HPP #endif // OS_BSD_VM_OS_BSD_HPP

View File

@ -274,4 +274,8 @@ inline bool os::supports_monotonic_clock() {
#endif #endif
} }
inline void os::exit(int num) {
::exit(num);
}
#endif // OS_BSD_VM_OS_BSD_INLINE_HPP #endif // OS_BSD_VM_OS_BSD_INLINE_HPP

File diff suppressed because it is too large Load Diff

View File

@ -27,8 +27,8 @@
// Linux_OS defines the interface to Linux operating systems // Linux_OS defines the interface to Linux operating systems
/* pthread_getattr_np comes with LinuxThreads-0.9-7 on RedHat 7.1 */ // pthread_getattr_np comes with LinuxThreads-0.9-7 on RedHat 7.1
typedef int (*pthread_getattr_func_type) (pthread_t, pthread_attr_t *); typedef int (*pthread_getattr_func_type)(pthread_t, pthread_attr_t *);
// Information about the protection of the page at address '0' on this os. // Information about the protection of the page at address '0' on this os.
static bool zero_page_read_protected() { return true; } static bool zero_page_read_protected() { return true; }
@ -151,7 +151,7 @@ class Linux {
// that file provides extensions to the os class and not the // that file provides extensions to the os class and not the
// Linux class. // Linux class.
static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc, static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc,
intptr_t** ret_sp, intptr_t** ret_fp); intptr_t** ret_sp, intptr_t** ret_fp);
// This boolean allows users to forward their own non-matching signals // This boolean allows users to forward their own non-matching signals
// to JVM_handle_linux_signal, harmlessly. // to JVM_handle_linux_signal, harmlessly.
@ -222,10 +222,10 @@ class Linux {
static jlong fast_thread_cpu_time(clockid_t clockid); static jlong fast_thread_cpu_time(clockid_t clockid);
// pthread_cond clock suppport // pthread_cond clock suppport
private: private:
static pthread_condattr_t _condattr[1]; static pthread_condattr_t _condattr[1];
public: public:
static pthread_condattr_t* condAttr() { return _condattr; } static pthread_condattr_t* condAttr() { return _condattr; }
// Stack repair handling // Stack repair handling
@ -235,7 +235,7 @@ class Linux {
// LinuxThreads work-around for 6292965 // LinuxThreads work-around for 6292965
static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime); static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime);
private: private:
typedef int (*sched_getcpu_func_t)(void); typedef int (*sched_getcpu_func_t)(void);
typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen); typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen);
typedef int (*numa_max_node_func_t)(void); typedef int (*numa_max_node_func_t)(void);
@ -262,7 +262,7 @@ private:
static void set_numa_set_bind_policy(numa_set_bind_policy_func_t func) { _numa_set_bind_policy = func; } static void set_numa_set_bind_policy(numa_set_bind_policy_func_t func) { _numa_set_bind_policy = func; }
static void set_numa_all_nodes(unsigned long* ptr) { _numa_all_nodes = ptr; } static void set_numa_all_nodes(unsigned long* ptr) { _numa_all_nodes = ptr; }
static int sched_getcpu_syscall(void); static int sched_getcpu_syscall(void);
public: public:
static int sched_getcpu() { return _sched_getcpu != NULL ? _sched_getcpu() : -1; } static int sched_getcpu() { return _sched_getcpu != NULL ? _sched_getcpu() : -1; }
static int numa_node_to_cpus(int node, unsigned long *buffer, int bufferlen) { static int numa_node_to_cpus(int node, unsigned long *buffer, int bufferlen) {
return _numa_node_to_cpus != NULL ? _numa_node_to_cpus(node, buffer, bufferlen) : -1; return _numa_node_to_cpus != NULL ? _numa_node_to_cpus(node, buffer, bufferlen) : -1;
@ -287,63 +287,63 @@ public:
class PlatformEvent : public CHeapObj<mtInternal> { class PlatformEvent : public CHeapObj<mtInternal> {
private: private:
double CachePad[4]; // increase odds that _mutex is sole occupant of cache line double CachePad[4]; // increase odds that _mutex is sole occupant of cache line
volatile int _Event; volatile int _Event;
volatile int _nParked; volatile int _nParked;
pthread_mutex_t _mutex[1]; pthread_mutex_t _mutex[1];
pthread_cond_t _cond[1]; pthread_cond_t _cond[1];
double PostPad[2]; double PostPad[2];
Thread * _Assoc; Thread * _Assoc;
public: // TODO-FIXME: make dtor private public: // TODO-FIXME: make dtor private
~PlatformEvent() { guarantee(0, "invariant"); } ~PlatformEvent() { guarantee(0, "invariant"); }
public: public:
PlatformEvent() { PlatformEvent() {
int status; int status;
status = pthread_cond_init (_cond, os::Linux::condAttr()); status = pthread_cond_init(_cond, os::Linux::condAttr());
assert_status(status == 0, status, "cond_init"); assert_status(status == 0, status, "cond_init");
status = pthread_mutex_init (_mutex, NULL); status = pthread_mutex_init(_mutex, NULL);
assert_status(status == 0, status, "mutex_init"); assert_status(status == 0, status, "mutex_init");
_Event = 0; _Event = 0;
_nParked = 0; _nParked = 0;
_Assoc = NULL; _Assoc = NULL;
} }
// Use caution with reset() and fired() -- they may require MEMBARs // Use caution with reset() and fired() -- they may require MEMBARs
void reset() { _Event = 0; } void reset() { _Event = 0; }
int fired() { return _Event; } int fired() { return _Event; }
void park(); void park();
void unpark(); void unpark();
int park(jlong millis); // relative timed-wait only int park(jlong millis); // relative timed-wait only
void SetAssociation(Thread * a) { _Assoc = a; } void SetAssociation(Thread * a) { _Assoc = a; }
}; };
class PlatformParker : public CHeapObj<mtInternal> { class PlatformParker : public CHeapObj<mtInternal> {
protected: protected:
enum { enum {
REL_INDEX = 0, REL_INDEX = 0,
ABS_INDEX = 1 ABS_INDEX = 1
}; };
int _cur_index; // which cond is in use: -1, 0, 1 int _cur_index; // which cond is in use: -1, 0, 1
pthread_mutex_t _mutex[1]; pthread_mutex_t _mutex[1];
pthread_cond_t _cond[2]; // one for relative times and one for abs. pthread_cond_t _cond[2]; // one for relative times and one for abs.
public: // TODO-FIXME: make dtor private public: // TODO-FIXME: make dtor private
~PlatformParker() { guarantee(0, "invariant"); } ~PlatformParker() { guarantee(0, "invariant"); }
public: public:
PlatformParker() { PlatformParker() {
int status; int status;
status = pthread_cond_init (&_cond[REL_INDEX], os::Linux::condAttr()); status = pthread_cond_init(&_cond[REL_INDEX], os::Linux::condAttr());
assert_status(status == 0, status, "cond_init rel"); assert_status(status == 0, status, "cond_init rel");
status = pthread_cond_init (&_cond[ABS_INDEX], NULL); status = pthread_cond_init(&_cond[ABS_INDEX], NULL);
assert_status(status == 0, status, "cond_init abs"); assert_status(status == 0, status, "cond_init abs");
status = pthread_mutex_init (_mutex, NULL); status = pthread_mutex_init(_mutex, NULL);
assert_status(status == 0, status, "mutex_init"); assert_status(status == 0, status, "mutex_init");
_cur_index = -1; // mark as unused _cur_index = -1; // mark as unused
} }
}; };
#endif // OS_LINUX_VM_OS_LINUX_HPP #endif // OS_LINUX_VM_OS_LINUX_HPP

View File

@ -263,4 +263,8 @@ inline bool os::supports_monotonic_clock() {
return Linux::_clock_gettime != NULL; return Linux::_clock_gettime != NULL;
} }
inline void os::exit(int num) {
::exit(num);
}
#endif // OS_LINUX_VM_OS_LINUX_INLINE_HPP #endif // OS_LINUX_VM_OS_LINUX_INLINE_HPP

View File

@ -250,6 +250,7 @@ int generateJvmOffsets(GEN_variant gen_variant) {
printf("\n"); printf("\n");
GEN_OFFS(nmethod, _method); GEN_OFFS(nmethod, _method);
GEN_OFFS(nmethod, _dependencies_offset);
GEN_OFFS(nmethod, _metadata_offset); GEN_OFFS(nmethod, _metadata_offset);
GEN_OFFS(nmethod, _scopes_data_offset); GEN_OFFS(nmethod, _scopes_data_offset);
GEN_OFFS(nmethod, _scopes_pcs_offset); GEN_OFFS(nmethod, _scopes_pcs_offset);

View File

@ -595,7 +595,7 @@ static int nmethod_info(Nmethod_t *N)
/* scopes_pcs */ /* scopes_pcs */
err = ps_pread(J->P, nm + OFFSET_nmethod_scopes_pcs_offset, &N->scopes_pcs_beg, SZ32); err = ps_pread(J->P, nm + OFFSET_nmethod_scopes_pcs_offset, &N->scopes_pcs_beg, SZ32);
CHECK_FAIL(err); CHECK_FAIL(err);
err = ps_pread(J->P, nm + OFFSET_nmethod_handler_table_offset, &N->scopes_pcs_end, SZ32); err = ps_pread(J->P, nm + OFFSET_nmethod_dependencies_offset, &N->scopes_pcs_end, SZ32);
CHECK_FAIL(err); CHECK_FAIL(err);
/* scopes_data */ /* scopes_data */

File diff suppressed because it is too large Load Diff

View File

@ -36,10 +36,10 @@ class Solaris {
private: private:
// Support for "new" libthread APIs for getting & setting thread context (2.8) // Support for "new" libthread APIs for getting & setting thread context (2.8)
#define TRS_VALID 0 #define TRS_VALID 0
#define TRS_NONVOLATILE 1 #define TRS_NONVOLATILE 1
#define TRS_LWPID 2 #define TRS_LWPID 2
#define TRS_INVALID 3 #define TRS_INVALID 3
// initialized to libthread or lwp synchronization primitives depending on UseLWPSychronization // initialized to libthread or lwp synchronization primitives depending on UseLWPSychronization
static int_fnP_mutex_tP _mutex_lock; static int_fnP_mutex_tP _mutex_lock;
@ -61,8 +61,8 @@ class Solaris {
typedef id_t lgrp_id_t; typedef id_t lgrp_id_t;
typedef int lgrp_rsrc_t; typedef int lgrp_rsrc_t;
typedef enum lgrp_view { typedef enum lgrp_view {
LGRP_VIEW_CALLER, /* what's available to the caller */ LGRP_VIEW_CALLER, // what's available to the caller
LGRP_VIEW_OS /* what's available to operating system */ LGRP_VIEW_OS // what's available to operating system
} lgrp_view_t; } lgrp_view_t;
typedef uint_t (*getisax_func_t)(uint32_t* array, uint_t n); typedef uint_t (*getisax_func_t)(uint32_t* array, uint_t n);
@ -74,8 +74,8 @@ class Solaris {
typedef int (*lgrp_children_func_t)(lgrp_cookie_t cookie, lgrp_id_t parent, typedef int (*lgrp_children_func_t)(lgrp_cookie_t cookie, lgrp_id_t parent,
lgrp_id_t *lgrp_array, uint_t lgrp_array_size); lgrp_id_t *lgrp_array, uint_t lgrp_array_size);
typedef int (*lgrp_resources_func_t)(lgrp_cookie_t cookie, lgrp_id_t lgrp, typedef int (*lgrp_resources_func_t)(lgrp_cookie_t cookie, lgrp_id_t lgrp,
lgrp_id_t *lgrp_array, uint_t lgrp_array_size, lgrp_id_t *lgrp_array, uint_t lgrp_array_size,
lgrp_rsrc_t type); lgrp_rsrc_t type);
typedef int (*lgrp_nlgrps_func_t)(lgrp_cookie_t cookie); typedef int (*lgrp_nlgrps_func_t)(lgrp_cookie_t cookie);
typedef int (*lgrp_cookie_stale_func_t)(lgrp_cookie_t cookie); typedef int (*lgrp_cookie_stale_func_t)(lgrp_cookie_t cookie);
typedef int (*meminfo_func_t)(const uint64_t inaddr[], int addr_count, typedef int (*meminfo_func_t)(const uint64_t inaddr[], int addr_count,
@ -97,6 +97,8 @@ class Solaris {
static meminfo_func_t _meminfo; static meminfo_func_t _meminfo;
// Large Page Support // Large Page Support
static bool is_valid_page_size(size_t bytes);
static size_t page_size_for_alignment(size_t alignment);
static bool setup_large_pages(caddr_t start, size_t bytes, size_t align); static bool setup_large_pages(caddr_t start, size_t bytes, size_t align);
static void init_thread_fpu_state(void); static void init_thread_fpu_state(void);
@ -128,7 +130,7 @@ class Solaris {
static bool valid_stack_address(Thread* thread, address sp); static bool valid_stack_address(Thread* thread, address sp);
static bool valid_ucontext(Thread* thread, ucontext_t* valid, ucontext_t* suspect); static bool valid_ucontext(Thread* thread, ucontext_t* valid, ucontext_t* suspect);
static ucontext_t* get_valid_uc_in_signal_handler(Thread* thread, static ucontext_t* get_valid_uc_in_signal_handler(Thread* thread,
ucontext_t* uc); ucontext_t* uc);
static ExtendedPC ucontext_get_ExtendedPC(ucontext_t* uc); static ExtendedPC ucontext_get_ExtendedPC(ucontext_t* uc);
static intptr_t* ucontext_get_sp(ucontext_t* uc); static intptr_t* ucontext_get_sp(ucontext_t* uc);
@ -143,7 +145,7 @@ class Solaris {
// os_solaris_i486.hpp and os_solaris_sparc.hpp, but that file // os_solaris_i486.hpp and os_solaris_sparc.hpp, but that file
// provides extensions to the os class and not the Solaris class. // provides extensions to the os class and not the Solaris class.
static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc, static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc,
intptr_t** ret_sp, intptr_t** ret_fp); intptr_t** ret_sp, intptr_t** ret_fp);
static void hotspot_sigmask(Thread* thread); static void hotspot_sigmask(Thread* thread);
@ -216,8 +218,7 @@ class Solaris {
static void set_mutex_destroy(int_fnP_mutex_tP func) { _mutex_destroy = func; } static void set_mutex_destroy(int_fnP_mutex_tP func) { _mutex_destroy = func; }
static void set_mutex_scope(int scope) { _mutex_scope = scope; } static void set_mutex_scope(int scope) { _mutex_scope = scope; }
static int cond_timedwait(cond_t *cv, mutex_t *mx, timestruc_t *abst) static int cond_timedwait(cond_t *cv, mutex_t *mx, timestruc_t *abst) { return _cond_timedwait(cv, mx, abst); }
{ return _cond_timedwait(cv, mx, abst); }
static int cond_wait(cond_t *cv, mutex_t *mx) { return _cond_wait(cv, mx); } static int cond_wait(cond_t *cv, mutex_t *mx) { return _cond_wait(cv, mx); }
static int cond_signal(cond_t *cv) { return _cond_signal(cv); } static int cond_signal(cond_t *cv) { return _cond_signal(cv); }
static int cond_broadcast(cond_t *cv) { return _cond_broadcast(cv); } static int cond_broadcast(cond_t *cv) { return _cond_broadcast(cv); }
@ -225,8 +226,7 @@ class Solaris {
static int cond_destroy(cond_t *cv) { return _cond_destroy(cv); } static int cond_destroy(cond_t *cv) { return _cond_destroy(cv); }
static int cond_scope() { return _cond_scope; } static int cond_scope() { return _cond_scope; }
static void set_cond_timedwait(int_fnP_cond_tP_mutex_tP_timestruc_tP func) static void set_cond_timedwait(int_fnP_cond_tP_mutex_tP_timestruc_tP func) { _cond_timedwait = func; }
{ _cond_timedwait = func; }
static void set_cond_wait(int_fnP_cond_tP_mutex_tP func) { _cond_wait = func; } static void set_cond_wait(int_fnP_cond_tP_mutex_tP func) { _cond_wait = func; }
static void set_cond_signal(int_fnP_cond_tP func) { _cond_signal = func; } static void set_cond_signal(int_fnP_cond_tP func) { _cond_signal = func; }
static void set_cond_broadcast(int_fnP_cond_tP func) { _cond_broadcast = func; } static void set_cond_broadcast(int_fnP_cond_tP func) { _cond_broadcast = func; }
@ -247,9 +247,9 @@ class Solaris {
static id_t lgrp_home(idtype_t type, id_t id) { return _lgrp_home != NULL ? _lgrp_home(type, id) : -1; } static id_t lgrp_home(idtype_t type, id_t id) { return _lgrp_home != NULL ? _lgrp_home(type, id) : -1; }
static lgrp_cookie_t lgrp_init(lgrp_view_t view) { return _lgrp_init != NULL ? _lgrp_init(view) : 0; } static lgrp_cookie_t lgrp_init(lgrp_view_t view) { return _lgrp_init != NULL ? _lgrp_init(view) : 0; }
static int lgrp_fini(lgrp_cookie_t cookie) { return _lgrp_fini != NULL ? _lgrp_fini(cookie) : -1; } static int lgrp_fini(lgrp_cookie_t cookie) { return _lgrp_fini != NULL ? _lgrp_fini(cookie) : -1; }
static lgrp_id_t lgrp_root(lgrp_cookie_t cookie) { return _lgrp_root != NULL ? _lgrp_root(cookie) : -1; }; static lgrp_id_t lgrp_root(lgrp_cookie_t cookie) { return _lgrp_root != NULL ? _lgrp_root(cookie) : -1; }
static int lgrp_children(lgrp_cookie_t cookie, lgrp_id_t parent, static int lgrp_children(lgrp_cookie_t cookie, lgrp_id_t parent,
lgrp_id_t *lgrp_array, uint_t lgrp_array_size) { lgrp_id_t *lgrp_array, uint_t lgrp_array_size) {
return _lgrp_children != NULL ? _lgrp_children(cookie, parent, lgrp_array, lgrp_array_size) : -1; return _lgrp_children != NULL ? _lgrp_children(cookie, parent, lgrp_array, lgrp_array_size) : -1;
} }
static int lgrp_resources(lgrp_cookie_t cookie, lgrp_id_t lgrp, static int lgrp_resources(lgrp_cookie_t cookie, lgrp_id_t lgrp,
@ -269,8 +269,8 @@ class Solaris {
static void set_meminfo(meminfo_func_t func) { _meminfo = func; } static void set_meminfo(meminfo_func_t func) { _meminfo = func; }
static int meminfo (const uint64_t inaddr[], int addr_count, static int meminfo (const uint64_t inaddr[], int addr_count,
const uint_t info_req[], int info_count, const uint_t info_req[], int info_count,
uint64_t outdata[], uint_t validity[]) { uint64_t outdata[], uint_t validity[]) {
return _meminfo != NULL ? _meminfo(inaddr, addr_count, info_req, info_count, return _meminfo != NULL ? _meminfo(inaddr, addr_count, info_req, info_count,
outdata, validity) : -1; outdata, validity) : -1;
} }
@ -300,57 +300,57 @@ class Solaris {
}; };
class PlatformEvent : public CHeapObj<mtInternal> { class PlatformEvent : public CHeapObj<mtInternal> {
private: private:
double CachePad[4]; // increase odds that _mutex is sole occupant of cache line double CachePad[4]; // increase odds that _mutex is sole occupant of cache line
volatile int _Event; volatile int _Event;
int _nParked; int _nParked;
int _pipev[2]; int _pipev[2];
mutex_t _mutex[1]; mutex_t _mutex[1];
cond_t _cond[1]; cond_t _cond[1];
double PostPad[2]; double PostPad[2];
protected: protected:
// Defining a protected ctor effectively gives us an abstract base class. // Defining a protected ctor effectively gives us an abstract base class.
// That is, a PlatformEvent can never be instantiated "naked" but only // That is, a PlatformEvent can never be instantiated "naked" but only
// as a part of a ParkEvent (recall that ParkEvent extends PlatformEvent). // as a part of a ParkEvent (recall that ParkEvent extends PlatformEvent).
// TODO-FIXME: make dtor private // TODO-FIXME: make dtor private
~PlatformEvent() { guarantee(0, "invariant"); } ~PlatformEvent() { guarantee(0, "invariant"); }
PlatformEvent() { PlatformEvent() {
int status; int status;
status = os::Solaris::cond_init(_cond); status = os::Solaris::cond_init(_cond);
assert_status(status == 0, status, "cond_init"); assert_status(status == 0, status, "cond_init");
status = os::Solaris::mutex_init(_mutex); status = os::Solaris::mutex_init(_mutex);
assert_status(status == 0, status, "mutex_init"); assert_status(status == 0, status, "mutex_init");
_Event = 0; _Event = 0;
_nParked = 0; _nParked = 0;
_pipev[0] = _pipev[1] = -1; _pipev[0] = _pipev[1] = -1;
} }
public: public:
// Exercise caution using reset() and fired() -- they may require MEMBARs // Exercise caution using reset() and fired() -- they may require MEMBARs
void reset() { _Event = 0; } void reset() { _Event = 0; }
int fired() { return _Event; } int fired() { return _Event; }
void park(); void park();
int park(jlong millis); int park(jlong millis);
void unpark(); void unpark();
}; };
class PlatformParker : public CHeapObj<mtInternal> { class PlatformParker : public CHeapObj<mtInternal> {
protected: protected:
mutex_t _mutex[1]; mutex_t _mutex[1];
cond_t _cond[1]; cond_t _cond[1];
public: // TODO-FIXME: make dtor private public: // TODO-FIXME: make dtor private
~PlatformParker() { guarantee(0, "invariant"); } ~PlatformParker() { guarantee(0, "invariant"); }
public: public:
PlatformParker() { PlatformParker() {
int status; int status;
status = os::Solaris::cond_init(_cond); status = os::Solaris::cond_init(_cond);
assert_status(status == 0, status, "cond_init"); assert_status(status == 0, status, "cond_init");
status = os::Solaris::mutex_init(_mutex); status = os::Solaris::mutex_init(_mutex);
assert_status(status == 0, status, "mutex_init"); assert_status(status == 0, status, "mutex_init");
} }
}; };
#endif // OS_SOLARIS_VM_OS_SOLARIS_HPP #endif // OS_SOLARIS_VM_OS_SOLARIS_HPP

View File

@ -157,4 +157,8 @@ inline bool os::supports_monotonic_clock() {
return true; return true;
} }
inline void os::exit(int num) {
::exit(num);
}
#endif // OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP #endif // OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP

File diff suppressed because it is too large Load Diff

View File

@ -36,6 +36,7 @@ static const char* path_separator() { return ";"; }
class win32 { class win32 {
friend class os; friend class os;
friend unsigned __stdcall java_start(class Thread*);
protected: protected:
static int _vm_page_size; static int _vm_page_size;
@ -47,6 +48,7 @@ class win32 {
static bool _is_nt; static bool _is_nt;
static bool _is_windows_2003; static bool _is_windows_2003;
static bool _is_windows_server; static bool _is_windows_server;
static bool _has_exit_bug;
static bool _has_performance_count; static bool _has_performance_count;
static void print_windows_version(outputStream* st); static void print_windows_version(outputStream* st);
@ -69,8 +71,12 @@ class win32 {
// load dll from Windows system directory or Windows directory // load dll from Windows system directory or Windows directory
static HINSTANCE load_Windows_dll(const char* name, char *ebuf, int ebuflen); static HINSTANCE load_Windows_dll(const char* name, char *ebuf, int ebuflen);
private: private:
static void initialize_performance_counter(); enum Ept { EPT_THREAD, EPT_PROCESS, EPT_PROCESS_DIE };
// Wrapper around _endthreadex(), exit() and _exit()
static int exit_process_or_thread(Ept what, int exit_code);
static void initialize_performance_counter();
public: public:
// Generic interface: // Generic interface:
@ -88,6 +94,9 @@ class win32 {
// Tells whether the platform is Windows 2003 // Tells whether the platform is Windows 2003
static bool is_windows_2003() { return _is_windows_2003; } static bool is_windows_2003() { return _is_windows_2003; }
// Tells whether there can be the race bug during process exit on this platform
static bool has_exit_bug() { return _has_exit_bug; }
// Returns the byte size of a virtual memory page // Returns the byte size of a virtual memory page
static int vm_page_size() { return _vm_page_size; } static int vm_page_size() { return _vm_page_size; }

View File

@ -100,6 +100,10 @@ inline bool os::supports_monotonic_clock() {
return win32::_has_performance_count; return win32::_has_performance_count;
} }
inline void os::exit(int num) {
win32::exit_process_or_thread(win32::EPT_PROCESS, num);
}
#define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) \ #define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) \
os::win32::call_test_func_with_wrapper(f) os::win32::call_test_func_with_wrapper(f)

View File

@ -1,156 +0,0 @@
import static java.nio.file.FileVisitResult.CONTINUE;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Stack;
import java.util.Vector;
public class FileTreeCreatorVC7 extends FileTreeCreator {
public FileTreeCreatorVC7(Path startDir, Vector<BuildConfig> allConfigs, WinGammaPlatform wg) {
super(startDir, allConfigs, wg);
}
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attr) {
DirAttributes currentFileAttr = attributes.peek().clone();
boolean usePch = false;
boolean disablePch = false;
boolean useIgnore = false;
String fileName = file.getFileName().toString();
// usePch applies to all configs for a file.
if (fileName.equals(BuildConfig.getFieldString(null, "UseToGeneratePch"))) {
usePch = true;
}
for (BuildConfig cfg : allConfigs) {
if (cfg.lookupHashFieldInContext("IgnoreFile", fileName) != null) {
useIgnore = true;
currentFileAttr.setIgnore(cfg);
} else if (cfg.matchesIgnoredPath(file.toAbsolutePath().toString())) {
useIgnore = true;
currentFileAttr.setIgnore(cfg);
}
if (cfg.lookupHashFieldInContext("DisablePch", fileName) != null) {
disablePch = true;
currentFileAttr.setDisablePch(cfg);
}
Vector<String> rv = new Vector<String>();
cfg.collectRelevantVectors(rv, "AdditionalFile");
for(String addFile : rv) {
if (addFile.equals(fileName)) {
// supress any ignore
currentFileAttr.removeFromIgnored(cfg);
}
}
}
if (!useIgnore && !disablePch && !usePch) {
wg.tag("File", new String[] { "RelativePath", vcProjLocation.relativize(file).toString()});
} else {
wg.startTag(
"File",
new String[] { "RelativePath", vcProjLocation.relativize(file).toString()});
for (BuildConfig cfg : allConfigs) {
boolean ignore = currentFileAttr.hasIgnore(cfg);
String [] fileConfAttr;
if (ignore) {
fileConfAttr = new String[] {"Name", cfg.get("Name"), "ExcludedFromBuild", "TRUE" };
} else {
fileConfAttr = new String[] {"Name", cfg.get("Name")};
}
if (!disablePch && !usePch && !ignore) {
continue;
} else if (!disablePch && !usePch) {
wg.tag("FileConfiguration", fileConfAttr);
} else {
wg.startTag("FileConfiguration", fileConfAttr);
if (usePch) {
// usePch always applies to all configs, might not always be so.
wg.tag("Tool", new String[] {
"Name", "VCCLCompilerTool", "UsePrecompiledHeader",
"1" });
assert(!disablePch);
}
if (disablePch) {
if (currentFileAttr.hasDisablePch(cfg)) {
wg.tag("Tool", new String[] {
"Name", "VCCLCompilerTool", "UsePrecompiledHeader",
"0" });
}
assert(!usePch);
}
wg.endTag();
}
}
wg.endTag();
}
return CONTINUE;
}
@Override
public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs)
throws IOException {
Boolean hide = false;
DirAttributes newAttr = attributes.peek().clone();
String rPath;
if (path.toAbsolutePath().toString().equals(this.startDir.toAbsolutePath().toString())){
rPath = startDir.toString();
} else {
rPath = path.getFileName().toString();
}
// check per config ignorePaths!
for (BuildConfig cfg : allConfigs) {
if (cfg.matchesIgnoredPath(path.toAbsolutePath().toString())) {
newAttr.setIgnore(cfg);
}
// Hide is always on all configs. And additional files are never hiddden
if (cfg.matchesHidePath(path.toAbsolutePath().toString())) {
hide = true;
break;
}
}
if (!hide) {
wg.startTag("Filter", new String[] {
"Name", rPath});
attributes.push(newAttr);
return super.preVisitDirectory(path, attrs);
} else {
return FileVisitResult.SKIP_SUBTREE;
}
}
@Override
public FileVisitResult postVisitDirectory(Path dir, IOException exc) {
//end matching attributes set by ignorepath
wg.endTag();
attributes.pop();
return CONTINUE;
}
@Override
public FileVisitResult visitFileFailed(Path file, IOException exc) {
return CONTINUE;
}
public void writeFileTree() throws IOException {
Files.walkFileTree(this.startDir, this);
}
}

View File

@ -33,7 +33,7 @@ import java.util.LinkedList;
import java.util.UUID; import java.util.UUID;
import java.util.Vector; import java.util.Vector;
public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 { public class WinGammaPlatformVC10 extends WinGammaPlatform {
LinkedList <String>filters = new LinkedList<String>(); LinkedList <String>filters = new LinkedList<String>();

View File

@ -1,353 +0,0 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.file.FileSystems;
import java.util.Vector;
public class WinGammaPlatformVC7 extends WinGammaPlatform {
// TODO How about moving all globals configs to its own BuildConfig?
String projectVersion() {
return "7.10";
};
public void writeProjectFile(String projectFileName, String projectName,
Vector<BuildConfig> allConfigs) throws IOException {
System.out.println();
System.out.println(" Writing .vcproj file: " + projectFileName);
// If we got this far without an error, we're safe to actually
// write the .vcproj file
printWriter = new PrintWriter(new FileWriter(projectFileName));
printWriter
.println("<?xml version=\"1.0\" encoding=\"windows-1251\"?>");
startTag("VisualStudioProject", new String[] { "ProjectType",
"Visual C++", "Version", projectVersion(), "Name", projectName,
"ProjectGUID", "{8822CB5C-1C41-41C2-8493-9F6E1994338B}",
"SccProjectName", "", "SccLocalPath", "" });
startTag("Platforms");
tag("Platform",
new String[] { "Name",
(String) BuildConfig.getField(null, "PlatformName") });
endTag();
startTag("Configurations");
for (BuildConfig cfg : allConfigs) {
writeConfiguration(cfg);
}
endTag();
tag("References");
writeFiles(allConfigs);
tag("Globals");
endTag();
printWriter.close();
System.out.println(" Done.");
}
void writeCustomToolConfig(Vector<BuildConfig> configs, String[] customToolAttrs) {
for (BuildConfig cfg : configs) {
startTag("FileConfiguration",
new String[] { "Name", (String) cfg.get("Name") });
tag("Tool", customToolAttrs);
endTag();
}
}
void writeFiles(Vector<BuildConfig> allConfigs) {
// This code assummes there are no config specific includes.
startTag("Files");
String sourceBase = BuildConfig.getFieldString(null, "SourceBase");
// Use first config for all global absolute includes.
BuildConfig baseConfig = allConfigs.firstElement();
Vector<String> rv = new Vector<String>();
// Then use first config for all relative includes
Vector<String> ri = new Vector<String>();
baseConfig.collectRelevantVectors(ri, "RelativeSrcInclude");
for (String f : ri) {
rv.add(sourceBase + Util.sep + f);
}
baseConfig.collectRelevantVectors(rv, "AbsoluteSrcInclude");
handleIncludes(rv, allConfigs);
startTag("Filter", new String[] { "Name", "Resource Files", "Filter",
"ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" });
endTag();
endTag();
}
// Will visit file tree for each include
private void handleIncludes(Vector<String> includes, Vector<BuildConfig> allConfigs) {
for (String path : includes) {
FileTreeCreatorVC7 ftc = new FileTreeCreatorVC7(FileSystems.getDefault().getPath(path) , allConfigs, this);
try {
ftc.writeFileTree();
} catch (IOException e) {
e.printStackTrace();
}
}
}
void writeConfiguration(BuildConfig cfg) {
startTag("Configuration", new String[] { "Name", cfg.get("Name"),
"OutputDirectory", cfg.get("OutputDir"),
"IntermediateDirectory", cfg.get("OutputDir"),
"ConfigurationType", "2", "UseOfMFC", "0",
"ATLMinimizesCRunTimeLibraryUsage", "FALSE" });
tagV("Tool", cfg.getV("CompilerFlags"));
tag("Tool", new String[] { "Name", "VCCustomBuildTool" });
tagV("Tool", cfg.getV("LinkerFlags"));
String postBuildCmd = BuildConfig.getFieldString(null,
"PostbuildCommand");
if (postBuildCmd != null) {
tag("Tool",
new String[] {
"Name",
"VCPostBuildEventTool",
"Description",
BuildConfig
.getFieldString(null, "PostbuildDescription"),
// Caution: String.replace(String,String) is available
// from JDK5 onwards only
"CommandLine",
cfg.expandFormat(postBuildCmd.replace("\t",
"&#x0D;&#x0A;")) });
}
tag("Tool", new String[] { "Name", "VCPreBuildEventTool" });
tag("Tool",
new String[] {
"Name",
"VCPreLinkEventTool",
"Description",
BuildConfig.getFieldString(null, "PrelinkDescription"),
// Caution: String.replace(String,String) is available
// from JDK5 onwards only
"CommandLine",
cfg.expandFormat(BuildConfig.getFieldString(null,
"PrelinkCommand").replace("\t", "&#x0D;&#x0A;")) });
tag("Tool", new String[] { "Name", "VCResourceCompilerTool",
"PreprocessorDefinitions", "NDEBUG", "Culture", "1033" });
tag("Tool", new String[] { "Name", "VCMIDLTool",
"PreprocessorDefinitions", "NDEBUG", "MkTypLibCompatible",
"TRUE", "SuppressStartupBanner", "TRUE", "TargetEnvironment",
"1", "TypeLibraryName",
cfg.get("OutputDir") + Util.sep + "vm.tlb", "HeaderFileName",
"" });
endTag();
}
protected String getProjectExt() {
return ".vcproj";
}
}
class CompilerInterfaceVC7 extends CompilerInterface {
void getBaseCompilerFlags_common(Vector defines, Vector includes,
String outDir, Vector rv) {
// advanced M$ IDE (2003) can only recognize name if it's first or
// second attribute in the tag - go guess
addAttr(rv, "Name", "VCCLCompilerTool");
addAttr(rv, "AdditionalIncludeDirectories", Util.join(",", includes));
addAttr(rv, "PreprocessorDefinitions",
Util.join(";", defines).replace("\"", "&quot;"));
addAttr(rv, "PrecompiledHeaderThrough", "precompiled.hpp");
addAttr(rv, "PrecompiledHeaderFile", outDir + Util.sep + "vm.pch");
addAttr(rv, "AssemblerListingLocation", outDir);
addAttr(rv, "ObjectFile", outDir + Util.sep);
addAttr(rv, "ProgramDataBaseFileName", outDir + Util.sep + "jvm.pdb");
// Set /nologo optin
addAttr(rv, "SuppressStartupBanner", "TRUE");
// Surpass the default /Tc or /Tp. 0 is compileAsDefault
addAttr(rv, "CompileAs", "0");
// Set /W3 option. 3 is warningLevel_3
addAttr(rv, "WarningLevel", "3");
// Set /WX option,
addAttr(rv, "WarnAsError", "TRUE");
// Set /GS option
addAttr(rv, "BufferSecurityCheck", "FALSE");
// Set /Zi option. 3 is debugEnabled
addAttr(rv, "DebugInformationFormat", "3");
}
Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir) {
Vector rv = new Vector();
getBaseCompilerFlags_common(defines, includes, outDir, rv);
// Set /Yu option. 3 is pchUseUsingSpecific
// Note: Starting VC8 pchUseUsingSpecific is 2 !!!
addAttr(rv, "UsePrecompiledHeader", "3");
// Set /EHsc- option
addAttr(rv, "ExceptionHandling", "FALSE");
return rv;
}
Vector getBaseLinkerFlags(String outDir, String outDll, String platformName) {
Vector rv = new Vector();
addAttr(rv, "Name", "VCLinkerTool");
addAttr(rv, "AdditionalOptions",
"/export:JNI_GetDefaultJavaVMInitArgs "
+ "/export:JNI_CreateJavaVM "
+ "/export:JVM_FindClassFromBootLoader "
+ "/export:JNI_GetCreatedJavaVMs "
+ "/export:jio_snprintf /export:jio_printf "
+ "/export:jio_fprintf /export:jio_vfprintf "
+ "/export:jio_vsnprintf "
+ "/export:JVM_GetVersionInfo "
+ "/export:JVM_GetThreadStateNames "
+ "/export:JVM_GetThreadStateValues "
+ "/export:JVM_InitAgentProperties ");
addAttr(rv, "AdditionalDependencies", "Wsock32.lib winmm.lib");
addAttr(rv, "OutputFile", outDll);
// Set /INCREMENTAL option. 1 is linkIncrementalNo
addAttr(rv, "LinkIncremental", "1");
addAttr(rv, "SuppressStartupBanner", "TRUE");
addAttr(rv, "ModuleDefinitionFile", outDir + Util.sep + "vm.def");
addAttr(rv, "ProgramDatabaseFile", outDir + Util.sep + "jvm.pdb");
// Set /SUBSYSTEM option. 2 is subSystemWindows
addAttr(rv, "SubSystem", "2");
addAttr(rv, "BaseAddress", "0x8000000");
addAttr(rv, "ImportLibrary", outDir + Util.sep + "jvm.lib");
if (platformName.equals("Win32")) {
// Set /MACHINE option. 1 is X86
addAttr(rv, "TargetMachine", "1");
} else {
// Set /MACHINE option. 17 is X64
addAttr(rv, "TargetMachine", "17");
}
return rv;
}
void getDebugCompilerFlags_common(String opt, Vector rv) {
// Set /On option
addAttr(rv, "Optimization", opt);
// Set /FR option. 1 is brAllInfo
addAttr(rv, "BrowseInformation", "1");
addAttr(rv, "BrowseInformationFile", "$(IntDir)" + Util.sep);
// Set /MD option. 2 is rtMultiThreadedDLL
addAttr(rv, "RuntimeLibrary", "2");
// Set /Oy- option
addAttr(rv, "OmitFramePointers", "FALSE");
}
Vector getDebugCompilerFlags(String opt, String platformName) {
Vector rv = new Vector();
getDebugCompilerFlags_common(opt, rv);
return rv;
}
Vector getDebugLinkerFlags() {
Vector rv = new Vector();
addAttr(rv, "GenerateDebugInformation", "TRUE"); // == /DEBUG option
return rv;
}
void getAdditionalNonKernelLinkerFlags(Vector rv) {
extAttr(rv, "AdditionalOptions", "/export:AsyncGetCallTrace ");
}
void getProductCompilerFlags_common(Vector rv) {
// Set /O2 option. 2 is optimizeMaxSpeed
addAttr(rv, "Optimization", "2");
// Set /Oy- option
addAttr(rv, "OmitFramePointers", "FALSE");
// Set /Ob option. 1 is expandOnlyInline
addAttr(rv, "InlineFunctionExpansion", "1");
// Set /GF option.
addAttr(rv, "StringPooling", "TRUE");
// Set /MD option. 2 is rtMultiThreadedDLL
addAttr(rv, "RuntimeLibrary", "2");
// Set /Gy option
addAttr(rv, "EnableFunctionLevelLinking", "TRUE");
}
Vector getProductCompilerFlags() {
Vector rv = new Vector();
getProductCompilerFlags_common(rv);
return rv;
}
Vector getProductLinkerFlags() {
Vector rv = new Vector();
// Set /OPT:REF option. 2 is optReferences
addAttr(rv, "OptimizeReferences", "2");
// Set /OPT:optFolding option. 2 is optFolding
addAttr(rv, "EnableCOMDATFolding", "2");
return rv;
}
String getOptFlag() {
return "2";
}
String getNoOptFlag() {
return "0";
}
String makeCfgName(String flavourBuild, String platform) {
return flavourBuild + "|" + platform;
}
}

View File

@ -1,68 +0,0 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
import java.util.Vector;
public class WinGammaPlatformVC8 extends WinGammaPlatformVC7 {
String projectVersion() {return "8.00";};
}
class CompilerInterfaceVC8 extends CompilerInterfaceVC7 {
Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir) {
Vector rv = new Vector();
getBaseCompilerFlags_common(defines,includes, outDir, rv);
// Set /Yu option. 2 is pchUseUsingSpecific
addAttr(rv, "UsePrecompiledHeader", "2");
// Set /EHsc- option. 0 is cppExceptionHandlingNo
addAttr(rv, "ExceptionHandling", "0");
// enable multi process builds
extAttr(rv, "AdditionalOptions", "/MP");
return rv;
}
Vector getDebugCompilerFlags(String opt, String platformName) {
Vector rv = new Vector();
getDebugCompilerFlags_common(opt,rv);
return rv;
}
Vector getProductCompilerFlags() {
Vector rv = new Vector();
getProductCompilerFlags_common(rv);
return rv;
}
}

View File

@ -39,7 +39,6 @@ class ciField : public ResourceObj {
CI_PACKAGE_ACCESS CI_PACKAGE_ACCESS
friend class ciEnv; friend class ciEnv;
friend class ciInstanceKlass; friend class ciInstanceKlass;
friend class NonStaticFieldFiller;
private: private:
ciFlags _flags; ciFlags _flags;

View File

@ -44,7 +44,7 @@
// //
// Loaded instance klass. // Loaded instance klass.
ciInstanceKlass::ciInstanceKlass(KlassHandle h_k) : ciInstanceKlass::ciInstanceKlass(KlassHandle h_k) :
ciKlass(h_k), _non_static_fields(NULL) ciKlass(h_k)
{ {
assert(get_Klass()->oop_is_instance(), "wrong type"); assert(get_Klass()->oop_is_instance(), "wrong type");
assert(get_instanceKlass()->is_loaded(), "must be at least loaded"); assert(get_instanceKlass()->is_loaded(), "must be at least loaded");
@ -407,37 +407,6 @@ ciField* ciInstanceKlass::get_field_by_name(ciSymbol* name, ciSymbol* signature,
return field; return field;
} }
// ------------------------------------------------------------------
// ciInstanceKlass::non_static_fields.
class NonStaticFieldFiller: public FieldClosure {
GrowableArray<ciField*>* _arr;
ciEnv* _curEnv;
public:
NonStaticFieldFiller(ciEnv* curEnv, GrowableArray<ciField*>* arr) :
_curEnv(curEnv), _arr(arr)
{}
void do_field(fieldDescriptor* fd) {
ciField* field = new (_curEnv->arena()) ciField(fd);
_arr->append(field);
}
};
GrowableArray<ciField*>* ciInstanceKlass::non_static_fields() {
if (_non_static_fields == NULL) {
VM_ENTRY_MARK;
ciEnv* curEnv = ciEnv::current();
InstanceKlass* ik = get_instanceKlass();
int max_n_fields = ik->java_fields_count();
Arena* arena = curEnv->arena();
_non_static_fields =
new (arena) GrowableArray<ciField*>(arena, max_n_fields, 0, NULL);
NonStaticFieldFiller filler(curEnv, _non_static_fields);
ik->do_nonstatic_fields(&filler);
}
return _non_static_fields;
}
static int sort_field_by_offset(ciField** a, ciField** b) { static int sort_field_by_offset(ciField** a, ciField** b) {
return (*a)->offset_in_bytes() - (*b)->offset_in_bytes(); return (*a)->offset_in_bytes() - (*b)->offset_in_bytes();

View File

@ -71,8 +71,6 @@ private:
// Itsef: more than one implementors. // Itsef: more than one implementors.
ciInstanceKlass* _implementor; ciInstanceKlass* _implementor;
GrowableArray<ciField*>* _non_static_fields;
protected: protected:
ciInstanceKlass(KlassHandle h_k); ciInstanceKlass(KlassHandle h_k);
ciInstanceKlass(ciSymbol* name, jobject loader, jobject protection_domain); ciInstanceKlass(ciSymbol* name, jobject loader, jobject protection_domain);
@ -181,8 +179,6 @@ public:
ciField* get_field_by_offset(int field_offset, bool is_static); ciField* get_field_by_offset(int field_offset, bool is_static);
ciField* get_field_by_name(ciSymbol* name, ciSymbol* signature, bool is_static); ciField* get_field_by_name(ciSymbol* name, ciSymbol* signature, bool is_static);
GrowableArray<ciField*>* non_static_fields();
// total number of nonstatic fields (including inherited): // total number of nonstatic fields (including inherited):
int nof_nonstatic_fields() { int nof_nonstatic_fields() {
if (_nonstatic_fields == NULL) if (_nonstatic_fields == NULL)

View File

@ -1364,8 +1364,6 @@ void nmethod::invalidate_osr_method() {
// Remove from list of active nmethods // Remove from list of active nmethods
if (method() != NULL) if (method() != NULL)
method()->method_holder()->remove_osr_nmethod(this); method()->method_holder()->remove_osr_nmethod(this);
// Set entry as invalid
_entry_bci = InvalidOSREntryBci;
} }
void nmethod::log_state_change() const { void nmethod::log_state_change() const {

View File

@ -202,13 +202,6 @@ class nmethod : public CodeBlob {
bool _oops_are_stale; // indicates that it's no longer safe to access oops section bool _oops_are_stale; // indicates that it's no longer safe to access oops section
#endif #endif
enum { in_use = 0, // executable nmethod
not_entrant = 1, // marked for deoptimization but activations may still exist,
// will be transformed to zombie when all activations are gone
zombie = 2, // no activations exist, nmethod is ready for purge
unloaded = 3 }; // there should be no activations, should not be called,
// will be transformed to zombie immediately
jbyte _scavenge_root_state; jbyte _scavenge_root_state;
#if INCLUDE_RTM_OPT #if INCLUDE_RTM_OPT
@ -431,6 +424,13 @@ class nmethod : public CodeBlob {
address entry_point() const { return _entry_point; } // normal entry point address entry_point() const { return _entry_point; } // normal entry point
address verified_entry_point() const { return _verified_entry_point; } // if klass is correct address verified_entry_point() const { return _verified_entry_point; } // if klass is correct
enum { in_use = 0, // executable nmethod
not_entrant = 1, // marked for deoptimization but activations may still exist,
// will be transformed to zombie when all activations are gone
zombie = 2, // no activations exist, nmethod is ready for purge
unloaded = 3 }; // there should be no activations, should not be called,
// will be transformed to zombie immediately
// flag accessing and manipulation // flag accessing and manipulation
bool is_in_use() const { return _state == in_use; } bool is_in_use() const { return _state == in_use; }
bool is_alive() const { return _state == in_use || _state == not_entrant; } bool is_alive() const { return _state == in_use || _state == not_entrant; }
@ -759,7 +759,7 @@ public:
// support for code generation // support for code generation
static int verified_entry_point_offset() { return offset_of(nmethod, _verified_entry_point); } static int verified_entry_point_offset() { return offset_of(nmethod, _verified_entry_point); }
static int osr_entry_point_offset() { return offset_of(nmethod, _osr_entry_point); } static int osr_entry_point_offset() { return offset_of(nmethod, _osr_entry_point); }
static int entry_bci_offset() { return offset_of(nmethod, _entry_bci); } static int state_offset() { return offset_of(nmethod, _state); }
// RedefineClasses support. Mark metadata in nmethods as on_stack so that // RedefineClasses support. Mark metadata in nmethods as on_stack so that
// redefine classes doesn't purge it. // redefine classes doesn't purge it.

View File

@ -4737,7 +4737,7 @@ void G1PrintRegionLivenessInfoClosure::get_hum_bytes(size_t* used_bytes,
} }
bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) { bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) {
const char* type = ""; const char* type = r->get_type_str();
HeapWord* bottom = r->bottom(); HeapWord* bottom = r->bottom();
HeapWord* end = r->end(); HeapWord* end = r->end();
size_t capacity_bytes = r->capacity(); size_t capacity_bytes = r->capacity();
@ -4748,15 +4748,7 @@ bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) {
size_t remset_bytes = r->rem_set()->mem_size(); size_t remset_bytes = r->rem_set()->mem_size();
size_t strong_code_roots_bytes = r->rem_set()->strong_code_roots_mem_size(); size_t strong_code_roots_bytes = r->rem_set()->strong_code_roots_mem_size();
if (r->used() == 0) { if (r->startsHumongous()) {
type = "FREE";
} else if (r->is_survivor()) {
type = "SURV";
} else if (r->is_young()) {
type = "EDEN";
} else if (r->startsHumongous()) {
type = "HUMS";
assert(_hum_used_bytes == 0 && _hum_capacity_bytes == 0 && assert(_hum_used_bytes == 0 && _hum_capacity_bytes == 0 &&
_hum_prev_live_bytes == 0 && _hum_next_live_bytes == 0, _hum_prev_live_bytes == 0 && _hum_next_live_bytes == 0,
"they should have been zeroed after the last time we used them"); "they should have been zeroed after the last time we used them");
@ -4769,12 +4761,9 @@ bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) {
&prev_live_bytes, &next_live_bytes); &prev_live_bytes, &next_live_bytes);
end = bottom + HeapRegion::GrainWords; end = bottom + HeapRegion::GrainWords;
} else if (r->continuesHumongous()) { } else if (r->continuesHumongous()) {
type = "HUMC";
get_hum_bytes(&used_bytes, &capacity_bytes, get_hum_bytes(&used_bytes, &capacity_bytes,
&prev_live_bytes, &next_live_bytes); &prev_live_bytes, &next_live_bytes);
assert(end == bottom + HeapRegion::GrainWords, "invariant"); assert(end == bottom + HeapRegion::GrainWords, "invariant");
} else {
type = "OLD";
} }
_total_used_bytes += used_bytes; _total_used_bytes += used_bytes;

View File

@ -211,7 +211,10 @@ void YoungList::empty_list(HeapRegion* list) {
HeapRegion* next = list->get_next_young_region(); HeapRegion* next = list->get_next_young_region();
list->set_next_young_region(NULL); list->set_next_young_region(NULL);
list->uninstall_surv_rate_group(); list->uninstall_surv_rate_group();
list->set_not_young(); // This is called before a Full GC and all the non-empty /
// non-humongous regions at the end of the Full GC will end up as
// old anyway.
list->set_old();
list = next; list = next;
} }
} }
@ -370,7 +373,7 @@ void YoungList::print() {
if (curr == NULL) if (curr == NULL)
gclog_or_tty->print_cr(" empty"); gclog_or_tty->print_cr(" empty");
while (curr != NULL) { while (curr != NULL) {
gclog_or_tty->print_cr(" "HR_FORMAT", P: "PTR_FORMAT "N: "PTR_FORMAT", age: %4d", gclog_or_tty->print_cr(" "HR_FORMAT", P: "PTR_FORMAT ", N: "PTR_FORMAT", age: %4d",
HR_FORMAT_PARAMS(curr), HR_FORMAT_PARAMS(curr),
curr->prev_top_at_mark_start(), curr->prev_top_at_mark_start(),
curr->next_top_at_mark_start(), curr->next_top_at_mark_start(),
@ -802,6 +805,7 @@ HeapWord* G1CollectedHeap::humongous_obj_allocate(size_t word_size) {
#ifdef ASSERT #ifdef ASSERT
for (uint i = first; i < first + obj_regions; ++i) { for (uint i = first; i < first + obj_regions; ++i) {
HeapRegion* hr = region_at(i); HeapRegion* hr = region_at(i);
assert(hr->is_free(), "sanity");
assert(hr->is_empty(), "sanity"); assert(hr->is_empty(), "sanity");
assert(is_on_master_free_list(hr), "sanity"); assert(is_on_master_free_list(hr), "sanity");
} }
@ -1225,21 +1229,21 @@ private:
public: public:
bool doHeapRegion(HeapRegion* hr) { bool doHeapRegion(HeapRegion* hr) {
assert(!hr->is_young(), "not expecting to find young regions"); assert(!hr->is_young(), "not expecting to find young regions");
// We only generate output for non-empty regions. if (hr->is_free()) {
if (!hr->is_empty()) { // We only generate output for non-empty regions.
if (!hr->isHumongous()) { } else if (hr->startsHumongous()) {
_hr_printer->post_compaction(hr, G1HRPrinter::Old); if (hr->region_num() == 1) {
} else if (hr->startsHumongous()) { // single humongous region
if (hr->region_num() == 1) { _hr_printer->post_compaction(hr, G1HRPrinter::SingleHumongous);
// single humongous region
_hr_printer->post_compaction(hr, G1HRPrinter::SingleHumongous);
} else {
_hr_printer->post_compaction(hr, G1HRPrinter::StartsHumongous);
}
} else { } else {
assert(hr->continuesHumongous(), "only way to get here"); _hr_printer->post_compaction(hr, G1HRPrinter::StartsHumongous);
_hr_printer->post_compaction(hr, G1HRPrinter::ContinuesHumongous);
} }
} else if (hr->continuesHumongous()) {
_hr_printer->post_compaction(hr, G1HRPrinter::ContinuesHumongous);
} else if (hr->is_old()) {
_hr_printer->post_compaction(hr, G1HRPrinter::Old);
} else {
ShouldNotReachHere();
} }
return false; return false;
} }
@ -1477,9 +1481,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
// Discard all rset updates // Discard all rset updates
JavaThread::dirty_card_queue_set().abandon_logs(); JavaThread::dirty_card_queue_set().abandon_logs();
assert(!G1DeferredRSUpdate assert(dirty_card_queue_set().completed_buffers_num() == 0, "DCQS should be empty");
|| (G1DeferredRSUpdate &&
(dirty_card_queue_set().completed_buffers_num() == 0)), "Should not be any");
_young_list->reset_sampled_info(); _young_list->reset_sampled_info();
// At this point there should be no regions in the // At this point there should be no regions in the
@ -2090,15 +2092,13 @@ jint G1CollectedHeap::initialize() {
concurrent_g1_refine()->red_zone(), concurrent_g1_refine()->red_zone(),
Shared_DirtyCardQ_lock); Shared_DirtyCardQ_lock);
if (G1DeferredRSUpdate) { dirty_card_queue_set().initialize(NULL, // Should never be called by the Java code
dirty_card_queue_set().initialize(NULL, // Should never be called by the Java code DirtyCardQ_CBL_mon,
DirtyCardQ_CBL_mon, DirtyCardQ_FL_lock,
DirtyCardQ_FL_lock, -1, // never trigger processing
-1, // never trigger processing -1, // no limit on length
-1, // no limit on length Shared_DirtyCardQ_lock,
Shared_DirtyCardQ_lock, &JavaThread::dirty_card_queue_set());
&JavaThread::dirty_card_queue_set());
}
// Initialize the card queue set used to hold cards containing // Initialize the card queue set used to hold cards containing
// references into the collection set. // references into the collection set.
@ -2121,8 +2121,8 @@ jint G1CollectedHeap::initialize() {
// We'll re-use the same region whether the alloc region will // We'll re-use the same region whether the alloc region will
// require BOT updates or not and, if it doesn't, then a non-young // require BOT updates or not and, if it doesn't, then a non-young
// region will complain that it cannot support allocations without // region will complain that it cannot support allocations without
// BOT updates. So we'll tag the dummy region as young to avoid that. // BOT updates. So we'll tag the dummy region as eden to avoid that.
dummy_region->set_young(); dummy_region->set_eden();
// Make sure it's full. // Make sure it's full.
dummy_region->set_top(dummy_region->end()); dummy_region->set_top(dummy_region->end());
G1AllocRegion::setup(this, dummy_region); G1AllocRegion::setup(this, dummy_region);
@ -4031,14 +4031,6 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
if (_hr_printer.is_active()) { if (_hr_printer.is_active()) {
HeapRegion* hr = g1_policy()->collection_set(); HeapRegion* hr = g1_policy()->collection_set();
while (hr != NULL) { while (hr != NULL) {
G1HRPrinter::RegionType type;
if (!hr->is_young()) {
type = G1HRPrinter::Old;
} else if (hr->is_survivor()) {
type = G1HRPrinter::Survivor;
} else {
type = G1HRPrinter::Eden;
}
_hr_printer.cset(hr); _hr_printer.cset(hr);
hr = hr->next_in_collection_set(); hr = hr->next_in_collection_set();
} }
@ -5393,7 +5385,6 @@ class G1RedirtyLoggedCardsTask : public AbstractGangTask {
}; };
void G1CollectedHeap::redirty_logged_cards() { void G1CollectedHeap::redirty_logged_cards() {
guarantee(G1DeferredRSUpdate, "Must only be called when using deferred RS updates.");
double redirty_logged_cards_start = os::elapsedTime(); double redirty_logged_cards_start = os::elapsedTime();
uint n_workers = (G1CollectedHeap::use_parallel_gc_threads() ? uint n_workers = (G1CollectedHeap::use_parallel_gc_threads() ?
@ -5448,9 +5439,10 @@ public:
void do_oop(narrowOop* p) { guarantee(false, "Not needed"); } void do_oop(narrowOop* p) { guarantee(false, "Not needed"); }
void do_oop(oop* p) { void do_oop(oop* p) {
oop obj = *p; oop obj = *p;
assert(obj != NULL, "the caller should have filtered out NULL values");
G1CollectedHeap::in_cset_state_t cset_state = _g1->in_cset_state(obj); G1CollectedHeap::in_cset_state_t cset_state = _g1->in_cset_state(obj);
if (obj == NULL || cset_state == G1CollectedHeap::InNeither) { if (cset_state == G1CollectedHeap::InNeither) {
return; return;
} }
if (cset_state == G1CollectedHeap::InCSet) { if (cset_state == G1CollectedHeap::InCSet) {
@ -6052,9 +6044,7 @@ void G1CollectedHeap::evacuate_collection_set(EvacuationInfo& evacuation_info) {
// RSets. // RSets.
enqueue_discovered_references(n_workers); enqueue_discovered_references(n_workers);
if (G1DeferredRSUpdate) { redirty_logged_cards();
redirty_logged_cards();
}
COMPILER2_PRESENT(DerivedPointerTable::update_pointers()); COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
} }
@ -6062,7 +6052,7 @@ void G1CollectedHeap::free_region(HeapRegion* hr,
FreeRegionList* free_list, FreeRegionList* free_list,
bool par, bool par,
bool locked) { bool locked) {
assert(!hr->isHumongous(), "this is only for non-humongous regions"); assert(!hr->is_free(), "the region should not be free");
assert(!hr->is_empty(), "the region should not be empty"); assert(!hr->is_empty(), "the region should not be empty");
assert(_hrm.is_available(hr->hrm_index()), "region should be committed"); assert(_hrm.is_available(hr->hrm_index()), "region should be committed");
assert(free_list != NULL, "pre-condition"); assert(free_list != NULL, "pre-condition");
@ -6092,14 +6082,14 @@ void G1CollectedHeap::free_humongous_region(HeapRegion* hr,
// We need to read this before we make the region non-humongous, // We need to read this before we make the region non-humongous,
// otherwise the information will be gone. // otherwise the information will be gone.
uint last_index = hr->last_hc_index(); uint last_index = hr->last_hc_index();
hr->set_notHumongous(); hr->clear_humongous();
free_region(hr, free_list, par); free_region(hr, free_list, par);
uint i = hr->hrm_index() + 1; uint i = hr->hrm_index() + 1;
while (i < last_index) { while (i < last_index) {
HeapRegion* curr_hr = region_at(i); HeapRegion* curr_hr = region_at(i);
assert(curr_hr->continuesHumongous(), "invariant"); assert(curr_hr->continuesHumongous(), "invariant");
curr_hr->set_notHumongous(); curr_hr->clear_humongous();
free_region(curr_hr, free_list, par); free_region(curr_hr, free_list, par);
i += 1; i += 1;
} }
@ -6407,9 +6397,9 @@ void G1CollectedHeap::free_collection_set(HeapRegion* cs_head, EvacuationInfo& e
if (cur->is_young()) { if (cur->is_young()) {
cur->set_young_index_in_cset(-1); cur->set_young_index_in_cset(-1);
} }
cur->set_not_young();
cur->set_evacuation_failed(false); cur->set_evacuation_failed(false);
// The region is now considered to be old. // The region is now considered to be old.
cur->set_old();
_old_set.add(cur); _old_set.add(cur);
evacuation_info.increment_collectionset_used_after(cur->used()); evacuation_info.increment_collectionset_used_after(cur->used());
} }
@ -6696,16 +6686,15 @@ public:
TearDownRegionSetsClosure(HeapRegionSet* old_set) : _old_set(old_set) { } TearDownRegionSetsClosure(HeapRegionSet* old_set) : _old_set(old_set) { }
bool doHeapRegion(HeapRegion* r) { bool doHeapRegion(HeapRegion* r) {
if (r->is_empty()) { if (r->is_old()) {
// We ignore empty regions, we'll empty the free list afterwards
} else if (r->is_young()) {
// We ignore young regions, we'll empty the young list afterwards
} else if (r->isHumongous()) {
// We ignore humongous regions, we're not tearing down the
// humongous region set
} else {
// The rest should be old
_old_set->remove(r); _old_set->remove(r);
} else {
// We ignore free regions, we'll empty the free list afterwards.
// We ignore young regions, we'll empty the young list afterwards.
// We ignore humongous regions, we're not tearing down the
// humongous regions set.
assert(r->is_free() || r->is_young() || r->isHumongous(),
"it cannot be another type");
} }
return false; return false;
} }
@ -6755,6 +6744,7 @@ public:
if (r->is_empty()) { if (r->is_empty()) {
// Add free regions to the free list // Add free regions to the free list
r->set_free();
_hrm->insert_into_free_list(r); _hrm->insert_into_free_list(r);
} else if (!_free_list_only) { } else if (!_free_list_only) {
assert(!r->is_young(), "we should not come across young regions"); assert(!r->is_young(), "we should not come across young regions");
@ -6762,7 +6752,11 @@ public:
if (r->isHumongous()) { if (r->isHumongous()) {
// We ignore humongous regions, we left the humongous set unchanged // We ignore humongous regions, we left the humongous set unchanged
} else { } else {
// The rest should be old, add them to the old set // Objects that were compacted would have ended up on regions
// that were previously old or free.
assert(r->is_free() || r->is_old(), "invariant");
// We now consider them old, so register as such.
r->set_old();
_old_set->add(r); _old_set->add(r);
} }
_total_used += r->used(); _total_used += r->used();
@ -6829,7 +6823,7 @@ HeapRegion* G1CollectedHeap::new_mutator_alloc_region(size_t word_size,
void G1CollectedHeap::retire_mutator_alloc_region(HeapRegion* alloc_region, void G1CollectedHeap::retire_mutator_alloc_region(HeapRegion* alloc_region,
size_t allocated_bytes) { size_t allocated_bytes) {
assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */); assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */);
assert(alloc_region->is_young(), "all mutator alloc regions should be young"); assert(alloc_region->is_eden(), "all mutator alloc regions should be eden");
g1_policy()->add_region_to_incremental_cset_lhs(alloc_region); g1_policy()->add_region_to_incremental_cset_lhs(alloc_region);
_summary_bytes_used += allocated_bytes; _summary_bytes_used += allocated_bytes;
@ -6888,6 +6882,7 @@ HeapRegion* G1CollectedHeap::new_gc_alloc_region(size_t word_size,
_hr_printer.alloc(new_alloc_region, G1HRPrinter::Survivor); _hr_printer.alloc(new_alloc_region, G1HRPrinter::Survivor);
check_bitmaps("Survivor Region Allocation", new_alloc_region); check_bitmaps("Survivor Region Allocation", new_alloc_region);
} else { } else {
new_alloc_region->set_old();
_hr_printer.alloc(new_alloc_region, G1HRPrinter::Old); _hr_printer.alloc(new_alloc_region, G1HRPrinter::Old);
check_bitmaps("Old Region Allocation", new_alloc_region); check_bitmaps("Old Region Allocation", new_alloc_region);
} }
@ -6999,9 +6994,11 @@ public:
} else if (hr->is_empty()) { } else if (hr->is_empty()) {
assert(_hrm->is_free(hr), err_msg("Heap region %u is empty but not on the free list.", hr->hrm_index())); assert(_hrm->is_free(hr), err_msg("Heap region %u is empty but not on the free list.", hr->hrm_index()));
_free_count.increment(1u, hr->capacity()); _free_count.increment(1u, hr->capacity());
} else { } else if (hr->is_old()) {
assert(hr->containing_set() == _old_set, err_msg("Heap region %u is old but not in the old set.", hr->hrm_index())); assert(hr->containing_set() == _old_set, err_msg("Heap region %u is old but not in the old set.", hr->hrm_index()));
_old_count.increment(1u, hr->capacity()); _old_count.increment(1u, hr->capacity());
} else {
ShouldNotReachHere();
} }
return false; return false;
} }

View File

@ -1665,7 +1665,7 @@ G1CollectorPolicy::record_concurrent_mark_cleanup_end(int no_of_gc_threads) {
// Add the heap region at the head of the non-incremental collection set // Add the heap region at the head of the non-incremental collection set
void G1CollectorPolicy::add_old_region_to_cset(HeapRegion* hr) { void G1CollectorPolicy::add_old_region_to_cset(HeapRegion* hr) {
assert(_inc_cset_build_state == Active, "Precondition"); assert(_inc_cset_build_state == Active, "Precondition");
assert(!hr->is_young(), "non-incremental add of young region"); assert(hr->is_old(), "the region should be old");
assert(!hr->in_collection_set(), "should not already be in the CSet"); assert(!hr->in_collection_set(), "should not already be in the CSet");
hr->set_in_collection_set(true); hr->set_in_collection_set(true);
@ -1811,7 +1811,7 @@ void G1CollectorPolicy::add_region_to_incremental_cset_common(HeapRegion* hr) {
// Add the region at the RHS of the incremental cset // Add the region at the RHS of the incremental cset
void G1CollectorPolicy::add_region_to_incremental_cset_rhs(HeapRegion* hr) { void G1CollectorPolicy::add_region_to_incremental_cset_rhs(HeapRegion* hr) {
// We should only ever be appending survivors at the end of a pause // We should only ever be appending survivors at the end of a pause
assert( hr->is_survivor(), "Logic"); assert(hr->is_survivor(), "Logic");
// Do the 'common' stuff // Do the 'common' stuff
add_region_to_incremental_cset_common(hr); add_region_to_incremental_cset_common(hr);
@ -1829,7 +1829,7 @@ void G1CollectorPolicy::add_region_to_incremental_cset_rhs(HeapRegion* hr) {
// Add the region to the LHS of the incremental cset // Add the region to the LHS of the incremental cset
void G1CollectorPolicy::add_region_to_incremental_cset_lhs(HeapRegion* hr) { void G1CollectorPolicy::add_region_to_incremental_cset_lhs(HeapRegion* hr) {
// Survivors should be added to the RHS at the end of a pause // Survivors should be added to the RHS at the end of a pause
assert(!hr->is_survivor(), "Logic"); assert(hr->is_eden(), "Logic");
// Do the 'common' stuff // Do the 'common' stuff
add_region_to_incremental_cset_common(hr); add_region_to_incremental_cset_common(hr);
@ -1989,7 +1989,11 @@ void G1CollectorPolicy::finalize_cset(double target_pause_time_ms, EvacuationInf
HeapRegion* hr = young_list->first_survivor_region(); HeapRegion* hr = young_list->first_survivor_region();
while (hr != NULL) { while (hr != NULL) {
assert(hr->is_survivor(), "badly formed young list"); assert(hr->is_survivor(), "badly formed young list");
hr->set_young(); // There is a convention that all the young regions in the CSet
// are tagged as "eden", so we do this for the survivors here. We
// use the special set_eden_pre_gc() as it doesn't check that the
// region is free (which is not the case here).
hr->set_eden_pre_gc();
hr = hr->get_next_young_region(); hr = hr->get_next_young_region();
} }

View File

@ -299,13 +299,13 @@ public:
// Accessors // Accessors
void set_region_eden(HeapRegion* hr, int young_index_in_cset) { void set_region_eden(HeapRegion* hr, int young_index_in_cset) {
hr->set_young(); hr->set_eden();
hr->install_surv_rate_group(_short_lived_surv_rate_group); hr->install_surv_rate_group(_short_lived_surv_rate_group);
hr->set_young_index_in_cset(young_index_in_cset); hr->set_young_index_in_cset(young_index_in_cset);
} }
void set_region_survivor(HeapRegion* hr, int young_index_in_cset) { void set_region_survivor(HeapRegion* hr, int young_index_in_cset) {
assert(hr->is_young() && hr->is_survivor(), "pre-condition"); assert(hr->is_survivor(), "pre-condition");
hr->install_surv_rate_group(_survivor_surv_rate_group); hr->install_surv_rate_group(_survivor_surv_rate_group);
hr->set_young_index_in_cset(young_index_in_cset); hr->set_young_index_in_cset(young_index_in_cset);
} }

View File

@ -176,15 +176,17 @@ public:
class RemoveSelfForwardPtrHRClosure: public HeapRegionClosure { class RemoveSelfForwardPtrHRClosure: public HeapRegionClosure {
G1CollectedHeap* _g1h; G1CollectedHeap* _g1h;
ConcurrentMark* _cm; ConcurrentMark* _cm;
OopsInHeapRegionClosure *_update_rset_cl;
uint _worker_id; uint _worker_id;
DirtyCardQueue _dcq;
UpdateRSetDeferred _update_rset_cl;
public: public:
RemoveSelfForwardPtrHRClosure(G1CollectedHeap* g1h, RemoveSelfForwardPtrHRClosure(G1CollectedHeap* g1h,
OopsInHeapRegionClosure* update_rset_cl,
uint worker_id) : uint worker_id) :
_g1h(g1h), _update_rset_cl(update_rset_cl), _g1h(g1h), _dcq(&g1h->dirty_card_queue_set()), _update_rset_cl(g1h, &_dcq),
_worker_id(worker_id), _cm(_g1h->concurrent_mark()) { } _worker_id(worker_id), _cm(_g1h->concurrent_mark()) {
}
bool doHeapRegion(HeapRegion *hr) { bool doHeapRegion(HeapRegion *hr) {
bool during_initial_mark = _g1h->g1_policy()->during_initial_mark_pause(); bool during_initial_mark = _g1h->g1_policy()->during_initial_mark_pause();
@ -195,7 +197,7 @@ public:
if (hr->claimHeapRegion(HeapRegion::ParEvacFailureClaimValue)) { if (hr->claimHeapRegion(HeapRegion::ParEvacFailureClaimValue)) {
if (hr->evacuation_failed()) { if (hr->evacuation_failed()) {
RemoveSelfForwardPtrObjClosure rspc(_g1h, _cm, hr, _update_rset_cl, RemoveSelfForwardPtrObjClosure rspc(_g1h, _cm, hr, &_update_rset_cl,
during_initial_mark, during_initial_mark,
during_conc_mark, during_conc_mark,
_worker_id); _worker_id);
@ -214,7 +216,7 @@ public:
// whenever this might be required in the future. // whenever this might be required in the future.
hr->rem_set()->reset_for_par_iteration(); hr->rem_set()->reset_for_par_iteration();
hr->reset_bot(); hr->reset_bot();
_update_rset_cl->set_region(hr); _update_rset_cl.set_region(hr);
hr->object_iterate(&rspc); hr->object_iterate(&rspc);
hr->rem_set()->clean_strong_code_roots(hr); hr->rem_set()->clean_strong_code_roots(hr);
@ -238,16 +240,7 @@ public:
_g1h(g1h) { } _g1h(g1h) { }
void work(uint worker_id) { void work(uint worker_id) {
UpdateRSetImmediate immediate_update(_g1h->g1_rem_set()); RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, worker_id);
DirtyCardQueue dcq(&_g1h->dirty_card_queue_set());
UpdateRSetDeferred deferred_update(_g1h, &dcq);
OopsInHeapRegionClosure *update_rset_cl = &deferred_update;
if (!G1DeferredRSUpdate) {
update_rset_cl = &immediate_update;
}
RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, update_rset_cl, worker_id);
HeapRegion* hr = _g1h->start_cset_region_for_worker(worker_id); HeapRegion* hr = _g1h->start_cset_region_for_worker(worker_id);
_g1h->collection_set_iterate_from(hr, &rsfp_cl); _g1h->collection_set_iterate_from(hr, &rsfp_cl);

View File

@ -237,10 +237,8 @@ void G1GCPhaseTimes::note_gc_end() {
_last_gc_worker_times_ms.verify(); _last_gc_worker_times_ms.verify();
_last_gc_worker_other_times_ms.verify(); _last_gc_worker_other_times_ms.verify();
if (G1DeferredRSUpdate) { _last_redirty_logged_cards_time_ms.verify();
_last_redirty_logged_cards_time_ms.verify(); _last_redirty_logged_cards_processed_cards.verify();
_last_redirty_logged_cards_processed_cards.verify();
}
} }
void G1GCPhaseTimes::note_string_dedup_fixup_start() { void G1GCPhaseTimes::note_string_dedup_fixup_start() {
@ -352,12 +350,10 @@ void G1GCPhaseTimes::print(double pause_time_sec) {
_recorded_non_young_cset_choice_time_ms)); _recorded_non_young_cset_choice_time_ms));
print_stats(2, "Ref Proc", _cur_ref_proc_time_ms); print_stats(2, "Ref Proc", _cur_ref_proc_time_ms);
print_stats(2, "Ref Enq", _cur_ref_enq_time_ms); print_stats(2, "Ref Enq", _cur_ref_enq_time_ms);
if (G1DeferredRSUpdate) { print_stats(2, "Redirty Cards", _recorded_redirty_logged_cards_time_ms);
print_stats(2, "Redirty Cards", _recorded_redirty_logged_cards_time_ms); if (G1Log::finest()) {
if (G1Log::finest()) { _last_redirty_logged_cards_time_ms.print(3, "Parallel Redirty");
_last_redirty_logged_cards_time_ms.print(3, "Parallel Redirty"); _last_redirty_logged_cards_processed_cards.print(3, "Redirtied Cards");
_last_redirty_logged_cards_processed_cards.print(3, "Redirtied Cards");
}
} }
if (G1ReclaimDeadHumongousObjectsAtYoungGC) { if (G1ReclaimDeadHumongousObjectsAtYoungGC) {
print_stats(2, "Humongous Reclaim", _cur_fast_reclaim_humongous_time_ms); print_stats(2, "Humongous Reclaim", _cur_fast_reclaim_humongous_time_ms);

View File

@ -27,7 +27,6 @@
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp" #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1HotCardCache.hpp" #include "gc_implementation/g1/g1HotCardCache.hpp"
#include "gc_implementation/g1/g1RemSet.hpp" #include "gc_implementation/g1/g1RemSet.hpp"
#include "gc_implementation/g1/heapRegion.hpp"
#include "runtime/atomic.inline.hpp" #include "runtime/atomic.inline.hpp"
G1HotCardCache::G1HotCardCache(G1CollectedHeap *g1h): G1HotCardCache::G1HotCardCache(G1CollectedHeap *g1h):
@ -136,7 +135,6 @@ void G1HotCardCache::drain(uint worker_i,
} }
void G1HotCardCache::reset_card_counts(HeapRegion* hr) { void G1HotCardCache::reset_card_counts(HeapRegion* hr) {
assert(!hr->isHumongous(), "Should have been cleared");
_card_counts.clear_region(hr); _card_counts.clear_region(hr);
} }

View File

@ -84,20 +84,6 @@ class G1ParScanThreadState : public StackObj {
DirtyCardQueue& dirty_card_queue() { return _dcq; } DirtyCardQueue& dirty_card_queue() { return _dcq; }
G1SATBCardTableModRefBS* ctbs() { return _ct_bs; } G1SATBCardTableModRefBS* ctbs() { return _ct_bs; }
template <class T> inline void immediate_rs_update(HeapRegion* from, T* p, int tid);
template <class T> void deferred_rs_update(HeapRegion* from, T* p, int tid) {
// If the new value of the field points to the same region or
// is the to-space, we don't need to include it in the Rset updates.
if (!from->is_in_reserved(oopDesc::load_decode_heap_oop(p)) && !from->is_survivor()) {
size_t card_index = ctbs()->index_for(p);
// If the card hasn't been added to the buffer, do it.
if (ctbs()->mark_card_deferred(card_index)) {
dirty_card_queue().enqueue((jbyte*)ctbs()->byte_for_index(card_index));
}
}
}
public: public:
G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp); G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp);
~G1ParScanThreadState(); ~G1ParScanThreadState();
@ -124,8 +110,17 @@ class G1ParScanThreadState : public StackObj {
_refs->push(ref); _refs->push(ref);
} }
template <class T> inline void update_rs(HeapRegion* from, T* p, int tid); template <class T> void update_rs(HeapRegion* from, T* p, int tid) {
// If the new value of the field points to the same region or
// is the to-space, we don't need to include it in the Rset updates.
if (!from->is_in_reserved(oopDesc::load_decode_heap_oop(p)) && !from->is_survivor()) {
size_t card_index = ctbs()->index_for(p);
// If the card hasn't been added to the buffer, do it.
if (ctbs()->mark_card_deferred(card_index)) {
dirty_card_queue().enqueue((jbyte*)ctbs()->byte_for_index(card_index));
}
}
}
private: private:
inline HeapWord* allocate(GCAllocPurpose purpose, size_t word_sz); inline HeapWord* allocate(GCAllocPurpose purpose, size_t word_sz);

View File

@ -29,20 +29,6 @@
#include "gc_implementation/g1/g1RemSet.inline.hpp" #include "gc_implementation/g1/g1RemSet.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
template <class T> inline void G1ParScanThreadState::immediate_rs_update(HeapRegion* from, T* p, int tid) {
if (!from->is_survivor()) {
_g1_rem->par_write_ref(from, p, tid);
}
}
template <class T> void G1ParScanThreadState::update_rs(HeapRegion* from, T* p, int tid) {
if (G1DeferredRSUpdate) {
deferred_rs_update(from, p, tid);
} else {
immediate_rs_update(from, p, tid);
}
}
template <class T> void G1ParScanThreadState::do_oop_evac(T* p, HeapRegion* from) { template <class T> void G1ParScanThreadState::do_oop_evac(T* p, HeapRegion* from) {
assert(!oopDesc::is_null(oopDesc::load_decode_heap_oop(p)), assert(!oopDesc::is_null(oopDesc::load_decode_heap_oop(p)),
"Reference should not be NULL here as such are never pushed to the task queue."); "Reference should not be NULL here as such are never pushed to the task queue.");

View File

@ -339,12 +339,8 @@ void G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
// are just discarded (there's no need to update the RSets of regions // are just discarded (there's no need to update the RSets of regions
// that were in the collection set - after the pause these regions // that were in the collection set - after the pause these regions
// are wholly 'free' of live objects. In the event of an evacuation // are wholly 'free' of live objects. In the event of an evacuation
// failure the cards/buffers in this queue set are: // failure the cards/buffers in this queue set are passed to the
// * passed to the DirtyCardQueueSet that is used to manage deferred // DirtyCardQueueSet that is used to manage RSet updates
// RSet updates, or
// * scanned for references that point into the collection set
// and the RSet of the corresponding region in the collection set
// is updated immediately.
DirtyCardQueue into_cset_dcq(&_g1->into_cset_dirty_card_queue_set()); DirtyCardQueue into_cset_dcq(&_g1->into_cset_dirty_card_queue_set());
assert((ParallelGCThreads > 0) || worker_i == 0, "invariant"); assert((ParallelGCThreads > 0) || worker_i == 0, "invariant");
@ -358,7 +354,6 @@ void G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
void G1RemSet::prepare_for_oops_into_collection_set_do() { void G1RemSet::prepare_for_oops_into_collection_set_do() {
cleanupHRRS(); cleanupHRRS();
ConcurrentG1Refine* cg1r = _g1->concurrent_g1_refine();
_g1->set_refine_cte_cl_concurrency(false); _g1->set_refine_cte_cl_concurrency(false);
DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
dcqs.concatenate_logs(); dcqs.concatenate_logs();
@ -371,66 +366,6 @@ void G1RemSet::prepare_for_oops_into_collection_set_do() {
_total_cards_scanned = 0; _total_cards_scanned = 0;
} }
// This closure, applied to a DirtyCardQueueSet, is used to immediately
// update the RSets for the regions in the CSet. For each card it iterates
// through the oops which coincide with that card. It scans the reference
// fields in each oop; when it finds an oop that points into the collection
// set, the RSet for the region containing the referenced object is updated.
class UpdateRSetCardTableEntryIntoCSetClosure: public CardTableEntryClosure {
G1CollectedHeap* _g1;
CardTableModRefBS* _ct_bs;
public:
UpdateRSetCardTableEntryIntoCSetClosure(G1CollectedHeap* g1,
CardTableModRefBS* bs):
_g1(g1), _ct_bs(bs)
{ }
bool do_card_ptr(jbyte* card_ptr, uint worker_i) {
// Construct the region representing the card.
HeapWord* start = _ct_bs->addr_for(card_ptr);
// And find the region containing it.
HeapRegion* r = _g1->heap_region_containing(start);
// Scan oops in the card looking for references into the collection set
// Don't use addr_for(card_ptr + 1) which can ask for
// a card beyond the heap. This is not safe without a perm
// gen.
HeapWord* end = start + CardTableModRefBS::card_size_in_words;
MemRegion scanRegion(start, end);
UpdateRSetImmediate update_rs_cl(_g1->g1_rem_set());
FilterIntoCSClosure update_rs_cset_oop_cl(NULL, _g1, &update_rs_cl);
FilterOutOfRegionClosure filter_then_update_rs_cset_oop_cl(r, &update_rs_cset_oop_cl);
// We can pass false as the "filter_young" parameter here as:
// * we should be in a STW pause,
// * the DCQS to which this closure is applied is used to hold
// references that point into the collection set from the prior
// RSet updating,
// * the post-write barrier shouldn't be logging updates to young
// regions (but there is a situation where this can happen - see
// the comment in G1RemSet::refine_card() below -
// that should not be applicable here), and
// * during actual RSet updating, the filtering of cards in young
// regions in HeapRegion::oops_on_card_seq_iterate_careful is
// employed.
// As a result, when this closure is applied to "refs into cset"
// DCQS, we shouldn't see any cards in young regions.
update_rs_cl.set_region(r);
HeapWord* stop_point =
r->oops_on_card_seq_iterate_careful(scanRegion,
&filter_then_update_rs_cset_oop_cl,
false /* filter_young */,
NULL /* card_ptr */);
// Since this is performed in the event of an evacuation failure, we
// we shouldn't see a non-null stop point
assert(stop_point == NULL, "saw an unallocated region");
return true;
}
};
void G1RemSet::cleanup_after_oops_into_collection_set_do() { void G1RemSet::cleanup_after_oops_into_collection_set_do() {
guarantee( _cards_scanned != NULL, "invariant" ); guarantee( _cards_scanned != NULL, "invariant" );
_total_cards_scanned = 0; _total_cards_scanned = 0;
@ -451,25 +386,10 @@ void G1RemSet::cleanup_after_oops_into_collection_set_do() {
double restore_remembered_set_start = os::elapsedTime(); double restore_remembered_set_start = os::elapsedTime();
// Restore remembered sets for the regions pointing into the collection set. // Restore remembered sets for the regions pointing into the collection set.
if (G1DeferredRSUpdate) { // We just need to transfer the completed buffers from the DirtyCardQueueSet
// If deferred RS updates are enabled then we just need to transfer // used to hold cards that contain references that point into the collection set
// the completed buffers from (a) the DirtyCardQueueSet used to hold // to the DCQS used to hold the deferred RS updates.
// cards that contain references that point into the collection set _g1->dirty_card_queue_set().merge_bufferlists(&into_cset_dcqs);
// to (b) the DCQS used to hold the deferred RS updates
_g1->dirty_card_queue_set().merge_bufferlists(&into_cset_dcqs);
} else {
CardTableModRefBS* bs = (CardTableModRefBS*)_g1->barrier_set();
UpdateRSetCardTableEntryIntoCSetClosure update_rs_cset_immediate(_g1, bs);
int n_completed_buffers = 0;
while (into_cset_dcqs.apply_closure_to_completed_buffer(&update_rs_cset_immediate,
0, 0, true)) {
n_completed_buffers++;
}
assert(n_completed_buffers == into_cset_n_buffers, "missed some buffers");
}
_g1->g1_policy()->phase_times()->record_evac_fail_restore_remsets((os::elapsedTime() - restore_remembered_set_start) * 1000.0); _g1->g1_policy()->phase_times()->record_evac_fail_restore_remsets((os::elapsedTime() - restore_remembered_set_start) * 1000.0);
} }

View File

@ -193,18 +193,4 @@ public:
bool apply_to_weak_ref_discovered_field() { return true; } bool apply_to_weak_ref_discovered_field() { return true; }
}; };
class UpdateRSetImmediate: public OopsInHeapRegionClosure {
private:
G1RemSet* _g1_rem_set;
template <class T> void do_oop_work(T* p);
public:
UpdateRSetImmediate(G1RemSet* rs) :
_g1_rem_set(rs) {}
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
virtual void do_oop( oop* p) { do_oop_work(p); }
};
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP

View File

@ -79,13 +79,4 @@ inline void UpdateRSOopClosure::do_oop_work(T* p) {
_rs->par_write_ref(_from, p, _worker_i); _rs->par_write_ref(_from, p, _worker_i);
} }
template <class T>
inline void UpdateRSetImmediate::do_oop_work(T* p) {
assert(_from->is_in_reserved(p), "paranoia");
T heap_oop = oopDesc::load_heap_oop(p);
if (!oopDesc::is_null(heap_oop) && !_from->is_survivor()) {
_g1_rem_set->par_write_ref(_from, p, 0);
}
}
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_INLINE_HPP #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_INLINE_HPP

View File

@ -259,14 +259,16 @@ public:
size_t code_root_elems = hrrs->strong_code_roots_list_length(); size_t code_root_elems = hrrs->strong_code_roots_list_length();
RegionTypeCounter* current = NULL; RegionTypeCounter* current = NULL;
if (r->is_young()) { if (r->is_free()) {
current = &_free;
} else if (r->is_young()) {
current = &_young; current = &_young;
} else if (r->isHumongous()) { } else if (r->isHumongous()) {
current = &_humonguous; current = &_humonguous;
} else if (r->is_empty()) { } else if (r->is_old()) {
current = &_free;
} else {
current = &_old; current = &_old;
} else {
ShouldNotReachHere();
} }
current->add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems); current->add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems);
_all.add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems); _all.add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems);

View File

@ -31,8 +31,6 @@
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
class DirtyCardQueueSet; class DirtyCardQueueSet;
class G1SATBCardTableLoggingModRefBS; class G1SATBCardTableLoggingModRefBS;
@ -180,7 +178,4 @@ class G1SATBCardTableLoggingModRefBS: public G1SATBCardTableModRefBS {
void write_ref_array_work(MemRegion mr) { invalidate(mr); } void write_ref_array_work(MemRegion mr) { invalidate(mr); }
}; };
#endif // INCLUDE_ALL_GCS
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1SATBCARDTABLEMODREFBS_HPP #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1SATBCARDTABLEMODREFBS_HPP

View File

@ -108,9 +108,6 @@
develop(bool, G1RSBarrierRegionFilter, true, \ develop(bool, G1RSBarrierRegionFilter, true, \
"If true, generate region filtering code in RS barrier") \ "If true, generate region filtering code in RS barrier") \
\ \
develop(bool, G1DeferredRSUpdate, true, \
"If true, use deferred RS updates") \
\
develop(bool, G1RSLogCheckCardTable, false, \ develop(bool, G1RSLogCheckCardTable, false, \
"If true, verify that no dirty cards remain after RS log " \ "If true, verify that no dirty cards remain after RS log " \
"processing.") \ "processing.") \

View File

@ -211,8 +211,6 @@ void HeapRegion::reset_after_compaction() {
} }
void HeapRegion::hr_clear(bool par, bool clear_space, bool locked) { void HeapRegion::hr_clear(bool par, bool clear_space, bool locked) {
assert(_humongous_type == NotHumongous,
"we should have already filtered out humongous regions");
assert(_humongous_start_region == NULL, assert(_humongous_start_region == NULL,
"we should have already filtered out humongous regions"); "we should have already filtered out humongous regions");
assert(_end == _orig_end, assert(_end == _orig_end,
@ -222,7 +220,7 @@ void HeapRegion::hr_clear(bool par, bool clear_space, bool locked) {
set_young_index_in_cset(-1); set_young_index_in_cset(-1);
uninstall_surv_rate_group(); uninstall_surv_rate_group();
set_young_type(NotYoung); set_free();
reset_pre_dummy_top(); reset_pre_dummy_top();
if (!par) { if (!par) {
@ -273,7 +271,7 @@ void HeapRegion::set_startsHumongous(HeapWord* new_top, HeapWord* new_end) {
assert(top() == bottom(), "should be empty"); assert(top() == bottom(), "should be empty");
assert(bottom() <= new_top && new_top <= new_end, "pre-condition"); assert(bottom() <= new_top && new_top <= new_end, "pre-condition");
_humongous_type = StartsHumongous; _type.set_starts_humongous();
_humongous_start_region = this; _humongous_start_region = this;
set_end(new_end); set_end(new_end);
@ -287,11 +285,11 @@ void HeapRegion::set_continuesHumongous(HeapRegion* first_hr) {
assert(top() == bottom(), "should be empty"); assert(top() == bottom(), "should be empty");
assert(first_hr->startsHumongous(), "pre-condition"); assert(first_hr->startsHumongous(), "pre-condition");
_humongous_type = ContinuesHumongous; _type.set_continues_humongous();
_humongous_start_region = first_hr; _humongous_start_region = first_hr;
} }
void HeapRegion::set_notHumongous() { void HeapRegion::clear_humongous() {
assert(isHumongous(), "pre-condition"); assert(isHumongous(), "pre-condition");
if (startsHumongous()) { if (startsHumongous()) {
@ -307,7 +305,6 @@ void HeapRegion::set_notHumongous() {
} }
assert(capacity() == HeapRegion::GrainBytes, "pre-condition"); assert(capacity() == HeapRegion::GrainBytes, "pre-condition");
_humongous_type = NotHumongous;
_humongous_start_region = NULL; _humongous_start_region = NULL;
} }
@ -327,12 +324,12 @@ HeapRegion::HeapRegion(uint hrm_index,
MemRegion mr) : MemRegion mr) :
G1OffsetTableContigSpace(sharedOffsetArray, mr), G1OffsetTableContigSpace(sharedOffsetArray, mr),
_hrm_index(hrm_index), _hrm_index(hrm_index),
_humongous_type(NotHumongous), _humongous_start_region(NULL), _humongous_start_region(NULL),
_in_collection_set(false), _in_collection_set(false),
_next_in_special_set(NULL), _orig_end(NULL), _next_in_special_set(NULL), _orig_end(NULL),
_claimed(InitialClaimValue), _evacuation_failed(false), _claimed(InitialClaimValue), _evacuation_failed(false),
_prev_marked_bytes(0), _next_marked_bytes(0), _gc_efficiency(0.0), _prev_marked_bytes(0), _next_marked_bytes(0), _gc_efficiency(0.0),
_young_type(NotYoung), _next_young_region(NULL), _next_young_region(NULL),
_next_dirty_cards_region(NULL), _next(NULL), _prev(NULL), _next_dirty_cards_region(NULL), _next(NULL), _prev(NULL),
#ifdef ASSERT #ifdef ASSERT
_containing_set(NULL), _containing_set(NULL),
@ -686,26 +683,11 @@ void HeapRegion::verify_strong_code_roots(VerifyOption vo, bool* failures) const
void HeapRegion::print() const { print_on(gclog_or_tty); } void HeapRegion::print() const { print_on(gclog_or_tty); }
void HeapRegion::print_on(outputStream* st) const { void HeapRegion::print_on(outputStream* st) const {
if (isHumongous()) { st->print(" %2s", get_short_type_str());
if (startsHumongous())
st->print(" HS");
else
st->print(" HC");
} else {
st->print(" ");
}
if (in_collection_set()) if (in_collection_set())
st->print(" CS"); st->print(" CS");
else else
st->print(" "); st->print(" ");
if (is_young())
st->print(is_survivor() ? " SU" : " Y ");
else
st->print(" ");
if (is_empty())
st->print(" F");
else
st->print(" ");
st->print(" TS %5d", _gc_time_stamp); st->print(" TS %5d", _gc_time_stamp);
st->print(" PTAMS "PTR_FORMAT" NTAMS "PTR_FORMAT, st->print(" PTAMS "PTR_FORMAT" NTAMS "PTR_FORMAT,
prev_top_at_mark_start(), next_top_at_mark_start()); prev_top_at_mark_start(), next_top_at_mark_start());

View File

@ -27,6 +27,7 @@
#include "gc_implementation/g1/g1BlockOffsetTable.hpp" #include "gc_implementation/g1/g1BlockOffsetTable.hpp"
#include "gc_implementation/g1/g1_specialized_oop_closures.hpp" #include "gc_implementation/g1/g1_specialized_oop_closures.hpp"
#include "gc_implementation/g1/heapRegionType.hpp"
#include "gc_implementation/g1/survRateGroup.hpp" #include "gc_implementation/g1/survRateGroup.hpp"
#include "gc_implementation/shared/ageTable.hpp" #include "gc_implementation/shared/ageTable.hpp"
#include "gc_implementation/shared/spaceDecorator.hpp" #include "gc_implementation/shared/spaceDecorator.hpp"
@ -34,8 +35,6 @@
#include "memory/watermark.hpp" #include "memory/watermark.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
// A HeapRegion is the smallest piece of a G1CollectedHeap that // A HeapRegion is the smallest piece of a G1CollectedHeap that
// can be collected independently. // can be collected independently.
@ -55,10 +54,7 @@ class nmethod;
#define HR_FORMAT "%u:(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]" #define HR_FORMAT "%u:(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]"
#define HR_FORMAT_PARAMS(_hr_) \ #define HR_FORMAT_PARAMS(_hr_) \
(_hr_)->hrm_index(), \ (_hr_)->hrm_index(), \
(_hr_)->is_survivor() ? "S" : (_hr_)->is_young() ? "E" : \ (_hr_)->get_short_type_str(), \
(_hr_)->startsHumongous() ? "HS" : \
(_hr_)->continuesHumongous() ? "HC" : \
!(_hr_)->is_empty() ? "O" : "F", \
p2i((_hr_)->bottom()), p2i((_hr_)->top()), p2i((_hr_)->end()) p2i((_hr_)->bottom()), p2i((_hr_)->top()), p2i((_hr_)->end())
// sentinel value for hrm_index // sentinel value for hrm_index
@ -215,12 +211,6 @@ class HeapRegion: public G1OffsetTableContigSpace {
friend class VMStructs; friend class VMStructs;
private: private:
enum HumongousType {
NotHumongous = 0,
StartsHumongous,
ContinuesHumongous
};
// The remembered set for this region. // The remembered set for this region.
// (Might want to make this "inline" later, to avoid some alloc failure // (Might want to make this "inline" later, to avoid some alloc failure
// issues.) // issues.)
@ -232,7 +222,8 @@ class HeapRegion: public G1OffsetTableContigSpace {
// The index of this region in the heap region sequence. // The index of this region in the heap region sequence.
uint _hrm_index; uint _hrm_index;
HumongousType _humongous_type; HeapRegionType _type;
// For a humongous region, region in which it starts. // For a humongous region, region in which it starts.
HeapRegion* _humongous_start_region; HeapRegion* _humongous_start_region;
// For the start region of a humongous sequence, it's original end(). // For the start region of a humongous sequence, it's original end().
@ -274,13 +265,6 @@ class HeapRegion: public G1OffsetTableContigSpace {
// The calculated GC efficiency of the region. // The calculated GC efficiency of the region.
double _gc_efficiency; double _gc_efficiency;
enum YoungType {
NotYoung, // a region is not young
Young, // a region is young
Survivor // a region is young and it contains survivors
};
volatile YoungType _young_type;
int _young_index_in_cset; int _young_index_in_cset;
SurvRateGroup* _surv_rate_group; SurvRateGroup* _surv_rate_group;
int _age_index; int _age_index;
@ -305,12 +289,6 @@ class HeapRegion: public G1OffsetTableContigSpace {
_next_top_at_mark_start = bot; _next_top_at_mark_start = bot;
} }
void set_young_type(YoungType new_type) {
//assert(_young_type != new_type, "setting the same type" );
// TODO: add more assertions here
_young_type = new_type;
}
// Cached attributes used in the collection set policy information // Cached attributes used in the collection set policy information
// The RSet length that was added to the total value // The RSet length that was added to the total value
@ -430,9 +408,21 @@ class HeapRegion: public G1OffsetTableContigSpace {
_prev_marked_bytes = _next_marked_bytes = 0; _prev_marked_bytes = _next_marked_bytes = 0;
} }
bool isHumongous() const { return _humongous_type != NotHumongous; } const char* get_type_str() const { return _type.get_str(); }
bool startsHumongous() const { return _humongous_type == StartsHumongous; } const char* get_short_type_str() const { return _type.get_short_str(); }
bool continuesHumongous() const { return _humongous_type == ContinuesHumongous; }
bool is_free() const { return _type.is_free(); }
bool is_young() const { return _type.is_young(); }
bool is_eden() const { return _type.is_eden(); }
bool is_survivor() const { return _type.is_survivor(); }
bool isHumongous() const { return _type.is_humongous(); }
bool startsHumongous() const { return _type.is_starts_humongous(); }
bool continuesHumongous() const { return _type.is_continues_humongous(); }
bool is_old() const { return _type.is_old(); }
// For a humongous region, region in which it starts. // For a humongous region, region in which it starts.
HeapRegion* humongous_start_region() const { HeapRegion* humongous_start_region() const {
return _humongous_start_region; return _humongous_start_region;
@ -496,7 +486,7 @@ class HeapRegion: public G1OffsetTableContigSpace {
void set_continuesHumongous(HeapRegion* first_hr); void set_continuesHumongous(HeapRegion* first_hr);
// Unsets the humongous-related fields on the region. // Unsets the humongous-related fields on the region.
void set_notHumongous(); void clear_humongous();
// If the region has a remembered set, return a pointer to it. // If the region has a remembered set, return a pointer to it.
HeapRegionRemSet* rem_set() const { HeapRegionRemSet* rem_set() const {
@ -623,9 +613,6 @@ class HeapRegion: public G1OffsetTableContigSpace {
void calc_gc_efficiency(void); void calc_gc_efficiency(void);
double gc_efficiency() { return _gc_efficiency;} double gc_efficiency() { return _gc_efficiency;}
bool is_young() const { return _young_type != NotYoung; }
bool is_survivor() const { return _young_type == Survivor; }
int young_index_in_cset() const { return _young_index_in_cset; } int young_index_in_cset() const { return _young_index_in_cset; }
void set_young_index_in_cset(int index) { void set_young_index_in_cset(int index) {
assert( (index == -1) || is_young(), "pre-condition" ); assert( (index == -1) || is_young(), "pre-condition" );
@ -677,11 +664,13 @@ class HeapRegion: public G1OffsetTableContigSpace {
} }
} }
void set_young() { set_young_type(Young); } void set_free() { _type.set_free(); }
void set_survivor() { set_young_type(Survivor); } void set_eden() { _type.set_eden(); }
void set_eden_pre_gc() { _type.set_eden_pre_gc(); }
void set_survivor() { _type.set_survivor(); }
void set_not_young() { set_young_type(NotYoung); } void set_old() { _type.set_old(); }
// Determine if an object has been allocated since the last // Determine if an object has been allocated since the last
// mark performed by the collector. This returns true iff the object // mark performed by the collector. This returns true iff the object
@ -809,6 +798,4 @@ class HeapRegionClosure : public StackObj {
bool complete() { return _complete; } bool complete() { return _complete; }
}; };
#endif // INCLUDE_ALL_GCS
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_HPP #endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_HPP

View File

@ -42,7 +42,9 @@ void HeapRegionSetBase::verify_region(HeapRegion* hr) {
assert(hr->containing_set() == this, err_msg("Inconsistent containing set for %u", hr->hrm_index())); assert(hr->containing_set() == this, err_msg("Inconsistent containing set for %u", hr->hrm_index()));
assert(!hr->is_young(), err_msg("Adding young region %u", hr->hrm_index())); // currently we don't use these sets for young regions assert(!hr->is_young(), err_msg("Adding young region %u", hr->hrm_index())); // currently we don't use these sets for young regions
assert(hr->isHumongous() == regions_humongous(), err_msg("Wrong humongous state for region %u and set %s", hr->hrm_index(), name())); assert(hr->isHumongous() == regions_humongous(), err_msg("Wrong humongous state for region %u and set %s", hr->hrm_index(), name()));
assert(hr->is_empty() == regions_empty(), err_msg("Wrong empty state for region %u and set %s", hr->hrm_index(), name())); assert(hr->is_free() == regions_free(), err_msg("Wrong free state for region %u and set %s", hr->hrm_index(), name()));
assert(!hr->is_free() || hr->is_empty(), err_msg("Free region %u is not empty for set %s", hr->hrm_index(), name()));
assert(!hr->is_empty() || hr->is_free(), err_msg("Empty region %u is not free for set %s", hr->hrm_index(), name()));
assert(hr->rem_set()->verify_ready_for_par_iteration(), err_msg("Wrong iteration state %u", hr->hrm_index())); assert(hr->rem_set()->verify_ready_for_par_iteration(), err_msg("Wrong iteration state %u", hr->hrm_index()));
} }
#endif #endif
@ -85,16 +87,16 @@ void HeapRegionSetBase::print_on(outputStream* out, bool print_contents) {
out->print_cr("Set: %s ("PTR_FORMAT")", name(), this); out->print_cr("Set: %s ("PTR_FORMAT")", name(), this);
out->print_cr(" Region Assumptions"); out->print_cr(" Region Assumptions");
out->print_cr(" humongous : %s", BOOL_TO_STR(regions_humongous())); out->print_cr(" humongous : %s", BOOL_TO_STR(regions_humongous()));
out->print_cr(" empty : %s", BOOL_TO_STR(regions_empty())); out->print_cr(" free : %s", BOOL_TO_STR(regions_free()));
out->print_cr(" Attributes"); out->print_cr(" Attributes");
out->print_cr(" length : %14u", length()); out->print_cr(" length : %14u", length());
out->print_cr(" total capacity : "SIZE_FORMAT_W(14)" bytes", out->print_cr(" total capacity : "SIZE_FORMAT_W(14)" bytes",
total_capacity_bytes()); total_capacity_bytes());
} }
HeapRegionSetBase::HeapRegionSetBase(const char* name, bool humongous, bool empty, HRSMtSafeChecker* mt_safety_checker) HeapRegionSetBase::HeapRegionSetBase(const char* name, bool humongous, bool free, HRSMtSafeChecker* mt_safety_checker)
: _name(name), _verify_in_progress(false), : _name(name), _verify_in_progress(false),
_is_humongous(humongous), _is_empty(empty), _mt_safety_checker(mt_safety_checker), _is_humongous(humongous), _is_free(free), _mt_safety_checker(mt_safety_checker),
_count() _count()
{ } { }

View File

@ -81,7 +81,7 @@ class HeapRegionSetBase VALUE_OBJ_CLASS_SPEC {
friend class VMStructs; friend class VMStructs;
private: private:
bool _is_humongous; bool _is_humongous;
bool _is_empty; bool _is_free;
HRSMtSafeChecker* _mt_safety_checker; HRSMtSafeChecker* _mt_safety_checker;
protected: protected:
@ -102,9 +102,9 @@ protected:
// not. Only used during verification. // not. Only used during verification.
bool regions_humongous() { return _is_humongous; } bool regions_humongous() { return _is_humongous; }
// Indicates whether all regions in the set should be empty or // Indicates whether all regions in the set should be free or
// not. Only used during verification. // not. Only used during verification.
bool regions_empty() { return _is_empty; } bool regions_free() { return _is_free; }
void check_mt_safety() { void check_mt_safety() {
if (_mt_safety_checker != NULL) { if (_mt_safety_checker != NULL) {
@ -114,7 +114,7 @@ protected:
virtual void fill_in_ext_msg_extra(hrs_ext_msg* msg) { } virtual void fill_in_ext_msg_extra(hrs_ext_msg* msg) { }
HeapRegionSetBase(const char* name, bool humongous, bool empty, HRSMtSafeChecker* mt_safety_checker); HeapRegionSetBase(const char* name, bool humongous, bool free, HRSMtSafeChecker* mt_safety_checker);
public: public:
const char* name() { return _name; } const char* name() { return _name; }
@ -171,7 +171,7 @@ public:
do { \ do { \
assert(((_set1_)->regions_humongous() == \ assert(((_set1_)->regions_humongous() == \
(_set2_)->regions_humongous()) && \ (_set2_)->regions_humongous()) && \
((_set1_)->regions_empty() == (_set2_)->regions_empty()), \ ((_set1_)->regions_free() == (_set2_)->regions_free()), \
hrs_err_msg("the contents of set %s and set %s should match", \ hrs_err_msg("the contents of set %s and set %s should match", \
(_set1_)->name(), (_set2_)->name())); \ (_set1_)->name(), (_set2_)->name())); \
} while (0) } while (0)
@ -184,7 +184,7 @@ public:
class HeapRegionSet : public HeapRegionSetBase { class HeapRegionSet : public HeapRegionSetBase {
public: public:
HeapRegionSet(const char* name, bool humongous, HRSMtSafeChecker* mt_safety_checker): HeapRegionSet(const char* name, bool humongous, HRSMtSafeChecker* mt_safety_checker):
HeapRegionSetBase(name, humongous, false /* empty */, mt_safety_checker) { } HeapRegionSetBase(name, humongous, false /* free */, mt_safety_checker) { }
void bulk_remove(const HeapRegionSetCount& removed) { void bulk_remove(const HeapRegionSetCount& removed) {
_count.decrement(removed.length(), removed.capacity()); _count.decrement(removed.length(), removed.capacity());

View File

@ -19,41 +19,51 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*
*/ */
import sun.hotspot.WhiteBox; #include "precompiled.hpp"
#include "gc_implementation/g1/heapRegionType.hpp"
class AllocateBeyondMetaspaceSize { bool HeapRegionType::is_valid(Tag tag) {
public static Object dummy; switch (tag) {
case FreeTag:
public static void main(String [] args) { case EdenTag:
if (args.length != 2) { case SurvTag:
throw new IllegalArgumentException("Usage: <MetaspaceSize> <YoungGenSize>"); case HumStartsTag:
} case HumContTag:
case OldTag:
long metaspaceSize = Long.parseLong(args[0]); return true;
long youngGenSize = Long.parseLong(args[1]);
run(metaspaceSize, youngGenSize);
}
private static void run(long metaspaceSize, long youngGenSize) {
WhiteBox wb = WhiteBox.getWhiteBox();
long allocationBeyondMetaspaceSize = metaspaceSize * 2;
long metaspace = wb.allocateMetaspace(null, allocationBeyondMetaspaceSize);
triggerYoungGC(youngGenSize);
wb.freeMetaspace(null, metaspace, metaspace);
}
private static void triggerYoungGC(long youngGenSize) {
long approxAllocSize = 32 * 1024;
long numAllocations = 2 * youngGenSize / approxAllocSize;
for (long i = 0; i < numAllocations; i++) {
dummy = new byte[(int)approxAllocSize];
}
} }
return false;
}
const char* HeapRegionType::get_str() const {
hrt_assert_is_valid(_tag);
switch (_tag) {
case FreeTag: return "FREE";
case EdenTag: return "EDEN";
case SurvTag: return "SURV";
case HumStartsTag: return "HUMS";
case HumContTag: return "HUMC";
case OldTag: return "OLD";
}
ShouldNotReachHere();
// keep some compilers happy
return NULL;
}
const char* HeapRegionType::get_short_str() const {
hrt_assert_is_valid(_tag);
switch (_tag) {
case FreeTag: return "F";
case EdenTag: return "E";
case SurvTag: return "S";
case HumStartsTag: return "HS";
case HumContTag: return "HC";
case OldTag: return "O";
}
ShouldNotReachHere();
// keep some compilers happy
return NULL;
} }

View File

@ -0,0 +1,134 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONTYPE_HPP
#define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONTYPE_HPP
#include "memory/allocation.hpp"
#define hrt_assert_is_valid(tag) \
assert(is_valid((tag)), err_msg("invalid HR type: %u", (uint) (tag)))
class HeapRegionType VALUE_OBJ_CLASS_SPEC {
private:
// We encode the value of the heap region type so the generation can be
// determined quickly. The tag is split into two parts:
//
// major type (young, humongous) : top N-1 bits
// minor type (eden / survivor, starts / cont hum, etc.) : bottom 1 bit
//
// If there's need to increase the number of minor types in the
// future, we'll have to increase the size of the latter and hence
// decrease the size of the former.
//
// 0000 0 [ 0] Free
//
// 0001 0 Young Mask
// 0001 0 [ 2] Eden
// 0001 1 [ 3] Survivor
//
// 0010 0 Humongous Mask
// 0010 0 [ 4] Humongous Starts
// 0010 1 [ 5] Humongous Continues
//
// 01000 [ 8] Old
typedef enum {
FreeTag = 0,
YoungMask = 2,
EdenTag = YoungMask,
SurvTag = YoungMask + 1,
HumMask = 4,
HumStartsTag = HumMask,
HumContTag = HumMask + 1,
OldTag = 8
} Tag;
volatile Tag _tag;
static bool is_valid(Tag tag);
Tag get() const {
hrt_assert_is_valid(_tag);
return _tag;
}
// Sets the type to 'tag'.
void set(Tag tag) {
hrt_assert_is_valid(tag);
hrt_assert_is_valid(_tag);
_tag = tag;
}
// Sets the type to 'tag', expecting the type to be 'before'. This
// is available for when we want to add sanity checking to the type
// transition.
void set_from(Tag tag, Tag before) {
hrt_assert_is_valid(tag);
hrt_assert_is_valid(before);
hrt_assert_is_valid(_tag);
assert(_tag == before,
err_msg("HR tag: %u, expected: %u new tag; %u", _tag, before, tag));
_tag = tag;
}
public:
// Queries
bool is_free() const { return get() == FreeTag; }
bool is_young() const { return (get() & YoungMask) != 0; }
bool is_eden() const { return get() == EdenTag; }
bool is_survivor() const { return get() == SurvTag; }
bool is_humongous() const { return (get() & HumMask) != 0; }
bool is_starts_humongous() const { return get() == HumStartsTag; }
bool is_continues_humongous() const { return get() == HumContTag; }
bool is_old() const { return get() == OldTag; }
// Setters
void set_free() { set(FreeTag); }
void set_eden() { set_from(EdenTag, FreeTag); }
void set_eden_pre_gc() { set_from(EdenTag, SurvTag); }
void set_survivor() { set_from(SurvTag, FreeTag); }
void set_starts_humongous() { set_from(HumStartsTag, FreeTag); }
void set_continues_humongous() { set_from(HumContTag, FreeTag); }
void set_old() { set(OldTag); }
// Misc
const char* get_str() const;
const char* get_short_str() const;
HeapRegionType() : _tag(FreeTag) { hrt_assert_is_valid(_tag); }
};
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONTYPE_HPP

Some files were not shown because too many files have changed in this diff Show More