Wed, 10 Oct 2012 14:35:58 -0400
7189254: Change makefiles for more flexibility to override defaults
Summary: Change makefiles so that targets and parameters can be overridden by alternate makefiles.
Reviewed-by: dholmes, coleenp
1.1 --- a/make/Makefile Fri Oct 05 13:37:08 2012 -0700 1.2 +++ b/make/Makefile Wed Oct 10 14:35:58 2012 -0400 1.3 @@ -76,6 +76,8 @@ 1.4 1.5 include $(GAMMADIR)/make/altsrc.make 1.6 1.7 +-include $(HS_ALT_MAKE)/Makefile.make 1.8 + 1.9 ifneq ($(ALT_OUTPUTDIR),) 1.10 ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR) 1.11 else 1.12 @@ -88,16 +90,23 @@ 1.13 KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel 1.14 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero 1.15 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark 1.16 +MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 jvmgminimal1 1.17 1.18 -COMMON_VM_PRODUCT_TARGETS=product product1 productkernel docs export_product 1.19 -COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 fastdebugkernel docs export_fastdebug 1.20 -COMMON_VM_DEBUG_TARGETS=jvmg jvmg1 jvmgkernel docs export_debug 1.21 +COMMON_VM_PRODUCT_TARGETS=product product1 docs export_product 1.22 +COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 docs export_fastdebug 1.23 +COMMON_VM_DEBUG_TARGETS=jvmg jvmg1 docs export_debug 1.24 1.25 # JDK directory list 1.26 JDK_DIRS=bin include jre lib demo 1.27 1.28 all: all_product all_fastdebug 1.29 1.30 +ifeq ($(JVM_VARIANT_MINIMAL1),true) 1.31 +all_product: productminimal1 1.32 +all_fastdebug: fastdebugminimal1 1.33 +all_debug: jvmgminimal1 1.34 +endif 1.35 + 1.36 ifdef BUILD_CLIENT_ONLY 1.37 all_product: product1 docs export_product 1.38 all_fastdebug: fastdebug1 docs export_fastdebug 1.39 @@ -114,7 +123,7 @@ 1.40 endif 1.41 endif 1.42 1.43 -all_optimized: optimized optimized1 optimizedkernel docs export_optimized 1.44 +all_optimized: optimized optimized1 docs export_optimized 1.45 1.46 allzero: all_productzero all_fastdebugzero 1.47 all_productzero: productzero docs export_product 1.48 @@ -167,6 +176,11 @@ 1.49 $(MAKE) BUILD_FLAVOR=$(@:%shark=%) VM_TARGET=$@ \ 1.50 generic_buildshark $(ALT_OUT) 1.51 1.52 +$(MINIMAL1_VM_TARGETS): 1.53 + $(CD) $(GAMMADIR)/make; \ 1.54 + $(MAKE) BUILD_FLAVOR=$(@:%minimal1=%) VM_TARGET=$@ \ 1.55 + generic_buildminimal1 $(ALT_OUT) 1.56 + 1.57 # Build compiler1 (client) rule, different for platforms 1.58 generic_build1: 1.59 $(MKDIR) -p $(OUTPUTDIR) 1.60 @@ -239,6 +253,27 @@ 1.61 $(MAKE) -f $(ABS_OS_MAKEFILE) \ 1.62 $(MAKE_ARGS) $(VM_TARGET) 1.63 1.64 +generic_buildminimal1: 1.65 +ifeq ($(JVM_VARIANT_MINIMAL1),true) 1.66 + $(MKDIR) -p $(OUTPUTDIR) 1.67 + ifeq ($(ARCH_DATA_MODEL), 32) 1.68 + ifeq ($(OSNAME),windows) 1.69 + $(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ; 1.70 + else 1.71 + ifeq ($(OSNAME),solaris) 1.72 + $(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ; 1.73 + else 1.74 + $(CD) $(OUTPUTDIR); \ 1.75 + $(MAKE) -f $(ABS_OS_MAKEFILE) $(MAKE_ARGS) $(VM_TARGET) ; 1.76 + endif 1.77 + endif 1.78 + else 1.79 + @$(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" 1.80 + endif 1.81 +else 1.82 + @$(ECHO) "Error: trying to build a minimal target but JVM_VARIANT_MINIMAL1 is not true." 1.83 +endif 1.84 + 1.85 # Export file rule 1.86 generic_export: $(EXPORT_LIST) 1.87 export_product: 1.88 @@ -287,6 +322,8 @@ 1.89 KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) 1.90 ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR) 1.91 SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR) 1.92 +MINIMAL1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1 1.93 +MINIMAL1_DIR=$(MINIMAL1_BASE_DIR)/$(VM_SUBDIR) 1.94 1.95 ifeq ($(JVM_VARIANT_SERVER), true) 1.96 MISC_DIR=$(C2_DIR) 1.97 @@ -308,6 +345,10 @@ 1.98 MISC_DIR=$(ZERO_DIR) 1.99 GEN_DIR=$(ZERO_BASE_DIR)/generated 1.100 endif 1.101 +ifeq ($(JVM_VARIANT_MINIMAL1), true) 1.102 + MISC_DIR=$(MINIMAL1_DIR) 1.103 + GEN_DIR=$(MINIMAL1_BASE_DIR)/generated 1.104 +endif 1.105 1.106 # Bin files (windows) 1.107 ifeq ($(OSNAME),windows) 1.108 @@ -357,6 +398,16 @@ 1.109 $(install-file) 1.110 endif 1.111 1.112 +# Minimal JVM files always come from minimal area 1.113 +$(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz 1.114 + $(install-file) 1.115 +$(EXPORT_MINIMAL_DIR)/%.dll: $(MINIMAL1_DIR)/%.dll 1.116 + $(install-file) 1.117 +$(EXPORT_MINIMAL_DIR)/%.pdb: $(MINIMAL1_DIR)/%.pdb 1.118 + $(install-file) 1.119 +$(EXPORT_MINIMAL_DIR)/%.map: $(MINIMAL1_DIR)/%.map 1.120 + $(install-file) 1.121 + 1.122 # Shared Library 1.123 ifneq ($(OSNAME),windows) 1.124 ifeq ($(JVM_VARIANT_SERVER), true) 1.125 @@ -411,6 +462,26 @@ 1.126 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX) 1.127 $(install-file) 1.128 endif 1.129 + ifeq ($(JVM_VARIANT_MINIMAL1), true) 1.130 + $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX) 1.131 + $(install-file) 1.132 + $(EXPORT_MINIMAL_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX) 1.133 + $(install-file) 1.134 + $(EXPORT_MINIMAL_DIR)/64/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX) 1.135 + $(install-file) 1.136 + $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo 1.137 + $(install-file) 1.138 + $(EXPORT_MINIMAL_DIR)/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo 1.139 + $(install-file) 1.140 + $(EXPORT_MINIMAL_DIR)/64/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo 1.141 + $(install-file) 1.142 + $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz 1.143 + $(install-file) 1.144 + $(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz 1.145 + $(install-file) 1.146 + $(EXPORT_MINIMAL_DIR)/64/%.diz: $(MINIMAL1_DIR)/%.diz 1.147 + $(install-file) 1.148 + endif 1.149 endif 1.150 1.151 # Jar file (sa-jdi.jar) 1.152 @@ -451,7 +522,7 @@ 1.153 $(install-file) 1.154 1.155 # Xusage file 1.156 -$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE) 1.157 +$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt $(EXPORT_MINIMAL_DIR)/Xusage.txt: $(XUSAGE) 1.158 $(prep-target) 1.159 $(RM) $@.temp 1.160 $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp 1.161 @@ -467,6 +538,7 @@ 1.162 $(RM) -r $(KERNEL_DIR) 1.163 $(RM) -r $(ZERO_DIR) 1.164 $(RM) -r $(SHARK_DIR) 1.165 + $(RM) -r $(MINIMAL1_DIR) 1.166 clean_export: 1.167 $(RM) -r $(EXPORT_PATH) 1.168 clean_jdk: 1.169 @@ -574,10 +646,11 @@ 1.170 @$(ECHO) "create_jdk: Create JDK image, export all files into it" 1.171 @$(ECHO) "update_jdk: Update JDK image with fresh exported files" 1.172 @$(ECHO) " " 1.173 - @$(ECHO) "Others targets are:" 1.174 + @$(ECHO) "Other targets are:" 1.175 @$(ECHO) " $(C1_VM_TARGETS)" 1.176 @$(ECHO) " $(C2_VM_TARGETS)" 1.177 @$(ECHO) " $(KERNEL_VM_TARGETS)" 1.178 + @$(ECHO) " $(MINIMAL1_VM_TARGETS)" 1.179 1.180 # Variable help (only common ones used by this workspace) 1.181 variable_help: variable_help_intro variable_list variable_help_end 1.182 @@ -672,9 +745,10 @@ 1.183 include $(GAMMADIR)/make/jprt.gmk 1.184 1.185 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ 1.186 - $(KERNEL_VM_TARGETS) \ 1.187 - generic_build1 generic_build2 generic_buildkernel generic_export \ 1.188 + $(KERNEL_VM_TARGETS) $(MINIMAL1_VM_TARGETS) \ 1.189 + generic_build1 generic_build2 generic_buildkernel generic_buildminimal1 generic_export \ 1.190 export_product export_fastdebug export_debug export_optimized \ 1.191 export_jdk_product export_jdk_fastdebug export_jdk_debug \ 1.192 create_jdk copy_jdk update_jdk test_jdk \ 1.193 - copy_product_jdk copy_fastdebug_jdk copy_debug_jdk 1.194 + copy_product_jdk copy_fastdebug_jdk copy_debug_jdk \ 1.195 + $(HS_ALT_MAKE)/Makefile.make
2.1 --- a/make/bsd/Makefile Fri Oct 05 13:37:08 2012 -0700 2.2 +++ b/make/bsd/Makefile Wed Oct 10 14:35:58 2012 -0400 2.3 @@ -1,5 +1,5 @@ 2.4 # 2.5 -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 2.6 +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 2.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 # 2.9 # This code is free software; you can redistribute it and/or modify it 2.10 @@ -175,6 +175,10 @@ 2.11 # profiledshark shark <os>_<arch>_shark/profiled 2.12 # productshark shark <os>_<arch>_shark/product 2.13 # 2.14 +# fastdebugminimal1 minimal1 <os>_<arch>_minimal1/fastdebug 2.15 +# jvmgminimal1 minimal1 <os>_<arch>_minimal1/jvmg 2.16 +# productminimal1 minimal1 <os>_<arch>_minimal1/product 2.17 +# 2.18 # What you get with each target: 2.19 # 2.20 # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher 2.21 @@ -199,6 +203,7 @@ 2.22 SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) 2.23 SUBDIRS_ZERO = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS)) 2.24 SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS)) 2.25 +SUBDIRS_MINIMAL1 = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS)) 2.26 2.27 TARGETS_C2 = $(TARGETS) 2.28 TARGETS_C1 = $(addsuffix 1,$(TARGETS)) 2.29 @@ -206,6 +211,7 @@ 2.30 TARGETS_CORE = $(addsuffix core,$(TARGETS)) 2.31 TARGETS_ZERO = $(addsuffix zero,$(TARGETS)) 2.32 TARGETS_SHARK = $(addsuffix shark,$(TARGETS)) 2.33 +TARGETS_MINIMAL1 = $(addsuffix minimal1,$(TARGETS)) 2.34 2.35 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make 2.36 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX) 2.37 @@ -223,6 +229,7 @@ 2.38 @echo " $(TARGETS_CORE)" 2.39 @echo " $(TARGETS_ZERO)" 2.40 @echo " $(TARGETS_SHARK)" 2.41 + @echo " $(TARGETS_MINIMAL1)" 2.42 2.43 checks: check_os_version check_j2se_version 2.44 2.45 @@ -281,6 +288,10 @@ 2.46 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks 2.47 $(BUILDTREE) VARIANT=shark VARIANTARCH=$(VARIANTARCH) 2.48 2.49 +$(SUBDIRS_MINIMAL1): $(BUILDTREE_MAKE) 2.50 + $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks 2.51 + $(BUILDTREE) VARIANT=minimal1 2.52 + 2.53 platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in 2.54 $(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@ 2.55 2.56 @@ -340,12 +351,22 @@ 2.57 cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install 2.58 endif 2.59 2.60 +$(TARGETS_MINIMAL1): $(SUBDIRS_MINIMAL1) 2.61 + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) 2.62 +ifeq ($(TEST_IN_BUILD),true) 2.63 + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && ./test_gamma 2.64 +endif 2.65 +ifdef INSTALL 2.66 + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install 2.67 +endif 2.68 + 2.69 # Just build the tree, and nothing else: 2.70 tree: $(SUBDIRS_C2) 2.71 tree1: $(SUBDIRS_C1) 2.72 treecore: $(SUBDIRS_CORE) 2.73 treezero: $(SUBDIRS_ZERO) 2.74 treeshark: $(SUBDIRS_SHARK) 2.75 +treeminimal1: $(SUBDIRS_MINIMAL1) 2.76 2.77 # Doc target. This is the same for all build options. 2.78 # Hence create a docs directory beside ...$(ARCH)_[...] 2.79 @@ -367,17 +388,23 @@ 2.80 clean_docs: 2.81 rm -rf $(SUBDIR_DOCS) 2.82 2.83 -clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark: 2.84 +clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1: 2.85 rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@) 2.86 2.87 -clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs 2.88 +clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs 2.89 2.90 include $(GAMMADIR)/make/cscope.make 2.91 2.92 +# 2.93 +# Include alternate Makefile if it exists. 2.94 +# 2.95 +-include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make 2.96 + 2.97 #------------------------------------------------------------------------------- 2.98 2.99 -.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) 2.100 +.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1) 2.101 .PHONY: tree tree1 treecore treezero treeshark 2.102 .PHONY: all compiler1 compiler2 core zero shark 2.103 .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark docs clean_docs 2.104 .PHONY: checks check_os_version check_j2se_version 2.105 +.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
3.1 --- a/make/bsd/makefiles/buildtree.make Fri Oct 05 13:37:08 2012 -0700 3.2 +++ b/make/bsd/makefiles/buildtree.make Wed Oct 10 14:35:58 2012 -0400 3.3 @@ -60,6 +60,7 @@ 3.4 3.5 -include $(SPEC) 3.6 include $(GAMMADIR)/make/scm.make 3.7 +include $(GAMMADIR)/make/defs.make 3.8 include $(GAMMADIR)/make/altsrc.make 3.9 3.10 3.11 @@ -195,6 +196,8 @@ 3.12 sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \ 3.13 echo; \ 3.14 echo "GAMMADIR = $(GAMMADIR)"; \ 3.15 + echo "HS_ALT_MAKE = $(HS_ALT_MAKE)"; \ 3.16 + echo "OSNAME = $(OSNAME)"; \ 3.17 echo "SYSDEFS = \$$(Platform_sysdefs)"; \ 3.18 echo "SRCARCH = $(SRCARCH)"; \ 3.19 echo "BUILDARCH = $(BUILDARCH)"; \ 3.20 @@ -251,6 +254,7 @@ 3.21 [ -n "$(SPEC)" ] && \ 3.22 echo "include $(SPEC)"; \ 3.23 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \ 3.24 + echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \ 3.25 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \ 3.26 ) > $@ 3.27
4.1 --- a/make/bsd/makefiles/defs.make Fri Oct 05 13:37:08 2012 -0700 4.2 +++ b/make/bsd/makefiles/defs.make Wed Oct 10 14:35:58 2012 -0400 4.3 @@ -155,6 +155,7 @@ 4.4 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) 4.5 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server 4.6 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client 4.7 +EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal 4.8 4.9 EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar 4.10 4.11 @@ -168,6 +169,19 @@ 4.12 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) 4.13 endif 4.14 4.15 +ifeq ($(JVM_VARIANT_MINIMAL1),true) 4.16 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt 4.17 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX) 4.18 + 4.19 + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 4.20 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 4.21 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz 4.22 + else 4.23 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo 4.24 + endif 4.25 + endif 4.26 +endif 4.27 + 4.28 # Serviceability Binaries 4.29 # No SA Support for PPC, IA64, ARM or zero 4.30 ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
5.1 --- a/make/bsd/makefiles/gcc.make Fri Oct 05 13:37:08 2012 -0700 5.2 +++ b/make/bsd/makefiles/gcc.make Wed Oct 10 14:35:58 2012 -0400 5.3 @@ -1,5 +1,5 @@ 5.4 # 5.5 -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 5.6 +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 5.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.8 # 5.9 # This code is free software; you can redistribute it and/or modify it 5.10 @@ -151,11 +151,6 @@ 5.11 CFLAGS += -DCC_INTERP 5.12 endif 5.13 5.14 -# Build for embedded targets 5.15 -ifdef JAVASE_EMBEDDED 5.16 - CFLAGS += -DJAVASE_EMBEDDED 5.17 -endif 5.18 - 5.19 # Keep temporary files (.ii, .s) 5.20 ifdef NEED_ASM 5.21 CFLAGS += -save-temps 5.22 @@ -186,20 +181,32 @@ 5.23 CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations 5.24 endif 5.25 5.26 +OPT_CFLAGS/SIZE=-Os 5.27 +OPT_CFLAGS/SPEED=-O3 5.28 + 5.29 +# Hotspot uses very unstrict aliasing turn this optimization off 5.30 +# This option is added to CFLAGS rather than OPT_CFLAGS 5.31 +# so that OPT_CFLAGS overrides get this option too. 5.32 +CFLAGS += -fno-strict-aliasing 5.33 5.34 # The flags to use for an Optimized g++ build 5.35 ifeq ($(OS_VENDOR), Darwin) 5.36 # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy 5.37 # <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers> 5.38 - OPT_CFLAGS += -Os 5.39 + OPT_CFLAGS_DEFAULT ?= SIZE 5.40 else 5.41 - OPT_CFLAGS += -O3 5.42 + OPT_CFLAGS_DEFAULT ?= SPEED 5.43 endif 5.44 5.45 -# Hotspot uses very unstrict aliasing turn this optimization off 5.46 -OPT_CFLAGS += -fno-strict-aliasing 5.47 +ifdef OPT_CFLAGS 5.48 + ifneq ("$(origin OPT_CFLAGS)", "command line") 5.49 + $(error " Use OPT_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS.") 5.50 + endif 5.51 +endif 5.52 5.53 -# The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 5.54 +OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS) 5.55 + 5.56 +# The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 5.57 # if we use expensive-optimizations 5.58 ifeq ($(BUILDARCH), ia64) 5.59 OPT_CFLAGS += -fno-expensive-optimizations
6.1 --- a/make/bsd/makefiles/ia64.make Fri Oct 05 13:37:08 2012 -0700 6.2 +++ b/make/bsd/makefiles/ia64.make Wed Oct 10 14:35:58 2012 -0400 6.3 @@ -1,5 +1,5 @@ 6.4 # 6.5 -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. 6.6 +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 6.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.8 # 6.9 # This code is free software; you can redistribute it and/or modify it 6.10 @@ -25,8 +25,6 @@ 6.11 # 6.12 # IA64 only uses c++ based interpreter 6.13 CFLAGS += -DCC_INTERP -D_LP64=1 -DVM_LITTLE_ENDIAN 6.14 -# Hotspot uses very unstrict aliasing turn this optimization off 6.15 -OPT_CFLAGS += -fno-strict-aliasing 6.16 ifeq ($(VERSION),debug) 6.17 ASM_FLAGS= -DDEBUG 6.18 else
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/make/bsd/makefiles/minimal1.make Wed Oct 10 14:35:58 2012 -0400 7.3 @@ -0,0 +1,46 @@ 7.4 +# 7.5 +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 7.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.7 +# 7.8 +# This code is free software; you can redistribute it and/or modify it 7.9 +# under the terms of the GNU General Public License version 2 only, as 7.10 +# published by the Free Software Foundation. 7.11 +# 7.12 +# This code is distributed in the hope that it will be useful, but WITHOUT 7.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 7.14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 7.15 +# version 2 for more details (a copy is included in the LICENSE file that 7.16 +# accompanied this code). 7.17 +# 7.18 +# You should have received a copy of the GNU General Public License version 7.19 +# 2 along with this work; if not, write to the Free Software Foundation, 7.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 7.21 +# 7.22 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 7.23 +# or visit www.oracle.com if you need additional information or have any 7.24 +# questions. 7.25 +# 7.26 +# 7.27 + 7.28 +TYPE=MINIMAL1 7.29 + 7.30 +INCLUDE_JVMTI ?= false 7.31 +INCLUDE_FPROF ?= false 7.32 +INCLUDE_VM_STRUCTS ?= false 7.33 +INCLUDE_JNI_CHECK ?= false 7.34 +INCLUDE_SERVICES ?= false 7.35 +INCLUDE_MANAGEMENT ?= false 7.36 +INCLUDE_ALTERNATE_GCS ?= false 7.37 +INCLUDE_NMT ?= false 7.38 +INCLUDE_CDS ?= false 7.39 + 7.40 +CXXFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\" 7.41 +CFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\" 7.42 + 7.43 +Src_Dirs/MINIMAL1 = $(CORE_PATHS) $(COMPILER1_PATHS) 7.44 + 7.45 +Src_Files_EXCLUDE/MINIMAL1 += $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp 7.46 + 7.47 +-include $(HS_ALT_MAKE)/$(OSNAME)/makefiles/minimal1.make 7.48 + 7.49 +.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/makefiles/minimal1.make
8.1 --- a/make/bsd/makefiles/vm.make Fri Oct 05 13:37:08 2012 -0700 8.2 +++ b/make/bsd/makefiles/vm.make Wed Oct 10 14:35:58 2012 -0400 8.3 @@ -190,7 +190,7 @@ 8.4 ZERO_SPECIFIC_FILES := zero 8.5 8.6 # Always exclude these. 8.7 -Src_Files_EXCLUDE := jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp 8.8 +Src_Files_EXCLUDE += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp 8.9 8.10 # Exclude per type. 8.11 Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
9.1 --- a/make/defs.make Fri Oct 05 13:37:08 2012 -0700 9.2 +++ b/make/defs.make Wed Oct 10 14:35:58 2012 -0400 9.3 @@ -22,6 +22,27 @@ 9.4 # 9.5 # 9.6 9.7 +# The common definitions for hotspot builds. 9.8 + 9.9 +# Optionally include SPEC file generated by configure. 9.10 +ifneq ($(SPEC),) 9.11 + include $(SPEC) 9.12 +endif 9.13 + 9.14 +# Directory paths and user name 9.15 +# Unless GAMMADIR is set on the command line, search upward from 9.16 +# the current directory for a parent directory containing "src/share/vm". 9.17 +# If that fails, look for $GAMMADIR in the environment. 9.18 +# When the tree of subdirs is built, this setting is stored in each flags.make. 9.19 +GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done) 9.20 +HS_SRC_DIR=$(GAMMADIR)/src 9.21 +HS_MAKE_DIR=$(GAMMADIR)/make 9.22 +HS_BUILD_DIR=$(GAMMADIR)/build 9.23 + 9.24 +ifeq ($(USER),) 9.25 + USER=$(USERNAME) 9.26 +endif 9.27 + 9.28 ifeq ($(HS_ALT_MAKE),) 9.29 ifneq ($(OPENJDK),true) 9.30 HS_ALT_MAKE=$(GAMMADIR)/make/closed 9.31 @@ -30,12 +51,10 @@ 9.32 endif 9.33 endif 9.34 9.35 -# The common definitions for hotspot builds. 9.36 - 9.37 -# Optionally include SPEC file generated by configure. 9.38 -ifneq ($(SPEC),) 9.39 - include $(SPEC) 9.40 -endif 9.41 +# 9.42 +# Include alternate defs.make if it exists 9.43 +# 9.44 +-include $(HS_ALT_MAKE)/defs.make 9.45 9.46 # Default to verbose build logs (show all compile lines): 9.47 MAKE_VERBOSE=y 9.48 @@ -84,20 +103,6 @@ 9.49 endif 9.50 endif 9.51 9.52 -# Directory paths and user name 9.53 -# Unless GAMMADIR is set on the command line, search upward from 9.54 -# the current directory for a parent directory containing "src/share/vm". 9.55 -# If that fails, look for $GAMMADIR in the environment. 9.56 -# When the tree of subdirs is built, this setting is stored in each flags.make. 9.57 -GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done) 9.58 -HS_SRC_DIR=$(GAMMADIR)/src 9.59 -HS_MAKE_DIR=$(GAMMADIR)/make 9.60 -HS_BUILD_DIR=$(GAMMADIR)/build 9.61 - 9.62 -ifeq ($(USER),) 9.63 - USER=$(USERNAME) 9.64 -endif 9.65 - 9.66 # hotspot version definitions 9.67 include $(GAMMADIR)/make/hotspot_version 9.68 9.69 @@ -339,3 +344,4 @@ 9.70 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jfr.h 9.71 endif 9.72 9.73 +.PHONY: $(HS_ALT_MAKE)/defs.make
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/make/excludeSrc.make Wed Oct 10 14:35:58 2012 -0400 10.3 @@ -0,0 +1,110 @@ 10.4 +# 10.5 +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 10.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.7 +# 10.8 +# This code is free software; you can redistribute it and/or modify it 10.9 +# under the terms of the GNU General Public License version 2 only, as 10.10 +# published by the Free Software Foundation. 10.11 +# 10.12 +# This code is distributed in the hope that it will be useful, but WITHOUT 10.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10.14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 10.15 +# version 2 for more details (a copy is included in the LICENSE file that 10.16 +# accompanied this code). 10.17 +# 10.18 +# You should have received a copy of the GNU General Public License version 10.19 +# 2 along with this work; if not, write to the Free Software Foundation, 10.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 10.21 +# 10.22 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 10.23 +# or visit www.oracle.com if you need additional information or have any 10.24 +# questions. 10.25 +# 10.26 +# 10.27 +ifeq ($(INCLUDE_JVMTI), false) 10.28 + CXXFLAGS += -DINCLUDE_JVMTI=0 10.29 + CFLAGS += -DINCLUDE_JVMTI=0 10.30 + 10.31 + Src_Files_EXCLUDE += jvmtiGetLoadedClasses.cpp forte.cpp jvmtiThreadState.cpp jvmtiExtensions.cpp \ 10.32 + jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \ 10.33 + jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \ 10.34 + jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp 10.35 +endif 10.36 + 10.37 +ifeq ($(INCLUDE_FPROF), false) 10.38 + CXXFLAGS += -DINCLUDE_FPROF=0 10.39 + CFLAGS += -DINCLUDE_FPROF=0 10.40 + 10.41 + Src_Files_EXCLUDE += fprofiler.cpp 10.42 +endif 10.43 + 10.44 +ifeq ($(INCLUDE_VM_STRUCTS), false) 10.45 + CXXFLAGS += -DINCLUDE_VM_STRUCTS=0 10.46 + CFLAGS += -DINCLUDE_VM_STRUCTS=0 10.47 + 10.48 + Src_Files_EXCLUDE += vmStructs.cpp 10.49 +endif 10.50 + 10.51 +ifeq ($(INCLUDE_JNI_CHECK), false) 10.52 + CXXFLAGS += -DINCLUDE_JNI_CHECK=0 10.53 + CFLAGS += -DINCLUDE_JNI_CHECK=0 10.54 + 10.55 + Src_Files_EXCLUDE += jniCheck.cpp 10.56 +endif 10.57 + 10.58 +ifeq ($(INCLUDE_SERVICES), false) 10.59 + CXXFLAGS += -DINCLUDE_SERVICES=0 10.60 + CFLAGS += -DINCLUDE_SERVICES=0 10.61 + 10.62 + Src_Files_EXCLUDE += heapDumper.cpp heapInspection.cpp \ 10.63 + attachListener_linux.cpp attachListener.cpp 10.64 +endif 10.65 + 10.66 +ifeq ($(INCLUDE_MANAGEMENT), false) 10.67 + CXXFLAGS += -DINCLUDE_MANAGEMENT=0 10.68 + CFLAGS += -DINCLUDE_MANAGEMENT=0 10.69 +endif 10.70 + 10.71 +ifeq ($(INCLUDE_CDS), false) 10.72 + CXXFLAGS += -DINCLUDE_CDS=0 10.73 + CFLAGS += -DINCLUDE_CDS=0 10.74 + 10.75 + Src_Files_EXCLUDE += metaspaceShared.cpp 10.76 +endif 10.77 + 10.78 +ifeq ($(INCLUDE_ALTERNATE_GCS), false) 10.79 + CXXFLAGS += -DINCLUDE_ALTERNATE_GCS=0 10.80 + CFLAGS += -DINCLUDE_ALTERNATE_GCS=0 10.81 + 10.82 + CXXFLAGS += -DSERIALGC 10.83 + CFLAGS += -DSERIALGC 10.84 + Src_Files_EXCLUDE += \ 10.85 + binaryTreeDictionary.cpp cmsAdaptiveSizePolicy.cpp cmsCollectorPolicy.cpp \ 10.86 + cmsGCAdaptivePolicyCounters.cpp cmsLockVerifier.cpp cmsPermGen.cpp compactibleFreeListSpace.cpp \ 10.87 + concurrentMarkSweepGeneration.cpp concurrentMarkSweepThread.cpp freeBlockDictionary.cpp \ 10.88 + freeChunk.cpp freeList.cpp promotionInfo.cpp vmCMSOperations.cpp collectionSetChooser.cpp \ 10.89 + concurrentG1Refine.cpp concurrentG1RefineThread.cpp concurrentMark.cpp concurrentMarkThread.cpp \ 10.90 + dirtyCardQueue.cpp g1AllocRegion.cpp g1BlockOffsetTable.cpp g1CollectedHeap.cpp g1GCPhaseTimes.cpp \ 10.91 + g1CollectorPolicy.cpp g1ErgoVerbose.cpp g1_globals.cpp g1HRPrinter.cpp g1MarkSweep.cpp \ 10.92 + g1MMUTracker.cpp g1MonitoringSupport.cpp g1RemSet.cpp g1SATBCardTableModRefBS.cpp heapRegion.cpp \ 10.93 + heapRegionRemSet.cpp heapRegionSeq.cpp heapRegionSet.cpp heapRegionSets.cpp ptrQueue.cpp \ 10.94 + satbQueue.cpp sparsePRT.cpp survRateGroup.cpp vm_operations_g1.cpp adjoiningGenerations.cpp \ 10.95 + adjoiningVirtualSpaces.cpp asPSOldGen.cpp asPSYoungGen.cpp cardTableExtension.cpp \ 10.96 + gcTaskManager.cpp gcTaskThread.cpp objectStartArray.cpp parallelScavengeHeap.cpp parMarkBitMap.cpp \ 10.97 + pcTasks.cpp psAdaptiveSizePolicy.cpp psCompactionManager.cpp psGCAdaptivePolicyCounters.cpp \ 10.98 + psGenerationCounters.cpp psMarkSweep.cpp psMarkSweepDecorator.cpp psOldGen.cpp psParallelCompact.cpp \ 10.99 + psPermGen.cpp psPromotionLAB.cpp psPromotionManager.cpp psScavenge.cpp psTasks.cpp psVirtualspace.cpp \ 10.100 + psYoungGen.cpp vmPSOperations.cpp asParNewGeneration.cpp parCardTableModRefBS.cpp \ 10.101 + parGCAllocBuffer.cpp parNewGeneration.cpp mutableSpace.cpp gSpaceCounters.cpp allocationStats.cpp \ 10.102 + spaceCounters.cpp gcAdaptivePolicyCounters.cpp mutableNUMASpace.cpp immutableSpace.cpp \ 10.103 + immutableSpace.cpp g1MemoryPool.cpp psMemoryPool.cpp yieldWorkingGroup.cpp g1Log.cpp 10.104 +endif 10.105 + 10.106 +ifeq ($(INCLUDE_NMT), false) 10.107 + CXXFLAGS += -DINCLUDE_NMT=0 10.108 + CFLAGS += -DINCLUDE_NMT=0 10.109 + 10.110 + Src_Files_EXCLUDE += \ 10.111 + memBaseline.cpp memPtr.cpp memRecorder.cpp memReporter.cpp memSnapshot.cpp memTrackWorker.cpp \ 10.112 + memTracker.cpp nmtDCmd.cpp 10.113 +endif
11.1 --- a/make/linux/Makefile Fri Oct 05 13:37:08 2012 -0700 11.2 +++ b/make/linux/Makefile Wed Oct 10 14:35:58 2012 -0400 11.3 @@ -175,6 +175,10 @@ 11.4 # profiledshark shark <os>_<arch>_shark/profiled 11.5 # productshark shark <os>_<arch>_shark/product 11.6 # 11.7 +# fastdebugminimal1 minimal1 <os>_<arch>_minimal1/fastdebug 11.8 +# jvmgminimal1 minimal1 <os>_<arch>_minimal1/jvmg 11.9 +# productminimal1 minimal1 <os>_<arch>_minimal1/product 11.10 +# 11.11 # What you get with each target: 11.12 # 11.13 # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher 11.14 @@ -199,6 +203,7 @@ 11.15 SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) 11.16 SUBDIRS_ZERO = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS)) 11.17 SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS)) 11.18 +SUBDIRS_MINIMAL1 = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS)) 11.19 11.20 TARGETS_C2 = $(TARGETS) 11.21 TARGETS_C1 = $(addsuffix 1,$(TARGETS)) 11.22 @@ -206,6 +211,7 @@ 11.23 TARGETS_CORE = $(addsuffix core,$(TARGETS)) 11.24 TARGETS_ZERO = $(addsuffix zero,$(TARGETS)) 11.25 TARGETS_SHARK = $(addsuffix shark,$(TARGETS)) 11.26 +TARGETS_MINIMAL1 = $(addsuffix minimal1,$(TARGETS)) 11.27 11.28 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make 11.29 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) 11.30 @@ -224,6 +230,7 @@ 11.31 @echo " $(TARGETS_CORE)" 11.32 @echo " $(TARGETS_ZERO)" 11.33 @echo " $(TARGETS_SHARK)" 11.34 + @echo " $(TARGETS_MINIMAL1)" 11.35 11.36 checks: check_os_version check_j2se_version 11.37 11.38 @@ -281,6 +288,11 @@ 11.39 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks 11.40 $(BUILDTREE) VARIANT=shark VARIANTARCH=$(VARIANTARCH) 11.41 11.42 +$(SUBDIRS_MINIMAL1): $(BUILDTREE_MAKE) 11.43 + $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks 11.44 + $(BUILDTREE) VARIANT=minimal1 11.45 + 11.46 + 11.47 platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in 11.48 $(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@ 11.49 11.50 @@ -340,12 +352,22 @@ 11.51 cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install 11.52 endif 11.53 11.54 +$(TARGETS_MINIMAL1): $(SUBDIRS_MINIMAL1) 11.55 + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) 11.56 +ifeq ($(TEST_IN_BUILD),true) 11.57 + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && ./test_gamma 11.58 +endif 11.59 +ifdef INSTALL 11.60 + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install 11.61 +endif 11.62 + 11.63 # Just build the tree, and nothing else: 11.64 tree: $(SUBDIRS_C2) 11.65 tree1: $(SUBDIRS_C1) 11.66 treecore: $(SUBDIRS_CORE) 11.67 treezero: $(SUBDIRS_ZERO) 11.68 treeshark: $(SUBDIRS_SHARK) 11.69 +treeminimal1: $(SUBDIRS_MINIMAL1) 11.70 11.71 # Doc target. This is the same for all build options. 11.72 # Hence create a docs directory beside ...$(ARCH)_[...] 11.73 @@ -369,17 +391,23 @@ 11.74 clean_docs: 11.75 rm -rf $(SUBDIR_DOCS) 11.76 11.77 -clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark: 11.78 +clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1: 11.79 rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@) 11.80 11.81 -clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs 11.82 +clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs 11.83 11.84 include $(GAMMADIR)/make/cscope.make 11.85 11.86 +# 11.87 +# Include alternate Makefile if it exists. 11.88 +# 11.89 +-include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make 11.90 + 11.91 #------------------------------------------------------------------------------- 11.92 11.93 -.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) 11.94 +.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1) 11.95 .PHONY: tree tree1 treecore treezero treeshark 11.96 .PHONY: all compiler1 compiler2 core zero shark 11.97 .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark docs clean_docs 11.98 .PHONY: checks check_os_version check_j2se_version 11.99 +.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
12.1 --- a/make/linux/makefiles/buildtree.make Fri Oct 05 13:37:08 2012 -0700 12.2 +++ b/make/linux/makefiles/buildtree.make Wed Oct 10 14:35:58 2012 -0400 12.3 @@ -57,6 +57,7 @@ 12.4 12.5 -include $(SPEC) 12.6 include $(GAMMADIR)/make/scm.make 12.7 +include $(GAMMADIR)/make/defs.make 12.8 include $(GAMMADIR)/make/altsrc.make 12.9 12.10 12.11 @@ -188,6 +189,8 @@ 12.12 sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \ 12.13 echo; \ 12.14 echo "GAMMADIR = $(GAMMADIR)"; \ 12.15 + echo "HS_ALT_MAKE = $(HS_ALT_MAKE)"; \ 12.16 + echo "OSNAME = $(OSNAME)"; \ 12.17 echo "SYSDEFS = \$$(Platform_sysdefs)"; \ 12.18 echo "SRCARCH = $(SRCARCH)"; \ 12.19 echo "BUILDARCH = $(BUILDARCH)"; \ 12.20 @@ -254,6 +257,7 @@ 12.21 [ -n "$(SPEC)" ] && \ 12.22 echo "include $(SPEC)"; \ 12.23 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \ 12.24 + echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \ 12.25 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \ 12.26 ) > $@ 12.27
13.1 --- a/make/linux/makefiles/defs.make Fri Oct 05 13:37:08 2012 -0700 13.2 +++ b/make/linux/makefiles/defs.make Wed Oct 10 14:35:58 2012 -0400 13.3 @@ -254,6 +254,7 @@ 13.4 endif 13.5 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server 13.6 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client 13.7 +EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal 13.8 13.9 EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar 13.10 13.11 @@ -281,6 +282,19 @@ 13.12 endif 13.13 endif 13.14 13.15 +ifeq ($(JVM_VARIANT_MINIMAL1),true) 13.16 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt 13.17 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX) 13.18 + 13.19 + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 13.20 + ifeq ($(ZIP_DEBUGINFO_FILES),1) 13.21 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz 13.22 + else 13.23 + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo 13.24 + endif 13.25 + endif 13.26 +endif 13.27 + 13.28 # Serviceability Binaries 13.29 # No SA Support for PPC, IA64, ARM or zero 13.30 ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
14.1 --- a/make/linux/makefiles/gcc.make Fri Oct 05 13:37:08 2012 -0700 14.2 +++ b/make/linux/makefiles/gcc.make Wed Oct 10 14:35:58 2012 -0400 14.3 @@ -116,11 +116,6 @@ 14.4 CFLAGS += -DCC_INTERP 14.5 endif 14.6 14.7 -# Build for embedded targets 14.8 -ifdef JAVASE_EMBEDDED 14.9 - CFLAGS += -DJAVASE_EMBEDDED 14.10 -endif 14.11 - 14.12 # Keep temporary files (.ii, .s) 14.13 ifdef NEED_ASM 14.14 CFLAGS += -save-temps 14.15 @@ -146,10 +141,23 @@ 14.16 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 14.17 14.18 # The flags to use for an Optimized g++ build 14.19 -OPT_CFLAGS += -O3 14.20 +OPT_CFLAGS/SIZE=-Os 14.21 +OPT_CFLAGS/SPEED=-O3 14.22 14.23 # Hotspot uses very unstrict aliasing turn this optimization off 14.24 -OPT_CFLAGS += -fno-strict-aliasing 14.25 +# This option is added to CFLAGS rather than OPT_CFLAGS 14.26 +# so that OPT_CFLAGS overrides get this option too. 14.27 +CFLAGS += -fno-strict-aliasing 14.28 + 14.29 +OPT_CFLAGS_DEFAULT ?= SPEED 14.30 + 14.31 +ifdef OPT_CFLAGS 14.32 + ifneq ("$(origin OPT_CFLAGS)", "command line") 14.33 + $(error " Use OPT_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS.") 14.34 + endif 14.35 +endif 14.36 + 14.37 +OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS) 14.38 14.39 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 14.40 # if we use expensive-optimizations
15.1 --- a/make/linux/makefiles/ia64.make Fri Oct 05 13:37:08 2012 -0700 15.2 +++ b/make/linux/makefiles/ia64.make Wed Oct 10 14:35:58 2012 -0400 15.3 @@ -1,5 +1,5 @@ 15.4 # 15.5 -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. 15.6 +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 15.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 15.8 # 15.9 # This code is free software; you can redistribute it and/or modify it 15.10 @@ -25,8 +25,6 @@ 15.11 # 15.12 # IA64 only uses c++ based interpreter 15.13 CFLAGS += -DCC_INTERP -D_LP64=1 -DVM_LITTLE_ENDIAN 15.14 -# Hotspot uses very unstrict aliasing turn this optimization off 15.15 -OPT_CFLAGS += -fno-strict-aliasing 15.16 ifeq ($(VERSION),debug) 15.17 ASM_FLAGS= -DDEBUG 15.18 else
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 16.2 +++ b/make/linux/makefiles/minimal1.make Wed Oct 10 14:35:58 2012 -0400 16.3 @@ -0,0 +1,46 @@ 16.4 +# 16.5 +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 16.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 16.7 +# 16.8 +# This code is free software; you can redistribute it and/or modify it 16.9 +# under the terms of the GNU General Public License version 2 only, as 16.10 +# published by the Free Software Foundation. 16.11 +# 16.12 +# This code is distributed in the hope that it will be useful, but WITHOUT 16.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 16.14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16.15 +# version 2 for more details (a copy is included in the LICENSE file that 16.16 +# accompanied this code). 16.17 +# 16.18 +# You should have received a copy of the GNU General Public License version 16.19 +# 2 along with this work; if not, write to the Free Software Foundation, 16.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 16.21 +# 16.22 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 16.23 +# or visit www.oracle.com if you need additional information or have any 16.24 +# questions. 16.25 +# 16.26 +# 16.27 + 16.28 +TYPE=MINIMAL1 16.29 + 16.30 +INCLUDE_JVMTI ?= false 16.31 +INCLUDE_FPROF ?= false 16.32 +INCLUDE_VM_STRUCTS ?= false 16.33 +INCLUDE_JNI_CHECK ?= false 16.34 +INCLUDE_SERVICES ?= false 16.35 +INCLUDE_MANAGEMENT ?= false 16.36 +INCLUDE_ALTERNATE_GCS ?= false 16.37 +INCLUDE_NMT ?= false 16.38 +INCLUDE_CDS ?= false 16.39 + 16.40 +CXXFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\" 16.41 +CFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\" 16.42 + 16.43 +Src_Dirs/MINIMAL1 = $(CORE_PATHS) $(COMPILER1_PATHS) 16.44 + 16.45 +Src_Files_EXCLUDE/MINIMAL1 += $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp 16.46 + 16.47 +-include $(HS_ALT_MAKE)/$(OSNAME)/makefiles/minimal1.make 16.48 + 16.49 +.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/makefiles/minimal1.make
17.1 --- a/make/linux/makefiles/vm.make Fri Oct 05 13:37:08 2012 -0700 17.2 +++ b/make/linux/makefiles/vm.make Wed Oct 10 14:35:58 2012 -0400 17.3 @@ -192,7 +192,7 @@ 17.4 ZERO_SPECIFIC_FILES := zero 17.5 17.6 # Always exclude these. 17.7 -Src_Files_EXCLUDE := jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp 17.8 +Src_Files_EXCLUDE += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp 17.9 17.10 # Exclude per type. 17.11 Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
18.1 --- a/make/windows/makefiles/defs.make Fri Oct 05 13:37:08 2012 -0700 18.2 +++ b/make/windows/makefiles/defs.make Wed Oct 10 14:35:58 2012 -0400 18.3 @@ -154,10 +154,9 @@ 18.4 # On 32 bit windows we build server, client and kernel, on 64 bit just server. 18.5 ifeq ($(JVM_VARIANTS),) 18.6 ifeq ($(ARCH_DATA_MODEL), 32) 18.7 - JVM_VARIANTS:=client,server,kernel 18.8 + JVM_VARIANTS:=client,server 18.9 JVM_VARIANT_CLIENT:=true 18.10 JVM_VARIANT_SERVER:=true 18.11 - JVM_VARIANT_KERNEL:=true 18.12 else 18.13 JVM_VARIANTS:=server 18.14 JVM_VARIANT_SERVER:=true
19.1 --- a/src/os/solaris/vm/os_solaris.cpp Fri Oct 05 13:37:08 2012 -0700 19.2 +++ b/src/os/solaris/vm/os_solaris.cpp Wed Oct 10 14:35:58 2012 -0400 19.3 @@ -5870,15 +5870,6 @@ 19.4 } 19.5 } 19.6 19.7 -// Just to get the Kernel build to link on solaris for testing. 19.8 - 19.9 -extern "C" { 19.10 -class ASGCT_CallTrace; 19.11 -void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) 19.12 - KERNEL_RETURN; 19.13 -} 19.14 - 19.15 - 19.16 // ObjectMonitor park-unpark infrastructure ... 19.17 // 19.18 // We implement Solaris and Linux PlatformEvents with the
20.1 --- a/src/share/vm/memory/allocation.hpp Fri Oct 05 13:37:08 2012 -0700 20.2 +++ b/src/share/vm/memory/allocation.hpp Wed Oct 10 14:35:58 2012 -0400 20.3 @@ -27,6 +27,7 @@ 20.4 20.5 #include "runtime/globals.hpp" 20.6 #include "utilities/globalDefinitions.hpp" 20.7 +#include "utilities/macros.hpp" 20.8 #ifdef COMPILER1 20.9 #include "c1/c1_globals.hpp" 20.10 #endif 20.11 @@ -157,8 +158,16 @@ 20.12 20.13 typedef unsigned short MEMFLAGS; 20.14 20.15 +#if INCLUDE_NMT 20.16 + 20.17 extern bool NMT_track_callsite; 20.18 20.19 +#else 20.20 + 20.21 +const bool NMT_track_callsite = false; 20.22 + 20.23 +#endif // INCLUDE_NMT 20.24 + 20.25 // debug build does not inline 20.26 #if defined(_DEBUG_) 20.27 #define CURRENT_PC (NMT_track_callsite ? os::get_caller_pc(1) : 0)
21.1 --- a/src/share/vm/memory/heapInspection.hpp Fri Oct 05 13:37:08 2012 -0700 21.2 +++ b/src/share/vm/memory/heapInspection.hpp Wed Oct 10 14:35:58 2012 -0400 21.3 @@ -1,5 +1,5 @@ 21.4 /* 21.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 21.6 + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 21.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 21.8 * 21.9 * This code is free software; you can redistribute it and/or modify it 21.10 @@ -28,7 +28,7 @@ 21.11 #include "memory/allocation.inline.hpp" 21.12 #include "oops/oop.inline.hpp" 21.13 21.14 -#ifndef SERVICES_KERNEL 21.15 +#if INCLUDE_SERVICES 21.16 21.17 21.18 // HeapInspection 21.19 @@ -129,12 +129,12 @@ 21.20 void sort(); 21.21 }; 21.22 21.23 -#endif // SERVICES_KERNEL 21.24 +#endif // INCLUDE_SERVICES 21.25 21.26 class HeapInspection : public AllStatic { 21.27 public: 21.28 - static void heap_inspection(outputStream* st, bool need_prologue) KERNEL_RETURN; 21.29 - static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) KERNEL_RETURN; 21.30 + static void heap_inspection(outputStream* st, bool need_prologue) NOT_SERVICES_RETURN; 21.31 + static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN; 21.32 }; 21.33 21.34 #endif // SHARE_VM_MEMORY_HEAPINSPECTION_HPP
22.1 --- a/src/share/vm/memory/metaspaceShared.cpp Fri Oct 05 13:37:08 2012 -0700 22.2 +++ b/src/share/vm/memory/metaspaceShared.cpp Wed Oct 10 14:35:58 2012 -0400 22.3 @@ -42,14 +42,8 @@ 22.4 22.5 22.6 int MetaspaceShared::_max_alignment = 0; 22.7 -int MetaspaceShared::max_alignment() { return _max_alignment; } 22.8 -void MetaspaceShared::set_max_alignment(int alignment) { _max_alignment = alignment; } 22.9 22.10 -// Accessor functions to save shared space created for metadata, which has 22.11 -// extra space allocated at the end for miscellaneous data and code. 22.12 ReservedSpace* MetaspaceShared::_shared_rs = NULL; 22.13 -ReservedSpace* MetaspaceShared::shared_rs() { return _shared_rs; } 22.14 -void MetaspaceShared::set_shared_rs(ReservedSpace* rs) { _shared_rs = rs; } 22.15 22.16 // Read/write a data stream for restoring/preserving metadata pointers and 22.17 // miscellaneous data from/to the shared archive file.
23.1 --- a/src/share/vm/memory/metaspaceShared.hpp Fri Oct 05 13:37:08 2012 -0700 23.2 +++ b/src/share/vm/memory/metaspaceShared.hpp Wed Oct 10 14:35:58 2012 -0400 23.3 @@ -56,18 +56,33 @@ 23.4 n_regions = 4 23.5 }; 23.6 23.7 - static void set_max_alignment(int alignment) KERNEL_RETURN; 23.8 - static int max_alignment() KERNEL_RETURN_(0); 23.9 + // Accessor functions to save shared space created for metadata, which has 23.10 + // extra space allocated at the end for miscellaneous data and code. 23.11 + static void set_max_alignment(int alignment) { 23.12 + CDS_ONLY(_max_alignment = alignment); 23.13 + } 23.14 23.15 - static void preload_and_dump(TRAPS) KERNEL_RETURN; 23.16 - static ReservedSpace* shared_rs(); 23.17 - static void set_shared_rs(ReservedSpace* rs) KERNEL_RETURN; 23.18 + static int max_alignment() { 23.19 + CDS_ONLY(return _max_alignment); 23.20 + NOT_CDS(return 0); 23.21 + } 23.22 23.23 - static bool map_shared_spaces(FileMapInfo* mapinfo) KERNEL_RETURN_(false); 23.24 - static void initialize_shared_spaces() KERNEL_RETURN; 23.25 + static void preload_and_dump(TRAPS) NOT_CDS_RETURN; 23.26 + 23.27 + static ReservedSpace* shared_rs() { 23.28 + CDS_ONLY(return _shared_rs); 23.29 + NOT_CDS(return NULL); 23.30 + } 23.31 + 23.32 + static void set_shared_rs(ReservedSpace* rs) { 23.33 + CDS_ONLY(_shared_rs = rs;) 23.34 + } 23.35 + 23.36 + static bool map_shared_spaces(FileMapInfo* mapinfo) NOT_CDS_RETURN_(false); 23.37 + static void initialize_shared_spaces() NOT_CDS_RETURN; 23.38 23.39 // Return true if given address is in the mapped shared space. 23.40 - static bool is_in_shared_space(const void* p) KERNEL_RETURN_(false); 23.41 + static bool is_in_shared_space(const void* p) NOT_CDS_RETURN_(false); 23.42 23.43 static void generate_vtable_methods(void** vtbl_list, 23.44 void** vtable, 23.45 @@ -79,7 +94,7 @@ 23.46 // Remap the shared readonly space to shared readwrite, private if 23.47 // sharing is enabled. Simply returns true if sharing is not enabled 23.48 // or if the remapping has already been done by a prior call. 23.49 - static bool remap_shared_readonly_as_readwrite() KERNEL_RETURN_(true); 23.50 + static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true); 23.51 23.52 static void print_shared_spaces(); 23.53 };
24.1 --- a/src/share/vm/memory/universe.cpp Fri Oct 05 13:37:08 2012 -0700 24.2 +++ b/src/share/vm/memory/universe.cpp Wed Oct 10 14:35:58 2012 -0400 24.3 @@ -752,7 +752,7 @@ 24.4 #ifndef SERIALGC 24.5 Universe::_collectedHeap = new ParallelScavengeHeap(); 24.6 #else // SERIALGC 24.7 - fatal("UseParallelGC not supported in java kernel vm."); 24.8 + fatal("UseParallelGC not supported in this VM."); 24.9 #endif // SERIALGC 24.10 24.11 } else if (UseG1GC) { 24.12 @@ -777,7 +777,7 @@ 24.13 gc_policy = new ConcurrentMarkSweepPolicy(); 24.14 } 24.15 #else // SERIALGC 24.16 - fatal("UseConcMarkSweepGC not supported in java kernel vm."); 24.17 + fatal("UseConcMarkSweepGC not supported in this VM."); 24.18 #endif // SERIALGC 24.19 } else { // default old generation 24.20 gc_policy = new MarkSweepPolicy();
25.1 --- a/src/share/vm/prims/forte.hpp Fri Oct 05 13:37:08 2012 -0700 25.2 +++ b/src/share/vm/prims/forte.hpp Wed Oct 10 14:35:58 2012 -0400 25.3 @@ -1,5 +1,5 @@ 25.4 /* 25.5 - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 25.6 + * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. 25.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 25.8 * 25.9 * This code is free software; you can redistribute it and/or modify it 25.10 @@ -30,7 +30,7 @@ 25.11 class Forte : AllStatic { 25.12 public: 25.13 static void register_stub(const char* name, address start, address end) 25.14 - KERNEL_RETURN; 25.15 + NOT_JVMTI_RETURN; 25.16 // register internal VM stub 25.17 }; 25.18
26.1 --- a/src/share/vm/prims/jni.cpp Fri Oct 05 13:37:08 2012 -0700 26.2 +++ b/src/share/vm/prims/jni.cpp Wed Oct 10 14:35:58 2012 -0400 26.3 @@ -3003,9 +3003,9 @@ 26.4 HOTSPOT_JNI_GETSTATICOBJECTFIELD_ENTRY( 26.5 env, clazz, (uintptr_t) fieldID); 26.6 #endif /* USDT2 */ 26.7 -#ifndef JNICHECK_KERNEL 26.8 +#if INCLUDE_JNI_CHECK 26.9 DEBUG_ONLY(Klass* param_k = jniCheck::validate_class(thread, clazz);) 26.10 -#endif // JNICHECK_KERNEL 26.11 +#endif // INCLUDE_JNI_CHECK 26.12 JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); 26.13 assert(id->is_static_field_id(), "invalid static field id"); 26.14 // Keep JVMTI addition small and only check enabled flag here. 26.15 @@ -3951,6 +3951,7 @@ 26.16 // SetNativeMethodPrefix(es) functions in the JVM TI Spec for details. 26.17 static Method* find_prefixed_native(KlassHandle k, 26.18 Symbol* name, Symbol* signature, TRAPS) { 26.19 +#if INCLUDE_JVMTI 26.20 ResourceMark rm(THREAD); 26.21 Method* method; 26.22 int name_len = name->utf8_length(); 26.23 @@ -3982,6 +3983,7 @@ 26.24 name_len = trial_len; 26.25 name_str = trial_name_str; 26.26 } 26.27 +#endif // INCLUDE_JVMTI 26.28 return NULL; // not found 26.29 } 26.30 26.31 @@ -4975,11 +4977,9 @@ 26.32 26.33 // Returns the function structure 26.34 struct JNINativeInterface_* jni_functions() { 26.35 -#ifndef JNICHECK_KERNEL 26.36 +#if INCLUDE_JNI_CHECK 26.37 if (CheckJNICalls) return jni_functions_check(); 26.38 -#else // JNICHECK_KERNEL 26.39 - if (CheckJNICalls) warning("-Xcheck:jni is not supported in kernel vm."); 26.40 -#endif // JNICHECK_KERNEL 26.41 +#endif // INCLUDE_JNI_CHECK 26.42 return &jni_NativeInterface; 26.43 } 26.44
27.1 --- a/src/share/vm/prims/jvmtiEnter.xsl Fri Oct 05 13:37:08 2012 -0700 27.2 +++ b/src/share/vm/prims/jvmtiEnter.xsl Wed Oct 10 14:35:58 2012 -0400 27.3 @@ -1,6 +1,6 @@ 27.4 <?xml version="1.0"?> 27.5 <!-- 27.6 - Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 27.7 + Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 27.8 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 27.9 27.10 This code is free software; you can redistribute it and/or modify it 27.11 @@ -37,6 +37,8 @@ 27.12 <xsl:call-template name="sourceHeader"/> 27.13 <xsl:text> 27.14 # include "precompiled.hpp" 27.15 +# include "utilities/macros.hpp" 27.16 +#if INCLUDE_JVMTI 27.17 # include "prims/jvmtiEnter.hpp" 27.18 # include "prims/jvmtiRawMonitor.hpp" 27.19 # include "prims/jvmtiUtil.hpp" 27.20 @@ -247,6 +249,7 @@ 27.21 27.22 <xsl:text> 27.23 }; 27.24 +#endif // INCLUDE_JVMTI 27.25 </xsl:text> 27.26 </xsl:template> 27.27 27.28 @@ -469,7 +472,7 @@ 27.29 </xsl:text> 27.30 27.31 <xsl:if test="not(contains(@jkernel,'yes'))"> 27.32 - <xsl:text>
#ifdef JVMTI_KERNEL 
</xsl:text> 27.33 + <xsl:text>
#if !INCLUDE_JVMTI 
</xsl:text> 27.34 <xsl:text> return JVMTI_ERROR_NOT_AVAILABLE; 
</xsl:text> 27.35 <xsl:text>#else 
</xsl:text> 27.36 </xsl:if> 27.37 @@ -596,7 +599,7 @@ 27.38 </xsl:text> 27.39 27.40 <xsl:if test="not(contains(@jkernel,'yes'))"> 27.41 - <xsl:text>#endif // JVMTI_KERNEL
</xsl:text> 27.42 + <xsl:text>#endif // INCLUDE_JVMTI
</xsl:text> 27.43 </xsl:if> 27.44 27.45 <xsl:text>}
</xsl:text>
28.1 --- a/src/share/vm/prims/jvmtiEnvBase.hpp Fri Oct 05 13:37:08 2012 -0700 28.2 +++ b/src/share/vm/prims/jvmtiEnvBase.hpp Wed Oct 10 14:35:58 2012 -0400 28.3 @@ -56,7 +56,9 @@ 28.4 28.5 private: 28.6 28.7 +#if INCLUDE_JVMTI 28.8 static JvmtiEnvBase* _head_environment; // head of environment list 28.9 +#endif // INCLUDE_JVMTI 28.10 28.11 static bool _globally_initialized; 28.12 static jvmtiPhase _phase; 28.13 @@ -129,7 +131,10 @@ 28.14 friend class JvmtiEnvIterator; 28.15 JvmtiEnv* next_environment() { return (JvmtiEnv*)_next; } 28.16 void set_next_environment(JvmtiEnvBase* env) { _next = env; } 28.17 - static JvmtiEnv* head_environment() { return (JvmtiEnv*)_head_environment; } 28.18 + static JvmtiEnv* head_environment() { 28.19 + JVMTI_ONLY(return (JvmtiEnv*)_head_environment); 28.20 + NOT_JVMTI(return NULL); 28.21 + } 28.22 28.23 public: 28.24
29.1 --- a/src/share/vm/prims/jvmtiExport.hpp Fri Oct 05 13:37:08 2012 -0700 29.2 +++ b/src/share/vm/prims/jvmtiExport.hpp Wed Oct 10 14:35:58 2012 -0400 29.3 @@ -46,21 +46,18 @@ 29.4 class JvmtiThreadState; 29.5 class AttachOperation; 29.6 29.7 -#ifndef JVMTI_KERNEL 29.8 -#define JVMTI_SUPPORT_FLAG(key) \ 29.9 - private: \ 29.10 - static bool _##key; \ 29.11 - public: \ 29.12 - inline static void set_##key(bool on) { _##key = (on != 0); } \ 29.13 - inline static bool key() { return _##key; } 29.14 -#else // JVMTI_KERNEL 29.15 #define JVMTI_SUPPORT_FLAG(key) \ 29.16 private: \ 29.17 - const static bool _##key = false; \ 29.18 + static bool _##key; \ 29.19 public: \ 29.20 - inline static void set_##key(bool on) { report_unsupported(on); } \ 29.21 - inline static bool key() { return _##key; } 29.22 -#endif // JVMTI_KERNEL 29.23 + inline static void set_##key(bool on) { \ 29.24 + JVMTI_ONLY(_##key = (on != 0)); \ 29.25 + NOT_JVMTI(report_unsupported(on)); \ 29.26 + } \ 29.27 + inline static bool key() { \ 29.28 + JVMTI_ONLY(return _##key); \ 29.29 + NOT_JVMTI(return false); \ 29.30 + } 29.31 29.32 29.33 // This class contains the JVMTI interface for the rest of hotspot. 29.34 @@ -68,6 +65,8 @@ 29.35 class JvmtiExport : public AllStatic { 29.36 friend class VMStructs; 29.37 private: 29.38 + 29.39 +#if INCLUDE_JVMTI 29.40 static int _field_access_count; 29.41 static int _field_modification_count; 29.42 29.43 @@ -75,6 +74,7 @@ 29.44 static bool _can_hotswap_or_post_breakpoint; 29.45 static bool _can_modify_any_class; 29.46 static bool _can_walk_any_space; 29.47 +#endif // INCLUDE_JVMTI 29.48 29.49 JVMTI_SUPPORT_FLAG(can_get_source_debug_extension) 29.50 JVMTI_SUPPORT_FLAG(can_maintain_original_method_order) 29.51 @@ -125,10 +125,18 @@ 29.52 29.53 // these should only be called by the friend class 29.54 friend class JvmtiManageCapabilities; 29.55 - inline static void set_can_modify_any_class(bool on) { _can_modify_any_class = (on != 0); } 29.56 - inline static void set_can_access_local_variables(bool on) { _can_access_local_variables = (on != 0); } 29.57 - inline static void set_can_hotswap_or_post_breakpoint(bool on) { _can_hotswap_or_post_breakpoint = (on != 0); } 29.58 - inline static void set_can_walk_any_space(bool on) { _can_walk_any_space = (on != 0); } 29.59 + inline static void set_can_modify_any_class(bool on) { 29.60 + JVMTI_ONLY(_can_modify_any_class = (on != 0);) 29.61 + } 29.62 + inline static void set_can_access_local_variables(bool on) { 29.63 + JVMTI_ONLY(_can_access_local_variables = (on != 0);) 29.64 + } 29.65 + inline static void set_can_hotswap_or_post_breakpoint(bool on) { 29.66 + JVMTI_ONLY(_can_hotswap_or_post_breakpoint = (on != 0);) 29.67 + } 29.68 + inline static void set_can_walk_any_space(bool on) { 29.69 + JVMTI_ONLY(_can_walk_any_space = (on != 0);) 29.70 + } 29.71 29.72 enum { 29.73 JVMTI_VERSION_MASK = 0x70000000, 29.74 @@ -144,7 +152,7 @@ 29.75 // posts a DynamicCodeGenerated event (internal/private implementation). 29.76 // The public post_dynamic_code_generated* functions make use of the 29.77 // internal implementation. Also called from JvmtiDeferredEvent::post() 29.78 - static void post_dynamic_code_generated_internal(const char *name, const void *code_begin, const void *code_end) KERNEL_RETURN; 29.79 + static void post_dynamic_code_generated_internal(const char *name, const void *code_begin, const void *code_end) NOT_JVMTI_RETURN; 29.80 29.81 private: 29.82 29.83 @@ -154,9 +162,9 @@ 29.84 29.85 static void post_compiled_method_load(JvmtiEnv* env, const jmethodID method, const jint length, 29.86 const void *code_begin, const jint map_length, 29.87 - const jvmtiAddrLocationMap* map) KERNEL_RETURN; 29.88 + const jvmtiAddrLocationMap* map) NOT_JVMTI_RETURN; 29.89 static void post_dynamic_code_generated(JvmtiEnv* env, const char *name, const void *code_begin, 29.90 - const void *code_end) KERNEL_RETURN; 29.91 + const void *code_end) NOT_JVMTI_RETURN; 29.92 29.93 // The RedefineClasses() API breaks some invariants in the "regular" 29.94 // system. For example, there are sanity checks when GC'ing nmethods 29.95 @@ -178,9 +186,8 @@ 29.96 static bool _has_redefined_a_class; 29.97 friend class VM_RedefineClasses; 29.98 inline static void set_has_redefined_a_class() { 29.99 - _has_redefined_a_class = true; 29.100 + JVMTI_ONLY(_has_redefined_a_class = true;) 29.101 } 29.102 - 29.103 // Flag to indicate if the compiler has recorded all dependencies. When the 29.104 // can_redefine_classes capability is enabled in the OnLoad phase then the compiler 29.105 // records all dependencies from startup. However if the capability is first 29.106 @@ -191,7 +198,8 @@ 29.107 29.108 public: 29.109 inline static bool has_redefined_a_class() { 29.110 - return _has_redefined_a_class; 29.111 + JVMTI_ONLY(return _has_redefined_a_class); 29.112 + NOT_JVMTI(return false); 29.113 } 29.114 29.115 inline static bool all_dependencies_are_recorded() { 29.116 @@ -204,120 +212,141 @@ 29.117 29.118 29.119 // let JVMTI know that the JVM_OnLoad code is running 29.120 - static void enter_onload_phase(); 29.121 + static void enter_onload_phase() NOT_JVMTI_RETURN; 29.122 29.123 // let JVMTI know that the VM isn't up yet (and JVM_OnLoad code isn't running) 29.124 - static void enter_primordial_phase(); 29.125 + static void enter_primordial_phase() NOT_JVMTI_RETURN; 29.126 29.127 // let JVMTI know that the VM isn't up yet but JNI is live 29.128 - static void enter_start_phase(); 29.129 + static void enter_start_phase() NOT_JVMTI_RETURN; 29.130 29.131 // let JVMTI know that the VM is fully up and running now 29.132 - static void enter_live_phase(); 29.133 + static void enter_live_phase() NOT_JVMTI_RETURN; 29.134 29.135 // ------ can_* conditions (below) are set at OnLoad and never changed ------------ 29.136 - inline static bool can_modify_any_class() { return _can_modify_any_class; } 29.137 - inline static bool can_access_local_variables() { return _can_access_local_variables; } 29.138 - inline static bool can_hotswap_or_post_breakpoint() { return _can_hotswap_or_post_breakpoint; } 29.139 - inline static bool can_walk_any_space() { return _can_walk_any_space; } 29.140 + inline static bool can_modify_any_class() { 29.141 + JVMTI_ONLY(return _can_modify_any_class); 29.142 + NOT_JVMTI(return false); 29.143 + } 29.144 + inline static bool can_access_local_variables() { 29.145 + JVMTI_ONLY(return _can_access_local_variables); 29.146 + NOT_JVMTI(return false); 29.147 + } 29.148 + inline static bool can_hotswap_or_post_breakpoint() { 29.149 + JVMTI_ONLY(return _can_hotswap_or_post_breakpoint); 29.150 + NOT_JVMTI(return false); 29.151 + } 29.152 + inline static bool can_walk_any_space() { 29.153 + JVMTI_ONLY(return _can_walk_any_space); 29.154 + NOT_JVMTI(return false); 29.155 + } 29.156 29.157 // field access management 29.158 - static address get_field_access_count_addr(); 29.159 + static address get_field_access_count_addr() NOT_JVMTI_RETURN_(0); 29.160 29.161 // field modification management 29.162 - static address get_field_modification_count_addr(); 29.163 + static address get_field_modification_count_addr() NOT_JVMTI_RETURN_(0); 29.164 29.165 // ----------------- 29.166 29.167 - static bool is_jvmti_version(jint version) { return (version & JVMTI_VERSION_MASK) == JVMTI_VERSION_VALUE; } 29.168 - static bool is_jvmdi_version(jint version) { return (version & JVMTI_VERSION_MASK) == JVMDI_VERSION_VALUE; } 29.169 - static jint get_jvmti_interface(JavaVM *jvm, void **penv, jint version); 29.170 + static bool is_jvmti_version(jint version) { 29.171 + JVMTI_ONLY(return (version & JVMTI_VERSION_MASK) == JVMTI_VERSION_VALUE); 29.172 + NOT_JVMTI(return false); 29.173 + } 29.174 + static bool is_jvmdi_version(jint version) { 29.175 + JVMTI_ONLY(return (version & JVMTI_VERSION_MASK) == JVMDI_VERSION_VALUE); 29.176 + NOT_JVMTI(return false); 29.177 + } 29.178 + static jint get_jvmti_interface(JavaVM *jvm, void **penv, jint version) NOT_JVMTI_RETURN_(0); 29.179 static void decode_version_values(jint version, int * major, int * minor, 29.180 - int * micro); 29.181 + int * micro) NOT_JVMTI_RETURN; 29.182 29.183 // single stepping management methods 29.184 - static void at_single_stepping_point(JavaThread *thread, Method* method, address location) KERNEL_RETURN; 29.185 - static void expose_single_stepping(JavaThread *thread) KERNEL_RETURN; 29.186 - static bool hide_single_stepping(JavaThread *thread) KERNEL_RETURN_(false); 29.187 + static void at_single_stepping_point(JavaThread *thread, Method* method, address location) NOT_JVMTI_RETURN; 29.188 + static void expose_single_stepping(JavaThread *thread) NOT_JVMTI_RETURN; 29.189 + static bool hide_single_stepping(JavaThread *thread) NOT_JVMTI_RETURN_(false); 29.190 29.191 // Methods that notify the debugger that something interesting has happened in the VM. 29.192 - static void post_vm_start (); 29.193 - static void post_vm_initialized (); 29.194 - static void post_vm_death (); 29.195 + static void post_vm_start () NOT_JVMTI_RETURN; 29.196 + static void post_vm_initialized () NOT_JVMTI_RETURN; 29.197 + static void post_vm_death () NOT_JVMTI_RETURN; 29.198 29.199 - static void post_single_step (JavaThread *thread, Method* method, address location) KERNEL_RETURN; 29.200 - static void post_raw_breakpoint (JavaThread *thread, Method* method, address location) KERNEL_RETURN; 29.201 + static void post_single_step (JavaThread *thread, Method* method, address location) NOT_JVMTI_RETURN; 29.202 + static void post_raw_breakpoint (JavaThread *thread, Method* method, address location) NOT_JVMTI_RETURN; 29.203 29.204 - static void post_exception_throw (JavaThread *thread, Method* method, address location, oop exception) KERNEL_RETURN; 29.205 - static void notice_unwind_due_to_exception (JavaThread *thread, Method* method, address location, oop exception, bool in_handler_frame) KERNEL_RETURN; 29.206 + static void post_exception_throw (JavaThread *thread, Method* method, address location, oop exception) NOT_JVMTI_RETURN; 29.207 + static void notice_unwind_due_to_exception (JavaThread *thread, Method* method, address location, oop exception, bool in_handler_frame) NOT_JVMTI_RETURN; 29.208 29.209 static oop jni_GetField_probe (JavaThread *thread, jobject jobj, 29.210 oop obj, Klass* klass, jfieldID fieldID, bool is_static) 29.211 - KERNEL_RETURN_(NULL); 29.212 + NOT_JVMTI_RETURN_(NULL); 29.213 static oop jni_GetField_probe_nh (JavaThread *thread, jobject jobj, 29.214 oop obj, Klass* klass, jfieldID fieldID, bool is_static) 29.215 - KERNEL_RETURN_(NULL); 29.216 + NOT_JVMTI_RETURN_(NULL); 29.217 static void post_field_access_by_jni (JavaThread *thread, oop obj, 29.218 - Klass* klass, jfieldID fieldID, bool is_static) KERNEL_RETURN; 29.219 + Klass* klass, jfieldID fieldID, bool is_static) NOT_JVMTI_RETURN; 29.220 static void post_field_access (JavaThread *thread, Method* method, 29.221 - address location, KlassHandle field_klass, Handle object, jfieldID field) KERNEL_RETURN; 29.222 + address location, KlassHandle field_klass, Handle object, jfieldID field) NOT_JVMTI_RETURN; 29.223 static oop jni_SetField_probe (JavaThread *thread, jobject jobj, 29.224 oop obj, Klass* klass, jfieldID fieldID, bool is_static, char sig_type, 29.225 - jvalue *value) KERNEL_RETURN_(NULL); 29.226 + jvalue *value) NOT_JVMTI_RETURN_(NULL); 29.227 static oop jni_SetField_probe_nh (JavaThread *thread, jobject jobj, 29.228 oop obj, Klass* klass, jfieldID fieldID, bool is_static, char sig_type, 29.229 - jvalue *value) KERNEL_RETURN_(NULL); 29.230 + jvalue *value) NOT_JVMTI_RETURN_(NULL); 29.231 static void post_field_modification_by_jni(JavaThread *thread, oop obj, 29.232 Klass* klass, jfieldID fieldID, bool is_static, char sig_type, 29.233 jvalue *value); 29.234 static void post_raw_field_modification(JavaThread *thread, Method* method, 29.235 address location, KlassHandle field_klass, Handle object, jfieldID field, 29.236 - char sig_type, jvalue *value) KERNEL_RETURN; 29.237 + char sig_type, jvalue *value) NOT_JVMTI_RETURN; 29.238 29.239 - static void post_method_entry (JavaThread *thread, Method* method, frame current_frame) KERNEL_RETURN; 29.240 - static void post_method_exit (JavaThread *thread, Method* method, frame current_frame) KERNEL_RETURN; 29.241 + static void post_method_entry (JavaThread *thread, Method* method, frame current_frame) NOT_JVMTI_RETURN; 29.242 + static void post_method_exit (JavaThread *thread, Method* method, frame current_frame) NOT_JVMTI_RETURN; 29.243 29.244 - static void post_class_load (JavaThread *thread, Klass* klass) KERNEL_RETURN; 29.245 - static void post_class_unload (Klass* klass) KERNEL_RETURN; 29.246 - static void post_class_prepare (JavaThread *thread, Klass* klass) KERNEL_RETURN; 29.247 + static void post_class_load (JavaThread *thread, Klass* klass) NOT_JVMTI_RETURN; 29.248 + static void post_class_unload (Klass* klass) NOT_JVMTI_RETURN; 29.249 + static void post_class_prepare (JavaThread *thread, Klass* klass) NOT_JVMTI_RETURN; 29.250 29.251 - static void post_thread_start (JavaThread *thread) KERNEL_RETURN; 29.252 - static void post_thread_end (JavaThread *thread) KERNEL_RETURN; 29.253 + static void post_thread_start (JavaThread *thread) NOT_JVMTI_RETURN; 29.254 + static void post_thread_end (JavaThread *thread) NOT_JVMTI_RETURN; 29.255 29.256 // Support for java.lang.instrument agent loading. 29.257 static bool _should_post_class_file_load_hook; 29.258 inline static void set_should_post_class_file_load_hook(bool on) { _should_post_class_file_load_hook = on; } 29.259 - inline static bool should_post_class_file_load_hook() { return _should_post_class_file_load_hook; } 29.260 + inline static bool should_post_class_file_load_hook() { 29.261 + JVMTI_ONLY(return _should_post_class_file_load_hook); 29.262 + NOT_JVMTI(return false;) 29.263 + } 29.264 static void post_class_file_load_hook(Symbol* h_name, Handle class_loader, 29.265 Handle h_protection_domain, 29.266 unsigned char **data_ptr, unsigned char **end_ptr, 29.267 unsigned char **cached_data_ptr, 29.268 - jint *cached_length_ptr); 29.269 - static void post_native_method_bind(Method* method, address* function_ptr) KERNEL_RETURN; 29.270 - static void post_compiled_method_load(nmethod *nm) KERNEL_RETURN; 29.271 - static void post_dynamic_code_generated(const char *name, const void *code_begin, const void *code_end) KERNEL_RETURN; 29.272 + jint *cached_length_ptr) NOT_JVMTI_RETURN; 29.273 + static void post_native_method_bind(Method* method, address* function_ptr) NOT_JVMTI_RETURN; 29.274 + static void post_compiled_method_load(nmethod *nm) NOT_JVMTI_RETURN; 29.275 + static void post_dynamic_code_generated(const char *name, const void *code_begin, const void *code_end) NOT_JVMTI_RETURN; 29.276 29.277 // used to post a CompiledMethodUnload event 29.278 - static void post_compiled_method_unload(jmethodID mid, const void *code_begin) KERNEL_RETURN; 29.279 + static void post_compiled_method_unload(jmethodID mid, const void *code_begin) NOT_JVMTI_RETURN; 29.280 29.281 // similiar to post_dynamic_code_generated except that it can be used to 29.282 // post a DynamicCodeGenerated event while holding locks in the VM. Any event 29.283 // posted using this function is recorded by the enclosing event collector 29.284 // -- JvmtiDynamicCodeEventCollector. 29.285 - static void post_dynamic_code_generated_while_holding_locks(const char* name, address code_begin, address code_end) KERNEL_RETURN; 29.286 + static void post_dynamic_code_generated_while_holding_locks(const char* name, address code_begin, address code_end) NOT_JVMTI_RETURN; 29.287 29.288 - static void post_garbage_collection_finish() KERNEL_RETURN; 29.289 - static void post_garbage_collection_start() KERNEL_RETURN; 29.290 - static void post_data_dump() KERNEL_RETURN; 29.291 - static void post_monitor_contended_enter(JavaThread *thread, ObjectMonitor *obj_mntr) KERNEL_RETURN; 29.292 - static void post_monitor_contended_entered(JavaThread *thread, ObjectMonitor *obj_mntr) KERNEL_RETURN; 29.293 - static void post_monitor_wait(JavaThread *thread, oop obj, jlong timeout) KERNEL_RETURN; 29.294 - static void post_monitor_waited(JavaThread *thread, ObjectMonitor *obj_mntr, jboolean timed_out) KERNEL_RETURN; 29.295 - static void post_object_free(JvmtiEnv* env, jlong tag) KERNEL_RETURN; 29.296 - static void post_resource_exhausted(jint resource_exhausted_flags, const char* detail) KERNEL_RETURN; 29.297 - static void record_vm_internal_object_allocation(oop object) KERNEL_RETURN; 29.298 + static void post_garbage_collection_finish() NOT_JVMTI_RETURN; 29.299 + static void post_garbage_collection_start() NOT_JVMTI_RETURN; 29.300 + static void post_data_dump() NOT_JVMTI_RETURN; 29.301 + static void post_monitor_contended_enter(JavaThread *thread, ObjectMonitor *obj_mntr) NOT_JVMTI_RETURN; 29.302 + static void post_monitor_contended_entered(JavaThread *thread, ObjectMonitor *obj_mntr) NOT_JVMTI_RETURN; 29.303 + static void post_monitor_wait(JavaThread *thread, oop obj, jlong timeout) NOT_JVMTI_RETURN; 29.304 + static void post_monitor_waited(JavaThread *thread, ObjectMonitor *obj_mntr, jboolean timed_out) NOT_JVMTI_RETURN; 29.305 + static void post_object_free(JvmtiEnv* env, jlong tag) NOT_JVMTI_RETURN; 29.306 + static void post_resource_exhausted(jint resource_exhausted_flags, const char* detail) NOT_JVMTI_RETURN; 29.307 + static void record_vm_internal_object_allocation(oop object) NOT_JVMTI_RETURN; 29.308 // Post objects collected by vm_object_alloc_event_collector. 29.309 - static void post_vm_object_alloc(JavaThread *thread, oop object) KERNEL_RETURN; 29.310 + static void post_vm_object_alloc(JavaThread *thread, oop object) NOT_JVMTI_RETURN; 29.311 // Collects vm internal objects for later event posting. 29.312 inline static void vm_object_alloc_event_collector(oop object) { 29.313 if (should_post_vm_object_alloc()) { 29.314 @@ -331,21 +360,19 @@ 29.315 } 29.316 } 29.317 29.318 - static void cleanup_thread (JavaThread* thread) KERNEL_RETURN; 29.319 + static void cleanup_thread (JavaThread* thread) NOT_JVMTI_RETURN; 29.320 29.321 - static void oops_do(OopClosure* f) KERNEL_RETURN; 29.322 - static void weak_oops_do(BoolObjectClosure* b, OopClosure* f) KERNEL_RETURN; 29.323 - static void gc_epilogue() KERNEL_RETURN; 29.324 + static void oops_do(OopClosure* f) NOT_JVMTI_RETURN; 29.325 + static void weak_oops_do(BoolObjectClosure* b, OopClosure* f) NOT_JVMTI_RETURN; 29.326 + static void gc_epilogue() NOT_JVMTI_RETURN; 29.327 29.328 - static void transition_pending_onload_raw_monitors() KERNEL_RETURN; 29.329 + static void transition_pending_onload_raw_monitors() NOT_JVMTI_RETURN; 29.330 29.331 -#ifndef SERVICES_KERNEL 29.332 // attach support 29.333 - static jint load_agent_library(AttachOperation* op, outputStream* out); 29.334 -#endif // SERVICES_KERNEL 29.335 + static jint load_agent_library(AttachOperation* op, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR); 29.336 29.337 // SetNativeMethodPrefix support 29.338 - static char** get_all_native_method_prefixes(int* count_ptr); 29.339 + static char** get_all_native_method_prefixes(int* count_ptr) NOT_JVMTI_RETURN_(NULL); 29.340 }; 29.341 29.342 // Support class used by JvmtiDynamicCodeEventCollector and others. It 29.343 @@ -408,8 +435,8 @@ 29.344 void register_stub(const char* name, address start, address end); 29.345 29.346 public: 29.347 - JvmtiDynamicCodeEventCollector() KERNEL_RETURN; 29.348 - ~JvmtiDynamicCodeEventCollector() KERNEL_RETURN; 29.349 + JvmtiDynamicCodeEventCollector() NOT_JVMTI_RETURN; 29.350 + ~JvmtiDynamicCodeEventCollector() NOT_JVMTI_RETURN; 29.351 bool is_dynamic_code_event() { return true; } 29.352 29.353 }; 29.354 @@ -441,8 +468,8 @@ 29.355 static void oops_do_for_all_threads(OopClosure* f); 29.356 29.357 public: 29.358 - JvmtiVMObjectAllocEventCollector() KERNEL_RETURN; 29.359 - ~JvmtiVMObjectAllocEventCollector() KERNEL_RETURN; 29.360 + JvmtiVMObjectAllocEventCollector() NOT_JVMTI_RETURN; 29.361 + ~JvmtiVMObjectAllocEventCollector() NOT_JVMTI_RETURN; 29.362 bool is_vm_object_alloc_event() { return true; } 29.363 29.364 bool is_enabled() { return _enable; } 29.365 @@ -472,16 +499,16 @@ 29.366 bool was_enabled() { return _collector != NULL; } 29.367 29.368 public: 29.369 - NoJvmtiVMObjectAllocMark() KERNEL_RETURN; 29.370 - ~NoJvmtiVMObjectAllocMark() KERNEL_RETURN; 29.371 + NoJvmtiVMObjectAllocMark() NOT_JVMTI_RETURN; 29.372 + ~NoJvmtiVMObjectAllocMark() NOT_JVMTI_RETURN; 29.373 }; 29.374 29.375 29.376 // Base class for reporting GC events to JVMTI. 29.377 class JvmtiGCMarker : public StackObj { 29.378 public: 29.379 - JvmtiGCMarker() KERNEL_RETURN; 29.380 - ~JvmtiGCMarker() KERNEL_RETURN; 29.381 + JvmtiGCMarker() NOT_JVMTI_RETURN; 29.382 + ~JvmtiGCMarker() NOT_JVMTI_RETURN; 29.383 }; 29.384 29.385 // JvmtiHideSingleStepping is a helper class for hiding
30.1 --- a/src/share/vm/prims/jvmtiImpl.hpp Fri Oct 05 13:37:08 2012 -0700 30.2 +++ b/src/share/vm/prims/jvmtiImpl.hpp Wed Oct 10 14:35:58 2012 -0400 30.3 @@ -481,15 +481,15 @@ 30.4 30.5 // Factory methods 30.6 static JvmtiDeferredEvent compiled_method_load_event(nmethod* nm) 30.7 - KERNEL_RETURN_(JvmtiDeferredEvent()); 30.8 + NOT_JVMTI_RETURN_(JvmtiDeferredEvent()); 30.9 static JvmtiDeferredEvent compiled_method_unload_event(nmethod* nm, 30.10 - jmethodID id, const void* code) KERNEL_RETURN_(JvmtiDeferredEvent()); 30.11 + jmethodID id, const void* code) NOT_JVMTI_RETURN_(JvmtiDeferredEvent()); 30.12 static JvmtiDeferredEvent dynamic_code_generated_event( 30.13 const char* name, const void* begin, const void* end) 30.14 - KERNEL_RETURN_(JvmtiDeferredEvent()); 30.15 + NOT_JVMTI_RETURN_(JvmtiDeferredEvent()); 30.16 30.17 // Actually posts the event. 30.18 - void post() KERNEL_RETURN; 30.19 + void post() NOT_JVMTI_RETURN; 30.20 }; 30.21 30.22 /** 30.23 @@ -520,13 +520,13 @@ 30.24 static volatile QueueNode* _pending_list; // Uses CAS for read/update 30.25 30.26 // Transfers events from the _pending_list to the _queue. 30.27 - static void process_pending_events() KERNEL_RETURN; 30.28 + static void process_pending_events() NOT_JVMTI_RETURN; 30.29 30.30 public: 30.31 // Must be holding Service_lock when calling these 30.32 - static bool has_events() KERNEL_RETURN_(false); 30.33 - static void enqueue(const JvmtiDeferredEvent& event) KERNEL_RETURN; 30.34 - static JvmtiDeferredEvent dequeue() KERNEL_RETURN_(JvmtiDeferredEvent()); 30.35 + static bool has_events() NOT_JVMTI_RETURN_(false); 30.36 + static void enqueue(const JvmtiDeferredEvent& event) NOT_JVMTI_RETURN; 30.37 + static JvmtiDeferredEvent dequeue() NOT_JVMTI_RETURN_(JvmtiDeferredEvent()); 30.38 30.39 // Used to enqueue events without using a lock, for times (such as during 30.40 // safepoint) when we can't or don't want to lock the Service_lock. 30.41 @@ -534,7 +534,7 @@ 30.42 // Events will be held off to the side until there's a call to 30.43 // dequeue(), enqueue(), or process_pending_events() (all of which require 30.44 // the holding of the Service_lock), and will be enqueued at that time. 30.45 - static void add_pending_event(const JvmtiDeferredEvent&) KERNEL_RETURN; 30.46 + static void add_pending_event(const JvmtiDeferredEvent&) NOT_JVMTI_RETURN; 30.47 }; 30.48 30.49 // Utility macro that checks for NULL pointers:
31.1 --- a/src/share/vm/prims/jvmtiRedefineClasses.hpp Fri Oct 05 13:37:08 2012 -0700 31.2 +++ b/src/share/vm/prims/jvmtiRedefineClasses.hpp Wed Oct 10 14:35:58 2012 -0400 31.3 @@ -495,9 +495,9 @@ 31.4 class MetadataOnStackMark : public StackObj { 31.5 NOT_PRODUCT(static bool _is_active;) 31.6 public: 31.7 - MetadataOnStackMark(); 31.8 - ~MetadataOnStackMark(); 31.9 - static void record(Metadata* m); 31.10 + MetadataOnStackMark() NOT_JVMTI_RETURN; 31.11 + ~MetadataOnStackMark() NOT_JVMTI_RETURN; 31.12 + static void record(Metadata* m) NOT_JVMTI_RETURN; 31.13 }; 31.14 31.15 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES_HPP
32.1 --- a/src/share/vm/prims/jvmtiTagMap.hpp Fri Oct 05 13:37:08 2012 -0700 32.2 +++ b/src/share/vm/prims/jvmtiTagMap.hpp Wed Oct 10 14:35:58 2012 -0400 32.3 @@ -1,5 +1,5 @@ 32.4 /* 32.5 - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 32.6 + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 32.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 32.8 * 32.9 * This code is free software; you can redistribute it and/or modify it 32.10 @@ -125,7 +125,7 @@ 32.11 jlong** tag_result_ptr); 32.12 32.13 static void weak_oops_do( 32.14 - BoolObjectClosure* is_alive, OopClosure* f) KERNEL_RETURN; 32.15 + BoolObjectClosure* is_alive, OopClosure* f) NOT_JVMTI_RETURN; 32.16 }; 32.17 32.18 #endif // SHARE_VM_PRIMS_JVMTITAGMAP_HPP
33.1 --- a/src/share/vm/prims/jvmtiThreadState.hpp Fri Oct 05 13:37:08 2012 -0700 33.2 +++ b/src/share/vm/prims/jvmtiThreadState.hpp Wed Oct 10 14:35:58 2012 -0400 33.3 @@ -391,7 +391,7 @@ 33.4 static ByteSize earlyret_oop_offset() { return byte_offset_of(JvmtiThreadState, _earlyret_oop); } 33.5 static ByteSize earlyret_value_offset() { return byte_offset_of(JvmtiThreadState, _earlyret_value); } 33.6 33.7 - void oops_do(OopClosure* f); // GC support 33.8 + void oops_do(OopClosure* f) NOT_JVMTI_RETURN; // GC support 33.9 33.10 public: 33.11 void set_should_post_on_exceptions(bool val) { _thread->set_should_post_on_exceptions_flag(val ? JNI_TRUE : JNI_FALSE); }
34.1 --- a/src/share/vm/prims/nativeLookup.cpp Fri Oct 05 13:37:08 2012 -0700 34.2 +++ b/src/share/vm/prims/nativeLookup.cpp Wed Oct 10 14:35:58 2012 -0400 34.3 @@ -328,6 +328,7 @@ 34.4 // native implementation again. 34.5 // See SetNativeMethodPrefix in the JVM TI Spec for more details. 34.6 address NativeLookup::lookup_entry_prefixed(methodHandle method, bool& in_base_library, TRAPS) { 34.7 +#if INCLUDE_JVMTI 34.8 ResourceMark rm(THREAD); 34.9 34.10 int prefix_count; 34.11 @@ -358,6 +359,7 @@ 34.12 } 34.13 } 34.14 } 34.15 +#endif // INCLUDE_JVMTI 34.16 return NULL; 34.17 } 34.18
35.1 --- a/src/share/vm/runtime/arguments.cpp Fri Oct 05 13:37:08 2012 -0700 35.2 +++ b/src/share/vm/runtime/arguments.cpp Wed Oct 10 14:35:58 2012 -0400 35.3 @@ -1066,7 +1066,7 @@ 35.4 } 35.5 } 35.6 35.7 -#ifndef KERNEL 35.8 +#if INCLUDE_ALTERNATE_GCS 35.9 static void disable_adaptive_size_policy(const char* collector_name) { 35.10 if (UseAdaptiveSizePolicy) { 35.11 if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) { 35.12 @@ -1141,7 +1141,7 @@ 35.13 FLAG_SET_ERGO(bool, UseParNewGC, true); 35.14 } 35.15 35.16 - // Turn off AdaptiveSizePolicy for CMS until it is complete. 35.17 + // Turn off AdaptiveSizePolicy by default for cms until it is complete. 35.18 disable_adaptive_size_policy("UseConcMarkSweepGC"); 35.19 35.20 // In either case, adjust ParallelGCThreads and/or UseParNewGC 35.21 @@ -1283,7 +1283,7 @@ 35.22 tty->print_cr("ConcGCThreads: %u", ConcGCThreads); 35.23 } 35.24 } 35.25 -#endif // KERNEL 35.26 +#endif // INCLUDE_ALTERNATE_GCS 35.27 35.28 void set_object_alignment() { 35.29 // Object alignment. 35.30 @@ -1300,10 +1300,10 @@ 35.31 // Oop encoding heap max 35.32 OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes; 35.33 35.34 -#ifndef KERNEL 35.35 +#if INCLUDE_ALTERNATE_GCS 35.36 // Set CMS global values 35.37 CompactibleFreeListSpace::set_cms_values(); 35.38 -#endif // KERNEL 35.39 +#endif // INCLUDE_ALTERNATE_GCS 35.40 } 35.41 35.42 bool verify_object_alignment() { 35.43 @@ -1991,9 +1991,15 @@ 35.44 } 35.45 #endif // SPARC 35.46 35.47 - if (PrintNMTStatistics && MemTracker::tracking_level() == MemTracker::NMT_off) { 35.48 - warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled"); 35.49 - PrintNMTStatistics = false; 35.50 + if (PrintNMTStatistics) { 35.51 +#if INCLUDE_NMT 35.52 + if (MemTracker::tracking_level() == MemTracker::NMT_off) { 35.53 +#endif // INCLUDE_NMT 35.54 + warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled"); 35.55 + PrintNMTStatistics = false; 35.56 +#if INCLUDE_NMT 35.57 + } 35.58 +#endif 35.59 } 35.60 35.61 return status; 35.62 @@ -2220,12 +2226,12 @@ 35.63 size_t len2 = strlen(pos+1) + 1; // options start after ':'. Final zero must be copied. 35.64 options = (char*)memcpy(NEW_C_HEAP_ARRAY(char, len2, mtInternal), pos+1, len2); 35.65 } 35.66 -#ifdef JVMTI_KERNEL 35.67 +#if !INCLUDE_JVMTI 35.68 if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) { 35.69 - warning("profiling and debugging agents are not supported with Kernel VM"); 35.70 + warning("profiling and debugging agents are not supported in this VM"); 35.71 } else 35.72 -#endif // JVMTI_KERNEL 35.73 - add_init_library(name, options); 35.74 +#endif // !INCLUDE_JVMTI 35.75 + add_init_library(name, options); 35.76 } 35.77 // -agentlib and -agentpath 35.78 } else if (match_option(option, "-agentlib:", &tail) || 35.79 @@ -2240,20 +2246,24 @@ 35.80 if(pos != NULL) { 35.81 options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(pos + 1) + 1, mtInternal), pos + 1); 35.82 } 35.83 -#ifdef JVMTI_KERNEL 35.84 +#if !INCLUDE_JVMTI 35.85 if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) { 35.86 - warning("profiling and debugging agents are not supported with Kernel VM"); 35.87 + warning("profiling and debugging agents are not supported in this VM"); 35.88 } else 35.89 -#endif // JVMTI_KERNEL 35.90 +#endif // !INCLUDE_JVMTI 35.91 add_init_agent(name, options, is_absolute_path); 35.92 35.93 } 35.94 // -javaagent 35.95 } else if (match_option(option, "-javaagent:", &tail)) { 35.96 +#if !INCLUDE_JVMTI 35.97 + warning("Instrumentation agents are not supported in this VM"); 35.98 +#else 35.99 if(tail != NULL) { 35.100 char *options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(tail) + 1, mtInternal), tail); 35.101 add_init_agent("instrument", options, false); 35.102 } 35.103 +#endif // !INCLUDE_JVMTI 35.104 // -Xnoclassgc 35.105 } else if (match_option(option, "-Xnoclassgc", &tail)) { 35.106 FLAG_SET_CMDLINE(bool, ClassUnloading, false); 35.107 @@ -2385,12 +2395,12 @@ 35.108 // EVM option, ignore silently for compatibility 35.109 // -Xprof 35.110 } else if (match_option(option, "-Xprof", &tail)) { 35.111 -#ifndef FPROF_KERNEL 35.112 +#if INCLUDE_FPROF 35.113 _has_profile = true; 35.114 -#else // FPROF_KERNEL 35.115 +#else // INCLUDE_FPROF 35.116 // do we have to exit? 35.117 - warning("Kernel VM does not support flat profiling."); 35.118 -#endif // FPROF_KERNEL 35.119 + warning("Flat profiling is not supported in this VM."); 35.120 +#endif // INCLUDE_FPROF 35.121 // -Xaprof 35.122 } else if (match_option(option, "-Xaprof", &tail)) { 35.123 _has_alloc_profile = true; 35.124 @@ -2438,6 +2448,9 @@ 35.125 #if defined(KERNEL) 35.126 vm_exit_during_initialization( 35.127 "Dumping a shared archive is not supported on the Kernel JVM.", NULL); 35.128 +#elif !INCLUDE_CDS 35.129 + vm_exit_during_initialization( 35.130 + "Dumping a shared archive is not supported in this VM.", NULL); 35.131 #else 35.132 FLAG_SET_CMDLINE(bool, DumpSharedSpaces, true); 35.133 set_mode_flags(_int); // Prevent compilation, which creates objects 35.134 @@ -2490,7 +2503,11 @@ 35.135 // JNI hooks 35.136 } else if (match_option(option, "-Xcheck", &tail)) { 35.137 if (!strcmp(tail, ":jni")) { 35.138 +#if !INCLUDE_JNI_CHECK 35.139 + warning("JNI CHECKING is not supported in this VM"); 35.140 +#else 35.141 CheckJNICalls = true; 35.142 +#endif // INCLUDE_JNI_CHECK 35.143 } else if (is_bad_option(option, args->ignoreUnrecognized, 35.144 "check")) { 35.145 return JNI_EINVAL; 35.146 @@ -3045,7 +3062,11 @@ 35.147 vm_exit(0); 35.148 } 35.149 if (match_option(option, "-XX:NativeMemoryTracking", &tail)) { 35.150 +#if INCLUDE_NMT 35.151 MemTracker::init_tracking_options(tail); 35.152 +#else 35.153 + warning("Native Memory Tracking is not supported in this VM"); 35.154 +#endif 35.155 } 35.156 35.157 35.158 @@ -3108,6 +3129,21 @@ 35.159 UNSUPPORTED_OPTION(UseG1GC, "G1 GC"); 35.160 #endif 35.161 35.162 +#if !INCLUDE_ALTERNATE_GCS 35.163 + if (UseParallelGC) { 35.164 + warning("Parallel GC is not supported in this VM. Using Serial GC."); 35.165 + } 35.166 + if (UseParallelOldGC) { 35.167 + warning("Parallel Old GC is not supported in this VM. Using Serial GC."); 35.168 + } 35.169 + if (UseConcMarkSweepGC) { 35.170 + warning("Concurrent Mark Sweep GC is not supported in this VM. Using Serial GC."); 35.171 + } 35.172 + if (UseParNewGC) { 35.173 + warning("Par New GC is not supported in this VM. Using Serial GC."); 35.174 + } 35.175 +#endif // INCLUDE_ALTERNATE_GCS 35.176 + 35.177 #ifndef PRODUCT 35.178 if (TraceBytecodesAt != 0) { 35.179 TraceBytecodes = true; 35.180 @@ -3156,9 +3192,9 @@ 35.181 #ifdef SERIALGC 35.182 force_serial_gc(); 35.183 #endif // SERIALGC 35.184 -#ifdef KERNEL 35.185 +#if !INCLUDE_CDS 35.186 no_shared_spaces(); 35.187 -#endif // KERNEL 35.188 +#endif // INCLUDE_CDS 35.189 35.190 // Set flags based on ergonomics. 35.191 set_ergonomics_flags(); 35.192 @@ -3180,9 +3216,10 @@ 35.193 } 35.194 } 35.195 35.196 -#ifndef KERNEL 35.197 // Set heap size based on available physical memory 35.198 set_heap_size(); 35.199 + 35.200 +#if INCLUDE_ALTERNATE_GCS 35.201 // Set per-collector flags 35.202 if (UseParallelGC || UseParallelOldGC) { 35.203 set_parallel_gc_flags(); 35.204 @@ -3193,7 +3230,7 @@ 35.205 } else if (UseG1GC) { 35.206 set_g1_gc_flags(); 35.207 } 35.208 -#endif // KERNEL 35.209 +#endif // INCLUDE_ALTERNATE_GCS 35.210 35.211 #ifdef SERIALGC 35.212 assert(verify_serial_gc_flags(), "SerialGC unset");
36.1 --- a/src/share/vm/runtime/fprofiler.hpp Fri Oct 05 13:37:08 2012 -0700 36.2 +++ b/src/share/vm/runtime/fprofiler.hpp Wed Oct 10 14:35:58 2012 -0400 36.3 @@ -65,15 +65,15 @@ 36.4 // For now, the only thread-specific region is the class loader. 36.5 enum Region { noRegion, classLoaderRegion, extraRegion, maxRegion }; 36.6 36.7 - ThreadProfilerMark(Region) KERNEL_RETURN; 36.8 - ~ThreadProfilerMark() KERNEL_RETURN; 36.9 + ThreadProfilerMark(Region) NOT_FPROF_RETURN; 36.10 + ~ThreadProfilerMark() NOT_FPROF_RETURN; 36.11 36.12 private: 36.13 ThreadProfiler* _pp; 36.14 Region _r; 36.15 }; 36.16 36.17 -#ifndef FPROF_KERNEL 36.18 +#if INCLUDE_FPROF 36.19 36.20 class IntervalData VALUE_OBJ_CLASS_SPEC { 36.21 // Just to keep these things all together 36.22 @@ -119,29 +119,29 @@ 36.23 static void print_header(outputStream* st); 36.24 void print_data(outputStream* st); 36.25 }; 36.26 -#endif // FPROF_KERNEL 36.27 +#endif // INCLUDE_FPROF 36.28 36.29 class ThreadProfiler: public CHeapObj<mtInternal> { 36.30 public: 36.31 - ThreadProfiler() KERNEL_RETURN; 36.32 - ~ThreadProfiler() KERNEL_RETURN; 36.33 + ThreadProfiler() NOT_FPROF_RETURN; 36.34 + ~ThreadProfiler() NOT_FPROF_RETURN; 36.35 36.36 // Resets the profiler 36.37 - void reset() KERNEL_RETURN; 36.38 + void reset() NOT_FPROF_RETURN; 36.39 36.40 // Activates the profiler for a certain thread 36.41 - void engage() KERNEL_RETURN; 36.42 + void engage() NOT_FPROF_RETURN; 36.43 36.44 // Deactivates the profiler 36.45 - void disengage() KERNEL_RETURN; 36.46 + void disengage() NOT_FPROF_RETURN; 36.47 36.48 // Prints the collected profiling information 36.49 - void print(const char* thread_name) KERNEL_RETURN; 36.50 + void print(const char* thread_name) NOT_FPROF_RETURN; 36.51 36.52 // Garbage Collection Support 36.53 - void oops_do(OopClosure* f) KERNEL_RETURN; 36.54 + void oops_do(OopClosure* f) NOT_FPROF_RETURN; 36.55 36.56 -#ifndef FPROF_KERNEL 36.57 +#if INCLUDE_FPROF 36.58 private: 36.59 // for recording ticks. 36.60 friend class ProfilerNode; 36.61 @@ -225,39 +225,39 @@ 36.62 IntervalData* interval_data_ref() { 36.63 return &_interval_data; 36.64 } 36.65 -#endif // FPROF_KERNEL 36.66 +#endif // INCLUDE_FPROF 36.67 }; 36.68 36.69 class FlatProfiler: AllStatic { 36.70 public: 36.71 - static void reset() KERNEL_RETURN ; 36.72 - static void engage(JavaThread* mainThread, bool fullProfile) KERNEL_RETURN ; 36.73 - static void disengage() KERNEL_RETURN ; 36.74 - static void print(int unused) KERNEL_RETURN ; 36.75 - static bool is_active() KERNEL_RETURN_(false) ; 36.76 + static void reset() NOT_FPROF_RETURN ; 36.77 + static void engage(JavaThread* mainThread, bool fullProfile) NOT_FPROF_RETURN ; 36.78 + static void disengage() NOT_FPROF_RETURN ; 36.79 + static void print(int unused) NOT_FPROF_RETURN ; 36.80 + static bool is_active() NOT_FPROF_RETURN_(false) ; 36.81 36.82 // This is NULL if each thread has its own thread profiler, 36.83 // else this is the single thread profiler used by all threads. 36.84 // In particular it makes a difference during garbage collection, 36.85 // where you only want to traverse each thread profiler once. 36.86 - static ThreadProfiler* get_thread_profiler() KERNEL_RETURN_(NULL); 36.87 + static ThreadProfiler* get_thread_profiler() NOT_FPROF_RETURN_(NULL); 36.88 36.89 // Garbage Collection Support 36.90 - static void oops_do(OopClosure* f) KERNEL_RETURN ; 36.91 + static void oops_do(OopClosure* f) NOT_FPROF_RETURN ; 36.92 36.93 // Support for disassembler to inspect the PCRecorder 36.94 36.95 // Returns the start address for a given pc 36.96 // NULL is returned if the PCRecorder is inactive 36.97 - static address bucket_start_for(address pc) KERNEL_RETURN_(NULL); 36.98 + static address bucket_start_for(address pc) NOT_FPROF_RETURN_(NULL); 36.99 36.100 enum { MillisecsPerTick = 10 }; // ms per profiling ticks 36.101 36.102 // Returns the number of ticks recorded for the bucket 36.103 // pc belongs to. 36.104 - static int bucket_count_for(address pc) KERNEL_RETURN_(0); 36.105 + static int bucket_count_for(address pc) NOT_FPROF_RETURN_(0); 36.106 36.107 -#ifndef FPROF_KERNEL 36.108 +#if INCLUDE_FPROF 36.109 36.110 private: 36.111 static bool full_profile() { 36.112 @@ -324,7 +324,7 @@ 36.113 static void interval_reset(); // reset interval data. 36.114 enum {interval_print_size = 10}; 36.115 static IntervalData* interval_data; 36.116 -#endif // FPROF_KERNEL 36.117 +#endif // INCLUDE_FPROF 36.118 }; 36.119 36.120 #endif // SHARE_VM_RUNTIME_FPROFILER_HPP
37.1 --- a/src/share/vm/runtime/globals_extension.hpp Fri Oct 05 13:37:08 2012 -0700 37.2 +++ b/src/share/vm/runtime/globals_extension.hpp Wed Oct 10 14:35:58 2012 -0400 37.3 @@ -94,9 +94,9 @@ 37.4 typedef enum { 37.5 RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER, RUNTIME_LP64_PRODUCT_FLAG_MEMBER) 37.6 RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER) 37.7 -#ifndef KERNEL 37.8 +#if INCLUDE_ALTERNATE_GCS 37.9 G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER) 37.10 -#endif 37.11 +#endif // INCLUDE_ALTERNATE_GCS 37.12 #ifdef COMPILER1 37.13 C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, C1_PD_DEVELOP_FLAG_MEMBER, C1_PRODUCT_FLAG_MEMBER, C1_PD_PRODUCT_FLAG_MEMBER, C1_NOTPRODUCT_FLAG_MEMBER) 37.14 #endif 37.15 @@ -187,7 +187,7 @@ 37.16 RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE, 37.17 RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE, 37.18 RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE) 37.19 -#ifndef KERNEL 37.20 +#if INCLUDE_ALTERNATE_GCS 37.21 G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE, 37.22 RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE, 37.23 RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE, 37.24 @@ -197,7 +197,7 @@ 37.25 RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE, 37.26 RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE, 37.27 RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE) 37.28 -#endif // KERNEL 37.29 +#endif // INCLUDE_ALTERNATE_GCS 37.30 #ifdef COMPILER1 37.31 C1_FLAGS(C1_DEVELOP_FLAG_MEMBER_WITH_TYPE, 37.32 C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
38.1 --- a/src/share/vm/runtime/init.cpp Fri Oct 05 13:37:08 2012 -0700 38.2 +++ b/src/share/vm/runtime/init.cpp Wed Oct 10 14:35:58 2012 -0400 38.3 @@ -114,9 +114,9 @@ 38.4 universe2_init(); // dependent on codeCache_init and stubRoutines_init1 38.5 referenceProcessor_init(); 38.6 jni_handles_init(); 38.7 -#ifndef VM_STRUCTS_KERNEL 38.8 +#if INCLUDE_VM_STRUCTS 38.9 vmStructs_init(); 38.10 -#endif // VM_STRUCTS_KERNEL 38.11 +#endif // INCLUDE_VM_STRUCTS 38.12 38.13 vtableStubs_init(); 38.14 InlineCacheBuffer_init();
39.1 --- a/src/share/vm/runtime/perfData.cpp Fri Oct 05 13:37:08 2012 -0700 39.2 +++ b/src/share/vm/runtime/perfData.cpp Wed Oct 10 14:35:58 2012 -0400 39.3 @@ -588,6 +588,10 @@ 39.4 39.5 PerfData* PerfDataList::find_by_name(const char* name) { 39.6 39.7 + // if add_item hasn't been called the list won't be initialized 39.8 + if (this == NULL) 39.9 + return NULL; 39.10 + 39.11 int i = _set->find((void*)name, PerfDataList::by_name); 39.12 39.13 if (i >= 0 && i <= _set->length())
40.1 --- a/src/share/vm/runtime/thread.cpp Fri Oct 05 13:37:08 2012 -0700 40.2 +++ b/src/share/vm/runtime/thread.cpp Wed Oct 10 14:35:58 2012 -0400 40.3 @@ -321,12 +321,14 @@ 40.4 // set up any platform-specific state. 40.5 os::initialize_thread(this); 40.6 40.7 +#if INCLUDE_NMT 40.8 // record thread's native stack, stack grows downward 40.9 if (MemTracker::is_on()) { 40.10 address stack_low_addr = stack_base() - stack_size(); 40.11 MemTracker::record_thread_stack(stack_low_addr, stack_size(), this, 40.12 CURRENT_PC); 40.13 } 40.14 +#endif // INCLUDE_NMT 40.15 } 40.16 40.17 40.18 @@ -338,10 +340,12 @@ 40.19 // record_stack_base_and_size called. Although, we would like to ensure 40.20 // that all started threads do call record_stack_base_and_size(), there is 40.21 // not proper way to enforce that. 40.22 +#if INCLUDE_NMT 40.23 if (_stack_base != NULL) { 40.24 address low_stack_addr = stack_base() - stack_size(); 40.25 MemTracker::release_thread_stack(low_stack_addr, stack_size(), this); 40.26 } 40.27 +#endif // INCLUDE_NMT 40.28 40.29 // deallocate data structures 40.30 delete resource_area(); 40.31 @@ -1357,7 +1361,9 @@ 40.32 set_monitor_chunks(NULL); 40.33 set_next(NULL); 40.34 set_thread_state(_thread_new); 40.35 +#if INCLUDE_NMT 40.36 set_recorder(NULL); 40.37 +#endif 40.38 _terminated = _not_terminated; 40.39 _privileged_stack_top = NULL; 40.40 _array_for_gc = NULL; 40.41 @@ -3523,7 +3529,9 @@ 40.42 #endif /* USDT2 */ 40.43 40.44 // record VM initialization completion time 40.45 +#if INCLUDE_MANAGEMENT 40.46 Management::record_vm_init_completed(); 40.47 +#endif // INCLUDE_MANAGEMENT 40.48 40.49 // Compute system loader. Note that this has to occur after set_init_completed, since 40.50 // valid exceptions may be thrown in the process. 40.51 @@ -3584,9 +3592,14 @@ 40.52 } 40.53 40.54 // initialize compiler(s) 40.55 +#if defined(COMPILER1) || defined(COMPILER2) 40.56 CompileBroker::compilation_init(); 40.57 - 40.58 +#endif 40.59 + 40.60 +#if INCLUDE_MANAGEMENT 40.61 Management::initialize(THREAD); 40.62 +#endif // INCLUDE_MANAGEMENT 40.63 + 40.64 if (HAS_PENDING_EXCEPTION) { 40.65 // management agent fails to start possibly due to 40.66 // configuration problem and is responsible for printing 40.67 @@ -3756,6 +3769,7 @@ 40.68 AgentLibrary* agent; 40.69 40.70 JvmtiExport::enter_onload_phase(); 40.71 + 40.72 for (agent = Arguments::agents(); agent != NULL; agent = agent->next()) { 40.73 OnLoadEntry_t on_load_entry = lookup_agent_on_load(agent); 40.74
41.1 --- a/src/share/vm/runtime/thread.hpp Fri Oct 05 13:37:08 2012 -0700 41.2 +++ b/src/share/vm/runtime/thread.hpp Wed Oct 10 14:35:58 2012 -0400 41.3 @@ -41,7 +41,11 @@ 41.4 #include "runtime/stubRoutines.hpp" 41.5 #include "runtime/threadLocalStorage.hpp" 41.6 #include "runtime/unhandledOops.hpp" 41.7 + 41.8 +#if INCLUDE_NMT 41.9 #include "services/memRecorder.hpp" 41.10 +#endif // INCLUDE_NMT 41.11 + 41.12 #include "trace/tracing.hpp" 41.13 #include "utilities/exceptions.hpp" 41.14 #include "utilities/top.hpp" 41.15 @@ -1038,6 +1042,7 @@ 41.16 bool do_not_unlock_if_synchronized() { return _do_not_unlock_if_synchronized; } 41.17 void set_do_not_unlock_if_synchronized(bool val) { _do_not_unlock_if_synchronized = val; } 41.18 41.19 +#if INCLUDE_NMT 41.20 // native memory tracking 41.21 inline MemRecorder* get_recorder() const { return (MemRecorder*)_recorder; } 41.22 inline void set_recorder(MemRecorder* rc) { _recorder = (volatile MemRecorder*)rc; } 41.23 @@ -1045,6 +1050,7 @@ 41.24 private: 41.25 // per-thread memory recorder 41.26 volatile MemRecorder* _recorder; 41.27 +#endif // INCLUDE_NMT 41.28 41.29 // Suspend/resume support for JavaThread 41.30 private:
42.1 --- a/src/share/vm/runtime/vmStructs.cpp Fri Oct 05 13:37:08 2012 -0700 42.2 +++ b/src/share/vm/runtime/vmStructs.cpp Wed Oct 10 14:35:58 2012 -0400 42.3 @@ -230,6 +230,15 @@ 42.4 return x; 42.5 } 42.6 42.7 +#if INCLUDE_JVMTI 42.8 + #define JVMTI_STRUCTS(static_field) \ 42.9 + static_field(JvmtiExport, _can_access_local_variables, bool) \ 42.10 + static_field(JvmtiExport, _can_hotswap_or_post_breakpoint, bool) \ 42.11 + static_field(JvmtiExport, _can_post_on_exceptions, bool) \ 42.12 + static_field(JvmtiExport, _can_walk_any_space, bool) 42.13 +#else 42.14 + #define JVMTI_STRUCTS(static_field) 42.15 +#endif // INCLUDE_JVMTI 42.16 42.17 typedef HashtableEntry<intptr_t, mtInternal> IntptrHashtableEntry; 42.18 typedef Hashtable<intptr_t, mtInternal> IntptrHashtable; 42.19 @@ -1170,10 +1179,7 @@ 42.20 /* JVMTI */ \ 42.21 /*************************/ \ 42.22 \ 42.23 - static_field(JvmtiExport, _can_access_local_variables, bool) \ 42.24 - static_field(JvmtiExport, _can_hotswap_or_post_breakpoint, bool) \ 42.25 - static_field(JvmtiExport, _can_post_on_exceptions, bool) \ 42.26 - static_field(JvmtiExport, _can_walk_any_space, bool) \ 42.27 + JVMTI_STRUCTS(static_field) \ 42.28 \ 42.29 /*************/ \ 42.30 /* Arguments */ \
43.1 --- a/src/share/vm/runtime/vm_version.cpp Fri Oct 05 13:37:08 2012 -0700 43.2 +++ b/src/share/vm/runtime/vm_version.cpp Wed Oct 10 14:35:58 2012 -0400 43.3 @@ -1,5 +1,5 @@ 43.4 /* 43.5 - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 43.6 + * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 43.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 43.8 * 43.9 * This code is free software; you can redistribute it and/or modify it 43.10 @@ -110,24 +110,26 @@ 43.11 #define VMLP "" 43.12 #endif 43.13 43.14 -#ifdef KERNEL 43.15 - #define VMTYPE "Kernel" 43.16 -#else // KERNEL 43.17 -#ifdef TIERED 43.18 - #define VMTYPE "Server" 43.19 -#else // TIERED 43.20 -#ifdef ZERO 43.21 -#ifdef SHARK 43.22 - #define VMTYPE "Shark" 43.23 -#else // SHARK 43.24 - #define VMTYPE "Zero" 43.25 -#endif // SHARK 43.26 -#else // ZERO 43.27 - #define VMTYPE COMPILER1_PRESENT("Client") \ 43.28 - COMPILER2_PRESENT("Server") 43.29 -#endif // ZERO 43.30 -#endif // TIERED 43.31 -#endif // KERNEL 43.32 +#ifndef VMTYPE 43.33 + #ifdef KERNEL 43.34 + #define VMTYPE "Kernel" 43.35 + #else // KERNEL 43.36 + #ifdef TIERED 43.37 + #define VMTYPE "Server" 43.38 + #else // TIERED 43.39 + #ifdef ZERO 43.40 + #ifdef SHARK 43.41 + #define VMTYPE "Shark" 43.42 + #else // SHARK 43.43 + #define VMTYPE "Zero" 43.44 + #endif // SHARK 43.45 + #else // ZERO 43.46 + #define VMTYPE COMPILER1_PRESENT("Client") \ 43.47 + COMPILER2_PRESENT("Server") 43.48 + #endif // ZERO 43.49 + #endif // TIERED 43.50 + #endif // KERNEL 43.51 +#endif 43.52 43.53 #ifndef HOTSPOT_VM_DISTRO 43.54 #error HOTSPOT_VM_DISTRO must be defined
44.1 --- a/src/share/vm/services/attachListener.hpp Fri Oct 05 13:37:08 2012 -0700 44.2 +++ b/src/share/vm/services/attachListener.hpp Wed Oct 10 14:35:58 2012 -0400 44.3 @@ -1,5 +1,5 @@ 44.4 /* 44.5 - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 44.6 + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 44.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 44.8 * 44.9 * This code is free software; you can redistribute it and/or modify it 44.10 @@ -52,21 +52,21 @@ 44.11 44.12 class AttachListener: AllStatic { 44.13 public: 44.14 - static void init() KERNEL_RETURN; 44.15 - static void abort() KERNEL_RETURN; 44.16 + static void init() NOT_SERVICES_RETURN; 44.17 + static void abort() NOT_SERVICES_RETURN; 44.18 44.19 // invoke to perform clean-up tasks when all clients detach 44.20 - static void detachall() KERNEL_RETURN; 44.21 + static void detachall() NOT_SERVICES_RETURN; 44.22 44.23 // indicates if the Attach Listener needs to be created at startup 44.24 - static bool init_at_startup() KERNEL_RETURN_(false); 44.25 + static bool init_at_startup() NOT_SERVICES_RETURN_(false); 44.26 44.27 // indicates if we have a trigger to start the Attach Listener 44.28 - static bool is_init_trigger() KERNEL_RETURN_(false); 44.29 + static bool is_init_trigger() NOT_SERVICES_RETURN_(false); 44.30 44.31 -#ifdef SERVICES_KERNEL 44.32 +#if !INCLUDE_SERVICES 44.33 static bool is_attach_supported() { return false; } 44.34 -#else // SERVICES_KERNEL 44.35 +#else 44.36 private: 44.37 static volatile bool _initialized; 44.38 44.39 @@ -94,10 +94,10 @@ 44.40 44.41 // dequeue the next operation 44.42 static AttachOperation* dequeue(); 44.43 -#endif // SERVICES_KERNEL 44.44 +#endif // !INCLUDE_SERVICES 44.45 }; 44.46 44.47 -#ifndef SERVICES_KERNEL 44.48 +#if INCLUDE_SERVICES 44.49 class AttachOperation: public CHeapObj<mtInternal> { 44.50 public: 44.51 enum { 44.52 @@ -151,6 +151,6 @@ 44.53 // complete operation by sending result code and any result data to the client 44.54 virtual void complete(jint result, bufferedStream* result_stream) = 0; 44.55 }; 44.56 -#endif // SERVICES_KERNEL 44.57 +#endif // INCLUDE_SERVICES 44.58 44.59 #endif // SHARE_VM_SERVICES_ATTACHLISTENER_HPP
45.1 --- a/src/share/vm/services/classLoadingService.cpp Fri Oct 05 13:37:08 2012 -0700 45.2 +++ b/src/share/vm/services/classLoadingService.cpp Wed Oct 10 14:35:58 2012 -0400 45.3 @@ -78,6 +78,7 @@ 45.4 45.5 #endif 45.6 45.7 +#if INCLUDE_MANAGEMENT 45.8 // counters for classes loaded from class files 45.9 PerfCounter* ClassLoadingService::_classes_loaded_count = NULL; 45.10 PerfCounter* ClassLoadingService::_classes_unloaded_count = NULL; 45.11 @@ -239,3 +240,5 @@ 45.12 // FIXME: Exclude array klasses for now 45.13 // Universe::basic_type_classes_do(&add_loaded_class); 45.14 } 45.15 + 45.16 +#endif // INCLUDE_MANAGEMENT
46.1 --- a/src/share/vm/services/classLoadingService.hpp Fri Oct 05 13:37:08 2012 -0700 46.2 +++ b/src/share/vm/services/classLoadingService.hpp Wed Oct 10 14:35:58 2012 -0400 46.3 @@ -1,5 +1,5 @@ 46.4 /* 46.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 46.6 + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 46.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 46.8 * 46.9 * This code is free software; you can redistribute it and/or modify it 46.10 @@ -55,7 +55,7 @@ 46.11 46.12 static bool get_verbose() { return TraceClassLoading; } 46.13 static bool set_verbose(bool verbose); 46.14 - static void reset_trace_class_unloading(); 46.15 + static void reset_trace_class_unloading() NOT_MANAGEMENT_RETURN; 46.16 46.17 static jlong loaded_class_count() { 46.18 return _classes_loaded_count->get_value() + _shared_classes_loaded_count->get_value(); 46.19 @@ -102,13 +102,16 @@ 46.20 return (UsePerfData ? _class_methods_size->get_value() : -1); 46.21 } 46.22 46.23 - static void notify_class_loaded(InstanceKlass* k, bool shared_class); 46.24 + static void notify_class_loaded(InstanceKlass* k, bool shared_class) 46.25 + NOT_MANAGEMENT_RETURN; 46.26 // All unloaded classes are non-shared 46.27 - static void notify_class_unloaded(InstanceKlass* k); 46.28 + static void notify_class_unloaded(InstanceKlass* k) NOT_MANAGEMENT_RETURN; 46.29 static void add_class_method_size(int size) { 46.30 +#if INCLUDE_MANAGEMENT 46.31 if (UsePerfData) { 46.32 _class_methods_size->inc(size); 46.33 } 46.34 +#endif // INCLUDE_MANAGEMENT 46.35 } 46.36 }; 46.37
47.1 --- a/src/share/vm/services/diagnosticCommand.cpp Fri Oct 05 13:37:08 2012 -0700 47.2 +++ b/src/share/vm/services/diagnosticCommand.cpp Wed Oct 10 14:35:58 2012 -0400 47.3 @@ -43,9 +43,9 @@ 47.4 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(true, false)); 47.5 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(true, false)); 47.6 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(true, false)); 47.7 -#ifndef SERVICES_KERNEL // Heap dumping not supported 47.8 +#if INCLUDE_SERVICES // Heap dumping supported 47.9 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(true, false)); 47.10 -#endif // SERVICES_KERNEL 47.11 +#endif // INCLUDE_SERVICES 47.12 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(true, false)); 47.13 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(true, false)); 47.14 47.15 @@ -252,7 +252,7 @@ 47.16 vmSymbols::void_method_signature(), CHECK); 47.17 } 47.18 47.19 -#ifndef SERVICES_KERNEL // Heap dumping not supported 47.20 +#if INCLUDE_SERVICES // Heap dumping supported 47.21 HeapDumpDCmd::HeapDumpDCmd(outputStream* output, bool heap) : 47.22 DCmdWithParser(output, heap), 47.23 _filename("filename","Name of the dump file", "STRING",true), 47.24 @@ -292,7 +292,7 @@ 47.25 return 0; 47.26 } 47.27 } 47.28 -#endif // SERVICES_KERNEL 47.29 +#endif // INCLUDE_SERVICES 47.30 47.31 ClassHistogramDCmd::ClassHistogramDCmd(outputStream* output, bool heap) : 47.32 DCmdWithParser(output, heap),
48.1 --- a/src/share/vm/services/diagnosticCommand.hpp Fri Oct 05 13:37:08 2012 -0700 48.2 +++ b/src/share/vm/services/diagnosticCommand.hpp Wed Oct 10 14:35:58 2012 -0400 48.3 @@ -155,7 +155,7 @@ 48.4 virtual void execute(TRAPS); 48.5 }; 48.6 48.7 -#ifndef SERVICES_KERNEL // Heap dumping not supported 48.8 +#if INCLUDE_SERVICES // Heap dumping supported 48.9 // See also: dump_heap in attachListener.cpp 48.10 class HeapDumpDCmd : public DCmdWithParser { 48.11 protected: 48.12 @@ -176,7 +176,7 @@ 48.13 static int num_arguments(); 48.14 virtual void execute(TRAPS); 48.15 }; 48.16 -#endif // SERVICES_KERNEL 48.17 +#endif // INCLUDE_SERVICES 48.18 48.19 // See also: inspeactheap in attachListener.cpp 48.20 class ClassHistogramDCmd : public DCmdWithParser {
49.1 --- a/src/share/vm/services/heapDumper.hpp Fri Oct 05 13:37:08 2012 -0700 49.2 +++ b/src/share/vm/services/heapDumper.hpp Wed Oct 10 14:35:58 2012 -0400 49.3 @@ -76,9 +76,9 @@ 49.4 // returns error message (resource allocated), or NULL if no error 49.5 char* error_as_C_string() const; 49.6 49.7 - static void dump_heap() KERNEL_RETURN; 49.8 + static void dump_heap() NOT_SERVICES_RETURN; 49.9 49.10 - static void dump_heap_from_oome() KERNEL_RETURN; 49.11 + static void dump_heap_from_oome() NOT_SERVICES_RETURN; 49.12 }; 49.13 49.14 #endif // SHARE_VM_SERVICES_HEAPDUMPER_HPP
50.1 --- a/src/share/vm/services/management.cpp Fri Oct 05 13:37:08 2012 -0700 50.2 +++ b/src/share/vm/services/management.cpp Wed Oct 10 14:35:58 2012 -0400 50.3 @@ -72,12 +72,22 @@ 50.4 TimeStamp Management::_stamp; 50.5 50.6 void management_init() { 50.7 +#if INCLUDE_MANAGEMENT 50.8 Management::init(); 50.9 ThreadService::init(); 50.10 RuntimeService::init(); 50.11 ClassLoadingService::init(); 50.12 +#else 50.13 + ThreadService::init(); 50.14 + // Make sure the VM version is initialized 50.15 + // This is normally called by RuntimeService::init(). 50.16 + // Since that is conditionalized out, we need to call it here. 50.17 + Abstract_VM_Version::initialize(); 50.18 +#endif // INCLUDE_MANAGEMENT 50.19 } 50.20 50.21 +#if INCLUDE_MANAGEMENT 50.22 + 50.23 void Management::init() { 50.24 EXCEPTION_MARK; 50.25 50.26 @@ -112,10 +122,10 @@ 50.27 50.28 _optional_support.isBootClassPathSupported = 1; 50.29 _optional_support.isObjectMonitorUsageSupported = 1; 50.30 -#ifndef SERVICES_KERNEL 50.31 +#if INCLUDE_SERVICES 50.32 // This depends on the heap inspector 50.33 _optional_support.isSynchronizerUsageSupported = 1; 50.34 -#endif // SERVICES_KERNEL 50.35 +#endif // INCLUDE_SERVICES 50.36 _optional_support.isThreadAllocatedMemorySupported = 1; 50.37 50.38 // Registration of the diagnostic commands 50.39 @@ -2108,7 +2118,7 @@ 50.40 50.41 // Dump heap - Returns 0 if succeeds. 50.42 JVM_ENTRY(jint, jmm_DumpHeap0(JNIEnv *env, jstring outputfile, jboolean live)) 50.43 -#ifndef SERVICES_KERNEL 50.44 +#if INCLUDE_SERVICES 50.45 ResourceMark rm(THREAD); 50.46 oop on = JNIHandles::resolve_external_guard(outputfile); 50.47 if (on == NULL) { 50.48 @@ -2126,9 +2136,9 @@ 50.49 THROW_MSG_(vmSymbols::java_io_IOException(), errmsg, -1); 50.50 } 50.51 return 0; 50.52 -#else // SERVICES_KERNEL 50.53 +#else // INCLUDE_SERVICES 50.54 return -1; 50.55 -#endif // SERVICES_KERNEL 50.56 +#endif // INCLUDE_SERVICES 50.57 JVM_END 50.58 50.59 JVM_ENTRY(jobjectArray, jmm_GetDiagnosticCommands(JNIEnv *env)) 50.60 @@ -2295,10 +2305,13 @@ 50.61 jmm_GetDiagnosticCommandArgumentsInfo, 50.62 jmm_ExecuteDiagnosticCommand 50.63 }; 50.64 +#endif // INCLUDE_MANAGEMENT 50.65 50.66 void* Management::get_jmm_interface(int version) { 50.67 +#if INCLUDE_MANAGEMENT 50.68 if (version == JMM_VERSION_1_0) { 50.69 return (void*) &jmm_interface; 50.70 } 50.71 +#endif // INCLUDE_MANAGEMENT 50.72 return NULL; 50.73 }
51.1 --- a/src/share/vm/services/management.hpp Fri Oct 05 13:37:08 2012 -0700 51.2 +++ b/src/share/vm/services/management.hpp Wed Oct 10 14:35:58 2012 -0400 51.3 @@ -58,16 +58,17 @@ 51.4 static void init(); 51.5 static void initialize(TRAPS); 51.6 51.7 - static jlong ticks_to_ms(jlong ticks); 51.8 - static jlong timestamp(); 51.9 + static jlong ticks_to_ms(jlong ticks) NOT_MANAGEMENT_RETURN_(0L); 51.10 + static jlong timestamp() NOT_MANAGEMENT_RETURN_(0L); 51.11 51.12 - static void oops_do(OopClosure* f); 51.13 + static void oops_do(OopClosure* f) NOT_MANAGEMENT_RETURN; 51.14 static void* get_jmm_interface(int version); 51.15 static void get_optional_support(jmmOptionalSupport* support); 51.16 51.17 static void get_loaded_classes(JavaThread* cur_thread, GrowableArray<KlassHandle>* klass_handle_array); 51.18 51.19 - static void record_vm_startup_time(jlong begin, jlong duration); 51.20 + static void record_vm_startup_time(jlong begin, jlong duration) 51.21 + NOT_MANAGEMENT_RETURN; 51.22 static void record_vm_init_completed() { 51.23 // Initialize the timestamp to get the current time 51.24 _vm_init_done_time->set_value(os::javaTimeMillis()); 51.25 @@ -85,14 +86,19 @@ 51.26 51.27 // methods to return a Klass*. 51.28 static Klass* java_lang_management_ThreadInfo_klass(TRAPS); 51.29 - static Klass* java_lang_management_MemoryUsage_klass(TRAPS); 51.30 + static Klass* java_lang_management_MemoryUsage_klass(TRAPS) 51.31 + NOT_MANAGEMENT_RETURN_(NULL); 51.32 static Klass* java_lang_management_MemoryPoolMXBean_klass(TRAPS); 51.33 static Klass* java_lang_management_MemoryManagerMXBean_klass(TRAPS); 51.34 static Klass* java_lang_management_GarbageCollectorMXBean_klass(TRAPS); 51.35 - static Klass* sun_management_Sensor_klass(TRAPS); 51.36 - static Klass* sun_management_ManagementFactory_klass(TRAPS); 51.37 - static Klass* sun_management_GarbageCollectorImpl_klass(TRAPS); 51.38 - static Klass* com_sun_management_GcInfo_klass(TRAPS); 51.39 + static Klass* sun_management_Sensor_klass(TRAPS) 51.40 + NOT_MANAGEMENT_RETURN_(NULL); 51.41 + static Klass* sun_management_ManagementFactory_klass(TRAPS) 51.42 + NOT_MANAGEMENT_RETURN_(NULL); 51.43 + static Klass* sun_management_GarbageCollectorImpl_klass(TRAPS) 51.44 + NOT_MANAGEMENT_RETURN_(NULL); 51.45 + static Klass* com_sun_management_GcInfo_klass(TRAPS) 51.46 + NOT_MANAGEMENT_RETURN_(NULL); 51.47 51.48 static instanceOop create_thread_info_instance(ThreadSnapshot* snapshot, TRAPS); 51.49 static instanceOop create_thread_info_instance(ThreadSnapshot* snapshot, objArrayHandle monitors_array, typeArrayHandle depths_array, objArrayHandle synchronizers_array, TRAPS);
52.1 --- a/src/share/vm/services/memReporter.hpp Fri Oct 05 13:37:08 2012 -0700 52.2 +++ b/src/share/vm/services/memReporter.hpp Wed Oct 10 14:35:58 2012 -0400 52.3 @@ -30,6 +30,8 @@ 52.4 #include "services/memTracker.hpp" 52.5 #include "utilities/ostream.hpp" 52.6 52.7 +#if INCLUDE_NMT 52.8 + 52.9 /* 52.10 * MemBaselineReporter reports data to this outputer class, 52.11 * ReportOutputer is responsible for format, store and redirect 52.12 @@ -265,4 +267,6 @@ 52.13 }; 52.14 52.15 52.16 +#endif // INCLUDE_NMT 52.17 + 52.18 #endif // SHARE_VM_SERVICES_MEM_REPORTER_HPP
53.1 --- a/src/share/vm/services/memTracker.hpp Fri Oct 05 13:37:08 2012 -0700 53.2 +++ b/src/share/vm/services/memTracker.hpp Wed Oct 10 14:35:58 2012 -0400 53.3 @@ -25,6 +25,80 @@ 53.4 #ifndef SHARE_VM_SERVICES_MEM_TRACKER_HPP 53.5 #define SHARE_VM_SERVICES_MEM_TRACKER_HPP 53.6 53.7 +#include "utilities/macros.hpp" 53.8 + 53.9 +#if !INCLUDE_NMT 53.10 + 53.11 +#include "utilities/ostream.hpp" 53.12 + 53.13 +class BaselineOutputer : public StackObj { 53.14 + 53.15 +}; 53.16 + 53.17 +class BaselineTTYOutputer : public BaselineOutputer { 53.18 + public: 53.19 + BaselineTTYOutputer(outputStream* st) { } 53.20 +}; 53.21 + 53.22 +class MemTracker : AllStatic { 53.23 + public: 53.24 + enum ShutdownReason { 53.25 + NMT_shutdown_none, // no shutdown requested 53.26 + NMT_shutdown_user, // user requested shutdown 53.27 + NMT_normal, // normal shutdown, process exit 53.28 + NMT_out_of_memory, // shutdown due to out of memory 53.29 + NMT_initialization, // shutdown due to initialization failure 53.30 + NMT_use_malloc_only, // can not combine NMT with UseMallocOnly flag 53.31 + NMT_error_reporting, // shutdown by vmError::report_and_die() 53.32 + NMT_out_of_generation, // running out of generation queue 53.33 + NMT_sequence_overflow // overflow the sequence number 53.34 + }; 53.35 + 53.36 + 53.37 + public: 53.38 + static inline void init_tracking_options(const char* option_line) { } 53.39 + static inline bool is_on() { return false; } 53.40 + static const char* reason() { return "Native memory tracking is not implemented"; } 53.41 + static inline bool can_walk_stack() { return false; } 53.42 + 53.43 + static inline void bootstrap_single_thread() { } 53.44 + static inline void bootstrap_multi_thread() { } 53.45 + static inline void start() { } 53.46 + 53.47 + static inline void record_malloc(address addr, size_t size, MEMFLAGS flags, 53.48 + address pc = 0, Thread* thread = NULL) { } 53.49 + static inline void record_free(address addr, MEMFLAGS flags, Thread* thread = NULL) { } 53.50 + static inline void record_realloc(address old_addr, address new_addr, size_t size, 53.51 + MEMFLAGS flags, address pc = 0, Thread* thread = NULL) { } 53.52 + static inline void record_arena_size(address addr, size_t size) { } 53.53 + static inline void record_virtual_memory_reserve(address addr, size_t size, 53.54 + address pc = 0, Thread* thread = NULL) { } 53.55 + static inline void record_virtual_memory_commit(address addr, size_t size, 53.56 + address pc = 0, Thread* thread = NULL) { } 53.57 + static inline void record_virtual_memory_uncommit(address addr, size_t size, 53.58 + Thread* thread = NULL) { } 53.59 + static inline void record_virtual_memory_release(address addr, size_t size, 53.60 + Thread* thread = NULL) { } 53.61 + static inline void record_virtual_memory_type(address base, MEMFLAGS flags, 53.62 + Thread* thread = NULL) { } 53.63 + static inline bool baseline() { return false; } 53.64 + static inline bool has_baseline() { return false; } 53.65 + 53.66 + static void shutdown(ShutdownReason reason) { } 53.67 + static inline bool shutdown_in_progress() { } 53.68 + static bool print_memory_usage(BaselineOutputer& out, size_t unit, 53.69 + bool summary_only = true) { } 53.70 + static bool compare_memory_usage(BaselineOutputer& out, size_t unit, 53.71 + bool summary_only = true) { } 53.72 + 53.73 + static inline void sync() { } 53.74 + static inline void thread_exiting(JavaThread* thread) { } 53.75 + 53.76 +}; 53.77 + 53.78 + 53.79 +#else // !INCLUDE_NMT 53.80 + 53.81 #include "memory/allocation.hpp" 53.82 #include "runtime/globals.hpp" 53.83 #include "runtime/mutex.hpp" 53.84 @@ -411,4 +485,6 @@ 53.85 static enum ShutdownReason _reason; 53.86 }; 53.87 53.88 +#endif // !INCLUDE_NMT 53.89 + 53.90 #endif // SHARE_VM_SERVICES_MEM_TRACKER_HPP
54.1 --- a/src/share/vm/services/runtimeService.cpp Fri Oct 05 13:37:08 2012 -0700 54.2 +++ b/src/share/vm/services/runtimeService.cpp Wed Oct 10 14:35:58 2012 -0400 54.3 @@ -1,5 +1,5 @@ 54.4 /* 54.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 54.6 + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 54.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 54.8 * 54.9 * This code is free software; you can redistribute it and/or modify it 54.10 @@ -35,6 +35,7 @@ 54.11 HS_DTRACE_PROBE_DECL(hs_private, safepoint__end); 54.12 #endif /* !USDT2 */ 54.13 54.14 +#if INCLUDE_MANAGEMENT 54.15 TimeStamp RuntimeService::_app_timer; 54.16 TimeStamp RuntimeService::_safepoint_timer; 54.17 PerfCounter* RuntimeService::_sync_time_ticks = NULL; 54.18 @@ -101,9 +102,9 @@ 54.19 memset((void*) capabilities, '0', len); 54.20 capabilities[len-1] = '\0'; 54.21 capabilities[0] = AttachListener::is_attach_supported() ? '1' : '0'; 54.22 -#ifdef KERNEL 54.23 +#if INCLUDE_SERVICES 54.24 capabilities[1] = '1'; 54.25 -#endif // KERNEL 54.26 +#endif // INCLUDE_SERVICES 54.27 PerfDataManager::create_string_constant(SUN_RT, "jvmCapabilities", 54.28 capabilities, CHECK); 54.29 } 54.30 @@ -205,3 +206,5 @@ 54.31 _thread_interrupt_signaled_count->inc(); 54.32 } 54.33 } 54.34 + 54.35 +#endif // INCLUDE_MANAGEMENT
55.1 --- a/src/share/vm/services/runtimeService.hpp Fri Oct 05 13:37:08 2012 -0700 55.2 +++ b/src/share/vm/services/runtimeService.hpp Wed Oct 10 14:35:58 2012 -0400 55.3 @@ -1,5 +1,5 @@ 55.4 /* 55.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 55.6 + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 55.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 55.8 * 55.9 * This code is free software; you can redistribute it and/or modify it 55.10 @@ -53,15 +53,15 @@ 55.11 static double last_application_time_sec() { return _app_timer.seconds(); } 55.12 55.13 // callbacks 55.14 - static void record_safepoint_begin(); 55.15 - static void record_safepoint_synchronized(); 55.16 - static void record_safepoint_end(); 55.17 - static void record_application_start(); 55.18 + static void record_safepoint_begin() NOT_MANAGEMENT_RETURN; 55.19 + static void record_safepoint_synchronized() NOT_MANAGEMENT_RETURN; 55.20 + static void record_safepoint_end() NOT_MANAGEMENT_RETURN; 55.21 + static void record_application_start() NOT_MANAGEMENT_RETURN; 55.22 55.23 // interruption events 55.24 - static void record_interrupted_before_count(); 55.25 - static void record_interrupted_during_count(); 55.26 - static void record_thread_interrupt_signaled_count(); 55.27 + static void record_interrupted_before_count() NOT_MANAGEMENT_RETURN; 55.28 + static void record_interrupted_during_count() NOT_MANAGEMENT_RETURN; 55.29 + static void record_thread_interrupt_signaled_count() NOT_MANAGEMENT_RETURN; 55.30 }; 55.31 55.32 #endif // SHARE_VM_SERVICES_RUNTIMESERVICE_HPP
56.1 --- a/src/share/vm/utilities/macros.hpp Fri Oct 05 13:37:08 2012 -0700 56.2 +++ b/src/share/vm/utilities/macros.hpp Wed Oct 10 14:35:58 2012 -0400 56.3 @@ -1,5 +1,5 @@ 56.4 /* 56.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 56.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 56.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 56.8 * 56.9 * This code is free software; you can redistribute it and/or modify it 56.10 @@ -34,26 +34,131 @@ 56.11 // Makes a string of the macro expansion of a 56.12 #define XSTR(a) STR(a) 56.13 56.14 -// KERNEL variant 56.15 -#ifdef KERNEL 56.16 -#define COMPILER1 56.17 -#define SERIALGC 56.18 +// -DINCLUDE_<something>=0 | 1 can be specified on the command line to include 56.19 +// or exclude functionality. 56.20 56.21 -#define JVMTI_KERNEL 56.22 -#define FPROF_KERNEL 56.23 -#define VM_STRUCTS_KERNEL 56.24 -#define JNICHECK_KERNEL 56.25 -#define SERVICES_KERNEL 56.26 +#ifndef INCLUDE_JVMTI 56.27 +#define INCLUDE_JVMTI 1 56.28 +#endif // INCLUDE_JVMTI 56.29 56.30 -#define KERNEL_RETURN {} 56.31 -#define KERNEL_RETURN_(code) { return code; } 56.32 +#if INCLUDE_JVMTI 56.33 +#define JVMTI_ONLY(x) x 56.34 +#define NOT_JVMTI(x) 56.35 +#define NOT_JVMTI_RETURN 56.36 +#define NOT_JVMTI_RETURN_(code) /* next token must be ; */ 56.37 +#else 56.38 +#define JVMTI_ONLY(x) 56.39 +#define NOT_JVMTI(x) x 56.40 +#define NOT_JVMTI_RETURN { return; } 56.41 +#define NOT_JVMTI_RETURN_(code) { return code; } 56.42 +#endif // INCLUDE_JVMTI 56.43 56.44 -#else // KERNEL 56.45 +#ifndef INCLUDE_FPROF 56.46 +#define INCLUDE_FPROF 1 56.47 +#endif 56.48 56.49 -#define KERNEL_RETURN /* next token must be ; */ 56.50 -#define KERNEL_RETURN_(code) /* next token must be ; */ 56.51 +#if INCLUDE_FPROF 56.52 +#define NOT_FPROF_RETURN /* next token must be ; */ 56.53 +#define NOT_FPROF_RETURN_(code) /* next token must be ; */ 56.54 +#else 56.55 +#define NOT_FPROF_RETURN {} 56.56 +#define NOT_FPROF_RETURN_(code) { return code; } 56.57 +#endif // INCLUDE_FPROF 56.58 56.59 -#endif // KERNEL 56.60 +#ifndef INCLUDE_VM_STRUCTS 56.61 +#define INCLUDE_VM_STRUCTS 1 56.62 +#endif 56.63 + 56.64 +#if INCLUDE_VM_STRUCTS 56.65 +#define NOT_VM_STRUCTS_RETURN /* next token must be ; */ 56.66 +#define NOT_VM_STRUCTS_RETURN_(code) /* next token must be ; */ 56.67 +#else 56.68 +#define NOT_VM_STRUCTS_RETURN {} 56.69 +#define NOT_VM_STRUCTS_RETURN_(code) { return code; } 56.70 +#endif // INCLUDE_VM_STRUCTS 56.71 + 56.72 +#ifndef INCLUDE_JNI_CHECK 56.73 +#define INCLUDE_JNI_CHECK 1 56.74 +#endif 56.75 + 56.76 +#if INCLUDE_JNI_CHECK 56.77 +#define NOT_JNI_CHECK_RETURN /* next token must be ; */ 56.78 +#define NOT_JNI_CHECK_RETURN_(code) /* next token must be ; */ 56.79 +#else 56.80 +#define NOT_JNI_CHECK_RETURN {} 56.81 +#define NOT_JNI_CHECK_RETURN_(code) { return code; } 56.82 +#endif // INCLUDE_JNI_CHECK 56.83 + 56.84 +#ifndef INCLUDE_SERVICES 56.85 +#define INCLUDE_SERVICES 1 56.86 +#endif 56.87 + 56.88 +#if INCLUDE_SERVICES 56.89 +#define NOT_SERVICES_RETURN /* next token must be ; */ 56.90 +#define NOT_SERVICES_RETURN_(code) /* next token must be ; */ 56.91 +#else 56.92 +#define NOT_SERVICES_RETURN {} 56.93 +#define NOT_SERVICES_RETURN_(code) { return code; } 56.94 +#endif // INCLUDE_SERVICES 56.95 + 56.96 +#ifndef INCLUDE_CDS 56.97 +#define INCLUDE_CDS 1 56.98 +#endif 56.99 + 56.100 +#if INCLUDE_CDS 56.101 +#define CDS_ONLY(x) x 56.102 +#define NOT_CDS(x) 56.103 +#define NOT_CDS_RETURN /* next token must be ; */ 56.104 +#define NOT_CDS_RETURN_(code) /* next token must be ; */ 56.105 +#else 56.106 +#define CDS_ONLY(x) 56.107 +#define NOT_CDS(x) x 56.108 +#define NOT_CDS_RETURN {} 56.109 +#define NOT_CDS_RETURN_(code) { return code; } 56.110 +#endif // INCLUDE_CDS 56.111 + 56.112 +#ifndef INCLUDE_MANAGEMENT 56.113 +#define INCLUDE_MANAGEMENT 1 56.114 +#endif // INCLUDE_MANAGEMENT 56.115 + 56.116 +#if INCLUDE_MANAGEMENT 56.117 +#define NOT_MANAGEMENT_RETURN /* next token must be ; */ 56.118 +#define NOT_MANAGEMENT_RETURN_(code) /* next token must be ; */ 56.119 +#else 56.120 +#define NOT_MANAGEMENT_RETURN {} 56.121 +#define NOT_MANAGEMENT_RETURN_(code) { return code; } 56.122 +#endif // INCLUDE_MANAGEMENT 56.123 + 56.124 +/* 56.125 + * When INCLUDE_ALTERNATE_GCS is false the only garbage collectors 56.126 + * included in the JVM are defaultNewGeneration and markCompact. 56.127 + * 56.128 + * When INCLUDE_ALTERNATE_GCS is true all garbage collectors are 56.129 + * included in the JVM. 56.130 + */ 56.131 +#ifndef INCLUDE_ALTERNATE_GCS 56.132 +#define INCLUDE_ALTERNATE_GCS 1 56.133 +#endif // INCLUDE_ALTERNATE_GCS 56.134 + 56.135 +#if INCLUDE_ALTERNATE_GCS 56.136 +#define NOT_ALTERNATE_GCS_RETURN /* next token must be ; */ 56.137 +#define NOT_ALTERNATE_GCS_RETURN_(code) /* next token must be ; */ 56.138 +#else 56.139 +#define NOT_ALTERNATE_GCS_RETURN {} 56.140 +#define NOT_ALTERNATE_GCS_RETURN_(code) { return code; } 56.141 +#endif // INCLUDE_ALTERNATE_GCS 56.142 + 56.143 +#ifndef INCLUDE_NMT 56.144 +#define INCLUDE_NMT 1 56.145 +#endif // INCLUDE_NMT 56.146 + 56.147 +#if INCLUDE_NMT 56.148 +#define NOT_NMT_RETURN /* next token must be ; */ 56.149 +#define NOT_NMT_RETURN_(code) /* next token must be ; */ 56.150 +#else 56.151 +#define NOT_NMT_RETURN {} 56.152 +#define NOT_NMT_RETURN_(code) { return code; } 56.153 +#endif // INCLUDE_NMT 56.154 56.155 // COMPILER1 variant 56.156 #ifdef COMPILER1