Mercurial > hg > openjdk > icedtea > jdk7 > hotspot
changeset 3605:72ba91bfdfd3
Merge jdk7u8-b01
author | andrew |
---|---|
date | Mon, 06 Aug 2012 14:20:29 +0100 |
parents | c5430c659d54 (diff) 528502f93096 (current diff) |
children | c115e0d9e93f |
files | .hgtags |
diffstat | 50 files changed, 618 insertions(+), 153 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Tue Jul 31 10:41:41 2012 -0700 +++ b/.hgtags Mon Aug 06 14:20:29 2012 +0100 @@ -50,6 +50,7 @@ faf94d94786b621f8e13cbcc941ca69c6d967c3f jdk7-b73 f4b900403d6e4b0af51447bd13bbe23fe3a1dac7 jdk7-b74 d8dd291a362acb656026a9c0a9da48501505a1e7 jdk7-b75 +b4ab978ce52c41bb7e8ee86285e6c9f28122bbe1 icedtea7-1.12 9174bb32e934965288121f75394874eeb1fcb649 jdk7-b76 455105fc81d941482f8f8056afaa7aa0949c9300 jdk7-b77 e703499b4b51e3af756ae77c3d5e8b3058a14e4e jdk7-b78 @@ -87,6 +88,7 @@ 07226e9eab8f74b37346b32715f829a2ef2c3188 hs18-b01 e7e7e36ccdb5d56edd47e5744351202d38f3b7ad jdk7-b87 4b60f23c42231f7ecd62ad1fcb6a9ca26fa57d1b jdk7-b88 +a393ff93e7e54dd94cc4211892605a32f9c77dad icedtea7-1.13 15836273ac2494f36ef62088bc1cb6f3f011f565 jdk7-b89 4b60f23c42231f7ecd62ad1fcb6a9ca26fa57d1b hs18-b02 605c9707a766ff518cd841fc04f9bb4b36a3a30b jdk7-b90 @@ -160,6 +162,7 @@ b898f0fc3cedc972d884d31a751afd75969531cf hs21-b05 bd586e392d93b7ed7a1636dcc8da2b6a4203a102 jdk7-b136 bd586e392d93b7ed7a1636dcc8da2b6a4203a102 hs21-b06 +591c7dc0b2ee879f87a7b5519a5388e0d81520be icedtea-1.14 2dbcb4a4d8dace5fe78ceb563b134f1fb296cd8f jdk7-b137 2dbcb4a4d8dace5fe78ceb563b134f1fb296cd8f hs21-b07 0930dc920c185afbf40fed9a655290b8e5b16783 jdk7-b138 @@ -182,6 +185,7 @@ 38fa55e5e79232d48f1bb8cf27d88bc094c9375a hs21-b16 81d815b05abb564aa1f4100ae13491c949b9a07e jdk7-b147 81d815b05abb564aa1f4100ae13491c949b9a07e hs21-b17 +7693eb0fce1f6b484cce96c233ea20bdad8a09e0 icedtea-2.0-branchpoint 9b0ca45cd756d538c4c30afab280a91868eee1a5 jdk7u2-b01 0cc8a70952c368e06de2adab1f2649a408f5e577 jdk8-b01 31e253c1da429124bb87570ab095d9bc89850d0a jdk8-b02 @@ -210,6 +214,7 @@ 3ba0bb2e7c8ddac172f5b995aae57329cdd2dafa hs22-b10 f17fe2f4b6aacc19cbb8ee39476f2f13a1c4d3cd jdk7u2-b13 0744602f85c6fe62255326df595785eb2b32166d jdk7u2-b21 +f8f4d3f9b16567b91bcef4caaa8417c8de8015f0 icedtea-2.1-branchpoint a40d238623e5b1ab1224ea6b36dc5b23d0a53880 jdk7u3-b02 6986bfb4c82e00b938c140f2202133350e6e73f8 jdk7u3-b03 8e6375b46717d74d4885f839b4e72d03f357a45f jdk7u3-b04 @@ -264,6 +269,7 @@ f92a171cf0071ca6c3fa8231d7d570377f8b2f4d hs23-b16 f92a171cf0071ca6c3fa8231d7d570377f8b2f4d hs23-b16 931e5f39e365a0d550d79148ff87a7f9e864d2e1 hs23-b16 +a2c5354863dcb3d147b7b6f55ef514b1bfecf920 icedtea-2.2-branchpoint efb5f2662c96c472caa3327090268c75a86dd9c0 jdk7u4-b13 82e719a2e6416838b4421637646cbfd7104c7716 jdk7u4-b14 e5f7f95411fb9e837800b4152741c962118e5d7a jdk7u5-b01 @@ -311,6 +317,7 @@ cefe884c708aa6dfd63aff45f6c698a6bc346791 jdk7u6-b16 270a40a57b3d05ca64070208dcbb895b5b509d8e hs23.2-b08 7a37cec9d0d44ae6ea3d26a95407e42d99af6843 jdk7u6-b17 +354cfde7db2f1fd46312d883a63c8a76d5381bab icedtea-2.3-branchpoint df0df4ae5af2f40b7f630c53a86e8c3d68ef5b66 jdk7u6-b18 1257f4373a06f788bd656ae1c7a953a026a285b9 jdk7u6-b19 a0c2fa4baeb6aad6f33dc87b676b21345794d61e hs23.2-b09
--- a/agent/src/os/linux/Makefile Tue Jul 31 10:41:41 2012 -0700 +++ b/agent/src/os/linux/Makefile Mon Aug 06 14:20:29 2012 +0100 @@ -23,7 +23,12 @@ # 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 + +ifndef BUILD_GCC +BUILD_GCC = gcc +endif + +GCC = $(BUILD_GCC) JAVAH = ${JAVA_HOME}/bin/javah @@ -40,7 +45,7 @@ LIBS = -lthread_db -CFLAGS = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -D_FILE_OFFSET_BITS=64 +CFLAGS = -c -fPIC -g -D_GNU_SOURCE -D_$(ARCH)_ $(if $(filter $(ARCH),alpha),,-D$(ARCH)) $(INCLUDES) -D_FILE_OFFSET_BITS=64 LIBSA = $(ARCH)/libsaproc.so @@ -73,7 +78,7 @@ $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS) test.o: test.c - $(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c + $(GCC) -c -o test.o -g -D_GNU_SOURCE -D_$(ARCH)_ $(if $(filter $(ARCH),alpha),,-D$(ARCH)) $(INCLUDES) test.c test: test.o $(GCC) -o test test.o -L$(ARCH) -lsaproc $(LIBS)
--- a/agent/src/os/linux/libproc.h Tue Jul 31 10:41:41 2012 -0700 +++ b/agent/src/os/linux/libproc.h Mon Aug 06 14:20:29 2012 +0100 @@ -36,9 +36,34 @@ These two files define pt_regs structure differently */ #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; + + /* We encode a magic number, PT_REGS_MAGIC, along + * with the %tt (trap type) register value at trap + * entry time. The magic number allows us to identify + * accurately a trap stack frame in the stack + * unwinder, and the %tt value allows us to test + * things like "in a system call" etc. for an arbitray + * process. + * + * The PT_REGS_MAGIC is chosen such that it can be + * loaded completely using just a sethi instruction. + */ + unsigned int magic; +}; #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
--- a/make/linux/makefiles/adlc.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/linux/makefiles/adlc.make Mon Aug 06 14:20:29 2012 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -133,8 +133,10 @@ # Note that product files are updated via "mv", which is atomic. TEMPDIR := $(OUTDIR)/mktmp$(shell echo $$$$) -# Debuggable by default -CFLAGS += -g +ifneq ($(DEBUG_BINARIES), true) + # Debuggable by default (unless already done by DEBUG_BINARIES) + CFLAGS += -g +endif # Pass -D flags into ADLC. ADLCFLAGS += $(SYSDEFS)
--- a/make/linux/makefiles/defs.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/linux/makefiles/defs.make Mon Aug 06 14:20:29 2012 +0100 @@ -228,10 +228,14 @@ # client and server subdirectories have symbolic links to ../libjsig.so EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz - else - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo + ifneq ($(ZERO_BUILD), true) + ifneq ($(STRIP_POLICY),no_strip) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz + else + EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo + endif + endif endif endif EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server @@ -240,11 +244,15 @@ ifndef BUILD_CLIENT_ONLY EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz - else - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo + ifneq ($(ZERO_BUILD), true) + ifneq ($(STRIP_POLICY),no_strip) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz + else + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo + endif + endif endif endif endif @@ -253,11 +261,13 @@ ifeq ($(ARCH_DATA_MODEL), 32) EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz - else - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo + ifneq ($(STRIP_POLICY),no_strip) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz + else + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo + endif endif endif endif @@ -270,12 +280,16 @@ ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ $(EXPORT_LIB_DIR)/sa-jdi.jar ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz - ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz - else - ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo - ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo + ifneq ($(ZERO_BUILD), true) + ifneq ($(STRIP_POLICY),no_strip) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz + ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz + else + ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo + ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo + endif + endif endif endif ADD_SA_BINARIES/ppc =
--- a/make/linux/makefiles/gcc.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/linux/makefiles/gcc.make Mon Aug 06 14:20:29 2012 +0100 @@ -25,20 +25,43 @@ #------------------------------------------------------------------------ # CC, CXX & AS -# When cross-compiling the ALT_COMPILER_PATH points -# to the cross-compilation toolset +ifndef HOST_GCC +ifdef CROSS_COMPILE_ARCH +HOST_GCC = gcc +else +HOST_GCC = $(CC) +endif +endif + +ifndef HOST_CXX +ifdef CROSS_COMPILE_ARCH +HOST_CXX = g++ +else +HOST_CXX = $(CXX) +endif +endif + +ifndef BUILD_GCC ifdef CROSS_COMPILE_ARCH -CXX = $(ALT_COMPILER_PATH)/g++ -CC = $(ALT_COMPILER_PATH)/gcc -HOSTCXX = g++ -HOSTCC = gcc +BUILD_GCC = $(ALT_COMPILER_PATH)/gcc else -CXX = g++ -CC = gcc -HOSTCXX = $(CXX) -HOSTCC = $(CC) +BUILD_GCC = gcc +endif endif +ifndef BUILD_CXX +ifdef CROSS_COMPILE_ARCH +BUILD_CXX = $(ALT_COMPILER_PATH)/g++ +else +BUILD_CXX = g++ +endif +endif + +CXX = $(BUILD_CXX) +CC = $(BUILD_GCC) +HOSTCXX = $(HOST_CXX) +HOSTCC = $(HOST_GCC) + AS = $(CC) -c # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only @@ -61,7 +84,11 @@ # Compiler flags # position-independent code +ifneq ($(filter parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),) PICFLAG = -fPIC +else +PICFLAG = -fpic +endif VM_PICFLAG/LIBJVM = $(PICFLAG) VM_PICFLAG/AOUT = @@ -209,47 +236,46 @@ #------------------------------------------------------------------------ # Debug flags -# Use the stabs format for debugging information (this is the default -# on gcc-2.91). It's good enough, has all the information about line -# numbers and local variables, and libjvm_g.so is only about 16M. -# Change this back to "-g" if you want the most expressive format. -# (warning: that could easily inflate libjvm_g.so to 150M!) -# Note: The Itanium gcc compiler crashes when using -gstabs. -DEBUG_CFLAGS/ia64 = -g -DEBUG_CFLAGS/amd64 = -g -DEBUG_CFLAGS/arm = -g -DEBUG_CFLAGS/ppc = -g -DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) -ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),) -DEBUG_CFLAGS += -gstabs -endif - -ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) - FASTDEBUG_CFLAGS/ia64 = -g - FASTDEBUG_CFLAGS/amd64 = -g - FASTDEBUG_CFLAGS/arm = -g - FASTDEBUG_CFLAGS/ppc = -g - FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) - ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),) - FASTDEBUG_CFLAGS += -gstabs +# DEBUG_BINARIES uses full -g debug information for all configs +ifeq ($(DEBUG_BINARIES), true) + CFLAGS += -g +else + # Use the stabs format for debugging information (this is the default + # on gcc-2.91). It's good enough, has all the information about line + # numbers and local variables, and libjvm_g.so is only about 16M. + # Change this back to "-g" if you want the most expressive format. + # (warning: that could easily inflate libjvm_g.so to 150M!) + # Note: The Itanium gcc compiler crashes when using -gstabs. + DEBUG_CFLAGS/ia64 = -g + DEBUG_CFLAGS/amd64 = -g + DEBUG_CFLAGS/arm = -g + DEBUG_CFLAGS/ppc = -g + DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) + ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),) + DEBUG_CFLAGS += -gstabs endif - - OPT_CFLAGS/ia64 = -g - OPT_CFLAGS/amd64 = -g - OPT_CFLAGS/arm = -g - OPT_CFLAGS/ppc = -g - OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH)) - ifeq ($(OPT_CFLAGS/$(BUILDARCH)),) - OPT_CFLAGS += -gstabs + + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + FASTDEBUG_CFLAGS/ia64 = -g + FASTDEBUG_CFLAGS/amd64 = -g + FASTDEBUG_CFLAGS/arm = -g + FASTDEBUG_CFLAGS/ppc = -g + FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) + ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),) + FASTDEBUG_CFLAGS += -gstabs + endif + + OPT_CFLAGS/ia64 = -g + OPT_CFLAGS/amd64 = -g + OPT_CFLAGS/arm = -g + OPT_CFLAGS/ppc = -g + OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH)) + ifeq ($(OPT_CFLAGS/$(BUILDARCH)),) + OPT_CFLAGS += -gstabs + endif endif endif -# DEBUG_BINARIES overrides everything, use full -g debug information -ifeq ($(DEBUG_BINARIES), true) - DEBUG_CFLAGS = -g - CFLAGS += $(DEBUG_CFLAGS) -endif - # If we are building HEADLESS, pass on to VM # so it can set the java.awt.headless property ifdef HEADLESS
--- a/make/linux/makefiles/jsig.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/linux/makefiles/jsig.make Mon Aug 06 14:20:29 2012 +0100 @@ -62,8 +62,10 @@ $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl $(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); } ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -73,10 +75,12 @@ endif endif [ -f $(LIBJSIG_G_DEBUGINFO) ] || { ln -s $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO); } - ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) + ifeq ($(ZIP_DEBUGINFO_FILES),1) $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) $(RM) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) [ -f $(LIBJSIG_G_DIZ) ] || { ln -s $(LIBJSIG_DIZ) $(LIBJSIG_G_DIZ); } + endif endif endif
--- a/make/linux/makefiles/rules.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/linux/makefiles/rules.make Mon Aug 06 14:20:29 2012 +0100 @@ -143,20 +143,10 @@ include $(GAMMADIR)/make/altsrc.make -# The non-PIC object files are only generated for 32 bit platforms. -ifdef LP64 %.o: %.cpp @echo Compiling $< $(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) -else -%.o: %.cpp - @echo Compiling $< - $(QUIETLY) $(REMOVE_TARGET) - $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ - $(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ - $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)) -endif %.o: %.s @echo Assembling $<
--- a/make/linux/makefiles/saproc.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/linux/makefiles/saproc.make Mon Aug 06 14:20:29 2012 +0100 @@ -91,8 +91,10 @@ -lthread_db $(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); } ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -103,9 +105,11 @@ endif [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); } ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) $(RM) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) [ -f $(LIBSAPROC_G_DIZ) ] || { ln -s $(LIBSAPROC_DIZ) $(LIBSAPROC_G_DIZ); } + endif endif endif
--- a/make/linux/makefiles/vm.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/linux/makefiles/vm.make Mon Aug 06 14:20:29 2012 +0100 @@ -97,6 +97,10 @@ ${HS_LIB_ARCH} \ ${VM_DISTRO} +ifdef DERIVATIVE_ID +CPPFLAGS += -DDERIVATIVE_ID="\"$(DERIVATIVE_ID)\"" +endif + # This is VERY important! The version define must only be supplied to vm_version.o # If not, ccache will not re-use the cache at all, since the version string might contain # a time and date. @@ -108,6 +112,10 @@ endif endif +ifdef DISTRIBUTION_ID +CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\"" +endif + # CFLAGS_WARN holds compiler options to suppress/enable warnings. CFLAGS += $(CFLAGS_WARN/BYFILE) @@ -242,13 +250,15 @@ vm.def: $(Res_Files) $(Obj_Files) sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@ -ifeq ($(SHARK_BUILD), true) - STATIC_CXX = false -else - ifeq ($(ZERO_LIBARCH), ppc64) +ifeq ($(STATIC_CXX),) + ifeq ($(SHARK_BUILD), true) STATIC_CXX = false else - STATIC_CXX = true + ifeq ($(ZERO_LIBARCH), ppc64) + STATIC_CXX = false + else + STATIC_CXX = true + endif endif endif @@ -338,8 +348,10 @@ } ifeq ($(CROSS_COMPILE_ARCH),) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO) $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -350,9 +362,11 @@ endif $(QUIETLY) [ -f $(LIBJVM_G_DEBUGINFO) ] || ln -s $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) $(RM) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) [ -f $(LIBJVM_G_DIZ) ] || { ln -s $(LIBJVM_DIZ) $(LIBJVM_G_DIZ); } + endif endif endif endif
--- a/make/linux/platform_zero.in Tue Jul 31 10:41:41 2012 -0700 +++ b/make/linux/platform_zero.in Mon Aug 06 14:20:29 2012 +0100 @@ -14,4 +14,4 @@ gnu_dis_arch = zero -sysdefs = -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -D@ZERO_ARCHDEF@ -DZERO_LIBARCH=\"@ZERO_LIBARCH@\" +sysdefs = -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -DTARGET_ARCH_NYI_6939861=1 -D@ZERO_ARCHDEF@ -DZERO_LIBARCH=\"@ZERO_LIBARCH@\"
--- a/make/solaris/makefiles/dtrace.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/solaris/makefiles/dtrace.make Mon Aug 06 14:20:29 2012 +0100 @@ -116,6 +116,7 @@ $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); } ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. # Clear the SHF_ALLOC flag (if set) from empty section headers. # An empty section header has sh_addr == 0 and sh_size == 0. @@ -129,6 +130,7 @@ # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) is not # in the link name: ( cd $(XLIBJVM_DIR) && $(ADD_GNU_DEBUGLINK) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB) ) + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -139,11 +141,13 @@ endif [ -f $(XLIBJVM_DB_G_DEBUGINFO) ] || { cd $(XLIBJVM_DIR) && ln -s $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO); } ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) is not # in the archived name: ( cd $(XLIBJVM_DIR) && $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO) ) $(RM) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO) [ -f $(XLIBJVM_DB_G_DIZ) ] || { cd $(XLIBJVM_DIR) && ln -s $(LIBJVM_DB_DIZ) $(LIBJVM_DB_G_DIZ); } + endif endif endif @@ -154,6 +158,7 @@ $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); } ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) # Clear the SHF_ALLOC flag (if set) from empty section headers. $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO) @@ -162,6 +167,7 @@ # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) is not # in the link name: ( cd $(XLIBJVM_DIR) && $(ADD_GNU_DEBUGLINK) $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE) ) + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -172,11 +178,13 @@ endif [ -f $(XLIBJVM_DTRACE_G_DEBUGINFO) ] || { cd $(XLIBJVM_DIR) && ln -s $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO); } ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) is not # in the archived name: ( cd $(XLIBJVM_DIR) && $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO) ) $(RM) $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO) [ -f $(XLIBJVM_DTRACE_G_DIZ) ] || { cd $(XLIBJVM_DIR) && ln -s $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_G_DIZ); } + endif endif endif @@ -226,12 +234,14 @@ $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc [ -f $(LIBJVM_DB_G) ] || { ln -s $@ $(LIBJVM_DB_G); } ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) # Clear the SHF_ALLOC flag (if set) from empty section headers. $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO) # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@ $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJVM_DB_DEBUGINFO) $@ + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -242,9 +252,11 @@ endif [ -f $(LIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO); } ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO) $(RM) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO) [ -f $(LIBJVM_DB_G_DIZ) ] || { ln -s $(LIBJVM_DB_DIZ) $(LIBJVM_DB_G_DIZ); } + endif endif endif @@ -254,12 +266,14 @@ $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor [ -f $(LIBJVM_DTRACE_G) ] || { ln -s $@ $(LIBJVM_DTRACE_G); } ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) # Clear the SHF_ALLOC flag (if set) from empty section headers. $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO) # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@ $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJVM_DTRACE_DEBUGINFO) $@ + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -270,9 +284,11 @@ endif [ -f $(LIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO); } ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO) $(RM) $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO) [ -f $(LIBJVM_DTRACE_G_DIZ) ] || { ln -s $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_G_DIZ); } + endif endif endif
--- a/make/solaris/makefiles/jsig.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/solaris/makefiles/jsig.make Mon Aug 06 14:20:29 2012 +0100 @@ -58,6 +58,7 @@ $(LFLAGS_JSIG) -o $@ $(JSIGSRCDIR)/jsig.c -ldl [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); } ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. # Clear the SHF_ALLOC flag (if set) from empty section headers. # An empty section header has sh_addr == 0 and sh_size == 0. @@ -69,6 +70,7 @@ # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available. # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJSIG_DEBUGINFO) $@ + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -79,9 +81,11 @@ endif [ -f $(LIBJSIG_G_DEBUGINFO) ] || { ln -s $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO); } ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) $(RM) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) [ -f $(LIBJSIG_G_DIZ) ] || { ln -s $(LIBJSIG_DIZ) $(LIBJSIG_G_DIZ); } + endif endif endif
--- a/make/solaris/makefiles/rules.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/solaris/makefiles/rules.make Mon Aug 06 14:20:29 2012 +0100 @@ -135,20 +135,10 @@ include $(GAMMADIR)/make/altsrc.make -# 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.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) -else -%.o: %.cpp - @echo Compiling $< - $(QUIETLY) $(REMOVE_TARGET) - $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ - $(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ - $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)) -endif %.o: %.s @echo Assembling $<
--- a/make/solaris/makefiles/saproc.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/solaris/makefiles/saproc.make Mon Aug 06 14:20:29 2012 +0100 @@ -109,6 +109,7 @@ -ldl -ldemangle -lthread -lc [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); } ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. # Clear the SHF_ALLOC flag (if set) from empty section headers. # An empty section header has sh_addr == 0 and sh_size == 0. @@ -120,6 +121,7 @@ # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available. # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBSAPROC_DEBUGINFO) $@ + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -130,9 +132,11 @@ endif [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); } ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) $(RM) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) [ -f $(LIBSAPROC_G_DIZ) ] || { ln -s $(LIBSAPROC_DIZ) $(LIBSAPROC_G_DIZ); } + endif endif endif
--- a/make/solaris/makefiles/vm.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/solaris/makefiles/vm.make Mon Aug 06 14:20:29 2012 +0100 @@ -85,11 +85,19 @@ ${HS_LIB_ARCH} \ ${VM_DISTRO} +ifdef DERIVATIVE_ID +CPPFLAGS += -DDERIVATIVE_ID="\"$(DERIVATIVE_ID)\"" +endif + # This is VERY important! The version define must only be supplied to vm_version.o # If not, ccache will not re-use the cache at all, since the version string might contain # a time and date. vm_version.o: CXXFLAGS += ${JRE_VERSION} +ifdef DISTRIBUTION_ID +CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\"" +endif + # CFLAGS_WARN holds compiler options to suppress/enable warnings. CFLAGS += $(CFLAGS_WARN) @@ -294,6 +302,7 @@ $(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G) $(QUIETLY) [ -f $(LIBJVM_G).1 ] || ln -s $@.1 $(LIBJVM_G).1 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifneq ($(STRIP_POLICY),no_strip) # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. # Clear the SHF_ALLOC flag (if set) from empty section headers. # An empty section header has sh_addr == 0 and sh_size == 0. @@ -305,6 +314,7 @@ # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available. # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJVM_DEBUGINFO) $@ + endif ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else @@ -315,9 +325,11 @@ endif $(QUIETLY) [ -f $(LIBJVM_G_DEBUGINFO) ] || ln -s $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) ifeq ($(ZIP_DEBUGINFO_FILES),1) + ifneq ($(STRIP_POLICY),no_strip) $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) $(RM) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO) [ -f $(LIBJVM_G_DIZ) ] || { ln -s $(LIBJVM_DIZ) $(LIBJVM_G_DIZ); } + endif endif endif endif # filter -sbfast -xsbfast
--- a/make/windows/makefiles/vm.make Tue Jul 31 10:41:41 2012 -0700 +++ b/make/windows/makefiles/vm.make Mon Aug 06 14:20:29 2012 +0100 @@ -83,6 +83,14 @@ # Define that so jni.h is on correct side CXX_FLAGS=$(CXX_FLAGS) /D "_JNI_IMPLEMENTATION_" +!ifdef DERIVATIVE_ID +CPP_FLAGS = $(CPP_FLAGS) /D "DERIVATIVE_ID=\"$(DERIVATIVE_ID)\"" +!endif + +!ifdef DISTRIBUTION_ID +CPP_FLAGS = $(CPP_FLAGS) /D "DISTRIBUTION_ID=\"$(DISTRIBUTION_ID)\"" +!endif + !if "$(BUILDARCH)" == "ia64" STACK_SIZE="/STACK:1048576,262144" !else
--- a/src/cpu/x86/vm/c2_globals_x86.hpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/cpu/x86/vm/c2_globals_x86.hpp Mon Aug 06 14:20:29 2012 +0100 @@ -89,7 +89,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);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cpu/zero/vm/deoptimizerFrame_zero.hpp Mon Aug 06 14:20:29 2012 +0100 @@ -0,0 +1,53 @@ +/* + * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008 Red Hat, Inc. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +// | ... | +// +--------------------+ ------------------ +// | frame_type | low addresses +// | next_frame | high addresses +// +--------------------+ ------------------ +// | ... | + +class DeoptimizerFrame : public ZeroFrame { + private: + DeoptimizerFrame() : ZeroFrame() { + ShouldNotCallThis(); + } + + protected: + enum Layout { + header_words = jf_header_words + }; + + public: + static DeoptimizerFrame *build(ZeroStack* stack); + + public: + void identify_word(int frame_index, + int offset, + char* fieldbuf, + char* valuebuf, + int buflen) const; +};
--- a/src/cpu/zero/vm/methodHandles_zero.hpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/cpu/zero/vm/methodHandles_zero.hpp Mon Aug 06 14:20:29 2012 +0100 @@ -1,6 +1,6 @@ /* * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Red Hat, Inc. + * Copyright 2011, 2012 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,3 +29,18 @@ adapter_code_size = 0 }; +class RicochetFrame : public ResourceObj { + friend class MethodHandles; + private: + /* + RF field x86 SPARC + sender_pc *(rsp+0) I7-0x8 + sender_link rbp I6+BIAS + exact_sender_sp rsi/r13 I5_savedSP + conversion *(rcx+&amh_conv) L5_conv + saved_args_base rax L4_sab (cf. Gargs = G4) + saved_args_layout #NULL L3_sal + saved_target *(rcx+&mh_vmtgt) L2_stgt + continuation #STUB_CON L1_cont + */ +};
--- a/src/cpu/zero/vm/sharedRuntime_zero.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/cpu/zero/vm/sharedRuntime_zero.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -1,6 +1,6 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. + * Copyright 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,6 +47,7 @@ #endif + int SharedRuntime::java_calling_convention(const BasicType *sig_bt, VMRegPair *regs, int total_args_passed, @@ -96,22 +97,23 @@ ShouldNotCallThis(); } +JRT_LEAF(void, zero_stub()) + ShouldNotCallThis(); +JRT_END + + static RuntimeStub* generate_empty_runtime_stub(const char* name) { - CodeBuffer buffer(name, 0, 0); - return RuntimeStub::new_runtime_stub(name, &buffer, 0, 0, NULL, false); + return CAST_FROM_FN_PTR(RuntimeStub*,zero_stub); } static SafepointBlob* generate_empty_safepoint_blob() { - CodeBuffer buffer("handler_blob", 0, 0); - return SafepointBlob::create(&buffer, NULL, 0); + return NULL; } static DeoptimizationBlob* generate_empty_deopt_blob() { - CodeBuffer buffer("handler_blob", 0, 0); - return DeoptimizationBlob::create(&buffer, NULL, 0, 0, 0, 0); + return NULL; } - void SharedRuntime::generate_deopt_blob() { _deopt_blob = generate_empty_deopt_blob(); } @@ -124,6 +126,7 @@ return generate_empty_runtime_stub("resolve_blob"); } + int SharedRuntime::c_calling_convention(const BasicType *sig_bt, VMRegPair *regs, int total_args_passed) {
--- a/src/os/linux/vm/os_linux.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/os/linux/vm/os_linux.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -1889,7 +1889,8 @@ {EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"}, {EM_MIPS, EM_MIPS, ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"}, {EM_PARISC, EM_PARISC, ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"}, - {EM_68K, EM_68K, ELFCLASS32, ELFDATA2MSB, (char*)"M68k"} + {EM_68K, EM_68K, ELFCLASS32, ELFDATA2MSB, (char*)"M68k"}, + {EM_SH, EM_SH, ELFCLASS32, ELFDATA2LSB, (char*)"SH"} /* Support little endian only*/ }; #if (defined IA32) @@ -1920,9 +1921,11 @@ static Elf32_Half running_arch_code=EM_MIPS; #elif (defined M68K) static Elf32_Half running_arch_code=EM_68K; + #elif (defined SH) + static Elf32_Half running_arch_code=EM_SH; #else #error Method os::dll_load requires that one of following is defined:\ - IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K + IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH #endif // Identify compatability class for VM's architecture and library's architecture @@ -2007,6 +2010,37 @@ return true; } +bool _print_lsb_file(const char* filename, outputStream* st) { + int fd = open(filename, O_RDONLY); + if (fd == -1) { + return false; + } + + char buf[512], *d_i, *d_r, *d_c; + int bytes; + + if ((bytes = read(fd, buf, sizeof(buf)-1)) == sizeof(buf)-1) { + close(fd); + return false; + } + close(fd); + + buf[bytes] = '\n'; + buf[bytes+1] = '\0'; + d_i = strstr(buf, "DISTRIB_ID="); + d_r = strstr(buf, "DISTRIB_RELEASE="); + d_c = strstr(buf, "DISTRIB_CODENAME="); + if (!d_i || !d_r || !d_c) { + return false; + } + d_i = strchr(d_i, '=') + 1; *strchrnul(d_i, '\n') = '\0'; + d_r = strchr(d_r, '=') + 1; *strchrnul(d_r, '\n') = '\0'; + d_c = strchr(d_c, '=') + 1; *strchrnul(d_c, '\n') = '\0'; + st->print("%s %s (%s)", d_i, d_r, d_c); + + return true; +} + void os::print_dll_info(outputStream *st) { st->print_cr("Dynamic libraries:"); @@ -2063,6 +2097,7 @@ !_print_ascii_file("/etc/SuSE-release", st) && !_print_ascii_file("/etc/turbolinux-release", st) && !_print_ascii_file("/etc/gentoo-release", st) && + !_print_lsb_file("/etc/lsb-release", st) && !_print_ascii_file("/etc/debian_version", st) && !_print_ascii_file("/etc/ltib-release", st) && !_print_ascii_file("/etc/angstrom-version", st)) {
--- a/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -28,7 +28,16 @@ #include "runtime/os.hpp" #include "runtime/threadLocalStorage.hpp" -#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
--- a/src/share/vm/asm/codeBuffer.hpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/asm/codeBuffer.hpp Mon Aug 06 14:20:29 2012 +0100 @@ -93,7 +93,7 @@ address _locs_point; // last relocated position (grows upward) bool _locs_own; // did I allocate the locs myself? bool _frozen; // no more expansion of this section - char _index; // my section number (SECT_INST, etc.) + signed char _index; // my section number (SECT_INST, etc.) CodeBuffer* _outer; // enclosing CodeBuffer // (Note: _locs_point used to be called _last_reloc_offset.)
--- a/src/share/vm/ci/ciTypeFlow.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/ci/ciTypeFlow.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -403,7 +403,7 @@ // Set the rest of the locals to bottom. Cell cell = state->next_cell(state->tos()); state->set_stack_size(0); - int limit = state->limit_cell(); + Cell limit = state->limit_cell(); for (; cell < limit; cell = state->next_cell(cell)) { state->set_type_at(cell, state->bottom_type()); }
--- a/src/share/vm/classfile/systemDictionary.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/classfile/systemDictionary.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -2252,7 +2252,6 @@ // Better never do a GC while we're holding these oops No_Safepoint_Verifier nosafepoint; - klassOop klass1 = find_class(d_index1, d_hash1, constraint_name, class_loader1); klassOop klass2 = find_class(d_index2, d_hash2, constraint_name, class_loader2); return constraints()->add_entry(constraint_name, klass1, class_loader1,
--- a/src/share/vm/compiler/methodLiveness.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/compiler/methodLiveness.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -572,15 +572,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; @@ -998,7 +998,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();
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -957,7 +957,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) { @@ -6276,7 +6276,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() && @@ -6569,7 +6569,7 @@ return; } // Double capacity if possible - size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax); + size_t new_capacity = MIN2((size_t) _capacity*2, (size_t) MarkStackSizeMax); // 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(
--- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -5407,7 +5407,7 @@ G1PPRL_SUM_BYTE_FORMAT("region-size"), g1_committed.start(), g1_committed.end(), g1_reserved.start(), g1_reserved.end(), - HeapRegion::GrainBytes); + (size_t)HeapRegion::GrainBytes); _out->print_cr(G1PPRL_LINE_PREFIX); _out->print_cr(G1PPRL_LINE_PREFIX G1PPRL_TYPE_H_FORMAT
--- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -897,8 +897,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);
--- a/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -69,7 +69,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:
--- a/src/share/vm/memory/collectorPolicy.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/memory/collectorPolicy.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -330,7 +330,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");
--- a/src/share/vm/memory/threadLocalAllocBuffer.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/memory/threadLocalAllocBuffer.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -243,7 +243,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();
--- a/src/share/vm/opto/cfgnode.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/opto/cfgnode.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -941,6 +941,8 @@ { assert(ft == _type, ""); } // Uplift to interface else if( !t->empty() && ttkp && ttkp->is_loaded() && ttkp->klass()->is_interface() ) { assert(ft == _type, ""); } // Uplift to interface + else if( !t->empty() && ttkp && ttkp->is_loaded() && ttkp->klass()->is_interface() ) + { assert(ft == _type, ""); } // Uplift to interface // Otherwise it's something stupid like non-overlapping int ranges // found on dying counted loops. else
--- a/src/share/vm/opto/type.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/opto/type.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -2577,6 +2577,8 @@ return kills; // Uplift to interface if (!empty() && ktkp != NULL && ktkp->klass()->is_loaded() && ktkp->klass()->is_interface()) return kills; // Uplift to interface + if (!empty() && ktkp != NULL && ktkp->klass()->is_loaded() && ktkp->klass()->is_interface()) + return kills; // Uplift to interface return Type::TOP; // Canonical empty value }
--- a/src/share/vm/prims/jni.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/prims/jni.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -4488,7 +4488,7 @@ if (!directBufferSupportInitializeEnded) { if (!initializeDirectBufferSupport(env, thread)) { #ifndef USDT2 - DTRACE_PROBE1(hotspot_jni, NewDirectByteBuffer__return, NULL); + DTRACE_PROBE1(hotspot_jni, NewDirectByteBuffer__return, (uintptr_t) NULL); #else /* USDT2 */ HOTSPOT_JNI_NEWDIRECTBYTEBUFFER_RETURN( NULL);
--- a/src/share/vm/prims/jvmtiEnv.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/prims/jvmtiEnv.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -2794,6 +2794,9 @@ (*entry_count_ptr) = num_entries; (*table_ptr) = jvmti_table; + if (num_entries == 0) + return JVMTI_ERROR_ABSENT_INFORMATION; + return JVMTI_ERROR_NONE; } /* end GetLineNumberTable */
--- a/src/share/vm/runtime/arguments.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/runtime/arguments.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -53,8 +53,7 @@ #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp" #endif -// Note: This is a special bug reporting site for the JVM -#define DEFAULT_VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/crash.jsp" +#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla" #define DEFAULT_JAVA_LAUNCHER "generic" char** Arguments::_jvm_flags_array = NULL; @@ -1165,7 +1164,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); } @@ -1194,8 +1193,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("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
--- a/src/share/vm/runtime/globals.hpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/runtime/globals.hpp Mon Aug 06 14:20:29 2012 +0100 @@ -3209,7 +3209,7 @@ product(uintx, InitialHeapSize, 0, \ "Initial heap size (in bytes); zero means OldSize + NewSize") \ \ - product(uintx, MaxHeapSize, ScaleForWordSize(96*M), \ + product(uintx, MaxHeapSize, ScaleForWordSize(512*M), \ "Maximum heap size (in bytes)") \ \ product(uintx, OldSize, ScaleForWordSize(4*M), \
--- a/src/share/vm/runtime/os.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/runtime/os.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -1101,6 +1101,9 @@ "%/lib/jsse.jar:" "%/lib/jce.jar:" "%/lib/charsets.jar:" + "%/lib/netx.jar:" + "%/lib/plugin.jar:" + "%/lib/rhino.jar:" "%/lib/jfr.jar:" #ifdef __APPLE__ "%/lib/JObjC.jar:"
--- a/src/share/vm/runtime/vmStructs.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/runtime/vmStructs.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -827,10 +827,10 @@ /* CodeBlobs (NOTE: incomplete, but only a little) */ \ /***************************************************/ \ \ - X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_pc, address)) \ - X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _exact_sender_sp, intptr_t*)) \ - X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_link, intptr_t*)) \ - X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _saved_args_base, intptr_t*)) \ + NOT_ZERO(X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_pc, address))) \ + NOT_ZERO(X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _exact_sender_sp, intptr_t*))) \ + NOT_ZERO(X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_link, intptr_t*))) \ + NOT_ZERO(X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _saved_args_base, intptr_t*))) \ \ static_field(SharedRuntime, _ricochet_blob, RicochetBlob*) \ \ @@ -2529,7 +2529,7 @@ /* frame */ \ /**********************/ \ \ - X86_ONLY(declare_constant(frame::entry_frame_call_wrapper_offset)) \ + NOT_ZERO(X86_ONLY(declare_constant(frame::entry_frame_call_wrapper_offset))) \ declare_constant(frame::pc_return_offset) \ \ /*************/ \
--- a/src/share/vm/shark/sharkCompiler.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/shark/sharkCompiler.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -1,6 +1,6 @@ /* * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2008, 2009, 2010, 2011 Red Hat, Inc. + * Copyright 2008, 2009, 2010, 2011, 2012 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -319,7 +319,7 @@ // finish with the exception of the VM thread, so we can consider // ourself the owner of the execution engine lock even though we // can't actually acquire it at this time. - assert(Thread::current()->is_VM_thread(), "must be called by VM thread"); + assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode"); assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); SharkEntry *entry = (SharkEntry *) code;
--- a/src/share/vm/utilities/bitMap.hpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/utilities/bitMap.hpp Mon Aug 06 14:20:29 2012 +0100 @@ -79,7 +79,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).
--- a/src/share/vm/utilities/macros.hpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/utilities/macros.hpp Mon Aug 06 14:20:29 2012 +0100 @@ -177,6 +177,22 @@ #define NOT_WIN64(code) code #endif +#if defined(ZERO) +#define ZERO_ONLY(code) code +#define NOT_ZERO(code) +#else +#define ZERO_ONLY(code) +#define NOT_ZERO(code) code +#endif + +#if defined(SHARK) +#define SHARK_ONLY(code) code +#define NOT_SHARK(code) +#else +#define SHARK_ONLY(code) +#define NOT_SHARK(code) code +#endif + #if defined(IA32) || defined(AMD64) #define X86 #define X86_ONLY(code) code
--- a/src/share/vm/utilities/ostream.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/utilities/ostream.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -1047,7 +1047,7 @@ server.sin_port = htons(port); server.sin_addr.s_addr = inet_addr(ip); - if (server.sin_addr.s_addr == (uint32_t)-1) { + if (server.sin_addr.s_addr == (in_addr_t)-1) { struct hostent* host = os::get_host_by_name((char*)ip); if (host != NULL) { memcpy(&server.sin_addr, host->h_addr_list[0], host->h_length);
--- a/src/share/vm/utilities/vmError.cpp Tue Jul 31 10:41:41 2012 -0700 +++ b/src/share/vm/utilities/vmError.cpp Mon Aug 06 14:20:29 2012 +0100 @@ -192,7 +192,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 on 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 @@ -458,6 +459,13 @@ UseCompressedOops ? "compressed oops" : "" ); +#ifdef DERIVATIVE_ID + st->print_cr("# Derivative: %s", DERIVATIVE_ID); +#endif +#ifdef DISTRIBUTION_ID + st->print_cr("# Distribution: %s", DISTRIBUTION_ID); +#endif + STEP(60, "(printing problematic frame)") // Print current frame if we have a context (i.e. it's a crash)
--- a/test/runtime/6929067/Test6929067.sh Tue Jul 31 10:41:41 2012 -0700 +++ b/test/runtime/6929067/Test6929067.sh Mon Aug 06 14:20:29 2012 +0100 @@ -42,7 +42,31 @@ ;; esac -LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/i386/client:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH +COMP_FLAG="-m32" + +# Test if JDK is 32 or 64 bits +${TESTJAVA}/bin/java -d64 -version 2> /dev/null + +if [ $? -eq 0 ] +then + COMP_FLAG="-m64" +fi + +# Get ARCH specifics +ARCH=`uname -m` +case "$ARCH" in + x86_64) + ARCH=amd64 + ;; + i586) + ARCH=i386 + ;; + i686) + ARCH=i386 +esac + +LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${ARCH}/client:${TESTJAVA}/jre/lib/${ARCH}/server:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH THIS_DIR=`pwd` @@ -55,6 +79,13 @@ ${TESTJAVA}${FS}bin${FS}javac T.java -gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${TESTJAVA}/jre/lib/i386/client/libjvm.so +echo "Architecture: ${ARCH}" +echo "Compilation flag: ${COMP_FLAG}" + +gcc ${COMP_FLAG} -o invoke \ +-L${TESTJAVA}/jre/lib/${ARCH}/client \ +-L${TESTJAVA}/jre/lib/${ARCH}/server \ +-ljvm -lpthread -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c + ./invoke exit $?
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/runtime/7020373/GenOOMCrashClass.java Mon Aug 06 14:20:29 2012 +0100 @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2011, Red Hat Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This code is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +import java.applet.Applet; +import java.io.IOException; + +import com.sun.org.apache.bcel.internal.Constants; +import com.sun.org.apache.bcel.internal.generic.AALOAD; +import com.sun.org.apache.bcel.internal.generic.ACONST_NULL; +import com.sun.org.apache.bcel.internal.generic.ALOAD; +import com.sun.org.apache.bcel.internal.generic.ArrayType; +import com.sun.org.apache.bcel.internal.generic.ClassGen; +import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; +import com.sun.org.apache.bcel.internal.generic.GOTO; +import com.sun.org.apache.bcel.internal.generic.ICONST; +import com.sun.org.apache.bcel.internal.generic.IFEQ; +import com.sun.org.apache.bcel.internal.generic.ILOAD; +import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; +import com.sun.org.apache.bcel.internal.generic.ISTORE; +import com.sun.org.apache.bcel.internal.generic.InstructionHandle; +import com.sun.org.apache.bcel.internal.generic.InstructionList; +import com.sun.org.apache.bcel.internal.generic.JSR; +import com.sun.org.apache.bcel.internal.generic.MethodGen; +import com.sun.org.apache.bcel.internal.generic.RETURN; +import com.sun.org.apache.bcel.internal.generic.Type; + + +public class GenOOMCrashClass { + + public static String genOOMCrashClass(int maxmeth, int nums/*String[] a*/) throws Exception { + String theClassFile = "OOMCrashClass"+nums+"_"+maxmeth; + ClassGen cg = new ClassGen(theClassFile, "java.applet.Applet", + "<generated>", Constants.ACC_PUBLIC | Constants.ACC_SUPER, null); + ConstantPoolGen cp = cg.getConstantPool(); // cg creates constant pool + + // int br0 = cp.addClass("marc.schoenefeld.2008"); + + int br2 = cp.addMethodref("java.lang.Integer", "parseInt", + "(Ljava/lang/String;)I"); + + Type[] argtype = new Type[] { + new ArrayType(Type.STRING, 1) + }; + + for (int j = 0; j < maxmeth; j++) { + + InstructionList il = new InstructionList(); + + String methodName = maxmeth == 1 ? "main" : "main" + j; + MethodGen mg = new MethodGen(Constants.ACC_STATIC + | Constants.ACC_PUBLIC,// access flags + Type.VOID, // return type + argtype, new String[] { "argv" }, // arg + // names + methodName, theClassFile, // method, class + il, cp); + + il.append(new ALOAD(0)); + il.append(new ICONST(0)); + il.append(new AALOAD()); // load something unpredictable, no folding + // please + + il.append(new INVOKESTATIC(br2)); + il.append(new ISTORE(1)); + + GOTO gototail = new GOTO(null); + + il.append(gototail); + + InstructionHandle ret = il.append(new RETURN()); + InstructionHandle ih = null; + for (int i = 0; i < nums; i++) { + ih = il.append(new ILOAD(1)); + IFEQ ifeq = new IFEQ(null); + il.append(ifeq); + + JSR jsr = new JSR(null); + GOTO next = new GOTO(null); + + InstructionHandle h_jsr = il.append(jsr); + InstructionHandle h_goto = il.append(next); + InstructionHandle h_ret = il.append(new RETURN()); + + InstructionHandle danach = il.append(new ACONST_NULL()); + jsr.setTarget(h_ret); + next.setTarget(danach); + + il.append(new GOTO(ih)); + ifeq.setTarget(ret); + ret = ih; + } + + gototail.setTarget(ih); + + mg.setMaxStack(Integer.MAX_VALUE); // Needed stack size + + mg.setMaxLocals(); + cg.addMethod(mg.getMethod()); + } + /* Add public <init> method, i.e. empty constructor */ + cg.addEmptyConstructor(Constants.ACC_PUBLIC); + + /* Get JavaClass object and dump it to file. */ + try { + System.out.println("dumping:"+theClassFile); + cg.getJavaClass().dump(theClassFile + ".class"); + } catch (java.io.IOException e) { + System.err.println(e); + } + return theClassFile; + } + + public static void main(String[] a) throws Exception { + int maxmeth_default = 250; + int nums_default = 20; + int maxmeth; + int nums; + try { + maxmeth = Integer.parseInt(a[0]); + } + catch (Exception e) { + maxmeth = maxmeth_default; + } + try { + nums = Integer.parseInt(a[1]); + } + catch (Exception e) { + nums = nums_default; + } + String classname = genOOMCrashClass(maxmeth,nums); + System.out.println("Generated"); + // System.out.println(a[0]); + // System.out.println("Loading"); + + // long t = System.currentTimeMillis(); + // Class g2 = Class.forName(classname); + // long u = System.currentTimeMillis(); + // System.out.println(g2 + ":" + (u - t)); + } + +}
--- a/test/runtime/7020373/Test7020373.sh Tue Jul 31 10:41:41 2012 -0700 +++ b/test/runtime/7020373/Test7020373.sh Mon Aug 06 14:20:29 2012 +0100 @@ -61,8 +61,13 @@ ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version -${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar +# first step: compile GenOOMCrash generator +${TESTJAVA}${FS}bin${FS}javac GenOOMCrashClass.java +# second step: run the generator to create test class +${TESTJAVA}${FS}bin${FS}java GenOOMCrashClass 1 4000 + +# third step: run the reproducer ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} OOMCrashClass4000_1 > test.out 2>&1 cat test.out