Mercurial > hg > release > icedtea6-1.7
changeset 1739:71a19c78147c
Support HotSpot 16 tree.
2009-10-21 Andrew John Hughes <ahughes@redhat.com>
* patches/ecj/icedtea-hotspot-original.patch:
Renamed to be used in all builds.
* patches/hotspot/original/icedtea-gcc-4.3.patch:
Dropped, redundant.
* patches/hotspot/original/icedtea-includedb.patch:
Renamed to include bug ID.
* patches/icedtea-f2i-overflow.patch:
Moved to HotSpot original directory and renamed to include bug ID.
* patches/icedtea-gcc-4.3.patch:
Dropped, redundant.
* patches/icedtea-lib64.patch:
Moved to HotSpot original directory and renamed to include bug ID.
* Makefile.am:
Pick up HotSpot URL from hotspot.map, remove GCC_OLD logic,
only apply some patches when building hs14.
* hotspot.map: Add hs16.
* patches/ecj/icedtea-hotspot.patch: Moved from icedtea-hotspot-original.patch.
* patches/hotspot/default/icedtea-bytecodeInterpreter.patch,
* patches/hotspot/default/icedtea-core-build.patch,
* patches/hotspot/default/icedtea-gcc-stack-markings.patch,
* patches/hotspot/default/icedtea-gcc-suffix.patch,
* patches/hotspot/default/icedtea-headers.patch,
* patches/hotspot/default/icedtea-memory-limits.patch,
* patches/hotspot/default/icedtea-no-precompiled.patch,
* patches/hotspot/default/icedtea-params-cast-size_t.patch,
* patches/hotspot/default/icedtea-parisc-opt.patch,
* patches/hotspot/default/icedtea-shark-build.patch,
* patches/hotspot/default/icedtea-shark.patch,
* patches/hotspot/default/icedtea-sparc-buildfixes.patch,
* patches/hotspot/default/icedtea-sparc-ptracefix.patch,
* patches/hotspot/default/icedtea-sparc-trapsfix.patch,
* patches/hotspot/default/icedtea-sparc64-linux.patch,
* patches/hotspot/default/icedtea-static-libstdc++.patch,
* patches/hotspot/default/icedtea-text-relocations.patch,
* patches/hotspot/default/icedtea-use-idx_t.patch,
* patches/hotspot/default/icedtea-version.patch,
* patches/hotspot/default/icedtea-zero-build.patch:
Copied from hotspot/original.
* patches/hotspot/default/openjdk-6886353-ignore_deoptimizealot.patch:
New patch for hs16 to ignore DeoptimizeALot on product builds;
backported from my fix for JDK7.
* patches/hotspot/original/icedtea-6778657-f2i-overflow.patch,
* patches/hotspot/original/icedtea-6778662-lib64.patch:
Moved from main directory as only needed for hs14. Added
Sun bug IDs.
* patches/hotspot/original/icedtea-6793825-includedb.patch:
Renamed to include bug ID.
* patches/icedtea-use-system-tzdata.patch:
Use new SystemProperty to avoid a GCC warning.
* patches/openjdk/6879689-hotspot_warning_fix.patch:
Backported from my fix in JDK7. Prevents a GCC warning
when compiling with optimisation.
line wrap: on
line diff
--- a/ChangeLog Mon Oct 19 23:19:26 2009 +0200 +++ b/ChangeLog Wed Oct 21 15:04:08 2009 +0100 @@ -1,3 +1,58 @@ +2009-10-21 Andrew John Hughes <ahughes@redhat.com> + + * patches/ecj/icedtea-hotspot-original.patch: + Renamed to be used in all builds. + * patches/hotspot/original/icedtea-gcc-4.3.patch: + Dropped, redundant. + * patches/hotspot/original/icedtea-includedb.patch: + Renamed to include bug ID. + * patches/icedtea-f2i-overflow.patch: + Moved to HotSpot original directory and renamed to include bug ID. + * patches/icedtea-gcc-4.3.patch: + Dropped, redundant. + * patches/icedtea-lib64.patch: + Moved to HotSpot original directory and renamed to include bug ID. + * Makefile.am: + Pick up HotSpot URL from hotspot.map, remove GCC_OLD logic, + only apply some patches when building hs14. + * hotspot.map: Add hs16. + * patches/ecj/icedtea-hotspot.patch: Moved from icedtea-hotspot-original.patch. + * patches/hotspot/default/icedtea-bytecodeInterpreter.patch, + * patches/hotspot/default/icedtea-core-build.patch, + * patches/hotspot/default/icedtea-gcc-stack-markings.patch, + * patches/hotspot/default/icedtea-gcc-suffix.patch, + * patches/hotspot/default/icedtea-headers.patch, + * patches/hotspot/default/icedtea-memory-limits.patch, + * patches/hotspot/default/icedtea-no-precompiled.patch, + * patches/hotspot/default/icedtea-params-cast-size_t.patch, + * patches/hotspot/default/icedtea-parisc-opt.patch, + * patches/hotspot/default/icedtea-shark-build.patch, + * patches/hotspot/default/icedtea-shark.patch, + * patches/hotspot/default/icedtea-sparc-buildfixes.patch, + * patches/hotspot/default/icedtea-sparc-ptracefix.patch, + * patches/hotspot/default/icedtea-sparc-trapsfix.patch, + * patches/hotspot/default/icedtea-sparc64-linux.patch, + * patches/hotspot/default/icedtea-static-libstdc++.patch, + * patches/hotspot/default/icedtea-text-relocations.patch, + * patches/hotspot/default/icedtea-use-idx_t.patch, + * patches/hotspot/default/icedtea-version.patch, + * patches/hotspot/default/icedtea-zero-build.patch: + Copied from hotspot/original. + * patches/hotspot/default/openjdk-6886353-ignore_deoptimizealot.patch: + New patch for hs16 to ignore DeoptimizeALot on product builds; + backported from my fix for JDK7. + * patches/hotspot/original/icedtea-6778657-f2i-overflow.patch, + * patches/hotspot/original/icedtea-6778662-lib64.patch: + Moved from main directory as only needed for hs14. Added + Sun bug IDs. + * patches/hotspot/original/icedtea-6793825-includedb.patch: + Renamed to include bug ID. + * patches/icedtea-use-system-tzdata.patch: + Use new SystemProperty to avoid a GCC warning. + * patches/openjdk/6879689-hotspot_warning_fix.patch: + Backported from my fix in JDK7. Prevents a GCC warning + when compiling with optimisation. + 2009-10-19 Mark Wielaard <mjw@redhat.com> * tapset/hotspot_jni.stp.in: New tapset.
--- a/Makefile.am Mon Oct 19 23:19:26 2009 +0200 +++ b/Makefile.am Wed Oct 21 15:04:08 2009 +0100 @@ -327,7 +327,6 @@ # Download OpenJDK sources. OPENJDK_URL = http://download.java.net/openjdk/jdk6/promoted/$(OPENJDK_VERSION)/ -HOTSPOT_URL = http://hg.openjdk.java.net/hsx/hsx14/master/archive/ OPENJDK_HG_URL = http://hg.openjdk.java.net/jdk6/jdk6 if USE_ALT_OPENJDK_SRC_ZIP @@ -412,7 +411,7 @@ if WITH_ALT_HSBUILD if USE_ALT_HOTSPOT_SRC_ZIP else - hotspot_md5sum="`$(AWK) 'version==$$1 {print $$3}' version=$(HSBUILD) \ + hotspot_md5sum="`$(AWK) 'version==$$1 {print $$4}' version=$(HSBUILD) \ $(abs_top_srcdir)/hotspot.map`" ; \ if ! echo "$${hotspot_md5sum} $(HOTSPOT_SRC_ZIP)" \ | $(MD5SUM) --check ; \ @@ -421,9 +420,9 @@ then \ mv $(HOTSPOT_SRC_ZIP) $(HOTSPOT_SRC_ZIP).old ; \ fi ; \ - changeset="`$(AWK) 'version==$$1 {print $$2}' version=$(HSBUILD) \ - $(abs_top_srcdir)/hotspot.map`" ; \ - $(WGET) $(HOTSPOT_URL)$${changeset}.tar.gz -O $(HOTSPOT_SRC_ZIP) ; \ + hotspot_url="`$(AWK) 'version==$$1 {print $$2 "/archive/" $$3 ".tar.gz"}' \ + version=$(HSBUILD) $(abs_top_srcdir)/hotspot.map`"; \ + $(WGET) $${hotspot_url} -O $(HOTSPOT_SRC_ZIP) ; \ fi endif endif @@ -539,14 +538,6 @@ mkdir -p stamps touch stamps/ports.stamp -# If new gcc is installed, apply 4.3 patch -if GCC_OLD - GCC_PATCH = -else - GCC_PATCH = patches/icedtea-gcc-4.3.patch \ - patches/hotspot/$(HSBUILD)/icedtea-gcc-4.3.patch -endif - ICEDTEA_FSG_PATCHES = ICEDTEA_PATCHES = \ @@ -587,7 +578,6 @@ patches/icedtea-linker-options.patch \ patches/hotspot/$(HSBUILD)/icedtea-static-libstdc++.patch \ patches/icedtea-timerqueue.patch \ - patches/icedtea-lib64.patch \ patches/icedtea-zero-build.patch \ patches/hotspot/$(HSBUILD)/icedtea-zero-build.patch \ patches/icedtea-print-lsb-release.patch \ @@ -608,14 +598,12 @@ patches/hotspot/$(HSBUILD)/icedtea-params-cast-size_t.patch \ patches/icedtea-clean-crypto.patch \ patches/hotspot/$(HSBUILD)/icedtea-shark.patch \ - $(GCC_PATCH) \ patches/icedtea-arch.patch \ patches/icedtea-lc_ctype.patch \ patches/icedtea-xjc.patch \ patches/icedtea-renderer-crossing.patch \ patches/icedtea-stroker-finish.patch \ patches/icedtea-linker-libs-order.patch \ - patches/icedtea-f2i-overflow.patch \ patches/icedtea-6761856-freetypescaler.patch \ patches/icedtea-testenv.patch \ patches/icedtea-samejvm-safe.patch \ @@ -625,8 +613,6 @@ patches/openjdk/bidi-tests.patch \ patches/openjdk/annotation-tests.patch \ patches/hotspot/$(HSBUILD)/icedtea-sparc-buildfixes.patch \ - patches/hotspot/$(HSBUILD)/icedtea-6791168.patch \ - patches/hotspot/$(HSBUILD)/icedtea-includedb.patch \ patches/hotspot/$(HSBUILD)/icedtea-sparc64-linux.patch \ patches/hotspot/$(HSBUILD)/icedtea-sparc-ptracefix.patch \ patches/hotspot/$(HSBUILD)/icedtea-sparc-trapsfix.patch @@ -672,6 +658,15 @@ patches/icedtea-nss-6763530.patch endif +if WITH_ALT_HSBUILD +ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch +else +ICEDTEA_PATCHES += patches/hotspot/original/icedtea-6778662-lib64.patch \ + patches/hotspot/original/icedtea-6778657-f2i-overflow.patch \ + patches/hotspot/original/icedtea-6791168.patch \ + patches/hotspot/original/icedtea-6793825-includedb.patch +endif + ICEDTEA_PATCHES += \ patches/icedtea-demo-swingapplet.patch \ patches/icedtea-awt-window-size.patch \ @@ -692,6 +687,7 @@ patches/openjdk/6432567-debugger-socket-overflow.patch \ patches/hotspot/$(HSBUILD)/icedtea-gcc-stack-markings.patch \ patches/icedtea-s390-serialize.patch \ + patches/openjdk/6879689-hotspot_warning_fix.patch \ $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp @@ -756,7 +752,7 @@ then \ $(TAR) xf $(HOTSPOT_SRC_ZIP) ; \ chmod -R ug+w master-* ; \ - mv master-$$($(AWK) 'version==$$1 {print $$2}' version=$(HSBUILD) \ + mv master-$$($(AWK) 'version==$$1 {print $$3}' version=$(HSBUILD) \ $(abs_top_srcdir)/hotspot.map) openjdk/hotspot ; \ fi ; \ fi ; @@ -943,7 +939,7 @@ # Patch OpenJDK for plug replacements and ecj. ICEDTEA_ECJ_PATCHES = patches/ecj/icedtea-ant.patch \ patches/ecj/icedtea.patch \ - patches/ecj/icedtea-hotspot-$(HSBUILD).patch \ + patches/ecj/icedtea-hotspot.patch \ patches/ecj/icedtea-spp.patch \ patches/ecj/icedtea-jopt.patch
--- a/hotspot.map Mon Oct 19 23:19:26 2009 +0200 +++ b/hotspot.map Wed Oct 21 15:04:08 2009 +0100 @@ -1,2 +1,2 @@ -# version changeset md5sum -default 09f7962b8b44 600284e870609a7531163bf2972c573b +# version url changeset md5sum +default http://hg.openjdk.java.net/hsx/hsx16/master 6bdfda9a7120 e194a7baefb2f55e21a280276a11b49a
--- a/patches/ecj/icedtea-hotspot-original.patch Mon Oct 19 23:19:26 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -diff -Nru openjdk-ecj.orig/hotspot/make/linux/Makefile openjdk-ecj/hotspot/make/linux/Makefile ---- openjdk-ecj.orig/hotspot/make/linux/Makefile 2008-10-24 10:16:06.000000000 +0100 -+++ openjdk-ecj/hotspot/make/linux/Makefile 2008-10-24 13:32:48.000000000 +0100 -@@ -263,28 +263,24 @@ - - $(TARGETS_C2): $(SUBDIRS_C2) - cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) -- cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma - ifdef INSTALL - cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install - endif - - $(TARGETS_TIERED): $(SUBDIRS_TIERED) - cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) -- cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma - ifdef INSTALL - cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install - endif - - $(TARGETS_C1): $(SUBDIRS_C1) - cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) -- cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma - ifdef INSTALL - cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install - endif - - $(TARGETS_CORE): $(SUBDIRS_CORE) - cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) -- cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma - ifdef INSTALL - cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install - endif -diff -Nru openjdk-ecj.orig/hotspot/make/linux/makefiles/sa.make openjdk-ecj/hotspot/make/linux/makefiles/sa.make ---- openjdk-ecj.orig/hotspot/make/linux/makefiles/sa.make 2008-10-24 10:16:06.000000000 +0100 -+++ openjdk-ecj/hotspot/make/linux/makefiles/sa.make 2008-10-24 13:32:48.000000000 +0100 -@@ -74,8 +74,8 @@ - mkdir -p $(SA_CLASSDIR); \ - fi - -- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES1) -- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES2) -+ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH):$(BOOT_JAVA_HOME)/jre/lib/rt.jar -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES1) -+ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH):$(BOOT_JAVA_HOME)/jre/lib/rt.jar -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES2) - - $(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer - $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) - -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/ecj/icedtea-hotspot.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,48 @@ +diff -Nru openjdk-ecj.orig/hotspot/make/linux/Makefile openjdk-ecj/hotspot/make/linux/Makefile +--- openjdk-ecj.orig/hotspot/make/linux/Makefile 2008-10-24 10:16:06.000000000 +0100 ++++ openjdk-ecj/hotspot/make/linux/Makefile 2008-10-24 13:32:48.000000000 +0100 +@@ -263,28 +263,24 @@ + + $(TARGETS_C2): $(SUBDIRS_C2) + cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_TIERED): $(SUBDIRS_TIERED) + cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_C1): $(SUBDIRS_C1) + cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_CORE): $(SUBDIRS_CORE) + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install + endif +diff -Nru openjdk-ecj.orig/hotspot/make/linux/makefiles/sa.make openjdk-ecj/hotspot/make/linux/makefiles/sa.make +--- openjdk-ecj.orig/hotspot/make/linux/makefiles/sa.make 2008-10-24 10:16:06.000000000 +0100 ++++ openjdk-ecj/hotspot/make/linux/makefiles/sa.make 2008-10-24 13:32:48.000000000 +0100 +@@ -74,8 +74,8 @@ + mkdir -p $(SA_CLASSDIR); \ + fi + +- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES1) +- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES2) ++ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH):$(BOOT_JAVA_HOME)/jre/lib/rt.jar -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES1) ++ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH):$(BOOT_JAVA_HOME)/jre/lib/rt.jar -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES2) + + $(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer + $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-bytecodeInterpreter.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,11 @@ +diff -Nru openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp +--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp 2008-10-23 08:41:04.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp 2008-10-30 15:48:48.000000000 +0000 +@@ -60,7 +60,6 @@ + }; + + class BytecodeInterpreter : StackObj { +-friend class SharedRuntime; + friend class AbstractInterpreterGenerator; + friend class CppInterpreterGenerator; + friend class InterpreterGenerator;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-core-build.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,108 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make +--- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-05-27 22:28:29.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-06-22 03:10:05.000000000 +0100 +@@ -97,6 +97,7 @@ + EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so ++ifndef ICEDTEA_CORE_BUILD + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +@@ -111,3 +112,4 @@ + EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar + endif + endif ++endif +diff -Nru openjdk.orig/hotspot/make/Makefile openjdk/hotspot/make/Makefile +--- openjdk.orig/hotspot/make/Makefile 2008-05-27 22:28:29.000000000 +0100 ++++ openjdk/hotspot/make/Makefile 2008-06-22 03:10:05.000000000 +0100 +@@ -91,6 +91,15 @@ + all_debug: jvmg jvmg1 jvmgkernel docs export_debug + all_optimized: optimized optimized1 optimizedkernel docs export_optimized + ++# Core (non-compiler) targets made available with this Makefile ++CORE_VM_TARGETS=productcore fastdebugcore optimizedcore jvmgcore ++ ++allcore: all_productcore all_fastdebugcore ++all_productcore: productcore docs export_product ++all_fastdebugcore: fastdebugcore docs export_fastdebug ++all_debugcore: jvmgcore docs export_debug ++all_optimizedcore: optimizedcore docs export_optimized ++ + # Do everything + world: all create_jdk + +@@ -113,6 +122,10 @@ + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_build2 $(ALT_OUT) + ++$(CORE_VM_TARGETS): ++ $(CD) $(GAMMADIR)/make; \ ++ $(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT) ++ + $(KERNEL_VM_TARGETS): + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT) +@@ -159,6 +172,12 @@ + $(MAKE_ARGS) $(VM_TARGET) + endif + ++generic_buildcore: ++ $(MKDIR) -p $(OUTPUTDIR) ++ $(CD) $(OUTPUTDIR); \ ++ $(MAKE) -f $(ABS_OS_MAKEFILE) \ ++ $(MAKE_ARGS) $(VM_TARGET) ++ + generic_buildkernel: + $(MKDIR) -p $(OUTPUTDIR) + ifeq ($(OSNAME),windows) +@@ -205,13 +224,21 @@ + XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt + DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs + C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 ++ifdef ICEDTEA_CORE_BUILD ++C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core ++else + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 ++endif + KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel + C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) + C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) + KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) + + # Misc files and generated files need to come from C1 or C2 area ++ifdef ICEDTEA_CORE_BUILD ++ MISC_DIR=$(C2_DIR) ++ GEN_DIR=$(C2_BASE_DIR)/generated ++else + ifeq ($(ARCH_DATA_MODEL), 32) + MISC_DIR=$(C1_DIR) + GEN_DIR=$(C1_BASE_DIR)/generated +@@ -219,6 +246,7 @@ + MISC_DIR=$(C2_DIR) + GEN_DIR=$(C2_BASE_DIR)/generated + endif ++endif + + # Bin files (windows) + ifeq ($(OSNAME),windows) +diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp 2008-05-27 22:28:30.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2008-06-22 03:10:05.000000000 +0100 +@@ -94,8 +94,12 @@ + #ifdef TIERED + #define VMTYPE "Server" + #else +- #define VMTYPE COMPILER1_PRESENT("Client") \ +- COMPILER2_PRESENT("Server") ++#if defined(COMPILER1) || defined(COMPILER2) ++ #define VMTYPE COMPILER1_PRESENT("Client") \ ++ COMPILER2_PRESENT("Server") ++#else ++ #define VMTYPE "Core" ++#endif // COMPILER1 || COMPILER2 + #endif // TIERED + #endif // KERNEL + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-gcc-stack-markings.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,14 @@ +--- openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s~ 2009-08-06 01:08:57.000000000 -0700 ++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s 2009-08-06 01:09:27.000000000 -0700 +@@ -650,3 +650,4 @@ _Atomic_cmpxchg_long: + popl %ebx + ret + ++.section .note.GNU-stack, "", @progbits +--- openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_64.s~ 2009-08-06 01:08:57.000000000 -0700 ++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_64.s 2009-08-06 01:09:27.000000000 -0700 +@@ -400,3 +400,4 @@ _Atomic_cmpxchg_long: + addq $4,%rdx + jg 4b + ret ++.section .note.GNU-stack, "", @progbits
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-gcc-suffix.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,25 @@ +--- openjdk/hotspot/agent/src/os/linux/Makefile~ 2007-08-02 09:16:50.000000000 +0200 ++++ openjdk/hotspot/agent/src/os/linux/Makefile 2007-08-08 17:00:11.204338801 +0200 +@@ -23,7 +23,7 @@ + # + + ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi ) +-GCC = gcc ++GCC = gcc$(GCC_SUFFIX) + + JAVAH = ${JAVA_HOME}/bin/javah + +--- openjdk/hotspot/make/linux/makefiles/gcc.make~ 2007-08-08 16:13:12.281815996 +0200 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2007-08-08 16:36:52.573240769 +0200 +@@ -25,8 +25,8 @@ + #------------------------------------------------------------------------ + # CC, CPP & AS + +-CPP = g++ +-CC = gcc ++CPP = g++$(GCC_SUFFIX) ++CC = gcc$(GCC_SUFFIX) + AS = $(CC) -c + + # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-headers.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,13 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/jvmti.make openjdk/hotspot/make/linux/makefiles/jvmti.make +--- openjdk.orig/hotspot/make/linux/makefiles/jvmti.make 2008-05-23 20:51:14.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/jvmti.make 2008-05-23 20:54:13.000000000 +0100 +@@ -59,7 +59,7 @@ + + JvmtiGeneratedFiles = $(JvmtiGeneratedNames:%=$(JvmtiOutDir)/%) + +-XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen ++XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) $(ENDORSED) -classpath $(JvmtiOutDir) jvmtiGen + + .PHONY: all jvmtidocs clean cleanall + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-memory-limits.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,23 @@ +diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp +--- openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp 2008-05-23 22:30:44.000000000 +0100 ++++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp 2008-05-23 22:30:59.000000000 +0100 +@@ -98,7 +98,7 @@ + + // Heap related flags + define_pd_global(uintx, PermSize, ScaleForWordSize(16*M)); +-define_pd_global(uintx, MaxPermSize, ScaleForWordSize(64*M)); ++define_pd_global(uintx, MaxPermSize, ScaleForWordSize(128*M)); + + // Ergonomics related flags + define_pd_global(bool, NeverActAsServerClassMachine, false); +--- penjdk6/hotspot/src/share/vm/runtime/globals.hpp 2008-02-12 04:14:24.000000000 -0500 ++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2008-02-14 16:34:00.000000000 -0500 +@@ -2606,7 +2606,7 @@ + "an OS lock") \ + \ + /* gc parameters */ \ +- product(uintx, MaxHeapSize, ScaleForWordSize(64*M), \ ++ product(uintx, MaxHeapSize, ScaleForWordSize(512*M), \ + "Default maximum size for object heap (in bytes)") \ + \ + product_pd(uintx, NewSize, \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-no-precompiled.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,32 @@ +--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig 2009-01-04 13:51:38.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2009-01-04 13:53:34.000000000 +0000 +@@ -34,13 +34,6 @@ + CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1) + CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) + +-# check for precompiled headers support +-ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" +-USE_PRECOMPILED_HEADER=1 +-PRECOMPILED_HEADER_DIR=. +-PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch +-endif +- + + #------------------------------------------------------------------------ + # Compiler flags +--- openjdk/hotspot/make/solaris/makefiles/gcc.make.orig 2009-01-04 14:44:12.000000000 +0000 ++++ openjdk/hotspot/make/solaris/makefiles/gcc.make 2009-01-04 17:06:50.000000000 +0000 +@@ -45,13 +45,6 @@ + $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) + + +-# check for precompiled headers support +-ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" +-USE_PRECOMPILED_HEADER=1 +-PRECOMPILED_HEADER_DIR=. +-PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch +-endif +- + + #------------------------------------------------------------------------ + # Compiler flags
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-params-cast-size_t.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,252 @@ +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2009-10-02 22:16:39.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2009-10-20 22:59:56.000000000 +0100 +@@ -940,7 +940,7 @@ + if (free_percentage < desired_free_percentage) { + size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); + assert(desired_capacity >= capacity(), "invalid expansion size"); +- expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes); ++ expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes); + } + if (expand_bytes > 0) { + if (PrintGCDetails && Verbose) { +@@ -6094,7 +6094,7 @@ + HeapWord* curAddr = _markBitMap.startWord(); + while (curAddr < _markBitMap.endWord()) { + size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr); +- MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining)); ++ MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining)); + _markBitMap.clear_large_range(chunk); + if (ConcurrentMarkSweepThread::should_yield() && + !foregroundGCIsActive() && +@@ -6382,7 +6382,7 @@ + return; + } + // Double capacity if possible +- size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax); ++ size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax); + // Do not give up existing stack until we have managed to + // get the double capacity that we desired. + ReservedSpace rs(ReservedSpace::allocation_align_size_up( +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2009-10-20 22:57:45.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2009-10-20 22:59:56.000000000 +0100 +@@ -412,7 +412,7 @@ + _regionStack(), + // _finger set in set_non_marking_state + +- _max_task_num(MAX2(ParallelGCThreads, (size_t)1)), ++ _max_task_num(MAX2((size_t)ParallelGCThreads, (size_t)1)), + // _active_tasks set in set_non_marking_state + // _tasks set inside the constructor + _task_queues(new CMTaskQueueSet((int) _max_task_num)), +@@ -463,7 +463,7 @@ + SATBMarkQueueSet& satb_qs = JavaThread::satb_mark_queue_set(); + satb_qs.set_buffer_size(G1SATBLogBufferSize); + +- int size = (int) MAX2(ParallelGCThreads, (size_t)1); ++ int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1); + _par_cleanup_thread_state = NEW_C_HEAP_ARRAY(ParCleanupThreadState*, size); + for (int i = 0 ; i < size; i++) { + _par_cleanup_thread_state[i] = new ParCleanupThreadState; +@@ -522,7 +522,7 @@ + _sleep_factor = sleep_factor; + _marking_task_overhead = marking_task_overhead; + } else { +- _parallel_marking_threads = MAX2((ParallelGCThreads + 2) / 4, (size_t)1); ++ _parallel_marking_threads = MAX2((size_t)((ParallelGCThreads + 2) / 4), (size_t)1); + _sleep_factor = 0.0; + _marking_task_overhead = 1.0; + } +@@ -649,7 +649,7 @@ + } + + ConcurrentMark::~ConcurrentMark() { +- int size = (int) MAX2(ParallelGCThreads, (size_t)1); ++ int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1); + for (int i = 0; i < size; i++) delete _par_cleanup_thread_state[i]; + FREE_C_HEAP_ARRAY(ParCleanupThreadState*, + _par_cleanup_thread_state); +@@ -1761,7 +1761,7 @@ + if (has_aborted()) return; + + int first = 0; +- int last = (int)MAX2(ParallelGCThreads, (size_t)1); ++ int last = (int)MAX2((size_t)ParallelGCThreads, (size_t)1); + for (int t = 0; t < last; t++) { + UncleanRegionList* list = &_par_cleanup_thread_state[t]->list; + assert(list->well_formed(), "Inv"); +@@ -3197,7 +3197,7 @@ + // of things to do) or totally (at the very end). + size_t target_size; + if (partially) +- target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize); ++ target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize); + else + target_size = 0; + +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2009-10-02 22:16:39.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2009-10-20 23:01:31.000000000 +0100 +@@ -1058,7 +1058,7 @@ + // This can be done by either mutator threads together with the + // concurrent refinement threads or GC threads. + int HeapRegionRemSet::num_par_rem_sets() { +- return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads); ++ return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (size_t)ParallelGCThreads); + } + + HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2009-10-02 22:16:39.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2009-10-20 22:59:56.000000000 +0100 +@@ -863,8 +863,8 @@ + void PSParallelCompact::initialize_dead_wood_limiter() + { + const size_t max = 100; +- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0; +- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; ++ _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0; ++ _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; + _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev); + DEBUG_ONLY(_dwl_initialized = true;) + _dwl_adjustment = normal_distribution(1.0); +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2009-10-02 22:16:39.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2009-10-20 22:59:56.000000000 +0100 +@@ -63,7 +63,7 @@ + _last_used = current_live; + + // We have different alignment constraints than the rest of the heap. +- const size_t alignment = MAX2(MinPermHeapExpansion, ++ const size_t alignment = MAX2((size_t) MinPermHeapExpansion, + virtual_space()->alignment()); + + // Compute the desired size: +diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp 2009-10-02 22:16:39.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp 2009-10-20 22:59:56.000000000 +0100 +@@ -281,7 +281,7 @@ + // yield a size that is too small) and bound it by MaxNewSize above. + // Ergonomics plays here by previously calculating the desired + // NewSize and MaxNewSize. +- max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize); ++ max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize); + } + assert(max_new_size > 0, "All paths should set max_new_size"); + +@@ -308,7 +308,7 @@ + // generally small compared to the NewRatio calculation. + _min_gen0_size = NewSize; + desired_new_size = NewSize; +- max_new_size = MAX2(max_new_size, NewSize); ++ max_new_size = MAX2(max_new_size, (size_t) NewSize); + } else { + // For the case where NewSize is the default, use NewRatio + // to size the minimum and initial generation sizes. +@@ -316,10 +316,10 @@ + // NewRatio is overly large, the resulting sizes can be too + // small. + _min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()), +- NewSize); ++ (size_t) NewSize); + desired_new_size = + MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()), +- NewSize); ++ (size_t) NewSize); + } + + assert(_min_gen0_size > 0, "Sanity check"); +@@ -374,14 +374,14 @@ + // Adjust gen0 down to accomodate OldSize + *gen0_size_ptr = heap_size - min_gen0_size; + *gen0_size_ptr = +- MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()), ++ MAX2((size_t)align_size_down(*gen0_size_ptr, min_alignment()), + min_alignment()); + assert(*gen0_size_ptr > 0, "Min gen0 is too large"); + result = true; + } else { + *gen1_size_ptr = heap_size - *gen0_size_ptr; + *gen1_size_ptr = +- MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()), ++ MAX2((size_t)align_size_down(*gen1_size_ptr, min_alignment()), + min_alignment()); + } + } +@@ -405,7 +405,7 @@ + // for setting the gen1 maximum. + _max_gen1_size = max_heap_byte_size() - _max_gen0_size; + _max_gen1_size = +- MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()), ++ MAX2((size_t)align_size_down(_max_gen1_size, min_alignment()), + min_alignment()); + // If no explicit command line flag has been set for the + // gen1 size, use what is left for gen1. +@@ -419,11 +419,11 @@ + "gen0 has an unexpected minimum size"); + set_min_gen1_size(min_heap_byte_size() - min_gen0_size()); + set_min_gen1_size( +- MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()), ++ MAX2((size_t)align_size_down(_min_gen1_size, min_alignment()), + min_alignment())); + set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size()); + set_initial_gen1_size( +- MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()), ++ MAX2((size_t)align_size_down(_initial_gen1_size, min_alignment()), + min_alignment())); + + } else { +diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2009-10-02 22:16:39.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2009-10-20 22:59:56.000000000 +0100 +@@ -221,7 +221,7 @@ + size_t init_sz; + + if (TLABSize > 0) { +- init_sz = MIN2(TLABSize / HeapWordSize, max_size()); ++ init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size()); + } else if (global_stats() == NULL) { + // Startup issue - main thread initialized before heap initialized. + init_sz = min_size(); +diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp 2009-10-20 22:57:44.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2009-10-20 23:02:17.000000000 +0100 +@@ -1064,7 +1064,7 @@ + // NewSize was set on the command line and it is larger than + // preferred_max_new_size. + if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line +- FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size)); ++ FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size)); + } else { + FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size); + } +@@ -1083,7 +1083,7 @@ + // there was no obvious reason. Also limit to the case where + // MaxNewSize has not been set. + +- FLAG_SET_ERGO(intx, NewRatio, MAX2(NewRatio, new_ratio)); ++ FLAG_SET_ERGO(intx, NewRatio, MAX2((intx) NewRatio, new_ratio)); + + // Code along this path potentially sets NewSize and OldSize + +@@ -1125,8 +1125,8 @@ + // Unless explicitly requested otherwise, make young gen + // at least min_new, and at most preferred_max_new_size. + if (FLAG_IS_DEFAULT(NewSize)) { +- FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new)); +- FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize)); ++ FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new)); ++ FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize)); + if(PrintGCDetails && Verbose) { + // Too early to use gclog_or_tty + tty->print_cr("Ergo set NewSize: " SIZE_FORMAT, NewSize); +@@ -1137,7 +1137,7 @@ + // later NewRatio will decide how it grows; see above. + if (FLAG_IS_DEFAULT(OldSize)) { + if (max_heap > NewSize) { +- FLAG_SET_ERGO(uintx, OldSize, MIN2(3*NewSize, max_heap - NewSize)); ++ FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t) (3*NewSize), max_heap - (size_t) NewSize)); + if(PrintGCDetails && Verbose) { + // Too early to use gclog_or_tty + tty->print_cr("Ergo set OldSize: " SIZE_FORMAT, OldSize);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-parisc-opt.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,28 @@ +--- openjdk/hotspot/make/linux/makefiles/product.make.orig 2008-12-10 19:02:31.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/product.make 2008-12-10 19:24:53.000000000 +0100 +@@ -25,6 +25,11 @@ + # Sets make macros for making optimized version of Gamma VM + # (This is the "product", not the "release" version.) + ++# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux ++ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc) ++ OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT) ++endif ++ + # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make + OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS) + OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@)) +--- openjdk/hotspot/make/linux/makefiles/optimized.make.orig 2008-12-10 19:02:22.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/optimized.make 2008-12-10 19:24:24.000000000 +0100 +@@ -25,6 +25,11 @@ + # Sets make macros for making optimized version of Gamma VM + # (This is the "product", not the "release" version.) + ++# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux ++ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc) ++ OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT) ++endif ++ + # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make + OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS) + OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-shark-build.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,233 @@ +diff -Nru openjdk.orig/hotspot/make/linux/Makefile openjdk/hotspot/make/linux/Makefile +--- openjdk.orig/hotspot/make/linux/Makefile 2008-07-03 08:39:52.000000000 +0100 ++++ openjdk/hotspot/make/linux/Makefile 2008-07-13 00:59:03.000000000 +0100 +@@ -158,6 +158,13 @@ + # profiledcore core <os>_<arch>_core/profiled + # productcore core <os>_<arch>_core/product + # ++# debugshark shark <os>_<arch>_shark/debug ++# fastdebugshark shark <os>_<arch>_shark/fastdebug ++# jvmgshark shark <os>_<arch>_shark/jvmg ++# optimizedshark shark <os>_<arch>_shark/optimized ++# profiledshark shark <os>_<arch>_shark/profiled ++# productshark shark <os>_<arch>_shark/product ++# + # What you get with each target: + # + # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher +@@ -176,11 +183,13 @@ + SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS)) + SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS)) + SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) ++SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(BUILDARCH)_shark/,$(TARGETS)) + + TARGETS_C2 = $(TARGETS) + TARGETS_C1 = $(addsuffix 1,$(TARGETS)) + TARGETS_TIERED = $(addsuffix tiered,$(TARGETS)) + TARGETS_CORE = $(addsuffix core,$(TARGETS)) ++TARGETS_SHARK = $(addsuffix shark,$(TARGETS)) + + BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make + BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) +@@ -196,6 +205,7 @@ + @echo " $(TARGETS_C2)" + @echo " $(TARGETS_C1)" + @echo " $(TARGETS_CORE)" ++ @echo " $(TARGETS_SHARK)" + + checks: check_os_version check_j2se_version + +@@ -245,6 +255,10 @@ + $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks + $(BUILDTREE) VARIANT=core + ++$(SUBDIRS_SHARK): $(BUILDTREE_MAKE) ++ $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks ++ $(BUILDTREE) VARIANT=shark ++ + # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME + + $(TARGETS_C2): $(SUBDIRS_C2) +@@ -275,6 +289,12 @@ + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install + endif + ++$(TARGETS_SHARK): $(SUBDIRS_SHARK) ++ cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) ++ifdef INSTALL ++ cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install ++endif ++ + # Just build the tree, and nothing else: + tree: $(SUBDIRS_C2) + tree1: $(SUBDIRS_C1) +@@ -305,7 +325,7 @@ + + #------------------------------------------------------------------------------- + +-.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) ++.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_SHARK) + .PHONY: tree tree1 treecore + .PHONY: all compiler1 compiler2 core + .PHONY: clean clean_compiler1 clean_compiler2 clean_core docs clean_docs +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make +--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make 2008-07-13 00:38:03.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/buildtree.make 2008-07-13 00:59:03.000000000 +0100 +@@ -215,8 +215,8 @@ + + ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm + @echo Creating directory list $@ +- $(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \ +- -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ ++ $(QUIETLY) find -L $(GAMMADIR)/src/share/vm/* -prune \ ++ -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find -L {} \ + \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@ + + Makefile: $(BUILDTREE_MAKE) +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make +--- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-07-13 00:38:03.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-07-13 00:59:03.000000000 +0100 +@@ -118,6 +118,7 @@ + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so + ifndef ICEDTEA_CORE_BUILD ++ifndef ICEDTEA_SHARK_BUILD + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +@@ -133,3 +134,4 @@ + endif + endif + endif ++endif +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-07-13 00:38:03.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-07-13 00:59:03.000000000 +0100 +@@ -64,6 +64,9 @@ + ifdef ICEDTEA_ZERO_BUILD + CFLAGS += $(LIBFFI_CFLAGS) + endif ++ifdef ICEDTEA_SHARK_BUILD ++CFLAGS += $(LLVM_CFLAGS) ++endif + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti + CFLAGS += -fno-exceptions +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/top.make openjdk/hotspot/make/linux/makefiles/top.make +--- openjdk.orig/hotspot/make/linux/makefiles/top.make 2008-07-03 08:39:53.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/top.make 2008-07-13 00:59:03.000000000 +0100 +@@ -73,6 +73,7 @@ + Include_DBs/COMPILER1 = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 + Include_DBs/COMPILER2 = $(Include_DBs/CORE) $(VM)/includeDB_compiler2 + Include_DBs/TIERED = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 $(VM)/includeDB_compiler2 ++Include_DBs/SHARK = $(Include_DBs/CORE) $(VM)/includeDB_shark + Include_DBs = $(Include_DBs/$(TYPE)) + + Cached_plat = $(GENERATED)/platform.current +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-07-13 00:38:03.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-07-13 00:59:03.000000000 +0100 +@@ -126,10 +126,14 @@ + + STATIC_CXX = true + +-ifeq ($(ZERO_LIBARCH), ppc64) ++ifdef ICEDTEA_SHARK_BUILD + STATIC_CXX = false + else +- STATIC_CXX = true ++ ifeq ($(ZERO_LIBARCH), ppc64) ++ STATIC_CXX = false ++ else ++ STATIC_CXX = true ++ endif + endif + + ifeq ($(LINK_INTO),AOUT) +@@ -157,6 +161,10 @@ + ifdef ICEDTEA_ZERO_BUILD + LIBS_VM += $(LIBFFI_LIBS) + endif ++ifdef ICEDTEA_SHARK_BUILD ++LFLAGS_VM += $(LLVM_LDFLAGS) ++LIBS_VM += $(LLVM_LIBS) ++endif + + LINK_VM = $(LINK_LIB.c) + +diff -Nru openjdk.orig/hotspot/make/Makefile openjdk/hotspot/make/Makefile +--- openjdk.orig/hotspot/make/Makefile 2008-07-13 00:38:02.000000000 +0100 ++++ openjdk/hotspot/make/Makefile 2008-07-13 00:59:03.000000000 +0100 +@@ -103,6 +103,15 @@ + all_debugcore: jvmgcore docs export_debug + all_optimizedcore: optimizedcore docs export_optimized + ++# Shark (C0) targets made available with this Makefile ++SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark ++ ++allshark: all_productshark all_fastdebugshark ++all_productshark: productshark docs export_product ++all_fastdebugshark: fastdebugshark docs export_fastdebug ++all_debugshark: jvmgshark docs export_debug ++all_optimizedshark: optimizedshark docs export_optimized ++ + # Do everything + world: all create_jdk + +@@ -129,6 +138,10 @@ + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT) + ++$(SHARK_VM_TARGETS): ++ $(CD) $(GAMMADIR)/make; \ ++ $(MAKE) VM_TARGET=$@ generic_buildshark $(ALT_OUT) ++ + $(KERNEL_VM_TARGETS): + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT) +@@ -181,6 +194,12 @@ + $(MAKE) -f $(ABS_OS_MAKEFILE) \ + $(MAKE_ARGS) $(VM_TARGET) + ++generic_buildshark: ++ $(MKDIR) -p $(OUTPUTDIR) ++ $(CD) $(OUTPUTDIR); \ ++ $(MAKE) -f $(ABS_OS_MAKEFILE) \ ++ $(MAKE_ARGS) $(VM_TARGET) ++ + generic_buildkernel: + $(MKDIR) -p $(OUTPUTDIR) + ifeq ($(OSNAME),windows) +@@ -230,8 +249,12 @@ + ifdef ICEDTEA_CORE_BUILD + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core + else ++ifdef ICEDTEA_SHARK_BUILD ++C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark ++else + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 + endif ++endif + KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel + C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) + C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) +@@ -242,6 +265,10 @@ + MISC_DIR=$(C2_DIR) + GEN_DIR=$(C2_BASE_DIR)/generated + else ++ifdef ICEDTEA_SHARK_BUILD ++ MISC_DIR=$(C2_DIR) ++ GEN_DIR=$(C2_BASE_DIR)/generated ++else + ifeq ($(ARCH_DATA_MODEL), 32) + MISC_DIR=$(C1_DIR) + GEN_DIR=$(C1_BASE_DIR)/generated +@@ -250,6 +277,7 @@ + GEN_DIR=$(C2_BASE_DIR)/generated + endif + endif ++endif + + # Bin files (windows) + ifeq ($(OSNAME),windows) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-shark.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,390 @@ +--- openjdk/hotspot/src/share/vm/oops/methodOop.cpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp 2008-12-03 14:33:48.000000000 +0000 +@@ -727,10 +727,14 @@ + } + + OrderAccess::storestore(); ++#ifdef SHARK ++ mh->_from_interpreted_entry = code->instructions_begin(); ++#else + mh->_from_compiled_entry = code->verified_entry_point(); + OrderAccess::storestore(); + // Instantly compiled code can execute. + mh->_from_interpreted_entry = mh->get_i2c_entry(); ++#endif // SHARK + + } + +--- openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp 2008-12-03 14:33:48.000000000 +0000 +@@ -44,6 +44,7 @@ + friend class VMStructs; + friend class CardTableRS; + friend class CheckForUnmarkedOops; // Needs access to raw card bytes. ++ friend class SharkBuilder; + #ifndef PRODUCT + // For debugging. + friend class GuaranteeNotModClosure; +--- openjdk/hotspot/src/share/vm/runtime/globals.cpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/globals.cpp 2008-12-03 14:33:48.000000000 +0000 +@@ -176,6 +176,18 @@ + #define C2_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{C2 notproduct}", DEFAULT }, + #endif + ++#define SHARK_PRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark product}", DEFAULT }, ++#define SHARK_PD_PRODUCT_FLAG_STRUCT(type, name, doc) { #type, XSTR(name), &name, "{Shark pd product}", DEFAULT }, ++#define SHARK_DIAGNOSTIC_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark diagnostic}", DEFAULT }, ++#ifdef PRODUCT ++ #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) /* flag is constant */ ++ #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc) /* flag is constant */ ++ #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) ++#else ++ #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark}", DEFAULT }, ++ #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc) { #type, XSTR(name), &name, "{Shark pd}", DEFAULT }, ++ #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark notproduct}", DEFAULT }, ++#endif + + static Flag flagTable[] = { + RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT, RUNTIME_LP64_PRODUCT_FLAG_STRUCT) +@@ -189,6 +201,9 @@ + #ifdef COMPILER2 + C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT) + #endif ++#ifdef SHARK ++ SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT) ++#endif + {0, NULL, NULL} + }; + +--- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp.orig 2008-12-03 14:23:37.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2008-12-03 14:33:48.000000000 +0000 +@@ -94,6 +94,9 @@ + #ifdef TIERED + #define VMTYPE "Server" + #else ++#ifdef SHARK ++ #define VMTYPE "Shark" ++#else + #if defined(COMPILER1) || defined(COMPILER2) + #define VMTYPE COMPILER1_PRESENT("Client") \ + COMPILER2_PRESENT("Server") +@@ -104,6 +107,7 @@ + #define VMTYPE "Core" + #endif // ZERO + #endif // COMPILER1 || COMPILER2 ++#endif // SHARK + #endif // TIERED + #endif // KERNEL + +--- openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp 2008-12-03 14:33:48.000000000 +0000 +@@ -229,6 +229,7 @@ + + } + ++#ifndef SHARK + // Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info. + CodeBlob* cb = stub_frame.cb(); + // Verify we have the right vframeArray +@@ -239,6 +240,10 @@ + assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking"); + Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp); + #endif ++#else ++ intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp(); ++#endif // !SHARK ++ + // This is a guarantee instead of an assert because if vframe doesn't match + // we will unpack the wrong deoptimized frame and wind up in strange places + // where it will be very difficult to figure out what went wrong. Better +@@ -349,7 +354,9 @@ + + frame_pcs[0] = deopt_sender.raw_pc(); + ++#ifndef SHARK + assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc"); ++#endif // SHARK + + UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord, + caller_adjustment * BytesPerWord, +@@ -890,7 +897,20 @@ + // stuff a C2I adapter we can properly fill in the callee-save + // register locations. + frame caller = fr.sender(reg_map); ++#ifdef ZERO ++ int frame_size; ++ { ++ // In zero, frame::sp() is the *end* of the frame, so ++ // caller.sp() - fr.sp() is the size of the *caller*. ++ RegisterMap dummy_map(thread, false); ++ frame frame_1 = thread->last_frame(); ++ frame frame_2 = frame_1.sender(&dummy_map); ++ assert(frame_2.sp() == fr.sp(), "should be"); ++ frame_size = frame_2.sp() - frame_1.sp(); ++ } ++#else + int frame_size = caller.sp() - fr.sp(); ++#endif // ZERO + + frame sender = caller; + +@@ -1057,7 +1077,7 @@ + JRT_END + + +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) { + // in case of an unresolved klass entry, load the class. + if (constant_pool->tag_at(index).is_unresolved_klass()) { +@@ -1808,7 +1828,7 @@ + if (xtty != NULL) xtty->tail("statistics"); + } + } +-#else // COMPILER2 ++#else // COMPILER2 || SHARK + + + // Stubs for C1 only system. +@@ -1844,4 +1864,4 @@ + return buf; + } + +-#endif // COMPILER2 ++#endif // COMPILER2 || SHARK +--- openjdk/hotspot/src/share/vm/runtime/globals.hpp.orig 2008-12-03 14:22:17.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2008-12-03 14:33:48.000000000 +0000 +@@ -22,7 +22,7 @@ + * + */ + +-#if !defined(COMPILER1) && !defined(COMPILER2) ++#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK) + define_pd_global(bool, BackgroundCompilation, false); + define_pd_global(bool, UseTLAB, false); + define_pd_global(bool, CICompileOSR, false); +--- openjdk/hotspot/src/share/vm/code/nmethod.hpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/code/nmethod.hpp 2008-12-03 14:33:48.000000000 +0000 +@@ -318,6 +318,7 @@ + + bool is_compiled_by_c1() const; + bool is_compiled_by_c2() const; ++ bool is_compiled_by_shark() const; + + // boundaries for different parts + address code_begin () const { return _entry_point; } +--- openjdk/hotspot/src/share/vm/code/nmethod.cpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp 2008-12-03 14:33:48.000000000 +0000 +@@ -65,6 +65,11 @@ + assert(compiler() != NULL, "must be"); + return compiler()->is_c2(); + } ++bool nmethod::is_compiled_by_shark() const { ++ if (is_native_method()) return false; ++ assert(compiler() != NULL, "must be"); ++ return compiler()->is_shark(); ++} + + + +@@ -1567,6 +1572,7 @@ + // Method that knows how to preserve outgoing arguments at call. This method must be + // called with a frame corresponding to a Java invoke + void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { ++#ifndef SHARK + if (!method()->is_native()) { + SimpleScopeDesc ssd(this, fr.pc()); + Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci()); +@@ -1574,6 +1580,7 @@ + symbolOop signature = call->signature(); + fr.oops_compiled_arguments_do(signature, is_static, reg_map, f); + } ++#endif // !SHARK + } + + +@@ -2003,6 +2010,8 @@ + tty->print("(c1) "); + } else if (is_compiled_by_c2()) { + tty->print("(c2) "); ++ } else if (is_compiled_by_shark()) { ++ tty->print("(shark) "); + } else { + tty->print("(nm) "); + } +--- openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp 2008-12-03 14:33:48.000000000 +0000 +@@ -554,6 +554,14 @@ + #endif + #endif // COMPILER2 + ++#ifdef SHARK ++#if defined(COMPILER1) || defined(COMPILER2) ++#error "Can't use COMPILER1 or COMPILER2 with shark" ++#endif ++ _compilers[0] = new SharkCompiler(); ++ _compilers[1] = _compilers[0]; ++#endif ++ + // Initialize the CompileTask free list + _task_free_list = NULL; + +--- openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp 2008-12-03 14:33:48.000000000 +0000 +@@ -45,18 +45,26 @@ + // Missing feature tests + virtual bool supports_native() { return true; } + virtual bool supports_osr () { return true; } +-#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2)) ++#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)) + virtual bool is_c1 () { return false; } + virtual bool is_c2 () { return false; } ++ virtual bool is_shark() { return false; } + #else + #ifdef COMPILER1 + bool is_c1 () { return true; } + bool is_c2 () { return false; } ++ bool is_shark() { return false; } + #endif // COMPILER1 + #ifdef COMPILER2 + bool is_c1 () { return false; } + bool is_c2 () { return true; } ++ bool is_shark() { return false; } + #endif // COMPILER2 ++#ifdef SHARK ++ bool is_c1 () { return false; } ++ bool is_c2 () { return false; } ++ bool is_shark() { return true; } ++#endif // SHARK + #endif // TIERED + + // Customization +--- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp 2008-12-03 14:33:48.000000000 +0000 +@@ -69,7 +69,7 @@ + + // Optional liveness analyzer. + MethodLiveness* _liveness; +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + ciTypeFlow* _flow; + #endif + +--- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp.orig 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp 2008-12-03 14:33:48.000000000 +0000 +@@ -56,9 +56,9 @@ + _liveness = NULL; + _bcea = NULL; + _method_blocks = NULL; +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + _flow = NULL; +-#endif // COMPILER2 ++#endif // COMPILER2 || SHARK + + if (JvmtiExport::can_hotswap_or_post_breakpoint() && _is_compilable) { + // 6328518 check hotswap conditions under the right lock. +@@ -124,9 +124,9 @@ + _bcea = NULL; + _method_blocks = NULL; + _method_data = NULL; +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + _flow = NULL; +-#endif // COMPILER2 ++#endif // COMPILER2 || SHARK + } + + +@@ -294,34 +294,34 @@ + // ------------------------------------------------------------------ + // ciMethod::get_flow_analysis + ciTypeFlow* ciMethod::get_flow_analysis() { +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + if (_flow == NULL) { + ciEnv* env = CURRENT_ENV; + _flow = new (env->arena()) ciTypeFlow(env, this); + _flow->do_flow(); + } + return _flow; +-#else // COMPILER2 ++#else // COMPILER2 || SHARK + ShouldNotReachHere(); + return NULL; +-#endif // COMPILER2 ++#endif // COMPILER2 || SHARK + } + + + // ------------------------------------------------------------------ + // ciMethod::get_osr_flow_analysis + ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) { +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + // OSR entry points are always place after a call bytecode of some sort + assert(osr_bci >= 0, "must supply valid OSR entry point"); + ciEnv* env = CURRENT_ENV; + ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci); + flow->do_flow(); + return flow; +-#else // COMPILER2 ++#else // COMPILER2 || SHARK + ShouldNotReachHere(); + return NULL; +-#endif // COMPILER2 ++#endif // COMPILER2 || SHARK + } + + // ------------------------------------------------------------------ +diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.cpp +--- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp Tue Jun 09 09:17:11 2009 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp Tue Jun 09 10:04:02 2009 +0100 +@@ -229,6 +229,20 @@ + } + + ++#ifdef SHARK ++// ------------------------------------------------------------------ ++// ciMethod::itable_index ++// ++// Get the position of this method's entry in the itable, if any. ++int ciMethod::itable_index() { ++ check_is_loaded(); ++ assert(holder()->is_linked(), "must be linked"); ++ VM_ENTRY_MARK; ++ return klassItable::compute_itable_index(get_methodOop()); ++} ++#endif // SHARK ++ ++ + // ------------------------------------------------------------------ + // ciMethod::native_entry + // +diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.hpp +--- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp Tue Jun 09 09:17:11 2009 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp Tue Jun 09 10:04:02 2009 +0100 +@@ -139,6 +139,9 @@ + + // Runtime information. + int vtable_index(); ++#ifdef SHARK ++ int itable_index(); ++#endif // SHARK + address native_entry(); + address interpreter_entry(); + +diff -r 0d80af392e67 openjdk/hotspot/src/share/vm/code/nmethod.cpp +--- openjdk/hotspot/src/share/vm/code/nmethod.cpp Thu Jul 30 10:00:04 2009 +0100 ++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp Fri Jul 31 15:39:43 2009 +0100 +@@ -1296,6 +1296,10 @@ + ec = next; + } + ++#ifdef SHARK ++ ((SharkCompiler *) compiler())->free_compiled_method(instructions_begin()); ++#endif // SHARK ++ + ((CodeBlob*)(this))->flush(); + + CodeCache::free(this);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-sparc-buildfixes.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,35 @@ +--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig 2008-12-04 20:29:08.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-12-04 20:32:54.000000000 +0000 +@@ -52,6 +52,10 @@ + PICFLAG = -fpic + endif + ++ifneq ($(filter sparc sparcv9,$(BUILDARCH)),) ++PICFLAG = -fPIC ++endif ++ + VM_PICFLAG/LIBJVM = $(PICFLAG) + VM_PICFLAG/AOUT = + VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) +--- openjdk/hotspot/make/linux/makefiles/defs.make.orig 2008-12-04 20:29:04.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-12-04 20:32:54.000000000 +0000 +@@ -59,7 +59,7 @@ + endif + + # sparc +-ifeq ($(ARCH), sparc64) ++ifneq (,$(filter $(ARCH), sparc sparc64)) + ifeq ($(ARCH_DATA_MODEL), 64) + ARCH_DATA_MODEL = 64 + MAKE_ARGS += LP64=1 +--- openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp.orig 2008-12-04 20:32:19.000000000 +0000 ++++ openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp 2008-12-04 20:32:54.000000000 +0000 +@@ -264,7 +264,7 @@ + + private: + +- constantPoolCacheOop* frame::interpreter_frame_cpoolcache_addr() const; ++ constantPoolCacheOop* interpreter_frame_cpoolcache_addr() const; + + #ifndef CC_INTERP +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-sparc-ptracefix.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,34 @@ +diff -up openjdk/hotspot/agent/src/os/linux/libproc.h.BAD openjdk/hotspot/agent/src/os/linux/libproc.h +--- openjdk/hotspot/agent/src/os/linux/libproc.h.BAD 2008-05-29 19:03:34.000000000 -0400 ++++ openjdk/hotspot/agent/src/os/linux/libproc.h 2008-05-29 19:01:45.000000000 -0400 +@@ -34,14 +34,25 @@ + + #if defined(sparc) || defined(sparcv9) + /* +- If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64 +- otherwise it should be from /usr/include/asm-sparc +- These two files define pt_regs structure differently ++ Taken from asm-sparc/ptrace.h and asm-sparc64/ptrace.h + */ + #ifdef _LP64 +-#include "asm-sparc64/ptrace.h" ++struct pt_regs { ++ unsigned long u_regs[16]; /* globals and ins */ ++ unsigned long tstate; ++ unsigned long tpc; ++ unsigned long tnpc; ++ unsigned int y; ++ unsigned int fprs; ++}; + #else +-#include "asm-sparc/ptrace.h" ++struct pt_regs { ++ unsigned long psr; ++ unsigned long pc; ++ unsigned long npc; ++ unsigned long y; ++ unsigned long u_regs[16]; /* globals and ins */ ++}; + #endif + + #endif //sparc or sparcv9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-sparc-trapsfix.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,21 @@ +diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp +--- openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp 2008-08-04 08:40:18.000000000 +0100 ++++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp 2008-08-09 01:29:51.000000000 +0100 +@@ -25,7 +25,16 @@ + #include "incls/_precompiled.incl" + #include "incls/_assembler_linux_sparc.cpp.incl" + +-#include <asm-sparc/traps.h> ++/* Headers for 32bit sparc with a 32bit userland end up in asm/ ++ * Headers for 32bit sparc with a 64bit userland end up in asm-sparc/ ++ * There is no traps.h in asm-sparc64/ ++ */ ++ ++#if defined(__sparc__) && defined(__arch64__) ++# include <asm-sparc/traps.h> ++#else ++# include <asm/traps.h> ++#endif + + void MacroAssembler::read_ccr_trap(Register ccr_save) { + // No implementation
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-sparc64-linux.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,42 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make +--- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-06-22 22:28:06.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-06-22 22:35:27.000000000 +0100 +@@ -73,6 +73,14 @@ + HS_ARCH = sparc + endif + ++# sparc ++ifeq ($(ARCH), sparc) ++ ARCH_DATA_MODEL = 32 ++ PLATFORM = linux-sparc ++ VM_PLATFORM = linux_sparc ++ HS_ARCH = sparc ++endif ++ + # x86_64 + ifeq ($(ARCH), x86_64) + ifeq ($(ARCH_DATA_MODEL), 64) +diff -Nru openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp +--- openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp 2008-06-22 20:44:41.000000000 +0100 ++++ openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp 2008-06-22 22:35:27.000000000 +0100 +@@ -1112,20 +1112,12 @@ + + void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, + CodeEmitInfo* info) { +-#ifdef _LP64 +- __ store(value, address, info); +-#else + __ volatile_store_mem_reg(value, address, info); +-#endif + } + + void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, + CodeEmitInfo* info) { +-#ifdef _LP64 +- __ load(address, result, info); +-#else + __ volatile_load_mem_reg(address, result, info); +-#endif + } + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-static-libstdc++.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,16 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-05-16 22:13:31.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-05-23 23:25:47.000000000 +0100 +@@ -124,6 +124,12 @@ + + STATIC_CXX = true + ++ifeq ($(ZERO_LIBARCH), ppc64) ++ STATIC_CXX = false ++else ++ STATIC_CXX = true ++endif ++ + ifeq ($(LINK_INTO),AOUT) + LIBJVM.o = + LIBJVM_MAPFILE =
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-text-relocations.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,61 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-07-17 08:40:27.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-07-21 23:10:50.000000000 +0100 +@@ -46,7 +46,11 @@ + # Compiler flags + + # position-independent code ++ifneq ($(filter alpha parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),) + PICFLAG = -fPIC ++else ++PICFLAG = -fpic ++endif + + VM_PICFLAG/LIBJVM = $(PICFLAG) + VM_PICFLAG/AOUT = +--- rules.make.orig 2008-12-12 11:23:31.000000000 -0500 ++++ openjdk/hotspot/make/linux/makefiles/rules.make 2008-12-12 11:32:26.000000000 -0500 +@@ -138,20 +138,10 @@ + include $(GAMMADIR)/make/pic.make + endif + +-# The non-PIC object files are only generated for 32 bit platforms. +-ifdef LP64 + %.o: %.cpp + @echo Compiling $< + $(QUIETLY) $(REMOVE_TARGET) + $(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE) +-else +-%.o: %.cpp +- @echo Compiling $< +- $(QUIETLY) $(REMOVE_TARGET) +- $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ +- $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \ +- $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)) +-endif + + %.o: %.s + @echo Assembling $< +--- rules.make.orig 2008-12-12 11:42:55.000000000 -0500 ++++ openjdk/hotspot/make/solaris/makefiles/rules.make 2008-12-12 11:44:01.000000000 -0500 +@@ -138,20 +138,10 @@ + include $(GAMMADIR)/make/pic.make + endif + +-# Sun compiler for 64 bit Solaris does not support building non-PIC object files. +-ifdef LP64 + %.o: %.cpp + @echo Compiling $< + $(QUIETLY) $(REMOVE_TARGET) + $(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE) +-else +-%.o: %.cpp +- @echo Compiling $< +- $(QUIETLY) $(REMOVE_TARGET) +- $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ +- $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \ +- $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)) +-endif + + %.o: %.s + @echo Assembling $<
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-use-idx_t.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,101 @@ +--- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp 2009-03-11 21:49:08.000000000 +0100 +@@ -468,7 +468,7 @@ + bci = 0; + } + +- MethodLivenessResult answer((uintptr_t*)NULL,0); ++ MethodLivenessResult answer((size_t*)NULL,0); + + if (_block_count > 0) { + if (TimeLivenessAnalysis) _time_total.start(); +@@ -567,15 +567,15 @@ + + + MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) : +- _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), + _last_bci(-1) { + _analyzer = analyzer; +@@ -992,7 +992,7 @@ + } + + MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) { +- MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()), ++ MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()), + _analyzer->bit_map_size_bits()); + answer.set_is_valid(); + +--- openjdk/hotspot/src/share/vm/utilities/bitMap.hpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp 2009-03-11 21:48:18.000000000 +0100 +@@ -33,7 +33,7 @@ + + public: + typedef size_t idx_t; // Type used for bit and word indices. +- typedef uintptr_t bm_word_t; // Element type of array that represents ++ typedef size_t bm_word_t; // Element type of array that represents + // the bitmap. + + // Hints for range sizes. +@@ -73,7 +73,7 @@ + + // Set a word to a specified value or to all ones; clear a word. + void set_word (idx_t word, bm_word_t val) { _map[word] = val; } +- void set_word (idx_t word) { set_word(word, ~(uintptr_t)0); } ++ void set_word (idx_t word) { set_word(word, ~(idx_t)0); } + void clear_word(idx_t word) { _map[word] = 0; } + + // Utilities for ranges of bits. Ranges are half-open [beg, end). +--- openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp 2009-03-11 21:48:18.000000000 +0100 +@@ -35,7 +35,7 @@ + + inline bool BitMap::par_set_bit(idx_t bit) { + verify_index(bit); +- volatile idx_t* const addr = word_addr(bit); ++ volatile idx_t* const addr = (idx_t *) word_addr(bit); + const idx_t mask = bit_mask(bit); + idx_t old_val = *addr; + +@@ -56,7 +56,7 @@ + + inline bool BitMap::par_clear_bit(idx_t bit) { + verify_index(bit); +- volatile idx_t* const addr = word_addr(bit); ++ volatile idx_t* const addr = (idx_t *) word_addr(bit); + const idx_t mask = ~bit_mask(bit); + idx_t old_val = *addr; + +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2009-03-11 21:48:47.000000000 +0100 +@@ -29,7 +29,7 @@ + // CMS Bit Map Wrapper + + CMBitMapRO::CMBitMapRO(ReservedSpace rs, int shifter): +- _bm((uintptr_t*)NULL,0), ++ _bm((size_t*)NULL,0), + _shifter(shifter) { + _bmStartWord = (HeapWord*)(rs.base()); + _bmWordSize = rs.size()/HeapWordSize; // rs.size() is in bytes +@@ -43,7 +43,7 @@ + "couldn't reseve backing store for CMS bit map"); + assert(_virtual_space.committed_size() == brs.size(), + "didn't reserve backing store for all of CMS bit map?"); +- _bm.set_map((uintptr_t*)_virtual_space.low()); ++ _bm.set_map((size_t*)_virtual_space.low()); + assert(_virtual_space.committed_size() << (_shifter + LogBitsPerByte) >= + _bmWordSize, "inconsistency in bit map sizing"); + _bm.set_size(_bmWordSize >> _shifter);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-version.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,48 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-11-06 08:40:50.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-11-19 12:15:54.000000000 +0000 +@@ -86,6 +86,10 @@ + ${JRE_VERSION} \ + ${VM_DISTRO} + ++ifdef DISTRIBUTION_ID ++CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\"" ++endif ++ + # CFLAGS_WARN holds compiler options to suppress/enable warnings. + CFLAGS += $(CFLAGS_WARN/BYFILE) + +diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp +--- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp 2008-11-06 08:40:58.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2008-11-19 12:15:54.000000000 +0000 +@@ -165,7 +165,8 @@ + + static void print_bug_submit_message(outputStream *out, Thread *thread) { + if (out == NULL) return; +- out->print_raw_cr("# If you would like to submit a bug report, please visit:"); ++ out->print_raw_cr("# If you would like to submit a bug report, please include"); ++ out->print_raw_cr("# instructions how to reproduce the bug and visit:"); + out->print_raw ("# "); + out->print_raw_cr(Arguments::java_vendor_url_bug()); + // If the crash is in native code, encourage user to submit a bug to the +@@ -339,6 +340,9 @@ + Abstract_VM_Version::vm_platform_string(), + UseCompressedOops ? "compressed oops" : "" + ); ++#ifdef DISTRIBUTION_ID ++ st->print_cr("# Distribution: %s", DISTRIBUTION_ID); ++#endif + + STEP(60, "(printing problematic frame)") + +--- arguments.cpp 2008-12-15 12:25:14.000000000 -0500 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2008-12-15 12:25:32.000000000 -0500 +@@ -25,7 +25,7 @@ + #include "incls/_precompiled.incl" + #include "incls/_arguments.cpp.incl" + +-#define DEFAULT_VENDOR_URL_BUG "http://java.sun.com/webapps/bugreport/crash.jsp" ++#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla" + #define DEFAULT_JAVA_LAUNCHER "generic" + + char** Arguments::_jvm_flags_array = NULL;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/icedtea-zero-build.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,129 @@ +diff -Nru openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make +--- openjdk.orig/hotspot/make/defs.make 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/make/defs.make 2008-11-29 02:14:15.000000000 +0000 +@@ -192,13 +192,14 @@ + + # Use uname output for SRCARCH, but deal with platform differences. If ARCH + # is not explicitly listed below, it is treated as x86. +- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64,$(ARCH))) ++ SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 zero,$(ARCH))) + ARCH/ = x86 + ARCH/sparc = sparc + ARCH/sparc64= sparc + ARCH/ia64 = ia64 + ARCH/amd64 = x86 + ARCH/x86_64 = x86 ++ ARCH/zero = zero + + # BUILDARCH is usually the same as SRCARCH, except for sparcv9 + BUILDARCH = $(SRCARCH) +@@ -222,8 +223,9 @@ + LIBARCH/sparc = sparc + LIBARCH/sparcv9 = sparcv9 + LIBARCH/ia64 = ia64 ++ LIBARCH/zero = $(ZERO_LIBARCH) + +- LP64_ARCH = sparcv9 amd64 ia64 ++ LP64_ARCH = sparcv9 amd64 ia64 zero + endif + + # Required make macro settings for all platforms +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make +--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/buildtree.make 2008-11-29 02:14:15.000000000 +0000 +@@ -321,6 +321,7 @@ + DATA_MODE/sparcv9 = 64 + DATA_MODE/amd64 = 64 + DATA_MODE/ia64 = 64 ++DATA_MODE/zero = $(ZERO_BITSPERWORD) + + JAVA_FLAG/32 = -d32 + JAVA_FLAG/64 = -d64 +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make +--- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-11-29 01:55:52.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-11-29 02:14:15.000000000 +0000 +@@ -37,6 +37,18 @@ + ARCH_DATA_MODEL ?= 32 + endif + ++# zero ++ifdef ICEDTEA_ZERO_BUILD ++ ARCH_DATA_MODEL = $(ZERO_BITSPERWORD) ++ ifeq ($(ARCH_DATA_MODEL), 64) ++ MAKE_ARGS += LP64=1 ++ endif ++ PLATFORM = linux-zero ++ VM_PLATFORM = linux_zero ++ HS_ARCH = zero ++ ARCH = zero ++endif ++ + # ia64 + ifeq ($(ARCH), ia64) + ARCH_DATA_MODEL = 64 +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-11-29 01:55:52.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-11-29 02:14:15.000000000 +0000 +@@ -56,6 +56,9 @@ + VM_PICFLAG/AOUT = + VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) + ++ifdef ICEDTEA_ZERO_BUILD ++CFLAGS += $(LIBFFI_CFLAGS) ++endif + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti + CFLAGS += -fno-exceptions +@@ -72,6 +75,7 @@ + ARCHFLAG/ia64 = + ARCHFLAG/sparc = -m32 -mcpu=v9 + ARCHFLAG/sparcv9 = -m64 -mcpu=v9 ++ARCHFLAG/zero = $(ZERO_ARCHFLAG) + + CFLAGS += $(ARCHFLAG) + AOUT_FLAGS += $(ARCHFLAG) +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/sa.make openjdk/hotspot/make/linux/makefiles/sa.make +--- openjdk.orig/hotspot/make/linux/makefiles/sa.make 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/sa.make 2008-11-29 02:14:15.000000000 +0000 +@@ -52,10 +52,10 @@ + SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties + + # if $(AGENT_DIR) does not exist, we don't build SA +-# also, we don't build SA on Itanium. ++# also, we don't build SA on Itanium or zero. + + all: +- if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ ++ if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ + $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \ + fi + +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make +--- openjdk.orig/hotspot/make/linux/makefiles/saproc.make 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/saproc.make 2008-11-29 02:14:15.000000000 +0000 +@@ -44,10 +44,10 @@ + DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) + + # if $(AGENT_DIR) does not exist, we don't build SA +-# also, we don't build SA on Itanium. ++# also, we don't build SA on Itanium or zero. + + checkAndBuildSA: +- $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ ++ $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ + $(MAKE) -f vm.make $(LIBSAPROC); \ + fi + +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-11-29 01:55:52.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-11-29 02:14:15.000000000 +0000 +@@ -158,6 +158,9 @@ + + LIBS_VM += $(LIBS) + endif ++ifdef ICEDTEA_ZERO_BUILD ++LIBS_VM += $(LIBFFI_LIBS) ++endif + + LINK_VM = $(LINK_LIB.c) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/openjdk-6886353-ignore_deoptimizealot.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,33 @@ +# HG changeset patch +# User andrew +# Date 1254183265 25200 +# Node ID d6b9fd78f38951b6c8b2912701f52aa9fbc08a63 +# Parent ddd6f1182ae3c0014cbc139952ba8d9d14bfb3d1 +6886353: For DeoptimizeALot, JTreg tests should "IgnoreUnrecognizedVMOptions on a product build +Summary: Add IgnoreUnrecognizedVMOptions for JTreg tests (on a product build) to pass with DeoptimizeALot +Reviewed-by: kvn + +diff -r ddd6f1182ae3 -r d6b9fd78f389 test/compiler/6823453/Test.java +--- openjdk/hotspot/test/compiler/6823453/Test.java Fri Sep 25 13:26:02 2009 -0700 ++++ openjdk/hotspot/test/compiler/6823453/Test.java Mon Sep 28 17:14:25 2009 -0700 +@@ -26,7 +26,7 @@ + * @test + * @bug 6823453 + * @summary DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph") +- * @run main/othervm -Xcomp -XX:CompileOnly=Test -XX:+DeoptimizeALot Test ++ * @run main/othervm -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:CompileOnly=Test -XX:+DeoptimizeALot Test + */ + + public class Test { +diff -r ddd6f1182ae3 -r d6b9fd78f389 test/compiler/6833129/Test.java +--- openjdk/hotspot/test/compiler/6833129/Test.java Fri Sep 25 13:26:02 2009 -0700 ++++ openjdk/hotspot/test/compiler/6833129/Test.java Mon Sep 28 17:14:25 2009 -0700 +@@ -25,7 +25,7 @@ + * @test + * @bug 6833129 + * @summary Object.clone() and Arrays.copyOf ignore coping with -XX:+DeoptimizeALot +- * @run main/othervm -Xbatch -XX:+DeoptimizeALot Test ++ * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+DeoptimizeALot Test + */ + + public class Test{
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/original/icedtea-6778657-f2i-overflow.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,96 @@ +diff -r dcb49b482348 -r f63a8dee04ae openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp +--- openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp Mon Nov 03 14:00:57 2008 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp Mon Nov 03 15:56:17 2008 +0000 +@@ -173,64 +173,46 @@ JRT_END + + + JRT_LEAF(jint, SharedRuntime::f2i(jfloat x)) +- if (g_isnan(x)) {return 0;} +- jlong lltmp = (jlong)x; +- jint ltmp = (jint)lltmp; +- if (ltmp == lltmp) { +- return ltmp; +- } else { +- if (x < 0) { +- return min_jint; +- } else { +- return max_jint; +- } +- } ++ if (g_isnan(x)) ++ return 0; ++ if (x >= (jfloat) max_jint) ++ return max_jint; ++ if (x <= (jfloat) min_jint) ++ return min_jint; ++ return (jint) x; + JRT_END + + + JRT_LEAF(jlong, SharedRuntime::f2l(jfloat x)) +- if (g_isnan(x)) {return 0;} +- jlong lltmp = (jlong)x; +- if (lltmp != min_jlong) { +- return lltmp; +- } else { +- if (x < 0) { +- return min_jlong; +- } else { +- return max_jlong; +- } +- } ++ if (g_isnan(x)) ++ return 0; ++ if (x >= (jfloat) max_jlong) ++ return max_jlong; ++ if (x <= (jfloat) min_jlong) ++ return min_jlong; ++ return (jlong) x; + JRT_END + + + JRT_LEAF(jint, SharedRuntime::d2i(jdouble x)) +- if (g_isnan(x)) {return 0;} +- jlong lltmp = (jlong)x; +- jint ltmp = (jint)lltmp; +- if (ltmp == lltmp) { +- return ltmp; +- } else { +- if (x < 0) { +- return min_jint; +- } else { +- return max_jint; +- } +- } ++ if (g_isnan(x)) ++ return 0; ++ if (x >= (jdouble) max_jint) ++ return max_jint; ++ if (x <= (jdouble) min_jint) ++ return min_jint; ++ return (jint) x; + JRT_END + + + JRT_LEAF(jlong, SharedRuntime::d2l(jdouble x)) +- if (g_isnan(x)) {return 0;} +- jlong lltmp = (jlong)x; +- if (lltmp != min_jlong) { +- return lltmp; +- } else { +- if (x < 0) { +- return min_jlong; +- } else { +- return max_jlong; +- } +- } ++ if (g_isnan(x)) ++ return 0; ++ if (x >= (jdouble) max_jlong) ++ return max_jlong; ++ if (x <= (jdouble) min_jlong) ++ return min_jlong; ++ return (jlong) x; + JRT_END + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/original/icedtea-6778662-lib64.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,16 @@ +--- origopenjdk/hotspot/src/os/linux/vm/os_linux.cpp 2008-01-04 18:11:53.000000000 -0500 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2008-04-21 14:00:59.000000000 -0400 +@@ -265,7 +265,12 @@ + * ... + * 7: The default directories, normally /lib and /usr/lib. + */ +-#define DEFAULT_LIBPATH "/lib:/usr/lib" ++ ++#if defined(AMD64) || defined(_LP64) && (defined(PPC) || defined(S390)) ++#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib" ++#else ++#define DEFAULT_LIBPATH "/lib:/usr/lib" ++#endif + + #define EXTENSIONS_DIR "/lib/ext" + #define ENDORSED_DIR "/lib/endorsed"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/original/icedtea-6793825-includedb.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,107 @@ +--- openjdk/hotspot/src/share/vm/includeDB_compiler2.orig 2009-01-13 10:10:44.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/includeDB_compiler2 2009-01-13 10:11:17.000000000 +0000 +@@ -140,6 +140,7 @@ + c2_globals_<os_family>.hpp macros.hpp + + c2_init_<arch>.cpp compile.hpp ++c2_init_<arch>.cpp node.hpp + + c2compiler.cpp ad_<arch_model>.hpp + c2compiler.cpp c2compiler.hpp +@@ -839,6 +840,7 @@ + phase.cpp compile.hpp + phase.cpp compileBroker.hpp + phase.cpp nmethod.hpp ++phase.cpp node.hpp + phase.cpp phase.hpp + + phase.hpp port.hpp +--- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1.orig 2009-01-13 10:10:44.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 2009-01-13 10:11:17.000000000 +0000 +@@ -34,6 +34,7 @@ + collectionSetChooser.cpp g1CollectedHeap.hpp + collectionSetChooser.cpp g1CollectorPolicy.hpp + collectionSetChooser.cpp collectionSetChooser.hpp ++collectionSetChooser.cpp space.inline.hpp + + collectionSetChooser.hpp heapRegion.hpp + collectionSetChooser.hpp growableArray.hpp +@@ -44,6 +45,7 @@ + concurrentG1Refine.cpp copy.hpp + concurrentG1Refine.cpp g1CollectedHeap.hpp + concurrentG1Refine.cpp g1RemSet.hpp ++concurrentG1Refine.cpp space.inline.hpp + + concurrentG1Refine.hpp globalDefinitions.hpp + +@@ -264,7 +266,7 @@ + heapRegion.cpp iterator.hpp + heapRegion.cpp oop.inline.hpp + +-heapRegion.hpp space.hpp ++heapRegion.hpp space.inline.hpp + heapRegion.hpp spaceDecorator.hpp + heapRegion.hpp g1BlockOffsetTable.inline.hpp + heapRegion.hpp watermark.hpp +--- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge.orig 2009-01-13 10:10:44.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge 2009-01-13 10:11:17.000000000 +0000 +@@ -306,6 +306,8 @@ + psPermGen.cpp psMarkSweepDecorator.hpp + psPermGen.cpp psParallelCompact.hpp + psPermGen.cpp psPermGen.hpp ++psPermGen.cpp markOop.inline.hpp ++psPermGen.cpp markSweep.inline.hpp + + psPermGen.hpp psOldGen.hpp + +--- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep.orig 2009-01-13 10:10:44.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep 2009-01-13 10:11:17.000000000 +0000 +@@ -28,6 +28,7 @@ + binaryTreeDictionary.cpp binaryTreeDictionary.hpp + binaryTreeDictionary.cpp globals.hpp + binaryTreeDictionary.cpp ostream.hpp ++binaryTreeDictionary.cpp space.inline.hpp + binaryTreeDictionary.cpp spaceDecorator.hpp + + binaryTreeDictionary.hpp freeBlockDictionary.hpp +--- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew.orig 2009-01-13 10:10:44.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew 2009-01-13 10:11:17.000000000 +0000 +@@ -29,6 +29,8 @@ + asParNewGeneration.cpp cmsAdaptiveSizePolicy.hpp + asParNewGeneration.cpp cmsGCAdaptivePolicyCounters.hpp + asParNewGeneration.cpp defNewGeneration.inline.hpp ++asParNewGeneration.cpp markOop.inline.hpp ++asParNewGeneration.cpp markSweep.inline.hpp + asParNewGeneration.cpp oop.pcgc.inline.hpp + asParNewGeneration.cpp parNewGeneration.hpp + asParNewGeneration.cpp referencePolicy.hpp +@@ -40,7 +42,7 @@ + parCardTableModRefBS.cpp java.hpp + parCardTableModRefBS.cpp mutexLocker.hpp + parCardTableModRefBS.cpp sharedHeap.hpp +-parCardTableModRefBS.cpp space.hpp ++parCardTableModRefBS.cpp space.inline.hpp + parCardTableModRefBS.cpp universe.hpp + parCardTableModRefBS.cpp virtualspace.hpp + +--- openjdk/hotspot/src/share/vm/includeDB_features.orig 2009-01-13 10:10:44.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/includeDB_features 2009-01-13 10:11:17.000000000 +0000 +@@ -59,6 +59,8 @@ + + dump_<arch_model>.cpp assembler_<arch>.inline.hpp + dump_<arch_model>.cpp compactingPermGenGen.hpp ++dump_<arch_model>.cpp generation.inline.hpp ++dump_<arch_model>.cpp space.inline.hpp + + forte.cpp collectedHeap.inline.hpp + forte.cpp debugInfoRec.hpp +--- openjdk/hotspot/src/share/vm/includeDB_core.orig 2009-03-11 13:14:45.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/includeDB_core 2009-03-11 13:15:59.000000000 +0000 +@@ -1311,6 +1311,7 @@ + cppInterpreter_<arch>.cpp debug.hpp + cppInterpreter_<arch>.cpp deoptimization.hpp + cppInterpreter_<arch>.cpp frame.inline.hpp ++cppInterpreter_<arch>.cpp interfaceSupport.hpp + cppInterpreter_<arch>.cpp interpreterRuntime.hpp + cppInterpreter_<arch>.cpp interpreter.hpp + cppInterpreter_<arch>.cpp interpreterGenerator.hpp
--- a/patches/hotspot/original/icedtea-gcc-4.3.patch Mon Oct 19 23:19:26 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make ---- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-12-01 12:06:51.000000000 +0000 -+++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-12-01 12:27:08.000000000 +0000 -@@ -98,7 +98,7 @@ - endif - - # Compiler warnings are treated as errors --WARNINGS_ARE_ERRORS = -Werror -+# WARNINGS_ARE_ERRORS = -Werror - - # Except for a few acceptable ones - # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit -diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/gcc.make openjdk/hotspot/make/solaris/makefiles/gcc.make ---- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/make/solaris/makefiles/gcc.make 2008-12-01 12:25:10.000000000 +0000 -@@ -109,7 +109,8 @@ - - - # Compiler warnings are treated as errors --WARNINGS_ARE_ERRORS = -Werror -+# Commented out for now because of gcc 4.3 warnings OpenJDK isn't ready for -+# WARNINGS_ARE_ERRORS = -Werror - # Enable these warnings. See 'info gcc' about details on these options - ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare - CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS) -diff -Nru openjdk.orig/hotspot/src/share/vm/adlc/filebuff.cpp openjdk/hotspot/src/share/vm/adlc/filebuff.cpp ---- openjdk.orig/hotspot/src/share/vm/adlc/filebuff.cpp 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/adlc/filebuff.cpp 2008-12-01 12:25:10.000000000 +0000 -@@ -25,6 +25,8 @@ - // FILEBUFF.CPP - Routines for handling a parser file buffer - #include "adlc.hpp" - -+using namespace std; -+ - //------------------------------FileBuff--------------------------------------- - // Create a new parsing buffer - FileBuff::FileBuff( BufferedFile *fptr, ArchDesc& archDesc) : _fp(fptr), _AD(archDesc) { -diff -Nru openjdk.orig/hotspot/src/share/vm/adlc/filebuff.hpp openjdk/hotspot/src/share/vm/adlc/filebuff.hpp ---- openjdk.orig/hotspot/src/share/vm/adlc/filebuff.hpp 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/adlc/filebuff.hpp 2008-12-01 12:25:10.000000000 +0000 -@@ -94,8 +94,11 @@ - FileBuffRegion *copy(); // Deep copy - FileBuffRegion *merge(FileBuffRegion*); // Merge 2 regions; delete input - --// void print(std::ostream&); --// friend std::ostream& operator<< (std::ostream&, FileBuffRegion&); -+#if defined(__GNUC__) && __GNUC__ >= 3 -+ void print(std::ostream&); -+ friend std::ostream& operator<< (std::ostream&, FileBuffRegion&); -+#else - void print(ostream&); - friend ostream& operator<< (ostream&, FileBuffRegion&); -+#endif - };
--- a/patches/hotspot/original/icedtea-includedb.patch Mon Oct 19 23:19:26 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ ---- openjdk/hotspot/src/share/vm/includeDB_compiler2.orig 2009-01-13 10:10:44.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/includeDB_compiler2 2009-01-13 10:11:17.000000000 +0000 -@@ -140,6 +140,7 @@ - c2_globals_<os_family>.hpp macros.hpp - - c2_init_<arch>.cpp compile.hpp -+c2_init_<arch>.cpp node.hpp - - c2compiler.cpp ad_<arch_model>.hpp - c2compiler.cpp c2compiler.hpp -@@ -839,6 +840,7 @@ - phase.cpp compile.hpp - phase.cpp compileBroker.hpp - phase.cpp nmethod.hpp -+phase.cpp node.hpp - phase.cpp phase.hpp - - phase.hpp port.hpp ---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1.orig 2009-01-13 10:10:44.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 2009-01-13 10:11:17.000000000 +0000 -@@ -34,6 +34,7 @@ - collectionSetChooser.cpp g1CollectedHeap.hpp - collectionSetChooser.cpp g1CollectorPolicy.hpp - collectionSetChooser.cpp collectionSetChooser.hpp -+collectionSetChooser.cpp space.inline.hpp - - collectionSetChooser.hpp heapRegion.hpp - collectionSetChooser.hpp growableArray.hpp -@@ -44,6 +45,7 @@ - concurrentG1Refine.cpp copy.hpp - concurrentG1Refine.cpp g1CollectedHeap.hpp - concurrentG1Refine.cpp g1RemSet.hpp -+concurrentG1Refine.cpp space.inline.hpp - - concurrentG1Refine.hpp globalDefinitions.hpp - -@@ -264,7 +266,7 @@ - heapRegion.cpp iterator.hpp - heapRegion.cpp oop.inline.hpp - --heapRegion.hpp space.hpp -+heapRegion.hpp space.inline.hpp - heapRegion.hpp spaceDecorator.hpp - heapRegion.hpp g1BlockOffsetTable.inline.hpp - heapRegion.hpp watermark.hpp ---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge.orig 2009-01-13 10:10:44.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge 2009-01-13 10:11:17.000000000 +0000 -@@ -306,6 +306,8 @@ - psPermGen.cpp psMarkSweepDecorator.hpp - psPermGen.cpp psParallelCompact.hpp - psPermGen.cpp psPermGen.hpp -+psPermGen.cpp markOop.inline.hpp -+psPermGen.cpp markSweep.inline.hpp - - psPermGen.hpp psOldGen.hpp - ---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep.orig 2009-01-13 10:10:44.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep 2009-01-13 10:11:17.000000000 +0000 -@@ -28,6 +28,7 @@ - binaryTreeDictionary.cpp binaryTreeDictionary.hpp - binaryTreeDictionary.cpp globals.hpp - binaryTreeDictionary.cpp ostream.hpp -+binaryTreeDictionary.cpp space.inline.hpp - binaryTreeDictionary.cpp spaceDecorator.hpp - - binaryTreeDictionary.hpp freeBlockDictionary.hpp ---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew.orig 2009-01-13 10:10:44.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew 2009-01-13 10:11:17.000000000 +0000 -@@ -29,6 +29,8 @@ - asParNewGeneration.cpp cmsAdaptiveSizePolicy.hpp - asParNewGeneration.cpp cmsGCAdaptivePolicyCounters.hpp - asParNewGeneration.cpp defNewGeneration.inline.hpp -+asParNewGeneration.cpp markOop.inline.hpp -+asParNewGeneration.cpp markSweep.inline.hpp - asParNewGeneration.cpp oop.pcgc.inline.hpp - asParNewGeneration.cpp parNewGeneration.hpp - asParNewGeneration.cpp referencePolicy.hpp -@@ -40,7 +42,7 @@ - parCardTableModRefBS.cpp java.hpp - parCardTableModRefBS.cpp mutexLocker.hpp - parCardTableModRefBS.cpp sharedHeap.hpp --parCardTableModRefBS.cpp space.hpp -+parCardTableModRefBS.cpp space.inline.hpp - parCardTableModRefBS.cpp universe.hpp - parCardTableModRefBS.cpp virtualspace.hpp - ---- openjdk/hotspot/src/share/vm/includeDB_features.orig 2009-01-13 10:10:44.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/includeDB_features 2009-01-13 10:11:17.000000000 +0000 -@@ -59,6 +59,8 @@ - - dump_<arch_model>.cpp assembler_<arch>.inline.hpp - dump_<arch_model>.cpp compactingPermGenGen.hpp -+dump_<arch_model>.cpp generation.inline.hpp -+dump_<arch_model>.cpp space.inline.hpp - - forte.cpp collectedHeap.inline.hpp - forte.cpp debugInfoRec.hpp ---- openjdk/hotspot/src/share/vm/includeDB_core.orig 2009-03-11 13:14:45.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/includeDB_core 2009-03-11 13:15:59.000000000 +0000 -@@ -1311,6 +1311,7 @@ - cppInterpreter_<arch>.cpp debug.hpp - cppInterpreter_<arch>.cpp deoptimization.hpp - cppInterpreter_<arch>.cpp frame.inline.hpp -+cppInterpreter_<arch>.cpp interfaceSupport.hpp - cppInterpreter_<arch>.cpp interpreterRuntime.hpp - cppInterpreter_<arch>.cpp interpreter.hpp - cppInterpreter_<arch>.cpp interpreterGenerator.hpp
--- a/patches/icedtea-f2i-overflow.patch Mon Oct 19 23:19:26 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -diff -r dcb49b482348 -r f63a8dee04ae openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp ---- openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp Mon Nov 03 14:00:57 2008 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp Mon Nov 03 15:56:17 2008 +0000 -@@ -173,64 +173,46 @@ JRT_END - - - JRT_LEAF(jint, SharedRuntime::f2i(jfloat x)) -- if (g_isnan(x)) {return 0;} -- jlong lltmp = (jlong)x; -- jint ltmp = (jint)lltmp; -- if (ltmp == lltmp) { -- return ltmp; -- } else { -- if (x < 0) { -- return min_jint; -- } else { -- return max_jint; -- } -- } -+ if (g_isnan(x)) -+ return 0; -+ if (x >= (jfloat) max_jint) -+ return max_jint; -+ if (x <= (jfloat) min_jint) -+ return min_jint; -+ return (jint) x; - JRT_END - - - JRT_LEAF(jlong, SharedRuntime::f2l(jfloat x)) -- if (g_isnan(x)) {return 0;} -- jlong lltmp = (jlong)x; -- if (lltmp != min_jlong) { -- return lltmp; -- } else { -- if (x < 0) { -- return min_jlong; -- } else { -- return max_jlong; -- } -- } -+ if (g_isnan(x)) -+ return 0; -+ if (x >= (jfloat) max_jlong) -+ return max_jlong; -+ if (x <= (jfloat) min_jlong) -+ return min_jlong; -+ return (jlong) x; - JRT_END - - - JRT_LEAF(jint, SharedRuntime::d2i(jdouble x)) -- if (g_isnan(x)) {return 0;} -- jlong lltmp = (jlong)x; -- jint ltmp = (jint)lltmp; -- if (ltmp == lltmp) { -- return ltmp; -- } else { -- if (x < 0) { -- return min_jint; -- } else { -- return max_jint; -- } -- } -+ if (g_isnan(x)) -+ return 0; -+ if (x >= (jdouble) max_jint) -+ return max_jint; -+ if (x <= (jdouble) min_jint) -+ return min_jint; -+ return (jint) x; - JRT_END - - - JRT_LEAF(jlong, SharedRuntime::d2l(jdouble x)) -- if (g_isnan(x)) {return 0;} -- jlong lltmp = (jlong)x; -- if (lltmp != min_jlong) { -- return lltmp; -- } else { -- if (x < 0) { -- return min_jlong; -- } else { -- return max_jlong; -- } -- } -+ if (g_isnan(x)) -+ return 0; -+ if (x >= (jdouble) max_jlong) -+ return max_jlong; -+ if (x <= (jdouble) min_jlong) -+ return min_jlong; -+ return (jlong) x; - JRT_END - -
--- a/patches/icedtea-gcc-4.3.patch Mon Oct 19 23:19:26 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ ---- openjdk/jdk/make/common/Defs-linux.gmk.ark 2008-01-11 14:20:26.000000000 +0000 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2008-01-11 14:21:10.000000000 +0000 -@@ -139,7 +139,9 @@ - # Treat compiler warnings as errors, if warnings not allowed - # - ifeq ($(COMPILER_WARNINGS_FATAL),true) -- GCC_WARNINGS += -Werror -+ # gcc 4.3 introduces new warnings OpenJDK code isn't quite ready for, such as -+ # "cast from double to float may chance its value". Let's ignore this for now. -+ # GCC_WARNINGS += -Werror - endif - - #
--- a/patches/icedtea-lib64.patch Mon Oct 19 23:19:26 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ ---- origopenjdk/hotspot/src/os/linux/vm/os_linux.cpp 2008-01-04 18:11:53.000000000 -0500 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2008-04-21 14:00:59.000000000 -0400 -@@ -265,7 +265,12 @@ - * ... - * 7: The default directories, normally /lib and /usr/lib. - */ --#define DEFAULT_LIBPATH "/lib:/usr/lib" -+ -+#if defined(AMD64) || defined(_LP64) && (defined(PPC) || defined(S390)) -+#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib" -+#else -+#define DEFAULT_LIBPATH "/lib:/usr/lib" -+#endif - - #define EXTENSIONS_DIR "/lib/ext" - #define ENDORSED_DIR "/lib/endorsed"
--- a/patches/icedtea-use-system-tzdata.patch Mon Oct 19 23:19:26 2009 +0200 +++ b/patches/icedtea-use-system-tzdata.patch Wed Oct 21 15:04:08 2009 +0100 @@ -60,7 +60,7 @@ + SystemProperty* sp = Arguments::system_properties(); + // Use the system zoneinfo files, if present + Arguments::PropertyList_add (&sp, -+ "user.zoneinfo.dir", "/usr/share/javazi"); ++ new SystemProperty("user.zoneinfo.dir", "/usr/share/javazi",true)); + #undef malloc #undef getenv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6879689-hotspot_warning_fix.patch Wed Oct 21 15:04:08 2009 +0100 @@ -0,0 +1,22 @@ +# HG changeset patch +# User andrew +# Date 1252396876 -3600 +# Node ID 5fdbe2cdf565f5d2c5c6bc8686a8eb792903e30e +# Parent 6ab1d6ece8bd7e0fb9bc16c2a1e03ca6b5402426 +6879689: Fix warning about ignored return value when compiling with -O2 +Summary: Store the return value of fwrite and check it matches the size of the array. +Reviewed-by: twisti, dholmes + +diff -r 6ab1d6ece8bd -r 5fdbe2cdf565 src/share/vm/adlc/archDesc.cpp +--- openjdk.orig/hotspot/src/share/vm/adlc/archDesc.cpp Mon Aug 17 15:03:39 2009 -0700 ++++ openjdk/hotspot/src/share/vm/adlc/archDesc.cpp Tue Sep 08 09:01:16 2009 +0100 +@@ -1031,7 +1031,8 @@ + //---------------------------addSUNcopyright------------------------------- + // output SUN copyright info + void ArchDesc::addSunCopyright(char* legal, int size, FILE *fp) { +- fwrite(legal, size, 1, fp); ++ size_t count = fwrite(legal, 1, size, fp); ++ assert(count == (size_t) size, "copyright info truncated"); + fprintf(fp,"\n"); + fprintf(fp,"// Machine Generated File. Do Not Edit!\n"); + fprintf(fp,"\n");