--- old/make/Makefile 2012-09-17 16:11:27.970640273 -0400 +++ new/make/Makefile 2012-09-17 16:11:26.830172111 -0400 @@ -76,6 +76,8 @@ include $(GAMMADIR)/make/altsrc.make +-include $(HS_ALT_MAKE)/Makefile.make + ifneq ($(ALT_OUTPUTDIR),) ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR) else @@ -88,16 +90,23 @@ KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark +MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 jvmgminimal1 -COMMON_VM_PRODUCT_TARGETS=product product1 productkernel docs export_product -COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 fastdebugkernel docs export_fastdebug -COMMON_VM_DEBUG_TARGETS=jvmg jvmg1 jvmgkernel docs export_debug +COMMON_VM_PRODUCT_TARGETS=product product1 docs export_product +COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 docs export_fastdebug +COMMON_VM_DEBUG_TARGETS=jvmg jvmg1 docs export_debug # JDK directory list JDK_DIRS=bin include jre lib demo all: all_product all_fastdebug +ifeq ($(JVM_VARIANT_MINIMAL1),true) +all_product: productminimal1 +all_fastdebug: fastdebugminimal1 +all_debug: jvmgminimal1 +endif + ifdef BUILD_CLIENT_ONLY all_product: product1 docs export_product all_fastdebug: fastdebug1 docs export_fastdebug @@ -114,7 +123,7 @@ endif endif -all_optimized: optimized optimized1 optimizedkernel docs export_optimized +all_optimized: optimized optimized1 docs export_optimized allzero: all_productzero all_fastdebugzero all_productzero: productzero docs export_product @@ -167,6 +176,11 @@ $(MAKE) BUILD_FLAVOR=$(@:%shark=%) VM_TARGET=$@ \ generic_buildshark $(ALT_OUT) +$(MINIMAL1_VM_TARGETS): + $(CD) $(GAMMADIR)/make; \ + $(MAKE) BUILD_FLAVOR=$(@:%minimal1=%) VM_TARGET=$@ \ + generic_buildminimal1 $(ALT_OUT) + # Build compiler1 (client) rule, different for platforms generic_build1: $(MKDIR) -p $(OUTPUTDIR) @@ -239,6 +253,31 @@ $(MAKE) -f $(ABS_OS_MAKEFILE) \ $(MAKE_ARGS) $(VM_TARGET) +generic_buildminimal1: +ifeq ($(JVM_VARIANT_MINIMAL1),true) + $(MKDIR) -p $(OUTPUTDIR) + ifeq ($(ARCH_DATA_MODEL), 32) + ifeq ($(OSNAME),windows) + $(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ; + else + ifeq ($(OSNAME),solaris) + $(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ; + else + @if [ -r $(GAMMADIR)/make/$(OSNAME)/makefiles/minimal1.make ] ; then \ + $(CD) $(OUTPUTDIR); \ + $(MAKE) -f $(ABS_OS_MAKEFILE) $(MAKE_ARGS) $(VM_TARGET) ; \ + else \ + $(ECHO) "No $(VM_TARGET) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ; \ + fi + endif + endif + else + @$(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" + endif +else + @$(ECHO) "Error: trying to build a minimal target but JVM_VARIANT_MINIMAL1 is not true." +endif + # Export file rule generic_export: $(EXPORT_LIST) export_product: @@ -287,6 +326,8 @@ KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR) SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR) +MINIMAL1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1 +MINIMAL1_DIR=$(MINIMAL1_BASE_DIR)/$(VM_SUBDIR) ifeq ($(JVM_VARIANT_SERVER), true) MISC_DIR=$(C2_DIR) @@ -308,6 +349,10 @@ MISC_DIR=$(ZERO_DIR) GEN_DIR=$(ZERO_BASE_DIR)/generated endif +ifeq ($(JVM_VARIANT_MINIMAL1), true) + MISC_DIR=$(MINIMAL1_DIR) + GEN_DIR=$(MINIMAL1_BASE_DIR)/generated +endif # Bin files (windows) ifeq ($(OSNAME),windows) @@ -357,6 +402,16 @@ $(install-file) endif +# Minimal JVM files always come from minimal area +$(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz + $(install-file) +$(EXPORT_MINIMAL_DIR)/%.dll: $(MINIMAL1_DIR)/%.dll + $(install-file) +$(EXPORT_MINIMAL_DIR)/%.pdb: $(MINIMAL1_DIR)/%.pdb + $(install-file) +$(EXPORT_MINIMAL_DIR)/%.map: $(MINIMAL1_DIR)/%.map + $(install-file) + # Shared Library ifneq ($(OSNAME),windows) ifeq ($(JVM_VARIANT_SERVER), true) @@ -411,6 +466,26 @@ $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX) $(install-file) endif + ifeq ($(JVM_VARIANT_MINIMAL1), true) + $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX) + $(install-file) + $(EXPORT_MINIMAL_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX) + $(install-file) + $(EXPORT_MINIMAL_DIR)/64/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX) + $(install-file) + $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo + $(install-file) + $(EXPORT_MINIMAL_DIR)/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo + $(install-file) + $(EXPORT_MINIMAL_DIR)/64/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo + $(install-file) + $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz + $(install-file) + $(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz + $(install-file) + $(EXPORT_MINIMAL_DIR)/64/%.diz: $(MINIMAL1_DIR)/%.diz + $(install-file) + endif endif # Jar file (sa-jdi.jar) @@ -451,7 +526,7 @@ $(install-file) # Xusage file -$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE) +$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt $(EXPORT_MINIMAL_DIR)/Xusage.txt: $(XUSAGE) $(prep-target) $(RM) $@.temp $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp @@ -467,6 +542,7 @@ $(RM) -r $(KERNEL_DIR) $(RM) -r $(ZERO_DIR) $(RM) -r $(SHARK_DIR) + $(RM) -r $(MINIMAL1_DIR) clean_export: $(RM) -r $(EXPORT_PATH) clean_jdk: @@ -574,10 +650,11 @@ @$(ECHO) "create_jdk: Create JDK image, export all files into it" @$(ECHO) "update_jdk: Update JDK image with fresh exported files" @$(ECHO) " " - @$(ECHO) "Others targets are:" + @$(ECHO) "Other targets are:" @$(ECHO) " $(C1_VM_TARGETS)" @$(ECHO) " $(C2_VM_TARGETS)" @$(ECHO) " $(KERNEL_VM_TARGETS)" + @$(ECHO) " $(MINIMAL1_VM_TARGETS)" # Variable help (only common ones used by this workspace) variable_help: variable_help_intro variable_list variable_help_end @@ -672,9 +749,10 @@ include $(GAMMADIR)/make/jprt.gmk .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ - $(KERNEL_VM_TARGETS) \ - generic_build1 generic_build2 generic_buildkernel generic_export \ + $(KERNEL_VM_TARGETS) $(MINIMAL1_VM_TARGETS) \ + generic_build1 generic_build2 generic_buildkernel generic_buildminimal1 generic_export \ export_product export_fastdebug export_debug export_optimized \ export_jdk_product export_jdk_fastdebug export_jdk_debug \ create_jdk copy_jdk update_jdk test_jdk \ - copy_product_jdk copy_fastdebug_jdk copy_debug_jdk + copy_product_jdk copy_fastdebug_jdk copy_debug_jdk \ + $(HS_ALT_MAKE)/Makefile.make --- old/make/bsd/Makefile 2012-09-17 16:11:32.025365050 -0400 +++ new/make/bsd/Makefile 2012-09-17 16:11:30.874369233 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -175,6 +175,10 @@ # profiledshark shark __shark/profiled # productshark shark __shark/product # +# fastdebugminimal1 minimal1 __minimal1/fastdebug +# jvmgminimal1 minimal1 __minimal1/jvmg +# productminimal1 minimal1 __minimal1/product +# # What you get with each target: # # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher @@ -199,6 +203,7 @@ SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) SUBDIRS_ZERO = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS)) SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS)) +SUBDIRS_MINIMAL1 = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS)) TARGETS_C2 = $(TARGETS) TARGETS_C1 = $(addsuffix 1,$(TARGETS)) @@ -206,6 +211,7 @@ TARGETS_CORE = $(addsuffix core,$(TARGETS)) TARGETS_ZERO = $(addsuffix zero,$(TARGETS)) TARGETS_SHARK = $(addsuffix shark,$(TARGETS)) +TARGETS_MINIMAL1 = $(addsuffix minimal1,$(TARGETS)) BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX) @@ -223,6 +229,7 @@ @echo " $(TARGETS_CORE)" @echo " $(TARGETS_ZERO)" @echo " $(TARGETS_SHARK)" + @echo " $(TARGETS_MINIMAL1)" checks: check_os_version check_j2se_version @@ -281,6 +288,10 @@ $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks $(BUILDTREE) VARIANT=shark VARIANTARCH=$(VARIANTARCH) +$(SUBDIRS_MINIMAL1): $(BUILDTREE_MAKE) + $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks + $(BUILDTREE) VARIANT=minimal1 + platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in $(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@ @@ -328,12 +339,20 @@ cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install endif +$(TARGETS_MINIMAL1): $(SUBDIRS_MINIMAL1) + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && ./test_gamma +ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install +endif + # Just build the tree, and nothing else: tree: $(SUBDIRS_C2) tree1: $(SUBDIRS_C1) treecore: $(SUBDIRS_CORE) treezero: $(SUBDIRS_ZERO) treeshark: $(SUBDIRS_SHARK) +treeminimal1: $(SUBDIRS_MINIMAL1) # Doc target. This is the same for all build options. # Hence create a docs directory beside ...$(ARCH)_[...] @@ -355,17 +374,23 @@ clean_docs: rm -rf $(SUBDIR_DOCS) -clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark: +clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1: rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@) -clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs +clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs include $(GAMMADIR)/make/cscope.make +# +# Include alternate Makefile if it exists. +# +-include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make + #------------------------------------------------------------------------------- -.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) +.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1) .PHONY: tree tree1 treecore treezero treeshark .PHONY: all compiler1 compiler2 core zero shark .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark docs clean_docs .PHONY: checks check_os_version check_j2se_version +.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make --- old/make/bsd/makefiles/buildtree.make 2012-09-17 16:11:36.018068012 -0400 +++ new/make/bsd/makefiles/buildtree.make 2012-09-17 16:11:34.912837020 -0400 @@ -60,6 +60,7 @@ -include $(SPEC) include $(GAMMADIR)/make/scm.make +include $(GAMMADIR)/make/defs.make include $(GAMMADIR)/make/altsrc.make @@ -195,6 +196,8 @@ sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \ echo; \ echo "GAMMADIR = $(GAMMADIR)"; \ + echo "HS_ALT_MAKE = $(HS_ALT_MAKE)"; \ + echo "OSNAME = $(OSNAME)"; \ echo "SYSDEFS = \$$(Platform_sysdefs)"; \ echo "SRCARCH = $(SRCARCH)"; \ echo "BUILDARCH = $(BUILDARCH)"; \ @@ -251,6 +254,7 @@ [ -n "$(SPEC)" ] && \ echo "include $(SPEC)"; \ echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \ + echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \ echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \ ) > $@ --- old/make/bsd/makefiles/defs.make 2012-09-17 16:11:40.057466139 -0400 +++ new/make/bsd/makefiles/defs.make 2012-09-17 16:11:38.923272455 -0400 @@ -155,6 +155,7 @@ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client +EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar @@ -168,6 +169,19 @@ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) endif +ifeq ($(JVM_VARIANT_MINIMAL1),true) + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX) + + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz + else + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo + endif + endif +endif + # Serviceability Binaries # No SA Support for PPC, IA64, ARM or zero ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ --- old/make/bsd/makefiles/gcc.make 2012-09-17 16:11:44.254315254 -0400 +++ new/make/bsd/makefiles/gcc.make 2012-09-17 16:11:43.103097073 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -151,11 +151,6 @@ CFLAGS += -DCC_INTERP endif -# Build for embedded targets -ifdef JAVASE_EMBEDDED - CFLAGS += -DJAVASE_EMBEDDED -endif - # Keep temporary files (.ii, .s) ifdef NEED_ASM CFLAGS += -save-temps @@ -186,25 +181,33 @@ CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations endif +OPT_CFLAGS/SIZE=-Os +OPT_CFLAGS/SPEED=-O3 + +# Hotspot uses very unstrict aliasing turn this optimization off +OPT_EXTRAS += -fno-strict-aliasing + +# The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp +# if we use expensive-optimizations +ifeq ($(BUILDARCH), ia64) + OPT_EXTRAS += -fno-expensive-optimizations +endif # The flags to use for an Optimized g++ build ifeq ($(OS_VENDOR), Darwin) # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy # - OPT_CFLAGS += -Os + OPT_CFLAGS_DEFAULT ?= SIZE else - OPT_CFLAGS += -O3 + OPT_CFLAGS_DEFAULT ?= SPEED endif -# Hotspot uses very unstrict aliasing turn this optimization off -OPT_CFLAGS += -fno-strict-aliasing - -# The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp -# if we use expensive-optimizations -ifeq ($(BUILDARCH), ia64) -OPT_CFLAGS += -fno-expensive-optimizations +ifdef OPT_CFLAGS + $(error "Use OPT_CFLAGS_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS") endif +OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS) + OPT_CFLAGS/NOOPT=-O0 # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation. --- old/make/bsd/makefiles/ia64.make 2012-09-17 16:11:48.206644866 -0400 +++ new/make/bsd/makefiles/ia64.make 2012-09-17 16:11:47.078986207 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # # IA64 only uses c++ based interpreter CFLAGS += -DCC_INTERP -D_LP64=1 -DVM_LITTLE_ENDIAN -# Hotspot uses very unstrict aliasing turn this optimization off -OPT_CFLAGS += -fno-strict-aliasing ifeq ($(VERSION),debug) ASM_FLAGS= -DDEBUG else --- old/make/bsd/makefiles/vm.make 2012-09-17 16:11:52.236167390 -0400 +++ new/make/bsd/makefiles/vm.make 2012-09-17 16:11:51.122056743 -0400 @@ -190,7 +190,7 @@ ZERO_SPECIFIC_FILES := zero # Always exclude these. -Src_Files_EXCLUDE := jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp +Src_Files_EXCLUDE += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp # Exclude per type. Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp --- old/make/defs.make 2012-09-17 16:11:56.920776954 -0400 +++ new/make/defs.make 2012-09-17 16:11:55.221534094 -0400 @@ -22,6 +22,23 @@ # # +# The common definitions for hotspot builds. + +# Optionally include SPEC file generated by configure. +ifneq ($(SPEC),) + include $(SPEC) +endif + +# Directory paths and user name +# Unless GAMMADIR is set on the command line, search upward from +# the current directory for a parent directory containing "src/share/vm". +# If that fails, look for $GAMMADIR in the environment. +# When the tree of subdirs is built, this setting is stored in each flags.make. +GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done) +HS_SRC_DIR=$(GAMMADIR)/src +HS_MAKE_DIR=$(GAMMADIR)/make +HS_BUILD_DIR=$(GAMMADIR)/build + ifeq ($(HS_ALT_MAKE),) ifneq ($(OPENJDK),true) HS_ALT_MAKE=$(GAMMADIR)/make/closed @@ -30,12 +47,10 @@ endif endif -# The common definitions for hotspot builds. - -# Optionally include SPEC file generated by configure. -ifneq ($(SPEC),) - include $(SPEC) -endif +# +# Include alternate defs.make if it exists +# +-include $(HS_ALT_MAKE)/defs.make # Default to verbose build logs (show all compile lines): MAKE_VERBOSE=y @@ -84,16 +99,6 @@ endif endif -# Directory paths and user name -# Unless GAMMADIR is set on the command line, search upward from -# the current directory for a parent directory containing "src/share/vm". -# If that fails, look for $GAMMADIR in the environment. -# When the tree of subdirs is built, this setting is stored in each flags.make. -GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done) -HS_SRC_DIR=$(GAMMADIR)/src -HS_MAKE_DIR=$(GAMMADIR)/make -HS_BUILD_DIR=$(GAMMADIR)/build - ifeq ($(USER),) USER=$(USERNAME) endif @@ -336,3 +341,4 @@ EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jfr.h endif +.PHONY: $(HS_ALT_MAKE)/defs.make --- old/make/linux/Makefile 2012-09-17 16:12:00.921529272 -0400 +++ new/make/linux/Makefile 2012-09-17 16:11:59.806144311 -0400 @@ -175,6 +175,10 @@ # profiledshark shark __shark/profiled # productshark shark __shark/product # +# fastdebugminimal1 minimal1 __minimal1/fastdebug +# jvmgminimal1 minimal1 __minimal1/jvmg +# productminimal1 minimal1 __minimal1/product +# # What you get with each target: # # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher @@ -199,6 +203,7 @@ SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) SUBDIRS_ZERO = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS)) SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS)) +SUBDIRS_MINIMAL1 = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS)) TARGETS_C2 = $(TARGETS) TARGETS_C1 = $(addsuffix 1,$(TARGETS)) @@ -206,6 +211,7 @@ TARGETS_CORE = $(addsuffix core,$(TARGETS)) TARGETS_ZERO = $(addsuffix zero,$(TARGETS)) TARGETS_SHARK = $(addsuffix shark,$(TARGETS)) +TARGETS_MINIMAL1 = $(addsuffix minimal1,$(TARGETS)) BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) @@ -224,6 +230,7 @@ @echo " $(TARGETS_CORE)" @echo " $(TARGETS_ZERO)" @echo " $(TARGETS_SHARK)" + @echo " $(TARGETS_MINIMAL1)" checks: check_os_version check_j2se_version @@ -281,6 +288,11 @@ $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks $(BUILDTREE) VARIANT=shark VARIANTARCH=$(VARIANTARCH) +$(SUBDIRS_MINIMAL1): $(BUILDTREE_MAKE) + $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks + $(BUILDTREE) VARIANT=minimal1 + + platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in $(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@ @@ -328,12 +340,20 @@ cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install endif +$(TARGETS_MINIMAL1): $(SUBDIRS_MINIMAL1) + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && ./test_gamma +ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install +endif + # Just build the tree, and nothing else: tree: $(SUBDIRS_C2) tree1: $(SUBDIRS_C1) treecore: $(SUBDIRS_CORE) treezero: $(SUBDIRS_ZERO) treeshark: $(SUBDIRS_SHARK) +treeminimal1: $(SUBDIRS_MINIMAL1) # Doc target. This is the same for all build options. # Hence create a docs directory beside ...$(ARCH)_[...] @@ -357,17 +377,23 @@ clean_docs: rm -rf $(SUBDIR_DOCS) -clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark: +clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1: rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@) -clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs +clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs include $(GAMMADIR)/make/cscope.make +# +# Include alternate Makefile if it exists. +# +-include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make + #------------------------------------------------------------------------------- -.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) +.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1) .PHONY: tree tree1 treecore treezero treeshark .PHONY: all compiler1 compiler2 core zero shark .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark docs clean_docs .PHONY: checks check_os_version check_j2se_version +.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make --- old/make/linux/makefiles/buildtree.make 2012-09-17 16:12:05.170353818 -0400 +++ new/make/linux/makefiles/buildtree.make 2012-09-17 16:12:03.789226746 -0400 @@ -57,6 +57,7 @@ -include $(SPEC) include $(GAMMADIR)/make/scm.make +include $(GAMMADIR)/make/defs.make include $(GAMMADIR)/make/altsrc.make @@ -188,6 +189,8 @@ sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \ echo; \ echo "GAMMADIR = $(GAMMADIR)"; \ + echo "HS_ALT_MAKE = $(HS_ALT_MAKE)"; \ + echo "OSNAME = $(OSNAME)"; \ echo "SYSDEFS = \$$(Platform_sysdefs)"; \ echo "SRCARCH = $(SRCARCH)"; \ echo "BUILDARCH = $(BUILDARCH)"; \ @@ -254,6 +257,7 @@ [ -n "$(SPEC)" ] && \ echo "include $(SPEC)"; \ echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \ + echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \ echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \ ) > $@ --- old/make/linux/makefiles/defs.make 2012-09-17 16:12:09.484249076 -0400 +++ new/make/linux/makefiles/defs.make 2012-09-17 16:12:08.342037731 -0400 @@ -248,6 +248,7 @@ endif EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client +EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar @@ -275,6 +276,19 @@ endif endif +ifeq ($(JVM_VARIANT_MINIMAL1),true) + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX) + + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz + else + EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo + endif + endif +endif + # Serviceability Binaries # No SA Support for PPC, IA64, ARM or zero ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ --- old/make/linux/makefiles/gcc.make 2012-09-17 16:12:13.435746605 -0400 +++ new/make/linux/makefiles/gcc.make 2012-09-17 16:12:12.296288272 -0400 @@ -116,11 +116,6 @@ CFLAGS += -DCC_INTERP endif -# Build for embedded targets -ifdef JAVASE_EMBEDDED - CFLAGS += -DJAVASE_EMBEDDED -endif - # Keep temporary files (.ii, .s) ifdef NEED_ASM CFLAGS += -save-temps @@ -146,17 +141,26 @@ CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) # The flags to use for an Optimized g++ build -OPT_CFLAGS += -O3 +OPT_CFLAGS/SIZE=-Os +OPT_CFLAGS/SPEED=-O3 # Hotspot uses very unstrict aliasing turn this optimization off -OPT_CFLAGS += -fno-strict-aliasing +OPT_EXTRAS += -fno-strict-aliasing # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp # if we use expensive-optimizations ifeq ($(BUILDARCH), ia64) -OPT_CFLAGS += -fno-expensive-optimizations +OPT_EXTRAS += -fno-expensive-optimizations +endif + +OPT_CFLAGS_DEFAULT ?= SPEED + +ifdef OPT_CFLAGS + $(error "$(OPT_CFLAGS) Use OPT_CFLAGS_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS") endif +OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS) + OPT_CFLAGS/NOOPT=-O0 # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation. --- old/make/linux/makefiles/ia64.make 2012-09-17 16:12:18.051117186 -0400 +++ new/make/linux/makefiles/ia64.make 2012-09-17 16:12:16.595841478 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # # IA64 only uses c++ based interpreter CFLAGS += -DCC_INTERP -D_LP64=1 -DVM_LITTLE_ENDIAN -# Hotspot uses very unstrict aliasing turn this optimization off -OPT_CFLAGS += -fno-strict-aliasing ifeq ($(VERSION),debug) ASM_FLAGS= -DDEBUG else --- old/make/linux/makefiles/vm.make 2012-09-17 16:12:22.132117464 -0400 +++ new/make/linux/makefiles/vm.make 2012-09-17 16:12:21.001174480 -0400 @@ -192,7 +192,7 @@ ZERO_SPECIFIC_FILES := zero # Always exclude these. -Src_Files_EXCLUDE := jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp +Src_Files_EXCLUDE += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp # Exclude per type. Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp --- old/make/windows/makefiles/defs.make 2012-09-17 16:12:26.638313221 -0400 +++ new/make/windows/makefiles/defs.make 2012-09-17 16:12:25.180230391 -0400 @@ -154,10 +154,9 @@ # On 32 bit windows we build server, client and kernel, on 64 bit just server. ifeq ($(JVM_VARIANTS),) ifeq ($(ARCH_DATA_MODEL), 32) - JVM_VARIANTS:=client,server,kernel + JVM_VARIANTS:=client,server JVM_VARIANT_CLIENT:=true JVM_VARIANT_SERVER:=true - JVM_VARIANT_KERNEL:=true else JVM_VARIANTS:=server JVM_VARIANT_SERVER:=true --- old/src/os/solaris/vm/os_solaris.cpp 2012-09-17 16:12:31.354581825 -0400 +++ new/src/os/solaris/vm/os_solaris.cpp 2012-09-17 16:12:29.937851632 -0400 @@ -5876,15 +5876,6 @@ } } -// Just to get the Kernel build to link on solaris for testing. - -extern "C" { -class ASGCT_CallTrace; -void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) - KERNEL_RETURN; -} - - // ObjectMonitor park-unpark infrastructure ... // // We implement Solaris and Linux PlatformEvents with the --- old/src/share/vm/code/nmethod.cpp 2012-09-17 16:12:35.729794071 -0400 +++ new/src/share/vm/code/nmethod.cpp 2012-09-17 16:12:34.509995964 -0400 @@ -1603,6 +1603,7 @@ // The RedefineClasses() API can cause the class unloading invariant // to no longer be true. See jvmtiExport.hpp for details. // Also, leave a debugging breadcrumb in local flag. +#if INCLUDE_JVMTI bool a_class_was_redefined = JvmtiExport::has_redefined_a_class(); if (a_class_was_redefined) { // This set of the unloading_occurred flag is done before the @@ -1610,6 +1611,7 @@ // of this nmethod is reported. unloading_occurred = true; } +#endif // INCLUDE_JVMTI // Exception cache ExceptionCache* ec = exception_cache(); --- old/src/share/vm/memory/allocation.hpp 2012-09-17 16:12:39.969794328 -0400 +++ new/src/share/vm/memory/allocation.hpp 2012-09-17 16:12:38.808449185 -0400 @@ -27,6 +27,7 @@ #include "runtime/globals.hpp" #include "utilities/globalDefinitions.hpp" +#include "utilities/macros.hpp" #ifdef COMPILER1 #include "c1/c1_globals.hpp" #endif @@ -147,6 +148,7 @@ ot_masks = 0x00F0 }; +#if INCLUDE_NMT #define IS_MEMORY_TYPE(flags, type) ((flags & mt_masks) == type) #define HAS_VALID_MEMORY_TYPE(flags)((flags & mt_masks) != mtNone) #define FLAGS_TO_MEMORY_TYPE(flags) (flags & mt_masks) @@ -154,11 +156,20 @@ #define IS_ARENA_OBJ(flags) ((flags & ot_masks) == otArena) #define IS_NMT_RECORDER(flags) ((flags & ot_masks) == otNMTRecorder) #define NMT_CAN_TRACK(flags) (!IS_NMT_RECORDER(flags) && !(IS_MEMORY_TYPE(flags, mtDontTrack))) +#endif // INCLUDE_NMT typedef unsigned short MEMFLAGS; +#if INCLUDE_NMT + extern bool NMT_track_callsite; +#else + +const bool NMT_track_callsite = false; + +#endif // INCLUDE_NMT + // debug build does not inline #if defined(_DEBUG_) #define CURRENT_PC (NMT_track_callsite ? os::get_caller_pc(1) : 0) --- old/src/share/vm/memory/heapInspection.hpp 2012-09-17 16:12:43.890739860 -0400 +++ new/src/share/vm/memory/heapInspection.hpp 2012-09-17 16:12:42.797747751 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ #include "memory/allocation.inline.hpp" #include "oops/oop.inline.hpp" -#ifndef SERVICES_KERNEL +#if INCLUDE_SERVICES // HeapInspection @@ -129,12 +129,12 @@ void sort(); }; -#endif // SERVICES_KERNEL +#endif // INCLUDE_SERVICES class HeapInspection : public AllStatic { public: - static void heap_inspection(outputStream* st, bool need_prologue) KERNEL_RETURN; - static void find_instances_at_safepoint(Klass* k, GrowableArray* result) KERNEL_RETURN; + static void heap_inspection(outputStream* st, bool need_prologue) NOT_SERVICES_RETURN; + static void find_instances_at_safepoint(Klass* k, GrowableArray* result) NOT_SERVICES_RETURN; }; #endif // SHARE_VM_MEMORY_HEAPINSPECTION_HPP --- old/src/share/vm/memory/metaspaceShared.cpp 2012-09-17 16:12:48.233089521 -0400 +++ new/src/share/vm/memory/metaspaceShared.cpp 2012-09-17 16:12:47.048168769 -0400 @@ -42,14 +42,8 @@ int MetaspaceShared::_max_alignment = 0; -int MetaspaceShared::max_alignment() { return _max_alignment; } -void MetaspaceShared::set_max_alignment(int alignment) { _max_alignment = alignment; } -// Accessor functions to save shared space created for metadata, which has -// extra space allocated at the end for miscellaneous data and code. ReservedSpace* MetaspaceShared::_shared_rs = NULL; -ReservedSpace* MetaspaceShared::shared_rs() { return _shared_rs; } -void MetaspaceShared::set_shared_rs(ReservedSpace* rs) { _shared_rs = rs; } // Read/write a data stream for restoring/preserving metadata pointers and // miscellaneous data from/to the shared archive file. --- old/src/share/vm/memory/metaspaceShared.hpp 2012-09-17 16:12:53.181376435 -0400 +++ new/src/share/vm/memory/metaspaceShared.hpp 2012-09-17 16:12:51.120674494 -0400 @@ -56,18 +56,33 @@ n_regions = 4 }; - static void set_max_alignment(int alignment) KERNEL_RETURN; - static int max_alignment() KERNEL_RETURN_(0); + // Accessor functions to save shared space created for metadata, which has + // extra space allocated at the end for miscellaneous data and code. + static void set_max_alignment(int alignment) { + CDS_ONLY(_max_alignment = alignment); + } + + static int max_alignment() { + CDS_ONLY(return _max_alignment); + NOT_CDS(return 0); + } + + static void preload_and_dump(TRAPS) NOT_CDS_RETURN; + + static ReservedSpace* shared_rs() { + CDS_ONLY(return _shared_rs); + NOT_CDS(return NULL); + } + + static void set_shared_rs(ReservedSpace* rs) { + CDS_ONLY(_shared_rs = rs;) + } - static void preload_and_dump(TRAPS) KERNEL_RETURN; - static ReservedSpace* shared_rs(); - static void set_shared_rs(ReservedSpace* rs) KERNEL_RETURN; - - static bool map_shared_spaces(FileMapInfo* mapinfo) KERNEL_RETURN_(false); - static void initialize_shared_spaces() KERNEL_RETURN; + static bool map_shared_spaces(FileMapInfo* mapinfo) NOT_CDS_RETURN_(false); + static void initialize_shared_spaces() NOT_CDS_RETURN; // Return true if given address is in the mapped shared space. - static bool is_in_shared_space(const void* p) KERNEL_RETURN_(false); + static bool is_in_shared_space(const void* p) NOT_CDS_RETURN_(false); static void generate_vtable_methods(void** vtbl_list, void** vtable, @@ -79,7 +94,7 @@ // Remap the shared readonly space to shared readwrite, private if // sharing is enabled. Simply returns true if sharing is not enabled // or if the remapping has already been done by a prior call. - static bool remap_shared_readonly_as_readwrite() KERNEL_RETURN_(true); + static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true); static void print_shared_spaces(); }; --- old/src/share/vm/memory/universe.cpp 2012-09-17 16:12:57.359050496 -0400 +++ new/src/share/vm/memory/universe.cpp 2012-09-17 16:12:56.222819607 -0400 @@ -749,7 +749,7 @@ #ifndef SERIALGC Universe::_collectedHeap = new ParallelScavengeHeap(); #else // SERIALGC - fatal("UseParallelGC not supported in java kernel vm."); + fatal("UseParallelGC not supported in this VM."); #endif // SERIALGC } else if (UseG1GC) { @@ -774,7 +774,7 @@ gc_policy = new ConcurrentMarkSweepPolicy(); } #else // SERIALGC - fatal("UseConcMarkSweepGC not supported in java kernel vm."); + fatal("UseConcMarkSweepGC not supported in this VM."); #endif // SERIALGC } else { // default old generation gc_policy = new MarkSweepPolicy(); --- old/src/share/vm/prims/forte.hpp 2012-09-17 16:13:02.059613468 -0400 +++ new/src/share/vm/prims/forte.hpp 2012-09-17 16:13:00.921510662 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,7 @@ class Forte : AllStatic { public: static void register_stub(const char* name, address start, address end) - KERNEL_RETURN; + NOT_JVMTI_RETURN; // register internal VM stub }; --- old/src/share/vm/prims/jni.cpp 2012-09-17 16:13:06.076332758 -0400 +++ new/src/share/vm/prims/jni.cpp 2012-09-17 16:13:04.880737714 -0400 @@ -3003,9 +3003,9 @@ HOTSPOT_JNI_GETSTATICOBJECTFIELD_ENTRY( env, clazz, (uintptr_t) fieldID); #endif /* USDT2 */ -#ifndef JNICHECK_KERNEL +#if INCLUDE_JNI_CHECK DEBUG_ONLY(Klass* param_k = jniCheck::validate_class(thread, clazz);) -#endif // JNICHECK_KERNEL +#endif // INCLUDE_JNI_CHECK JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); assert(id->is_static_field_id(), "invalid static field id"); // Keep JVMTI addition small and only check enabled flag here. @@ -3951,6 +3951,7 @@ // SetNativeMethodPrefix(es) functions in the JVM TI Spec for details. static Method* find_prefixed_native(KlassHandle k, Symbol* name, Symbol* signature, TRAPS) { +#if INCLUDE_JVMTI ResourceMark rm(THREAD); Method* method; int name_len = name->utf8_length(); @@ -3982,6 +3983,7 @@ name_len = trial_len; name_str = trial_name_str; } +#endif // INCLUDE_JVMTI return NULL; // not found } @@ -4975,11 +4977,9 @@ // Returns the function structure struct JNINativeInterface_* jni_functions() { -#ifndef JNICHECK_KERNEL +#if INCLUDE_JNI_CHECK if (CheckJNICalls) return jni_functions_check(); -#else // JNICHECK_KERNEL - if (CheckJNICalls) warning("-Xcheck:jni is not supported in kernel vm."); -#endif // JNICHECK_KERNEL +#endif // INCLUDE_JNI_CHECK return &jni_NativeInterface; } --- old/src/share/vm/prims/jvmtiEnter.xsl 2012-09-17 16:13:15.555876699 -0400 +++ new/src/share/vm/prims/jvmtiEnter.xsl 2012-09-17 16:13:14.316741979 -0400 @@ -1,6 +1,6 @@