- After installing
- Fedora 9
- you need to make sure you have
- the "Software Development" bundle installed, plus the
- following packages:
-
-
-
cups devel: Cups Development Package
-
freetype 2.3+ devel: Freetype 2.3 Development Package
-
hg: Mercurial, if you need to clone or manage source repositories
-
ksh: May be needed when using webrev
-
+
Fedora 9
+
+
+ After installing Fedora 9
+ you need to install several build dependencies. The simplest
+ way to do it is to execute the following commands as user
+ root:
+
+ yum-builddep java-openjdk
+
+ yum install gcc gcc-c++
+
+ In addition, it's necessary to set a few environment variables for the build:
+
+
+ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk
-
- Always a good idea to do a complete Software Update/Refresh
- after you get all the packages installed.
+
Fedora 10
+
+
+ After installing Fedora 10
+ you need to install several build dependencies. The simplest
+ way to do it is to execute the following commands as user
+ root:
+
+ yum-builddep java-1.6.0-openjdk
+
+ yum install gcc gcc-c++
+
+ In addition, it's necessary to set a few environment variables for the build:
+
+
+ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk
+
+
Fedora 11
+
+
+ After installing Fedora 11
+ you need to install several build dependencies. The simplest
+ way to do it is to execute the following commands as user
+ root:
+
+ yum-builddep java-1.6.0-openjdk
+
+ yum install gcc gcc-c++
+
+ In addition, it's necessary to set a few environment variables for the build:
+
+
+ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk
+
- In addition to needing the Bootstrap JDK and the Binary Plugs,
- when building on Ubuntu you will need to
- make sure certain packages are installed.
- In particular, certain X11 packages, make, m4, gawk, gcc 4,
- binutils, cups, freetype
- and alsa.
-
-
Ubuntu 6.06
+
Debian 5.0 (Lenny)
- The following list of packages for Ubuntu 6.06 is a working set that
- does appear to work.
-
- Note that it's quite possible that some of these
- packages are not required, so anyone discovering that some of the
- packages listed below are NOT required,
- please let the
- OpenJDK
- team know.
-
- All the packages below can be installed with the
- Synaptic Package manager provided with the base Ubuntu 6.06 release.
-
-
-
binutils (2.16.1cvs20060117-1ubuntu2.1)
-
cpp (4:4.0.3-1)
-
cpp-4.0 (4.0.3-1ubuntu5)
-
libfreetype6-dev
-
g++ (4:4.0.3-1)
-
g++-4.0 (4.0.3-1ubuntu5)
-
gawk (1:3.1.5-2build1)
-
gcc (4:4.0.3-1)
-
gcc-4.0 (4.0.3-1ubuntu5)
-
libasound2-dev (1.0.10-2ubuntu4)
-
libc6 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4
-
libc6-dev (2.3.6-0ubuntu20.4)
-
libc6-i686 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4
-
libcupsys2-dev (1.2.2-0ubuntu0.6.06)
-
libgcrypt11-dev (1.2.2-1)
-
libgnutls-dev (1.2.9-2ubuntu1.1)
-
libgnutls12 (1.2.9-2ubuntu1) to 1.2.9-2ubuntu1.1
-
libgpg-error-dev (1.1-4)
-
libice-dev (2:1.0.0-0ubuntu2)
-
liblockfile1 (1.06.1)
-
libopencdk8-dev (0.5.7-2)
-
libpopt-dev (1.7-5)
-
libsm-dev (2:1.0.0-0ubuntu2)
-
libstdc++6-4.0-dev (4.0.3-1ubuntu5)
-
libtasn1-2-dev (0.2.17-1ubuntu1)
-
libx11-dev (2:1.0.0-0ubuntu9)
-
libxau-dev (1:1.0.0-0ubuntu4)
-
libxaw-headers (2:1.0.1-0ubuntu3)
-
libxaw7-dev (2:1.0.1-0ubuntu3)
-
libxdmcp-dev (1:1.0.0-0ubuntu2)
-
libxext-dev (2:1.0.0-0ubuntu4)
-
libxi-dev (2:1.0.0-0ubuntu3)
-
libxmu-dev (2:1.0.0-0ubuntu3)
-
libxmu-headers (2:1.0.0-0ubuntu3)
-
libxmuu-dev (2:1.0.0-0ubuntu3)
-
libxp-dev (6.8.2-11ubuntu2)
-
libxpm-dev (1:3.5.4.2-0ubuntu3)
-
libxrandr-dev (1:1.1.0.2-0ubuntu4)
-
libxt-dev (1:1.0.0-0ubuntu3)
-
libxtrap-dev (2:1.0.0-0ubuntu2)
-
libxtst-dev (2:1.0.1-0ubuntu2)
-
libxv-dev (2:1.0.1-0ubuntu3)
-
linux-kernel-headers (2.6.11.2-0ubuntu18)
-
m4 (1.4.4-1)
-
make (3.80+3.81.b4-1)
-
ssl-cert (1.0.13)
-
x-dev (7.0.4-0ubuntu2)
-
x11proto-core-dev (7.0.4-0ubuntu2)
-
x11proto-input-dev (1.3.2-0ubuntu2)
-
x11proto-kb-dev (1.0.2-0ubuntu2)
-
x11proto-randr-dev (1.1.2-0ubuntu2)
-
x11proto-record-dev (1.13.2-0ubuntu2)
-
x11proto-trap-dev (3.4.3-0ubuntu2)
-
x11proto-video-dev (2.2.2-0ubuntu2)
-
x11proto-xext-dev (7.0.2-0ubuntu2)
-
xlibs-dev (7.0.0-0ubuntu45)
-
zlib1g-dev (1:1.2.3-6ubuntu4)
-
-
-
-
Ubuntu 7.04
-
- Using the Synaptic Package Manager, download the following
- packages (double indented packages are automatically aquired
- due to package dependencies):
-
-
-
build-essential
-
-
dpkg-dev
-
g++
-
g++-4.1
-
libc6-dev
-
libstdc++6.4.1-dev
-
linux-libc-dev
-
-
gawk
-
m4
-
libasound2-dev
-
libcupsys2-dev
-
-
libgcrypt11-dev
-
lgnutls-dev
-
libgpg-error-dev
-
liblzo-dev
-
libopencdk8-dev
-
libpopt-dev
-
libtasn1-3-dev
-
zlib1g-dev
-
-
sun-java6-jdk
-
-
java-common
-
libltdl3
-
odbcinst1debian1
-
sun-java6-bin
-
sun-java6-jre
-
unixodbc
-
-
xlibs-dev
-
-
(many)
-
-
x11proto-print-dev
-
libxaw7-dev
-
-
libxaw-headers
-
-
libxp-dev
-
libfreetype6-dev
-
-
+
+ After installing Debian 5
+ you need to install several build dependencies.
+ The simplest way to install the build dependencies is to
+ execute the following commands as user root:
+
+ aptitude build-dep openjdk-6
+
+ aptitude install openjdk-6-jdk libmotif-dev
+
+ In addition, it's necessary to set a few environment variables for the build:
+
+ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk
+
+ After installing Ubuntu 8.04
+ you need to install several build dependencies.
+
+ First, you need to enable the universe repository in the
+ Software Sources application and reload the repository
+ information. The Software Sources application is available
+ under the System/Administration menu.
+
+ The simplest way to install the build dependencies is to
+ execute the following commands:
+
+ sudo aptitude build-dep openjdk-6
+
+ sudo aptitude install openjdk-6-jdk
+
+ In addition, it's necessary to set a few environment variables for the build:
+
+ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk
+
+
Ubuntu 8.10
+
+
+ After installing Ubuntu 8.10
+ you need to install several build dependencies. The simplest
+ way to do it is to execute the following commands:
+
+ sudo aptitude build-dep openjdk-6
+
+ sudo aptitude install openjdk-6-jdk
+
+ In addition, it's necessary to set a few environment variables for the build:
+
+ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk
+
+
Ubuntu 9.04
+
+
+ After installing Ubuntu 9.04
+ you need to install several build dependencies. The simplest
+ way to do it is to execute the following commands:
+
+ sudo aptitude build-dep openjdk-6
+
+ sudo aptitude install openjdk-6-jdk
+
+ In addition, it's necessary to set a few environment variables for the build:
+
+ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk
+
+ After installing OpenSUSE 11.1
+ you need to install several build dependencies.
+ The simplest way to install the build dependencies is to
+ execute the following commands:
+
+ sudo zypper source-install -d java-1_6_0-openjdk
+
+ sudo zypper install make
+
+ In addition, it is necessary to set a few environment variables for the build:
+
+ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk
+
+ Finally, you need to unset the JAVA_HOME environment variable:
+
+ export -n JAVA_HOME
+
+ After installing Mandriva Linux One 2009 Spring
+ you need to install several build dependencies.
+ The simplest way to install the build dependencies is to
+ execute the following commands as user root:
+
+ urpmi java-1.6.0-openjdk-devel ant make gcc gcc-c++ freetype-devel zip unzip libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel libxtst6-devel libxi-devel
+
+ In addition, it is necessary to set a few environment variables for the build:
+
+ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk
+
+ After installing OpenSolaris 2009.06
+ you need to install several build dependencies.
+ The simplest way to install the build dependencies is to
+ execute the following commands:
+
+ pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2
+
+ In addition, it is necessary to set a few environment variables for the build:
+
+ export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/
+
+ Finally, you need to make sure that the build process can find the Sun Studio compilers:
+
+ export PATH=$PATH:/opt/SunStudioExpress/bin/
+
diff --git a/corba/.hgtags b/corba/.hgtags
index f9f88d9a708..2f4903da41f 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -46,3 +46,4 @@ a12ea7c7b497b4ba7830550095ef633bd6f43971 jdk7-b67
8120d308ec4e805c5588b8d9372844d781c4112d jdk7-b69
175bd68779546078dbdb6dacd7f0aced79ed22b1 jdk7-b70
3f1ef7f899ea2aec189c4fb67e5c8fa374437c50 jdk7-b71
+c793a31209263fbb867c23c752599d85c21abb73 jdk7-b72
diff --git a/corba/make/Makefile b/corba/make/Makefile
index d986cc3251f..b2178145b64 100644
--- a/corba/make/Makefile
+++ b/corba/make/Makefile
@@ -141,12 +141,12 @@ $(CLASSES_JAR):
#----- src.zip
-SRC_ZIP_FILES = $(shell $(FIND) $(SRC_CLASSES_DIR) \( -name SCCS -o -name \*-template \) -prune -o -type f -print )
+SRC_ZIP_FILES = $(shell $(FIND) $(SRC_CLASSES_DIR) \( -name \*-template \) -prune -o -type f -print )
SRC_ZIP = $(LIB_DIR)/src.zip
$(SRC_ZIP): $(SRC_ZIP_FILES)
abs_src_zip=`cd $(@D) ; pwd`/$(@F) ; \
- ( cd $(SRC_CLASSES_DIR) ; $(FIND) . \( -name SCCS -o -name \*-template \) -prune -o -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ; \
+ ( cd $(SRC_CLASSES_DIR) ; $(FIND) . \( -name \*-template \) -prune -o -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ; \
( cd $(GENSRC_DIR) ; $(FIND) . -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ;
#----- bin.zip
diff --git a/corba/make/common/BuildToolJar.gmk b/corba/make/common/BuildToolJar.gmk
index 7d4ad4169fc..dee6038abcf 100644
--- a/corba/make/common/BuildToolJar.gmk
+++ b/corba/make/common/BuildToolJar.gmk
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2009 Sun Microsystems, 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
@@ -24,22 +24,29 @@
#
# Input: BUILDDIR PACKAGE PKGDIR PROGRAM BUILDTOOL_SOURCE_ROOT BUILDTOOL_MAIN
-
+
+# All subdirectories under the package root for the tool (max depth 4)
+_WC_DIRS = * */* */*/* */*/*/*
+
BUILDTOOL_MAIN_SOURCE_FILE = $(BUILDTOOL_SOURCE_ROOT)/$(BUILDTOOL_MAIN)
BUILDTOOL_MANIFEST_FILE = $(BUILDTOOLCLASSDIR)/$(PROGRAM)_manifest.mf
BUILDTOOL_JAR_FILE = $(BUILDTOOLJARDIR)/$(PROGRAM).jar
-BUILDTOOL_ALL_FILES := $(shell $(CD) $(BUILDTOOL_SOURCE_ROOT) \
- && $(FIND) $(PKGDIR) $(SCM_DIRS_prune) -o -type f -print)
-BUILTTOOL_MAINCLASS = $(subst /,.,$(BUILDTOOL_MAIN:%.java=%))
+BUILTTOOL_MAINCLASS = $(subst /,.,$(BUILDTOOL_MAIN:%.java=%))
-all build: $(BUILDTOOL_JAR_FILE) tool_info
+# Wildcard patterns that find all the sources for this build tool
+BUILDTOOL_WC_PATTERNS = $(BUILDTOOL_SOURCE_ROOT)/$(PKGDIR)/*.java \
+ $(patsubst %, $(BUILDTOOL_SOURCE_ROOT)/$(PKGDIR)/%/*.java, $(_WC_DIRS))
+
+# Wildcard expansion that finds all the files
+BUILDTOOL_SRC_FILES := $(wildcard $(BUILDTOOL_WC_PATTERNS))
+
+all build: $(BUILDTOOL_JAR_FILE)
$(BUILDTOOL_MANIFEST_FILE): $(BUILDTOOL_MAIN_SOURCE_FILE)
@$(prep-target)
$(ECHO) "Main-Class: $(BUILTTOOL_MAINCLASS)" > $@
-$(BUILDTOOL_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) \
- $(BUILDTOOL_ALL_FILES:%=$(BUILDTOOL_SOURCE_ROOT)/%)
+$(BUILDTOOL_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) $(BUILDTOOL_SRC_FILES)
@$(prep-target)
@$(MKDIR) -p $(BUILDTOOLCLASSDIR)
$(BOOT_JAVAC_CMD) -d $(BUILDTOOLCLASSDIR) \
@@ -49,23 +56,8 @@ $(BUILDTOOL_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) \
$(JAR_JFLAGS) || $(RM) $@
@$(java-vm-cleanup)
-# Printing out a build tool information line
-define printBuildToolSetting
-if [ "$2" != "" ] ; then $(PRINTF) "%-25s %s\n" "$1:" "$2"; fi
-endef
-
-# Print out the build tool information
-tool_info:
- @$(ECHO) "========================================================="
- @$(call printBuildToolSetting,BUILDTOOL,$(PROGRAM))
- @$(call printBuildToolSetting,PACKAGE,$(PACKAGE))
- @$(call printBuildToolSetting,BUILDTOOL_SOURCE_ROOT,$(BUILDTOOL_SOURCE_ROOT))
- @$(call printBuildToolSetting,BUILTTOOL_MAINCLASS,$(BUILTTOOL_MAINCLASS))
- @$(call printBuildToolSetting,BUILDTOOL_JAR_FILE,$(BUILDTOOL_JAR_FILE))
- @$(ECHO) "========================================================="
-
clean clobber::
- $(RM) -r $(BUILDTOOLCLASSDIR)/$(PKGDIR)
- $(RM) $(BUILDTOOL_MANIFEST_FILE)
- $(RM) $(BUILDTOOL_JAR_FILE)
+ $(RM) -r $(BUILDTOOLCLASSDIR)/$(PKGDIR) \
+ $(BUILDTOOL_MANIFEST_FILE) \
+ $(BUILDTOOL_JAR_FILE)
diff --git a/corba/make/common/CancelImplicits.gmk b/corba/make/common/CancelImplicits.gmk
index 73417af1925..2e291e5e83e 100644
--- a/corba/make/common/CancelImplicits.gmk
+++ b/corba/make/common/CancelImplicits.gmk
@@ -1,5 +1,5 @@
#
-# Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2009 Sun Microsystems, 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
@@ -56,11 +56,3 @@ ifndef USE_IMPLICITS
%: %.sh
endif
-#
-# If you are using RCS, you must set the variable USE_RCS at the make
-# command line. Otherwise we disable RCS.
-#
-ifndef USE_RCS
-%:: %,v
-%:: RCS/%,v
-endif
diff --git a/corba/make/common/Defs.gmk b/corba/make/common/Defs.gmk
index 7fc4c26c67e..f020ef7f8d5 100644
--- a/corba/make/common/Defs.gmk
+++ b/corba/make/common/Defs.gmk
@@ -1,5 +1,5 @@
#
-# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1995-2009 Sun Microsystems, 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
@@ -310,125 +310,32 @@ endef
SUBDIRS_MAKEFLAGS-clobber = INCREMENTAL_BUILD=false
SUBDIRS_MAKEFLAGS-clean = INCREMENTAL_BUILD=false
-# Current directory
-CURRENT_DIRECTORY := $(shell $(PWD))
-
-# If no timing wanted, we need to define these as empty
-ifdef NO_TIMING
-
-TIMING_ID:=NA
-
-define TIMING_start
-t=0:0:0:0
-endef
-
-define TIMING_end
-time_used=0
-endef
-
-else # NO_TIMING
-
-# Default timing id
-TIMING_ID:=$(shell $(BASENAME) $(CURRENT_DIRECTORY))
-
-# Timing start (must be used in same shell, e.g. same command line)
-# Defines the shell variable $1 to have the start time.
-define TIMING_start
-$1=`$(DATE) +%j:%H:%M:%S`
-endef
-
-# Timing end (must be used in same shell, e.g. same command line)
-# Expects shell variable $1 to have been defined as the start time.
-# Expects shell variable $2 to have timing id string
-# Sets total_seconds shell variable as the total seconds used.
-# Sets time_used shell variable to contain format "%dh%dm%ds"
-define TIMING_end
-begTime="$${$1}"; \
-timing_id="$${$2}"; \
-endTime=`$(DATE) +%j:%H:%M:%S`; \
-d1=`$(ECHO) $${begTime} | $(CUT) -d':' -f1 | $(SED) -e 's@^0*@@'`; \
-if [ "$${d1}" = "" ] ; then d1=0; fi; \
-h1=`$(ECHO) $${begTime} | $(CUT) -d':' -f2 | $(SED) -e 's@^0*@@'`; \
-if [ "$${h1}" = "" ] ; then h1=0; fi; \
-m1=`$(ECHO) $${begTime} | $(CUT) -d':' -f3 | $(SED) -e 's@^0*@@'`; \
-if [ "$${m1}" = "" ] ; then m1=0; fi; \
-s1=`$(ECHO) $${begTime} | $(CUT) -d':' -f4 | $(SED) -e 's@^0*@@'`; \
-if [ "$${s1}" = "" ] ; then s1=0; fi; \
-d2=`$(ECHO) $${endTime} | $(CUT) -d':' -f1 | $(SED) -e 's@^0*@@'`; \
-if [ "$${d2}" = "" ] ; then d2=0; fi; \
-h2=`$(ECHO) $${endTime} | $(CUT) -d':' -f2 | $(SED) -e 's@^0*@@'`; \
-if [ "$${h2}" = "" ] ; then h2=0; fi; \
-m2=`$(ECHO) $${endTime} | $(CUT) -d':' -f3 | $(SED) -e 's@^0*@@'`; \
-if [ "$${m2}" = "" ] ; then m2=0; fi; \
-s2=`$(ECHO) $${endTime} | $(CUT) -d':' -f4 | $(SED) -e 's@^0*@@'`; \
-if [ "$${s2}" = "" ] ; then s2=0; fi; \
-t1_secs=`$(EXPR) $${d1} '*' 60 '*' 60 '*' 24 '+' $${h1} '*' 60 '*' 60 \
- '+' $${m1} '*' 60 '+' $${s1}`; \
-t2_secs=`$(EXPR) $${d2} '*' 60 '*' 60 '*' 24 '+' $${h2} '*' 60 '*' 60 \
- '+' $${m2} '*' 60 '+' $${s2}`; \
-total_seconds=`$(EXPR) $${t2_secs} '-' $${t1_secs}`; \
-if [ "$${total_seconds}" -lt 0 ] ; then total_seconds=0; fi; \
-t_hour=`$(EXPR) $${total_seconds} '/' '(' 60 '*' 60 ')'`h; \
-t_min=`$(EXPR) '(' $${total_seconds} '%' '(' 60 '*' 60 ')' ')' '/' 60`m; \
-t_sec=`$(EXPR) $${total_seconds} '%' 60`s; \
-time_used=$${t_sec}; \
-if [ "$${t_hour}" != "0h" ] ; then \
-time_used=$${t_hour}$${t_min}$${t_sec}; \
-elif [ "$${t_min}" != "0m" ] ; then \
-time_used=$${t_min}$${t_sec}; \
-else \
-time_used=$${t_sec}; \
-fi; \
-$(PRINTF) " Timing: %05d seconds or %s for %s\n" \
- $${total_seconds} $${time_used} $${timing_id}
-endef
-
-endif # NO_TIMING
-
# Given a SUBDIRS list, cd into them and make them
# SUBDIRS_MAKEFLAGS Make settings for a subdir make
# SUBDIRS_MAKEFLAGS-$@ Make settings specific to this target
define SUBDIRS-loop
-@$(ECHO) "Begin Processing SUBDIRS: $(SUBDIRS)"
@for i in DUMMY $(SUBDIRS) ; do \
if [ "$$i" != "DUMMY" ] ; then \
- $(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \
- timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \
- $(call TIMING_start,startTime); \
- curDir=$(CURRENT_DIRECTORY); \
- $(CD) $$i; $(MAKE) $@ TIMING_ID=$${timing_id} \
- $(SUBDIRS_MAKEFLAGS) \
- $(SUBDIRS_MAKEFLAGS-$@) \
- FULL_VERSION=$(FULL_VERSION) \
- RELEASE=$(RELEASE) || exit 1; \
- $(CD) $${curDir}; \
- $(call TIMING_end,startTime,timing_id); \
- $(ECHO) "<<>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \
- timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \
- $(call TIMING_start,startTime); \
- curDir=$(CURRENT_DIRECTORY); \
- $(CD) $$i; $(MAKE) $@ TIMING_ID=$${timing_id} \
- $(OTHERSUBDIRS_MAKEFLAGS) \
- FULL_VERSION=$(FULL_VERSION) \
- RELEASE=$(RELEASE) || exit 1; \
- $(CD) $${curDir}; \
- $(call TIMING_end,startTime,timing_id); \
- $(ECHO) "<<> $(WARNING_FILE)
- @$(ECHO) " This file may be from an unresolved Teamware conflict." >> $(WARNING_FILE)
- @$(ECHO) " This is also a symptom of a Teamware bringover/putback failure" >> $(WARNING_FILE)
- @$(ECHO) " in which SCCS files are updated but not checked out." >> $(WARNING_FILE)
- @$(ECHO) " Check for other out of date files in your workspace." >> $(WARNING_FILE)
- @$(ECHO) "" >> $(WARNING_FILE)
- @#exit 666
+# Prevent the use of many default suffix rules we do not need
+.SUFFIXES:
+.SUFFIXES: .c .o .h .obj .cpp .hpp .java .class
+# Make sure we are all insane
ifdef INSANE
export INSANE
endif
-ifdef ALT_COPYRIGHT_YEAR
- COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR)
-else
- COPYRIGHT_YEAR = $(shell $(DATE) '+%Y')
+# Make sure we have the current year
+ifndef COPYRIGHT_YEAR
+ ifdef ALT_COPYRIGHT_YEAR
+ COPYRIGHT_YEAR := $(ALT_COPYRIGHT_YEAR)
+ else
+ COPYRIGHT_YEAR := $(shell $(DATE) '+%Y')
+ endif
+ export COPYRIGHT_YEAR
endif
# Install of imported file (JDK_IMPORT_PATH, or some other external location)
diff --git a/corba/make/common/Rules.gmk b/corba/make/common/Rules.gmk
index 0598f08df88..571e6f8486d 100644
--- a/corba/make/common/Rules.gmk
+++ b/corba/make/common/Rules.gmk
@@ -27,17 +27,6 @@
#
# Rules shared by all Java makefiles.
#
-# Used to apply to source file $<, checks code conventions, issues warnings.
-define check-conventions
- if [ "$(CONVENTION_WATCH)" = "true" ] ; then \
- if [ "`$(CAT) -n -v -t $< | $(EGREP) -v '\@\(\#\)' | $(EGREP) '\^[MLI]'`" != "" ] ; then \
- $(ECHO) "WARNING: File contains tabs, ^M, or ^L characters: $<"; \
- if [ "$(CONVENTION_DETAILS)" = "true" ] ; then \
- $(CAT) -n -v -t $< | $(EGREP) -v '\@\(\#\)' | $(EGREP) '\^[MLI]' ; \
- fi; \
- fi; \
- fi
-endef
# Make sure the default rule is all
rules_default_rule: all
@@ -162,7 +151,6 @@ JAVA_SOURCE_LIST=$(TEMPDIR)/.classes.list
# Add a java source to the list
define add-java-file
$(ECHO) "$?" >> $(JAVA_SOURCE_LIST)
-$(check-conventions)
endef
$(CLASSDESTDIR)/%.class: $(GENSRCDIR)/%.java
@@ -197,11 +185,8 @@ JAVAC_PREFER_SOURCE = -Xprefer:source
.compile.classlist : $(JAVA_SOURCE_LIST)
@$(MKDIR) -p $(CLASSDESTDIR)
- @if [ `$(CAT) $(JAVA_SOURCE_LIST) | $(WC) -l` -ge 1 ] ; then \
- $(ECHO) "# Java sources to be compiled: (listed in file $(JAVA_SOURCE_LIST))"; \
+ if [ -s $(JAVA_SOURCE_LIST) ] ; then \
$(CAT) $(JAVA_SOURCE_LIST); \
- $(ECHO) "# Running javac:"; \
- $(ECHO) $(JAVAC_CMD) $(JAVAC_PREFER_SOURCE) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
$(JAVAC_CMD) $(JAVAC_PREFER_SOURCE) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
fi
@$(java-vm-cleanup)
@@ -220,10 +205,7 @@ endif
packages.clean:
ifeq ($(DONT_CLOBBER_CLASSES),false)
ifdef AUTO_FILES_JAVA_DIRS
- @for sdir in $(AUTO_FILES_JAVA_DIRS); do \
- $(ECHO) "$(RM) -r $(CLASSDESTDIR)/$$sdir"; \
- $(RM) -r $(CLASSDESTDIR)/$$sdir; \
- done
+ $(RM) -r $(patsubst %, $(CLASSDESTDIR)/%, $(AUTO_FILES_JAVA_DIRS))
else
$(RM) -r $(CLASSDESTDIR)/$(PKGDIR)
endif
@@ -259,15 +241,13 @@ classheaders: classes $(CLASSHDR_DOTFILE)
$(CLASSHDR_DOTFILE): $(CLASSES_export)
$(prep-target)
- @$(ECHO) "# Running javah:"
$(JAVAH_CMD) -d $(CLASSHDRDIR)/ \
$(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner))
@$(java-vm-cleanup)
@$(TOUCH) $@
classheaders.clean:
- $(RM) $(CLASSHDR_DOTFILE)
- $(RM) -r $(CLASSHDRDIR)
+ $(RM) -r $(CLASSHDRDIR) $(CLASSHDR_DOTFILE)
else # FILES_export
diff --git a/corba/make/common/shared/Compiler-msvc.gmk b/corba/make/common/shared/Compiler-msvc.gmk
index 048ca78eb51..b9c779f0f37 100644
--- a/corba/make/common/shared/Compiler-msvc.gmk
+++ b/corba/make/common/shared/Compiler-msvc.gmk
@@ -48,11 +48,17 @@ ifeq ($(PLATFORM), windows)
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
# Compiler version and type (Always get word after "Version")
- CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
-
+ ifndef CC_VER
+ CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
+ export CC_VER
+ endif
+
# SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
ifeq ($(ARCH_DATA_MODEL), 32)
- LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
+ ifndef LINK_VER
+ LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
+ export LINK_VER
+ endif
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
ifeq ($(CC_MAJORVER), 13)
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
@@ -93,7 +99,10 @@ ifeq ($(PLATFORM), windows)
endif
else
# else ARCH_DATA_MODEL is 64
- LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
+ ifndef LINK_VER
+ LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
+ export LINK_VER
+ endif
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
CC_MINORVER :=$(call MinorVersion,$(CC_VER))
CC_MICROVER :=$(call MicroVersion,$(CC_VER))
diff --git a/corba/make/common/shared/Defs-utils.gmk b/corba/make/common/shared/Defs-utils.gmk
index 51bdb660372..67b17795e45 100644
--- a/corba/make/common/shared/Defs-utils.gmk
+++ b/corba/make/common/shared/Defs-utils.gmk
@@ -116,7 +116,6 @@ RC = $(UTILS_COMMAND_PATH)rc
RMDIR = $(UTILS_COMMAND_PATH)rmdir
RPM = $(UTILS_COMMAND_PATH)rpm
RPMBUILD = $(UTILS_COMMAND_PATH)rpmbuild
-SCCS = $(UTILS_CCS_BIN_PATH)sccs
SED = $(UTILS_COMMAND_PATH)sed
SH = $(UTILS_COMMAND_PATH)sh
SHOWREV = $(UTILS_USR_BIN_PATH)showrev
diff --git a/corba/make/common/shared/Defs-windows.gmk b/corba/make/common/shared/Defs-windows.gmk
index 3e1fad1226a..8f09e3ca9d0 100644
--- a/corba/make/common/shared/Defs-windows.gmk
+++ b/corba/make/common/shared/Defs-windows.gmk
@@ -113,32 +113,38 @@ _system_drive:=$(call CheckValue,_system_drive,C:)
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifdef ALT_UNIXCOMMAND_PATH
- xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
- fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
- UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
-else
- ifdef USING_CYGWIN
- UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
+ifndef UNIXCOMMAND_PATH
+ ifdef ALT_UNIXCOMMAND_PATH
+ xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
+ fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
+ UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
else
- ifdef ROOTDIR
- xROOTDIR :="$(subst \,/,$(ROOTDIR))"
- _rootdir :=$(call FullPath,$(xROOTDIR))
+ ifdef USING_CYGWIN
+ UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
else
- xROOTDIR :="$(_system_drive)/mksnt"
- _rootdir :=$(call FullPath,$(xROOTDIR))
- endif
- ifneq ($(_rootdir),)
- UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
+ ifdef ROOTDIR
+ xROOTDIR :="$(subst \,/,$(ROOTDIR))"
+ _rootdir :=$(call FullPath,$(xROOTDIR))
+ else
+ xROOTDIR :="$(_system_drive)/mksnt"
+ _rootdir :=$(call FullPath,$(xROOTDIR))
+ endif
+ ifneq ($(_rootdir),)
+ UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
+ endif
endif
endif
+ UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
+ export UNIXCOMMAND_PATH
endif
-UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
# Get version of MKS or CYGWIN
ifdef USING_CYGWIN
-_CYGWIN_VER :=$(shell $(UNAME))
-CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER))
+ ifndef CYGWIN_VER
+ _CYGWIN_VER :=$(shell $(UNAME))
+ CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER))
+ export CYGWIN_VER
+ endif
else # MKS
_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
MKS_VER :=$(call GetVersion,$(_MKS_VER))
@@ -168,235 +174,234 @@ endif # MKS
# Process Windows values into FullPath values, these paths may have \ chars
-# System root
-ifdef SYSTEMROOT
- xSYSTEMROOT :="$(subst \,/,$(SYSTEMROOT))"
- _system_root :=$(call FullPath,$(xSYSTEMROOT))
-else
- ifdef SystemRoot
- xSYSTEMROOT :="$(subst \,/,$(SystemRoot))"
- _system_root :=$(call FullPath,$(xSYSTEMROOT))
+# Program Files directory
+ifndef SHORTPROGRAMFILES
+ ifdef PROGRAMFILES
+ xPROGRAMFILES :="$(subst \,/,$(PROGRAMFILES))"
else
- ifdef WINDIR
- xWINDIR :="$(subst \,/,$(WINDIR))"
- _system_root :=$(call FullPath,$(xWINDIR))
+ ifeq ($(ARCH_DATA_MODEL), 32)
+ xPROGRAMFILES :="$(_system_drive)/Program Files"
else
- ifdef windir
- xWINDIR :="$(subst \,/,$(windir))"
- _system_root :=$(call FullPath,$(xWINDIR))
- endif
+ xPROGRAMFILES :="$(_system_drive)/Program Files (x86)"
endif
endif
-endif
-_system_root:=$(call CheckValue,_system_root,$(_system_drive)/WINNT)
-
-# Program Files directory
-ifdef PROGRAMFILES
- xPROGRAMFILES :="$(subst \,/,$(PROGRAMFILES))"
-else
ifeq ($(ARCH_DATA_MODEL), 32)
- xPROGRAMFILES :="$(_system_drive)/Program Files"
+ SHORTPROGRAMFILES :=$(call FullPath,$(xPROGRAMFILES))
else
- xPROGRAMFILES :="$(_system_drive)/Program Files (x86)"
+ ifdef PROGRAMW6432
+ xPROGRAMW6432 :="$(subst \,/,$(PROGRAMW6432))"
+ else
+ xPROGRAMW6432 :="$(_system_drive)/Program Files"
+ endif
+ SHORTPROGRAMFILES :=$(call FullPath,$(xPROGRAMW6432))
endif
-endif
-ifeq ($(ARCH_DATA_MODEL), 32)
- _program_files :=$(call FullPath,$(xPROGRAMFILES))
-else
- ifdef PROGRAMW6432
- xPROGRAMW6432 :="$(subst \,/,$(PROGRAMW6432))"
- else
- xPROGRAMW6432 :="$(_system_drive)/Program Files"
+ ifneq ($(word 1,$(SHORTPROGRAMFILES)),$(SHORTPROGRAMFILES))
+ SHORTPROGRAMFILES :=
endif
- _program_files :=$(call FullPath,$(xPROGRAMW6432))
- _program_files32 :=$(call FullPath,$(xPROGRAMFILES))
- ifneq ($(word 1,$(_program_files32)),$(_program_files32))
- _program_files32:=
- endif
-endif
-ifneq ($(word 1,$(_program_files)),$(_program_files))
- _program_files:=
+ export SHORTPROGRAMFILES
endif
# Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit]
ifeq ($(ARCH_DATA_MODEL), 32)
- # Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat)
- ifdef MSVCDIR
- xMSVCDIR :="$(subst \,/,$(MSVCDIR))"
- _msvc_dir :=$(call FullPath,$(xMSVCDIR))
- else
- ifdef MSVCDir
- xMSVCDIR :="$(subst \,/,$(MSVCDir))"
- _msvc_dir :=$(call FullPath,$(xMSVCDIR))
+ ifndef SHORTMSVCDIR
+ # Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat)
+ ifdef MSVCDIR
+ xMSVCDIR :="$(subst \,/,$(MSVCDIR))"
+ SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
else
- ifneq ($(_program_files),)
- xMSVCDIR :="$(_program_files)/Microsoft Visual Studio .NET 2003/Vc7"
- _msvc_dir :=$(call FullPath,$(xMSVCDIR))
+ ifdef MSVCDir
+ xMSVCDIR :="$(subst \,/,$(MSVCDir))"
+ SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
+ else
+ ifneq ($(SHORTPROGRAMFILES),)
+ xMSVCDIR :="$(SHORTPROGRAMFILES)/Microsoft Visual Studio .NET 2003/Vc7"
+ SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
+ endif
endif
endif
- endif
- ifneq ($(subst MSDev98,OLDOLDOLD,$(_msvc_dir)),$(_msvc_dir))
- _msvc_dir :=
- endif
- # If we still don't have it, look for VS71COMNTOOLS, setup by installer?
- ifeq ($(_msvc_dir),)
- ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
- xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
- _vs71tools :=$(call FullPath,$(xVS71COMNTOOLS))
+ ifneq ($(subst MSDev98,OLDOLDOLD,$(SHORTMSVCDIR)),$(SHORTMSVCDIR))
+ SHORTMSVCDIR :=
endif
- ifneq ($(_vs71tools),)
- _msvc_dir :=$(_vs71tools)/../../Vc7
+ # If we still don't have it, look for VS71COMNTOOLS, setup by installer?
+ ifeq ($(SHORTMSVCDIR),)
+ ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
+ xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
+ _vs71tools :=$(call FullPath,$(xVS71COMNTOOLS))
+ endif
+ ifneq ($(_vs71tools),)
+ SHORTMSVCDIR :=$(_vs71tools)/../../Vc7
+ endif
endif
+ export SHORTMSVCDIR
endif
- ifneq ($(_msvc_dir),)
- _compiler_bin :=$(_msvc_dir)/Bin
- _redist_sdk :=$(_msvc_dir)/../SDK/v1.1/Bin
- _ms_sdk :=$(_msvc_dir)/PlatformSDK
+ ifneq ($(SHORTMSVCDIR),)
+ SHORTCOMPILERBIN :=$(SHORTMSVCDIR)/Bin
+ SHORTPSDK :=$(SHORTMSVCDIR)/PlatformSDK
+ export SHORTCOMPILERBIN
+ export SHORTPSDK
endif
endif
# The Microsoft Platform SDK installed by itself
-ifneq ($(_program_files),)
- xPSDK :="$(_program_files)/Microsoft Platform SDK"
- _psdk :=$(call FullPath,$(xPSDK))
- ifeq ($(_psdk),)
- xPSDK :="$(_program_files)/Microsoft SDK"
- _psdk :=$(call FullPath,$(xMSSDK))
+ifneq ($(SHORTPROGRAMFILES),)
+ ifndef SHORTPSDK
+ xPSDK :="$(SHORTPROGRAMFILES)/Microsoft Platform SDK"
+ SHORTPSDK :=$(call FullPath,$(xPSDK))
+ ifeq ($(SHORTPSDK),)
+ xPSDK :="$(SHORTPROGRAMFILES)/Microsoft SDK"
+ SHORTPSDK :=$(call FullPath,$(xMSSDK))
+ endif
+ export SHORTPSDK
endif
endif
# If no SDK found yet, look in other places
-ifeq ($(_ms_sdk),)
+ifndef SHORTPSDK
ifdef MSSDK
- xMSSDK :="$(subst \,/,$(MSSDK))"
- _ms_sdk :=$(call FullPath,$(xMSSDK))
+ xMSSDK :="$(subst \,/,$(MSSDK))"
+ SHORTPSDK :=$(call FullPath,$(xMSSDK))
else
ifdef MSSdk
- xMSSDK :="$(subst \,/,$(MSSdk))"
- _ms_sdk :=$(call FullPath,$(xMSSDK))
- else
- _ms_sdk :=$(_psdk)
+ xMSSDK :="$(subst \,/,$(MSSdk))"
+ SHORTPSDK :=$(call FullPath,$(xMSSDK))
endif
endif
+ export SHORTPSDK
endif
# Compilers for 64bit are from SDK
ifeq ($(ARCH_DATA_MODEL), 64)
- xMSSDK61 :="C:/Program Files/Microsoft SDKs/Windows/v6.1/"
- MSSDK61 :=$(call FullPath,$(xMSSDK61))
- xVS2008 :="C:/Program Files (x86)/Microsoft Visual Studio 9.0/"
- _vs2008 :=$(call FullPath,$(xVS2008))
- ifneq ($(_vs2008),)
- ifeq ($(ARCH), ia64)
- _compiler_bin :=$(_vs2008)/VC/Bin/x86_ia64
- endif
- ifeq ($(ARCH), amd64)
- _compiler_bin :=$(_vs2008)/VC/Bin/$(ARCH)
- _redist_sdk :=$(MSSDK61)/VC/redist
- endif
- else
- ifneq ($(_ms_sdk),)
+ ifndef SHORTCOMPILERBIN
+ xMSSDK61 :="C:/Program Files/Microsoft SDKs/Windows/v6.1/"
+ MSSDK61 :=$(call FullPath,$(xMSSDK61))
+ xVS2008 :="C:/Program Files (x86)/Microsoft Visual Studio 9.0/"
+ _vs2008 :=$(call FullPath,$(xVS2008))
+ ifneq ($(_vs2008),)
ifeq ($(ARCH), ia64)
- _compiler_bin :=$(_ms_sdk)/Bin/Win64
+ SHORTCOMPILERBIN :=$(_vs2008)/VC/Bin/x86_ia64
endif
ifeq ($(ARCH), amd64)
- _compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH)
- _redist_sdk :=$(_ms_sdk)/redist/win64/AMD64
+ SHORTCOMPILERBIN :=$(_vs2008)/VC/Bin/$(ARCH)
+ endif
+ else
+ ifneq ($(SHORTPSDK),)
+ ifeq ($(ARCH), ia64)
+ SHORTCOMPILERBIN :=$(SHORTPSDK)/Bin/Win64
+ endif
+ ifeq ($(ARCH), amd64)
+ SHORTCOMPILERBIN :=$(SHORTPSDK)/Bin/Win64/x86/$(ARCH)
+ endif
endif
endif
+ export SHORTCOMPILERBIN
endif
endif
# Location on system where jdk installs might be
-ifneq ($(_program_files),)
- USRJDKINSTANCES_PATH =$(_program_files)/Java
+ifneq ($(SHORTPROGRAMFILES),)
+ USRJDKINSTANCES_PATH =$(SHORTPROGRAMFILES)/Java
else
USRJDKINSTANCES_PATH =$(_system_drive)/
endif
# SLASH_JAVA: location of all network accessable files
-ifdef ALT_SLASH_JAVA
- xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
- SLASH_JAVA :=$(call FullPath,$(xALT_SLASH_JAVA))
-else
- ifdef ALT_JDK_JAVA_DRIVE
- SLASH_JAVA =$(JDK_JAVA_DRIVE)
+ifndef SLASH_JAVA
+ ifdef ALT_SLASH_JAVA
+ xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
+ SLASH_JAVA :=$(call FullPath,$(xALT_SLASH_JAVA))
else
- SLASH_JAVA =J:
+ ifdef ALT_JDK_JAVA_DRIVE
+ SLASH_JAVA =$(JDK_JAVA_DRIVE)
+ else
+ SLASH_JAVA =J:
+ endif
endif
+ SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
+ SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
+ export SLASH_JAVA
endif
-SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
-SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
# JDK_DEVTOOLS_DIR: common path for all the java devtools
-ifdef ALT_JDK_DEVTOOLS_DIR
- xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
- JDK_DEVTOOLS_DIR :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
-else
- JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
+ifndef JDK_DEVTOOLS_DIR
+ ifdef ALT_JDK_DEVTOOLS_DIR
+ xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
+ JDK_DEVTOOLS_DIR :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
+ else
+ JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
+ endif
+ JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
+ JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
+ export JDK_DEVTOOLS_DIR
endif
-JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
-JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
# COMPILER_PATH: path to where the compiler and tools are installed.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifdef ALT_COMPILER_PATH
- xALT_COMPILER_PATH :="$(subst \,/,$(ALT_COMPILER_PATH))"
- fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
- COMPILER_PATH :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
-else
- COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin))
+ifndef COMPILER_PATH
+ ifdef ALT_COMPILER_PATH
+ xALT_COMPILER_PATH :="$(subst \,/,$(ALT_COMPILER_PATH))"
+ fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
+ COMPILER_PATH :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
+ else
+ COMPILER_PATH :=$(call PrefixPath,$(SHORTCOMPILERBIN))
+ endif
+ COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
+ export COMPILER_PATH
endif
-COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
# MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifdef ALT_MSDEVTOOLS_PATH
- xALT_MSDEVTOOLS_PATH :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
- fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
- MSDEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
-else
- ifeq ($(ARCH_DATA_MODEL), 64)
- ifdef MSTOOLS
- xMSTOOLS :="$(subst \,/,$(MSTOOLS))"
- _ms_tools :=$(call FullPath,$(xMSTOOLS))
- else
- ifdef Mstools
- xMSTOOLS :="$(subst \,/,$(Mstools))"
+ifndef MSDEVTOOLS_PATH
+ ifdef ALT_MSDEVTOOLS_PATH
+ xALT_MSDEVTOOLS_PATH :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
+ fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
+ MSDEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
+ else
+ ifeq ($(ARCH_DATA_MODEL), 64)
+ ifdef MSTOOLS
+ xMSTOOLS :="$(subst \,/,$(MSTOOLS))"
_ms_tools :=$(call FullPath,$(xMSTOOLS))
else
- _ms_tools :=
+ ifdef Mstools
+ xMSTOOLS :="$(subst \,/,$(Mstools))"
+ _ms_tools :=$(call FullPath,$(xMSTOOLS))
+ else
+ _ms_tools :=
+ endif
+ endif
+ ifneq ($(_ms_tools),)
+ _ms_tools_bin :=$(_ms_tools)/Bin
+ else
+ # Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
+ _ms_tools_bin :=$(SHORTCOMPILERBIN)/../../..
endif
- endif
- ifneq ($(_ms_tools),)
- _ms_tools_bin :=$(_ms_tools)/Bin
else
- # Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
- _ms_tools_bin :=$(_compiler_bin)/../../..
+ _ms_tools_bin :=$(SHORTCOMPILERBIN)
endif
- else
- _ms_tools_bin :=$(_compiler_bin)
+ MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
endif
- MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
+ MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
+ export MSDEVTOOLS_PATH
endif
-MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifdef ALT_DEVTOOLS_PATH
- xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
- fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
- DEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
-else
- ifdef USING_CYGWIN
- DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
+ifndef DEVTOOLS_PATH
+ ifdef ALT_DEVTOOLS_PATH
+ xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
+ fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
+ DEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
else
- xDEVTOOLS_PATH :="$(_system_drive)/utils"
- fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
- DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
+ ifdef USING_CYGWIN
+ DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
+ else
+ xDEVTOOLS_PATH :="$(_system_drive)/utils"
+ fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
+ DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
+ endif
endif
+ DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
+ export DEVTOOLS_PATH
endif
-DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
# _BOOTDIR2: Second choice
@@ -410,20 +415,26 @@ endif
# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
-ifdef ALT_BUILD_JDK_IMPORT_PATH
- BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
-else
- BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
+ifndef BUILD_JDK_IMPORT_PATH
+ ifdef ALT_BUILD_JDK_IMPORT_PATH
+ BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
+ else
+ BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
+ endif
+ BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
+ BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
+ export BUILD_JDK_IMPORT_PATH
endif
-BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
-BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
-ifdef ALT_JDK_IMPORT_PATH
- JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
-else
- JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
+ifndef JDK_IMPORT_PATH
+ ifdef ALT_JDK_IMPORT_PATH
+ JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
+ else
+ JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
+ endif
+ JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
+ JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
+ export JDK_IMPORT_PATH
endif
-JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
-JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
diff --git a/corba/make/common/shared/Defs.gmk b/corba/make/common/shared/Defs.gmk
index e5afa8eb8e3..652b56e9ef5 100644
--- a/corba/make/common/shared/Defs.gmk
+++ b/corba/make/common/shared/Defs.gmk
@@ -228,12 +228,15 @@ else
endif
# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
-ifdef BUILD_NUMBER
- FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
-else
- BUILD_NUMBER = b00
- USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`)
- FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
+ifndef FULL_VERSION
+ ifdef BUILD_NUMBER
+ FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
+ else
+ BUILD_NUMBER = b00
+ USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`)
+ FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
+ endif
+ export FULL_VERSION
endif
# Promoted build location
diff --git a/corba/make/common/shared/Platform.gmk b/corba/make/common/shared/Platform.gmk
index 18f3aa330ec..c444d06f802 100644
--- a/corba/make/common/shared/Platform.gmk
+++ b/corba/make/common/shared/Platform.gmk
@@ -84,21 +84,14 @@ PLATFORM_SHARED=done
# REQUIRED_LINUX_VER linux only: required version of linux
# REQUIRED_LINUX_FULLVER linux only: required full version of linux
-SYSTEM_UNAME := $(shell uname)
+ifndef SYSTEM_UNAME
+ SYSTEM_UNAME := $(shell uname)
+ export SYSTEM_UNAME
+endif
# Normal boot jdk is previous release, but a hard requirement is a 1.5 boot
REQUIRED_BOOT_VER = 1.5
-#
-# Prune out all known SCM (Source Code Management) directories
-# so they will not be included when copying directory trees
-# or packaging up .jar files, etc. This applies to all workspaces.
-#
-SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files
-# When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune:
-SCM_DIRS_rexp = ".hg|.svn|CVS|RCS|SCCS|Codemgr_wsdata|deleted_files"
-SCM_DIRS_prune = \( -name .hg -o -name .svn -o -name CVS -o -name RCS -o -name SCCS -o -name Codemgr_wsdata -o -name deleted_files \) -prune
-
# Don't define this unless it's not defined
ifndef VARIANT
VARIANT=OPT
@@ -372,14 +365,17 @@ ifeq ($(PLATFORM), windows)
REQUIRED_FREE_SPACE=500000
OS_VENDOR = Microsoft
# How much RAM does this machine have:
- MB_OF_MEMORY := $(shell \
- if [ -f "C:/cygwin/bin/free.exe" ] ; then \
- ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
- grep Mem: | \
- sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
- else \
- echo "512"; \
- fi)
+ ifndef MB_OF_MEMORY
+ MB_OF_MEMORY := $(shell \
+ if [ -f "C:/cygwin/bin/free.exe" ] ; then \
+ ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
+ grep Mem: | \
+ sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
+ else \
+ echo "512"; \
+ fi)
+ export MB_OF_MEMORY
+ endif
endif
# Machines with 512Mb or less of real memory are considered low memory
@@ -387,30 +383,36 @@ endif
# system swapping during the build.
# If we don't know, assume 512. Subtract 128 from MB for VM MAX.
# Don't set VM max over 1024-128=896.
-ifneq ($(MB_OF_MEMORY),)
- LOW_MEMORY_MACHINE := $(shell \
- if [ $(MB_OF_MEMORY) -le 512 ] ; then \
- echo "true"; \
- else \
- echo "false"; \
- fi)
- MAX_VM_MEMORY := $(shell \
- if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
- expr $(MB_OF_MEMORY) '-' 128 ; \
- else \
- echo "896"; \
- fi)
- MIN_VM_MEMORY := $(shell \
- if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
- expr $(MAX_VM_MEMORY) '-' 8 ; \
- else \
- echo "128"; \
- fi)
-else
- MB_OF_MEMORY := unknown
- LOW_MEMORY_MACHINE := true
- MAX_VM_MEMORY := 384
- MIN_VM_MEMORY := 128
+ifndef MAX_VM_MEMORY
+ ifneq ($(MB_OF_MEMORY),)
+ LOW_MEMORY_MACHINE := $(shell \
+ if [ $(MB_OF_MEMORY) -le 512 ] ; then \
+ echo "true"; \
+ else \
+ echo "false"; \
+ fi)
+ MAX_VM_MEMORY := $(shell \
+ if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
+ expr $(MB_OF_MEMORY) '-' 128 ; \
+ else \
+ echo "896"; \
+ fi)
+ MIN_VM_MEMORY := $(shell \
+ if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
+ expr $(MAX_VM_MEMORY) '-' 8 ; \
+ else \
+ echo "128"; \
+ fi)
+ else
+ MB_OF_MEMORY := unknown
+ LOW_MEMORY_MACHINE := true
+ MAX_VM_MEMORY := 384
+ MIN_VM_MEMORY := 128
+ endif
+ export MAX_VM_MEMORY
+ export MIN_VM_MEMORY
+ export LOW_MEMORY_MACHINE
+ export MAX_VM_MEMORY
endif
REQUIRED_ZIP_VER = 2.2
diff --git a/corba/make/jprt.properties b/corba/make/jprt.properties
index 928f5998a4c..d932b72d9a3 100644
--- a/corba/make/jprt.properties
+++ b/corba/make/jprt.properties
@@ -34,8 +34,8 @@ solaris_i586_5.10,\
solaris_x64_5.10,\
linux_i586_2.6,\
linux_x64_2.6,\
-windows_i586,\
-windows_x64
+windows_i586_5.0,\
+windows_x64_5.2
# The different build flavors we want
jprt.build.flavors=product,fastdebug
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index ea30f311bdb..7e23e9838ef 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -46,3 +46,4 @@ d07e68298d4e17ebf93d8299e43fcc3ded26472a jdk7-b68
54fd4d9232969ea6cd3d236e5ad276183bb0d423 jdk7-b69
0632c3e615a315ff11e2ab1d64f4d82ff9853461 jdk7-b70
50a95aa4a247f0cbbf66df285a8b1d78ffb153d9 jdk7-b71
+a94714c550658fd6741793ef036cb9625dc2ab1a jdk7-b72
diff --git a/hotspot/agent/make/saenv.sh b/hotspot/agent/make/saenv.sh
index 1487716b380..81faf5e3c94 100644
--- a/hotspot/agent/make/saenv.sh
+++ b/hotspot/agent/make/saenv.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2009 Sun Microsystems, 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
diff --git a/hotspot/agent/make/saenv64.sh b/hotspot/agent/make/saenv64.sh
index e28df4ee6ec..6990c4f5a0b 100644
--- a/hotspot/agent/make/saenv64.sh
+++ b/hotspot/agent/make/saenv64.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2009 Sun Microsystems, 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
diff --git a/hotspot/agent/src/os/solaris/proc/Makefile b/hotspot/agent/src/os/solaris/proc/Makefile
index 4696662aa6d..46013cf81c6 100644
--- a/hotspot/agent/src/os/solaris/proc/Makefile
+++ b/hotspot/agent/src/os/solaris/proc/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2002-2009 Sun Microsystems, 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
diff --git a/hotspot/agent/src/os/solaris/proc/mapfile b/hotspot/agent/src/os/solaris/proc/mapfile
index eaa63b0adf0..375b9180352 100644
--- a/hotspot/agent/src/os/solaris/proc/mapfile
+++ b/hotspot/agent/src/os/solaris/proc/mapfile
@@ -1,7 +1,7 @@
#
#
-# Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2009 Sun Microsystems, 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
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java
index e8ffd9bbf18..48cb4edbcd2 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2009 Sun Microsystems, 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
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/FreeChunk.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/FreeChunk.java
index db7628e196b..28b94a969c7 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/FreeChunk.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/FreeChunk.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2009 Sun Microsystems, 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
diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version
index 1e60768f056..c94aaa00b47 100644
--- a/hotspot/make/hotspot_version
+++ b/hotspot/make/hotspot_version
@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2009
HS_MAJOR_VER=17
HS_MINOR_VER=0
-HS_BUILD_NUMBER=01
+HS_BUILD_NUMBER=02
JDK_MAJOR_VER=1
JDK_MINOR_VER=7
diff --git a/hotspot/make/linux/makefiles/jvmti.make b/hotspot/make/linux/makefiles/jvmti.make
index 70b33efef11..68318914ddf 100644
--- a/hotspot/make/linux/makefiles/jvmti.make
+++ b/hotspot/make/linux/makefiles/jvmti.make
@@ -70,10 +70,10 @@ all: $(JvmtiGeneratedFiles)
both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl
$(JvmtiGenClass): $(JvmtiGenSource)
- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiGenSource)
+ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
$(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
+ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@
diff --git a/hotspot/make/linux/makefiles/mapfile-vers-debug b/hotspot/make/linux/makefiles/mapfile-vers-debug
index 63cce8b1535..65765b2963d 100644
--- a/hotspot/make/linux/makefiles/mapfile-vers-debug
+++ b/hotspot/make/linux/makefiles/mapfile-vers-debug
@@ -74,6 +74,7 @@ SUNWprivate_1.1 {
JVM_CurrentTimeMillis;
JVM_DefineClass;
JVM_DefineClassWithSource;
+ JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus;
JVM_DisableCompiler;
JVM_DoPrivileged;
diff --git a/hotspot/make/linux/makefiles/mapfile-vers-product b/hotspot/make/linux/makefiles/mapfile-vers-product
index 6a76dd9e97b..884cbd04528 100644
--- a/hotspot/make/linux/makefiles/mapfile-vers-product
+++ b/hotspot/make/linux/makefiles/mapfile-vers-product
@@ -74,6 +74,7 @@ SUNWprivate_1.1 {
JVM_CurrentTimeMillis;
JVM_DefineClass;
JVM_DefineClassWithSource;
+ JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus;
JVM_DisableCompiler;
JVM_DoPrivileged;
diff --git a/hotspot/make/linux/makefiles/rules.make b/hotspot/make/linux/makefiles/rules.make
index 6559388141c..825bd8519a6 100644
--- a/hotspot/make/linux/makefiles/rules.make
+++ b/hotspot/make/linux/makefiles/rules.make
@@ -122,12 +122,20 @@ endif
endif
endif
+COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS)
+
SUM = /usr/bin/sum
# 'gmake MAKE_VERBOSE=y' gives all the gory details.
QUIETLY$(MAKE_VERBOSE) = @
RUN.JAR$(MAKE_VERBOSE) += >/dev/null
+# Settings for javac
+BOOT_SOURCE_LANGUAGE_VERSION = 6
+BOOT_TARGET_CLASS_VERSION = 6
+JAVAC_FLAGS = -g -encoding ascii
+BOOTSTRAP_JAVAC_FLAGS = $(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
+
# With parallel makes, print a message at the end of compilation.
ifeq ($(findstring j,$(MFLAGS)),j)
COMPILE_DONE = && { echo Done with $<; }
diff --git a/hotspot/make/linux/makefiles/sa.make b/hotspot/make/linux/makefiles/sa.make
index eca293bb8c0..0b5b5ceff4c 100644
--- a/hotspot/make/linux/makefiles/sa.make
+++ b/hotspot/make/linux/makefiles/sa.make
@@ -74,8 +74,8 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
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 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
+ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -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)
diff --git a/hotspot/make/linux/makefiles/top.make b/hotspot/make/linux/makefiles/top.make
index 1c212c6d3b9..e8490fa0327 100644
--- a/hotspot/make/linux/makefiles/top.make
+++ b/hotspot/make/linux/makefiles/top.make
@@ -24,7 +24,7 @@
# top.make is included in the Makefile in the build directories.
# It DOES NOT include the vm dependency info in order to be faster.
-# It's main job is to implement the incremental form of make lists.
+# Its main job is to implement the incremental form of make lists.
# It also:
# -builds and runs adlc via adlc.make
# -generates JVMTI source and docs via jvmti.make (JSR-163)
@@ -114,7 +114,7 @@ vm_build_preliminaries: checks $(Incremental_Lists) $(AD_Files_If_Required) jvm
# make makeDeps: (and zap the cached db files to force a nonincremental run)
$(GENERATED)/$(MakeDepsClass): $(MakeDepsSources)
- @$(REMOTE) $(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps -g -d $(GENERATED) $(MakeDepsSources)
+ @$(REMOTE) $(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps -d $(GENERATED) $(MakeDepsSources)
@echo Removing $(Incremental_Lists) to force regeneration.
@rm -f $(Incremental_Lists)
@$(CDG) echo >$(Cached_plat)
diff --git a/hotspot/make/solaris/makefiles/jvmti.make b/hotspot/make/solaris/makefiles/jvmti.make
index dc4efa1e9fc..ec4160f658e 100644
--- a/hotspot/make/solaris/makefiles/jvmti.make
+++ b/hotspot/make/solaris/makefiles/jvmti.make
@@ -69,10 +69,10 @@ all: $(JvmtiGeneratedFiles)
both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl
$(JvmtiGenClass): $(JvmtiGenSource)
- $(QUIETLY) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiGenSource)
+ $(QUIETLY) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
$(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
- $(QUIETLY) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
+ $(QUIETLY) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers b/hotspot/make/solaris/makefiles/mapfile-vers
index 8c9d6883067..1f88096e4c3 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers
+++ b/hotspot/make/solaris/makefiles/mapfile-vers
@@ -74,6 +74,7 @@ SUNWprivate_1.1 {
JVM_CurrentTimeMillis;
JVM_DefineClass;
JVM_DefineClassWithSource;
+ JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus;
JVM_DisableCompiler;
JVM_DoPrivileged;
diff --git a/hotspot/make/solaris/makefiles/rules.make b/hotspot/make/solaris/makefiles/rules.make
index 56ff0e7d6b7..2ccff9dd850 100644
--- a/hotspot/make/solaris/makefiles/rules.make
+++ b/hotspot/make/solaris/makefiles/rules.make
@@ -122,12 +122,20 @@ endif
endif
endif
+COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS)
+
SUM = /usr/bin/sum
# 'gmake MAKE_VERBOSE=y' gives all the gory details.
QUIETLY$(MAKE_VERBOSE) = @
RUN.JAR$(MAKE_VERBOSE) += >/dev/null
+# Settings for javac
+BOOT_SOURCE_LANGUAGE_VERSION = 6
+BOOT_TARGET_CLASS_VERSION = 6
+JAVAC_FLAGS = -g -encoding ascii
+BOOTSTRAP_JAVAC_FLAGS = $(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
+
# With parallel makes, print a message at the end of compilation.
ifeq ($(findstring j,$(MFLAGS)),j)
COMPILE_DONE = && { echo Done with $<; }
diff --git a/hotspot/make/solaris/makefiles/sa.make b/hotspot/make/solaris/makefiles/sa.make
index f8c1bf416c0..c8b6bfc647d 100644
--- a/hotspot/make/solaris/makefiles/sa.make
+++ b/hotspot/make/solaris/makefiles/sa.make
@@ -67,8 +67,8 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
$(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
mkdir -p $(SA_CLASSDIR); \
fi
- $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES1)
- $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES2)
+ $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
+ $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2)
$(QUIETLY) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
diff --git a/hotspot/make/solaris/makefiles/top.make b/hotspot/make/solaris/makefiles/top.make
index 6affc873cf6..37f44106b29 100644
--- a/hotspot/make/solaris/makefiles/top.make
+++ b/hotspot/make/solaris/makefiles/top.make
@@ -24,7 +24,7 @@
# top.make is included in the Makefile in the build directories.
# It DOES NOT include the vm dependency info in order to be faster.
-# It's main job is to implement the incremental form of make lists.
+# Its main job is to implement the incremental form of make lists.
# It also:
# -builds and runs adlc via adlc.make
# -generates JVMTI source and docs via jvmti.make (JSR-163)
@@ -112,7 +112,7 @@ vm_build_preliminaries: checks $(Incremental_Lists) $(AD_Files_If_Required) jvm
# make makeDeps: (and zap the cached db files to force a nonincremental run)
$(GENERATED)/$(MakeDepsClass): $(MakeDepsSources)
- @$(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps -g -d $(GENERATED) $(MakeDepsSources)
+ @$(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps -d $(GENERATED) $(MakeDepsSources)
@echo Removing $(Incremental_Lists) to force regeneration.
@rm -f $(Incremental_Lists)
@$(CDG) echo >$(Cached_plat)
diff --git a/hotspot/make/windows/makefiles/generated.make b/hotspot/make/windows/makefiles/generated.make
index 3a99300f02d..4c3fb1f050e 100644
--- a/hotspot/make/windows/makefiles/generated.make
+++ b/hotspot/make/windows/makefiles/generated.make
@@ -91,7 +91,7 @@ includeDB.current Dependencies: classes/MakeDeps.class $(IncludeDBs)
classes/MakeDeps.class: $(MakeDepsSources)
if exist classes rmdir /s /q classes
mkdir classes
- $(COMPILE_JAVAC) -classpath $(WorkSpace)\src\share\tools\MakeDeps -g -d classes $(MakeDepsSources)
+ $(COMPILE_JAVAC) -classpath $(WorkSpace)\src\share\tools\MakeDeps -d classes $(MakeDepsSources)
!if ("$(Variant)" == "compiler2") || ("$(Variant)" == "tiered")
diff --git a/hotspot/make/windows/makefiles/jvmti.make b/hotspot/make/windows/makefiles/jvmti.make
index e0b22c04d3a..e8a76c55bd4 100644
--- a/hotspot/make/windows/makefiles/jvmti.make
+++ b/hotspot/make/windows/makefiles/jvmti.make
@@ -68,10 +68,10 @@ default::
@if not exist $(JvmtiOutDir) mkdir $(JvmtiOutDir)
$(JvmtiGenClass): $(JvmtiGenSource)
- $(COMPILE_JAVAC) -g -d $(JvmtiOutDir) $(JvmtiGenSource)
+ $(COMPILE_JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
$(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
- @$(COMPILE_JAVAC) -g -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
+ @$(COMPILE_JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@
diff --git a/hotspot/make/windows/makefiles/rules.make b/hotspot/make/windows/makefiles/rules.make
index 90815ace24c..2ddb4507f32 100644
--- a/hotspot/make/windows/makefiles/rules.make
+++ b/hotspot/make/windows/makefiles/rules.make
@@ -29,7 +29,7 @@ RUN_JAVA=$(BootStrapDir)\bin\java
RUN_JAVAP=$(BootStrapDir)\bin\javap
RUN_JAVAH=$(BootStrapDir)\bin\javah
RUN_JAR=$(BootStrapDir)\bin\jar
-COMPILE_JAVAC=$(BootStrapDir)\bin\javac
+COMPILE_JAVAC=$(BootStrapDir)\bin\javac $(BOOTSTRAP_JAVAC_FLAGS)
COMPILE_RMIC=$(BootStrapDir)\bin\rmic
BOOT_JAVA_HOME=$(BootStrapDir)
!else
@@ -37,11 +37,17 @@ RUN_JAVA=java
RUN_JAVAP=javap
RUN_JAVAH=javah
RUN_JAR=jar
-COMPILE_JAVAC=javac
+COMPILE_JAVAC=javac $(BOOTSTRAP_JAVAC_FLAGS)
COMPILE_RMIC=rmic
BOOT_JAVA_HOME=
!endif
+# Settings for javac
+BOOT_SOURCE_LANGUAGE_VERSION=6
+BOOT_TARGET_CLASS_VERSION=6
+JAVAC_FLAGS=-g -encoding ascii
+BOOTSTRAP_JAVAC_FLAGS=$(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
+
ProjectFile=vm.vcproj
!if "$(MSC_VER)" == "1200"
diff --git a/hotspot/make/windows/makefiles/sa.make b/hotspot/make/windows/makefiles/sa.make
index 734f2259432..96b357eaf6d 100644
--- a/hotspot/make/windows/makefiles/sa.make
+++ b/hotspot/make/windows/makefiles/sa.make
@@ -55,9 +55,9 @@ default:: $(GENERATED)\sa-jdi.jar
$(GENERATED)\sa-jdi.jar: $(AGENT_FILES1:/=\) $(AGENT_FILES2:/=\)
@if not exist $(SA_CLASSDIR) mkdir $(SA_CLASSDIR)
@echo ...Building sa-jdi.jar
- @echo ...$(COMPILE_JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -g -d $(SA_CLASSDIR) ....
- @$(COMPILE_JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES1:/=\)
- @$(COMPILE_JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES2:/=\)
+ @echo ...$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -d $(SA_CLASSDIR) ....
+ @$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1:/=\)
+ @$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2:/=\)
$(COMPILE_RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
$(QUIETLY) echo $(SA_BUILD_VERSION_PROP)> $(SA_PROPERTIES)
$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
diff --git a/hotspot/make/windows/projectfiles/common/Makefile b/hotspot/make/windows/projectfiles/common/Makefile
index ebc3cd9bef6..00804b8f875 100644
--- a/hotspot/make/windows/projectfiles/common/Makefile
+++ b/hotspot/make/windows/projectfiles/common/Makefile
@@ -179,6 +179,6 @@ clean:
$(HOTSPOTBUILDSPACE)/classes/MakeDeps.class: $(MakeDepsSources)
@if exist $(HOTSPOTBUILDSPACE)\classes rmdir /s /q $(HOTSPOTBUILDSPACE)\classes
@mkdir $(HOTSPOTBUILDSPACE)\classes
- @$(COMPILE_JAVAC) -classpath $(HOTSPOTWORKSPACE)\src\share\tools\MakeDeps -g -d $(HOTSPOTBUILDSPACE)/classes $(MakeDepsSources)
+ @$(COMPILE_JAVAC) -classpath $(HOTSPOTWORKSPACE)\src\share\tools\MakeDeps -d $(HOTSPOTBUILDSPACE)/classes $(MakeDepsSources)
FORCE:
diff --git a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
index d0d831ec81c..1db51a19cb7 100644
--- a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
@@ -1696,6 +1696,9 @@ void InterpreterMacroAssembler::profile_virtual_call(Register receiver,
void InterpreterMacroAssembler::record_klass_in_profile_helper(
Register receiver, Register scratch,
int start_row, Label& done) {
+ if (TypeProfileWidth == 0)
+ return;
+
int last_row = VirtualCallData::row_limit() - 1;
assert(start_row <= last_row, "must be work left to do");
// Test this row for both the receiver and for null.
diff --git a/hotspot/src/cpu/sparc/vm/sparc.ad b/hotspot/src/cpu/sparc/vm/sparc.ad
index 757bb388356..9751224d772 100644
--- a/hotspot/src/cpu/sparc/vm/sparc.ad
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad
@@ -5707,7 +5707,7 @@ instruct loadUS2L_immI16(iRegL dst, memory mem, immI16 mask, iRegL tmp) %{
effect(TEMP dst, TEMP tmp);
ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
- size(3*4);
+ size((3+1)*4); // set may use two instructions.
format %{ "LDUH $mem,$dst\t! ushort/char & 16-bit mask -> long\n\t"
"SET $mask,$tmp\n\t"
"AND $dst,$tmp,$dst" %}
@@ -5851,7 +5851,7 @@ instruct loadI2L_immI(iRegL dst, memory mem, immI mask, iRegL tmp) %{
effect(TEMP dst, TEMP tmp);
ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
- size(3*4);
+ size((3+1)*4); // set may use two instructions.
format %{ "LDUW $mem,$dst\t! int & 32-bit mask -> long\n\t"
"SET $mask,$tmp\n\t"
"AND $dst,$tmp,$dst" %}
diff --git a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
index 997babc7afe..98f7f636133 100644
--- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, 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
@@ -827,8 +827,8 @@ void LIRGenerator::do_MathIntrinsic(Intrinsic* x) {
case vmIntrinsics::_dsin: __ sin (calc_input, calc_result, tmp1, tmp2); break;
case vmIntrinsics::_dcos: __ cos (calc_input, calc_result, tmp1, tmp2); break;
case vmIntrinsics::_dtan: __ tan (calc_input, calc_result, tmp1, tmp2); break;
- case vmIntrinsics::_dlog: __ log (calc_input, calc_result, LIR_OprFact::illegalOpr); break;
- case vmIntrinsics::_dlog10: __ log10(calc_input, calc_result, LIR_OprFact::illegalOpr); break;
+ case vmIntrinsics::_dlog: __ log (calc_input, calc_result, tmp1); break;
+ case vmIntrinsics::_dlog10: __ log10(calc_input, calc_result, tmp1); break;
default: ShouldNotReachHere();
}
diff --git a/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp
index d0b5fa39774..eaf745c16be 100644
--- a/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp
@@ -764,8 +764,6 @@ void FpuStackAllocator::handle_op2(LIR_Op2* op2) {
break;
}
- case lir_log:
- case lir_log10:
case lir_abs:
case lir_sqrt: {
// Right argument appears to be unused
@@ -785,6 +783,30 @@ void FpuStackAllocator::handle_op2(LIR_Op2* op2) {
break;
}
+ case lir_log:
+ case lir_log10: {
+ // log and log10 needs one temporary fpu stack slot, so there is ontemporary
+ // registers stored in temp of the operation.
+ // the stack allocator must guarantee that the stack slots are really free,
+ // otherwise there might be a stack overflow.
+ assert(right->is_illegal(), "must be");
+ assert(left->is_fpu_register(), "must be");
+ assert(res->is_fpu_register(), "must be");
+ assert(op2->tmp_opr()->is_fpu_register(), "must be");
+
+ insert_free_if_dead(op2->tmp_opr());
+ insert_free_if_dead(res, left);
+ insert_exchange(left);
+ do_rename(left, res);
+
+ new_left = to_fpu_stack_top(res);
+ new_res = new_left;
+
+ op2->set_fpu_stack_size(sim()->stack_size());
+ assert(sim()->stack_size() <= 7, "at least one stack slot must be free");
+ break;
+ }
+
case lir_tan:
case lir_sin:
diff --git a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp
index db0b6e32f49..e06e423a43a 100644
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp
@@ -1262,6 +1262,9 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper(
Register receiver, Register mdp,
Register reg2,
int start_row, Label& done) {
+ if (TypeProfileWidth == 0)
+ return;
+
int last_row = VirtualCallData::row_limit() - 1;
assert(start_row <= last_row, "must be work left to do");
// Test this row for both the receiver and for null.
diff --git a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp
index 0c1af9b0814..ad449c8bdd2 100644
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp
@@ -1272,6 +1272,9 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper(
Register receiver, Register mdp,
Register reg2,
int start_row, Label& done) {
+ if (TypeProfileWidth == 0)
+ return;
+
int last_row = VirtualCallData::row_limit() - 1;
assert(start_row <= last_row, "must be work left to do");
// Test this row for both the receiver and for null.
diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp
index 9f90cf2b428..0c941d66db9 100644
--- a/hotspot/src/os/windows/vm/os_windows.cpp
+++ b/hotspot/src/os/windows/vm/os_windows.cpp
@@ -1526,7 +1526,8 @@ void os::print_os_info(outputStream* st) {
case 5000: st->print(" Windows 2000"); break;
case 5001: st->print(" Windows XP"); break;
case 5002:
- case 6000: {
+ case 6000:
+ case 6001: {
// Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could
// find out whether we are running on 64 bit processor or not.
SYSTEM_INFO si;
@@ -1549,13 +1550,27 @@ void os::print_os_info(outputStream* st) {
st->print(" Windows XP x64 Edition");
else
st->print(" Windows Server 2003 family");
- } else { // os_vers == 6000
+ } else if (os_vers == 6000) {
if (osvi.wProductType == VER_NT_WORKSTATION)
st->print(" Windows Vista");
else
st->print(" Windows Server 2008");
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
st->print(" , 64 bit");
+ } else if (os_vers == 6001) {
+ if (osvi.wProductType == VER_NT_WORKSTATION) {
+ st->print(" Windows 7");
+ } else {
+ // Unrecognized windows, print out its major and minor versions
+ st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
+ }
+ if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
+ st->print(" , 64 bit");
+ } else { // future os
+ // Unrecognized windows, print out its major and minor versions
+ st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
+ if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
+ st->print(" , 64 bit");
}
break;
}
diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp b/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp
index d4ff200619f..5d86fe459cd 100644
--- a/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2009 Sun Microsystems, 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
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp b/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp
index d127d6ea902..f270c3d1da7 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/adlc/archDesc.cpp b/hotspot/src/share/vm/adlc/archDesc.cpp
index 408f0323cd1..6f7ae1ff33b 100644
--- a/hotspot/src/share/vm/adlc/archDesc.cpp
+++ b/hotspot/src/share/vm/adlc/archDesc.cpp
@@ -1031,7 +1031,8 @@ void ArchDesc::initBaseOpTypes() {
//---------------------------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");
diff --git a/hotspot/src/share/vm/c1/c1_IR.cpp b/hotspot/src/share/vm/c1/c1_IR.cpp
index 47e1c0d4151..7ecf4812b08 100644
--- a/hotspot/src/share/vm/c1/c1_IR.cpp
+++ b/hotspot/src/share/vm/c1/c1_IR.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/c1/c1_IR.hpp b/hotspot/src/share/vm/c1/c1_IR.hpp
index a3bcc2a477f..f7bbea2ff3b 100644
--- a/hotspot/src/share/vm/c1/c1_IR.hpp
+++ b/hotspot/src/share/vm/c1/c1_IR.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/c1/c1_LIR.cpp b/hotspot/src/share/vm/c1/c1_LIR.cpp
index 0c0f1eda623..b967785fbbb 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.cpp
@@ -567,8 +567,6 @@ void LIR_OpVisitState::visit(LIR_Op* op) {
case lir_rem:
case lir_sqrt:
case lir_abs:
- case lir_log:
- case lir_log10:
case lir_logic_and:
case lir_logic_or:
case lir_logic_xor:
@@ -644,13 +642,16 @@ void LIR_OpVisitState::visit(LIR_Op* op) {
case lir_tan:
case lir_sin:
- case lir_cos: {
+ case lir_cos:
+ case lir_log:
+ case lir_log10: {
assert(op->as_Op2() != NULL, "must be");
LIR_Op2* op2 = (LIR_Op2*)op;
- // sin and cos need two temporary fpu stack slots, so register
- // two temp operands. Register input operand as temp to
- // guarantee that they do not overlap
+ // On x86 tan/sin/cos need two temporary fpu stack slots and
+ // log/log10 need one so handle opr2 and tmp as temp inputs.
+ // Register input operand as temp to guarantee that it doesn't
+ // overlap with the input.
assert(op2->_info == NULL, "not used");
assert(op2->_opr1->is_valid(), "used");
do_input(op2->_opr1); do_temp(op2->_opr1);
diff --git a/hotspot/src/share/vm/c1/c1_LIR.hpp b/hotspot/src/share/vm/c1/c1_LIR.hpp
index d263b4e6b8d..c3da44e2329 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp
@@ -1840,8 +1840,8 @@ class LIR_List: public CompilationResourceObj {
void abs (LIR_Opr from, LIR_Opr to, LIR_Opr tmp) { append(new LIR_Op2(lir_abs , from, tmp, to)); }
void sqrt(LIR_Opr from, LIR_Opr to, LIR_Opr tmp) { append(new LIR_Op2(lir_sqrt, from, tmp, to)); }
- void log (LIR_Opr from, LIR_Opr to, LIR_Opr tmp) { append(new LIR_Op2(lir_log, from, tmp, to)); }
- void log10 (LIR_Opr from, LIR_Opr to, LIR_Opr tmp) { append(new LIR_Op2(lir_log10, from, tmp, to)); }
+ void log (LIR_Opr from, LIR_Opr to, LIR_Opr tmp) { append(new LIR_Op2(lir_log, from, LIR_OprFact::illegalOpr, to, tmp)); }
+ void log10 (LIR_Opr from, LIR_Opr to, LIR_Opr tmp) { append(new LIR_Op2(lir_log10, from, LIR_OprFact::illegalOpr, to, tmp)); }
void sin (LIR_Opr from, LIR_Opr to, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_Op2(lir_sin , from, tmp1, to, tmp2)); }
void cos (LIR_Opr from, LIR_Opr to, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_Op2(lir_cos , from, tmp1, to, tmp2)); }
void tan (LIR_Opr from, LIR_Opr to, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_Op2(lir_tan , from, tmp1, to, tmp2)); }
diff --git a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp
index d12a23ca21e..8e31b94ec01 100644
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/ci/ciObjectFactory.cpp b/hotspot/src/share/vm/ci/ciObjectFactory.cpp
index f0cfd32a93c..b466b0a3f43 100644
--- a/hotspot/src/share/vm/ci/ciObjectFactory.cpp
+++ b/hotspot/src/share/vm/ci/ciObjectFactory.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp
index 17684ff19c6..8235db6f082 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp
@@ -2547,6 +2547,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
KlassHandle host_klass,
GrowableArray* cp_patches,
symbolHandle& parsed_name,
+ bool verify,
TRAPS) {
// So that JVMTI can cache class file in the state before retransformable agents
// have modified it
@@ -2591,7 +2592,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
instanceKlassHandle nullHandle;
// Figure out whether we can skip format checking (matching classic VM behavior)
- _need_verify = Verifier::should_verify_for(class_loader());
+ _need_verify = Verifier::should_verify_for(class_loader(), verify);
// Set the verify flag in stream
cfs->set_verify(_need_verify);
@@ -3210,6 +3211,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
// Fill in information already parsed
this_klass->set_access_flags(access_flags);
+ this_klass->set_should_verify_class(verify);
jint lh = Klass::instance_layout_helper(instance_size, false);
this_klass->set_layout_helper(lh);
assert(this_klass->oop_is_instance(), "layout is correct");
@@ -3229,6 +3231,12 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
this_klass->set_has_final_method();
}
this_klass->set_method_ordering(method_ordering());
+ // The instanceKlass::_methods_jmethod_ids cache and the
+ // instanceKlass::_methods_cached_itable_indices cache are
+ // both managed on the assumption that the initial cache
+ // size is equal to the number of methods in the class. If
+ // that changes, then instanceKlass::idnum_can_increment()
+ // has to be changed accordingly.
this_klass->set_initial_method_idnum(methods->length());
this_klass->set_name(cp->klass_name_at(this_class_index));
if (LinkWellKnownClasses || is_anonymous()) // I am well known to myself
diff --git a/hotspot/src/share/vm/classfile/classFileParser.hpp b/hotspot/src/share/vm/classfile/classFileParser.hpp
index 40faac07328..213e9cacdf5 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.hpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.hpp
@@ -260,9 +260,10 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
Handle class_loader,
Handle protection_domain,
symbolHandle& parsed_name,
+ bool verify,
TRAPS) {
KlassHandle no_host_klass;
- return parseClassFile(name, class_loader, protection_domain, no_host_klass, NULL, parsed_name, THREAD);
+ return parseClassFile(name, class_loader, protection_domain, no_host_klass, NULL, parsed_name, verify, THREAD);
}
instanceKlassHandle parseClassFile(symbolHandle name,
Handle class_loader,
@@ -270,6 +271,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
KlassHandle host_klass,
GrowableArray* cp_patches,
symbolHandle& parsed_name,
+ bool verify,
TRAPS);
// Verifier checks
diff --git a/hotspot/src/share/vm/classfile/classLoader.cpp b/hotspot/src/share/vm/classfile/classLoader.cpp
index 5b517add1f8..669beb7ff32 100644
--- a/hotspot/src/share/vm/classfile/classLoader.cpp
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp
@@ -874,6 +874,7 @@ instanceKlassHandle ClassLoader::load_classfile(symbolHandle h_name, TRAPS) {
class_loader,
protection_domain,
parsed_name,
+ false,
CHECK_(h));
// add to package table
diff --git a/hotspot/src/share/vm/classfile/classLoader.hpp b/hotspot/src/share/vm/classfile/classLoader.hpp
index 3c6187c5af4..4526a520a4c 100644
--- a/hotspot/src/share/vm/classfile/classLoader.hpp
+++ b/hotspot/src/share/vm/classfile/classLoader.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/classfile/javaClasses.cpp b/hotspot/src/share/vm/classfile/javaClasses.cpp
index 248a1033697..cc0db7a173b 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp
@@ -252,7 +252,7 @@ symbolHandle java_lang_String::as_symbol(Handle java_string, TRAPS) {
typeArrayOop value = java_lang_String::value(obj);
int offset = java_lang_String::offset(obj);
int length = java_lang_String::length(obj);
- jchar* base = value->char_at_addr(offset);
+ jchar* base = (length == 0) ? NULL : value->char_at_addr(offset);
symbolOop sym = SymbolTable::lookup_unicode(base, length, THREAD);
return symbolHandle(THREAD, sym);
}
@@ -261,7 +261,7 @@ symbolOop java_lang_String::as_symbol_or_null(oop java_string) {
typeArrayOop value = java_lang_String::value(java_string);
int offset = java_lang_String::offset(java_string);
int length = java_lang_String::length(java_string);
- jchar* base = value->char_at_addr(offset);
+ jchar* base = (length == 0) ? NULL : value->char_at_addr(offset);
return SymbolTable::probe_unicode(base, length);
}
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
index a1efcc595f8..726048b874e 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
@@ -970,6 +970,7 @@ klassOop SystemDictionary::parse_stream(symbolHandle class_name,
host_klass,
cp_patches,
parsed_name,
+ true,
THREAD);
@@ -1025,6 +1026,7 @@ klassOop SystemDictionary::resolve_from_stream(symbolHandle class_name,
Handle class_loader,
Handle protection_domain,
ClassFileStream* st,
+ bool verify,
TRAPS) {
// Classloaders that support parallelism, e.g. bootstrap classloader,
@@ -1055,6 +1057,7 @@ klassOop SystemDictionary::resolve_from_stream(symbolHandle class_name,
class_loader,
protection_domain,
parsed_name,
+ verify,
THREAD);
const char* pkg = "java/";
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.hpp b/hotspot/src/share/vm/classfile/systemDictionary.hpp
index 14246e6ff70..b7c82033628 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.hpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.hpp
@@ -259,7 +259,9 @@ public:
TRAPS);
// Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
- static klassOop resolve_from_stream(symbolHandle class_name, Handle class_loader, Handle protection_domain, ClassFileStream* st, TRAPS);
+ static klassOop resolve_from_stream(symbolHandle class_name, Handle class_loader,
+ Handle protection_domain,
+ ClassFileStream* st, bool verify, TRAPS);
// Lookup an already loaded class. If not found NULL is returned.
static klassOop find(symbolHandle class_name, Handle class_loader, Handle protection_domain, TRAPS);
diff --git a/hotspot/src/share/vm/classfile/verifier.cpp b/hotspot/src/share/vm/classfile/verifier.cpp
index bb5edc785dc..dd947d19cfb 100644
--- a/hotspot/src/share/vm/classfile/verifier.cpp
+++ b/hotspot/src/share/vm/classfile/verifier.cpp
@@ -53,8 +53,8 @@ static void* verify_byte_codes_fn() {
// Methods in Verifier
-bool Verifier::should_verify_for(oop class_loader) {
- return class_loader == NULL ?
+bool Verifier::should_verify_for(oop class_loader, bool should_verify_class) {
+ return (class_loader == NULL || !should_verify_class) ?
BytecodeVerificationLocal : BytecodeVerificationRemote;
}
@@ -68,7 +68,7 @@ bool Verifier::relax_verify_for(oop loader) {
return !need_verify;
}
-bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, TRAPS) {
+bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, bool should_verify_class, TRAPS) {
ResourceMark rm(THREAD);
HandleMark hm;
@@ -81,7 +81,7 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, TRAPS) {
// If the class should be verified, first see if we can use the split
// verifier. If not, or if verification fails and FailOverToOldVerifier
// is set, then call the inference verifier.
- if (is_eligible_for_verification(klass)) {
+ if (is_eligible_for_verification(klass, should_verify_class)) {
if (TraceClassInitialization) {
tty->print_cr("Start class verification for: %s", klassName);
}
@@ -141,12 +141,13 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, TRAPS) {
}
}
-bool Verifier::is_eligible_for_verification(instanceKlassHandle klass) {
+bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class) {
symbolOop name = klass->name();
klassOop refl_magic_klass = SystemDictionary::reflect_magic_klass();
- return (should_verify_for(klass->class_loader()) &&
+ return (should_verify_for(klass->class_loader(), should_verify_class) &&
// return if the class is a bootstrapping class
+ // or defineClass specified not to verify by default (flags override passed arg)
// We need to skip the following four for bootstraping
name != vmSymbols::java_lang_Object() &&
name != vmSymbols::java_lang_Class() &&
diff --git a/hotspot/src/share/vm/classfile/verifier.hpp b/hotspot/src/share/vm/classfile/verifier.hpp
index 2c06b1ee61c..a1dc6ae13b2 100644
--- a/hotspot/src/share/vm/classfile/verifier.hpp
+++ b/hotspot/src/share/vm/classfile/verifier.hpp
@@ -34,16 +34,18 @@ class Verifier : AllStatic {
* Otherwise, no exception is thrown and the return indicates the
* error.
*/
- static bool verify(instanceKlassHandle klass, Mode mode, TRAPS);
+ static bool verify(instanceKlassHandle klass, Mode mode, bool should_verify_class, TRAPS);
- // Return false if the class is loaded by the bootstrap loader.
- static bool should_verify_for(oop class_loader);
+ // Return false if the class is loaded by the bootstrap loader,
+ // or if defineClass was called requesting skipping verification
+ // -Xverify:all/none override this value
+ static bool should_verify_for(oop class_loader, bool should_verify_class);
// Relax certain verifier checks to enable some broken 1.1 apps to run on 1.2.
static bool relax_verify_for(oop class_loader);
private:
- static bool is_eligible_for_verification(instanceKlassHandle klass);
+ static bool is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class);
static symbolHandle inference_verify(
instanceKlassHandle klass, char* msg, size_t msg_len, TRAPS);
};
diff --git a/hotspot/src/share/vm/code/debugInfoRec.hpp b/hotspot/src/share/vm/code/debugInfoRec.hpp
index 4ce5f1e45c3..bb896adeae2 100644
--- a/hotspot/src/share/vm/code/debugInfoRec.hpp
+++ b/hotspot/src/share/vm/code/debugInfoRec.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/code/nmethod.hpp b/hotspot/src/share/vm/code/nmethod.hpp
index 2902fc04b39..a396ef43512 100644
--- a/hotspot/src/share/vm/code/nmethod.hpp
+++ b/hotspot/src/share/vm/code/nmethod.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/compiler/oopMap.cpp b/hotspot/src/share/vm/compiler/oopMap.cpp
index 87751ab5bf3..46ffcc04db2 100644
--- a/hotspot/src/share/vm/compiler/oopMap.cpp
+++ b/hotspot/src/share/vm/compiler/oopMap.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/compiler/oopMap.hpp b/hotspot/src/share/vm/compiler/oopMap.hpp
index ff72fb20bee..05d9c098dfd 100644
--- a/hotspot/src/share/vm/compiler/oopMap.hpp
+++ b/hotspot/src/share/vm/compiler/oopMap.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.cpp
index 436b01613f9..3f508f823d6 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2001-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.cpp
index 445d32f4f91..b0d0df45dd9 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2001-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp
index 4e89c8cf979..79a40355adf 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp
@@ -302,9 +302,9 @@ MemRegion HeapRegionSeq::shrink_by(size_t shrink_bytes,
if (cur->isHumongous()) {
return MemRegion(last_start, end);
}
- cur->reset_zero_fill();
assert(cur == _regions.top(), "Should be top");
if (!cur->is_empty()) break;
+ cur->reset_zero_fill();
shrink_bytes -= cur->capacity();
num_regions_deleted++;
_regions.pop();
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp
index d6721572668..dea705439ad 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp
index cc00dcd813f..5d8284b438a 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp
index 2a16387183e..596c427a1dc 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
index e2480c9c8f2..8c2d145a5cf 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
@@ -2752,7 +2752,6 @@ PSParallelCompact::revisit_weak_klass_link(ParCompactionManager* cm, Klass* k) {
cm->revisit_klass_stack()->push(k);
}
-#if ( defined(COMPILER1) || defined(COMPILER2) )
void PSParallelCompact::revisit_mdo(ParCompactionManager* cm, DataLayout* p) {
cm->revisit_mdo_stack()->push(p);
}
@@ -2778,7 +2777,6 @@ void PSParallelCompact::follow_mdo_weak_refs() {
follow_stack(cm);
}
}
-#endif // ( COMPILER1 || COMPILER2 )
#ifdef VALIDATE_MARK_SWEEP
diff --git a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp
index a03b6a02a3e..510d6c3633c 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
@@ -73,7 +73,6 @@ void MarkSweep::follow_weak_klass_links() {
follow_stack();
}
-#if ( defined(COMPILER1) || defined(COMPILER2) )
void MarkSweep::revisit_mdo(DataLayout* p) {
_revisit_mdo_stack->push(p);
}
@@ -92,7 +91,6 @@ void MarkSweep::follow_mdo_weak_refs() {
}
follow_stack();
}
-#endif // ( COMPILER1 || COMPILER2 )
MarkSweep::FollowRootClosure MarkSweep::follow_root_closure;
diff --git a/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp b/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp
index 5e7a542d530..59543e7650c 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/memory/genMarkSweep.cpp b/hotspot/src/share/vm/memory/genMarkSweep.cpp
index bfc41fb8881..f0b3191b194 100644
--- a/hotspot/src/share/vm/memory/genMarkSweep.cpp
+++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2001-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/memory/iterator.cpp b/hotspot/src/share/vm/memory/iterator.cpp
index 8045703b03d..d04c9822100 100644
--- a/hotspot/src/share/vm/memory/iterator.cpp
+++ b/hotspot/src/share/vm/memory/iterator.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/memory/iterator.hpp b/hotspot/src/share/vm/memory/iterator.hpp
index f028174e5d3..6569200fe06 100644
--- a/hotspot/src/share/vm/memory/iterator.hpp
+++ b/hotspot/src/share/vm/memory/iterator.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/memory/serialize.cpp b/hotspot/src/share/vm/memory/serialize.cpp
index 08d76497978..3e891901aee 100644
--- a/hotspot/src/share/vm/memory/serialize.cpp
+++ b/hotspot/src/share/vm/memory/serialize.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/oops/arrayKlass.cpp b/hotspot/src/share/vm/oops/arrayKlass.cpp
index 0584e8e7ec5..7ff6d2f2f57 100644
--- a/hotspot/src/share/vm/oops/arrayKlass.cpp
+++ b/hotspot/src/share/vm/oops/arrayKlass.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp
index 79c09cbe3cd..4ed596a7d1e 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp
@@ -110,7 +110,7 @@ bool instanceKlass::verify_code(
// 1) Verify the bytecodes
Verifier::Mode mode =
throw_verifyerror ? Verifier::ThrowException : Verifier::NoException;
- return Verifier::verify(this_oop, mode, CHECK_false);
+ return Verifier::verify(this_oop, mode, this_oop->should_verify_class(), CHECK_false);
}
@@ -967,33 +967,78 @@ JNIid* instanceKlass::jni_id_for(int offset) {
// Lookup or create a jmethodID.
-// This code can be called by the VM thread. For this reason it is critical that
-// there are no blocking operations (safepoints) while the lock is held -- or a
-// deadlock can occur.
-jmethodID instanceKlass::jmethod_id_for_impl(instanceKlassHandle ik_h, methodHandle method_h) {
+// This code is called by the VMThread and JavaThreads so the
+// locking has to be done very carefully to avoid deadlocks
+// and/or other cache consistency problems.
+//
+jmethodID instanceKlass::get_jmethod_id(instanceKlassHandle ik_h, methodHandle method_h) {
size_t idnum = (size_t)method_h->method_idnum();
jmethodID* jmeths = ik_h->methods_jmethod_ids_acquire();
size_t length = 0;
jmethodID id = NULL;
- // array length stored in first element, other elements offset by one
- if (jmeths == NULL || // If there is no jmethodID array,
- (length = (size_t)jmeths[0]) <= idnum || // or if it is too short,
- (id = jmeths[idnum+1]) == NULL) { // or if this jmethodID isn't allocated
- // Do all the safepointing things (allocations) before grabbing the lock.
- // These allocations will have to be freed if they are unused.
+ // We use a double-check locking idiom here because this cache is
+ // performance sensitive. In the normal system, this cache only
+ // transitions from NULL to non-NULL which is safe because we use
+ // release_set_methods_jmethod_ids() to advertise the new cache.
+ // A partially constructed cache should never be seen by a racing
+ // thread. We also use release_store_ptr() to save a new jmethodID
+ // in the cache so a partially constructed jmethodID should never be
+ // seen either. Cache reads of existing jmethodIDs proceed without a
+ // lock, but cache writes of a new jmethodID requires uniqueness and
+ // creation of the cache itself requires no leaks so a lock is
+ // generally acquired in those two cases.
+ //
+ // If the RedefineClasses() API has been used, then this cache can
+ // grow and we'll have transitions from non-NULL to bigger non-NULL.
+ // Cache creation requires no leaks and we require safety between all
+ // cache accesses and freeing of the old cache so a lock is generally
+ // acquired when the RedefineClasses() API has been used.
- // Allocate a new array of methods.
+ if (jmeths != NULL) {
+ // the cache already exists
+ if (!ik_h->idnum_can_increment()) {
+ // the cache can't grow so we can just get the current values
+ get_jmethod_id_length_value(jmeths, idnum, &length, &id);
+ } else {
+ // cache can grow so we have to be more careful
+ if (Threads::number_of_threads() == 0 ||
+ SafepointSynchronize::is_at_safepoint()) {
+ // we're single threaded or at a safepoint - no locking needed
+ get_jmethod_id_length_value(jmeths, idnum, &length, &id);
+ } else {
+ MutexLocker ml(JmethodIdCreation_lock);
+ get_jmethod_id_length_value(jmeths, idnum, &length, &id);
+ }
+ }
+ }
+ // implied else:
+ // we need to allocate a cache so default length and id values are good
+
+ if (jmeths == NULL || // no cache yet
+ length <= idnum || // cache is too short
+ id == NULL) { // cache doesn't contain entry
+
+ // This function can be called by the VMThread so we have to do all
+ // things that might block on a safepoint before grabbing the lock.
+ // Otherwise, we can deadlock with the VMThread or have a cache
+ // consistency issue. These vars keep track of what we might have
+ // to free after the lock is dropped.
+ jmethodID to_dealloc_id = NULL;
+ jmethodID* to_dealloc_jmeths = NULL;
+
+ // may not allocate new_jmeths or use it if we allocate it
jmethodID* new_jmeths = NULL;
if (length <= idnum) {
- // A new array will be needed (unless some other thread beats us to it)
+ // allocate a new cache that might be used
size_t size = MAX2(idnum+1, (size_t)ik_h->idnum_allocated_count());
new_jmeths = NEW_C_HEAP_ARRAY(jmethodID, size+1);
memset(new_jmeths, 0, (size+1)*sizeof(jmethodID));
- new_jmeths[0] =(jmethodID)size; // array size held in the first element
+ // cache size is stored in element[0], other elements offset by one
+ new_jmeths[0] = (jmethodID)size;
}
- // Allocate a new method ID.
+ // allocate a new jmethodID that might be used
jmethodID new_id = NULL;
if (method_h->is_old() && !method_h->is_obsolete()) {
// The method passed in is old (but not obsolete), we need to use the current version
@@ -1007,63 +1052,111 @@ jmethodID instanceKlass::jmethod_id_for_impl(instanceKlassHandle ik_h, methodHan
new_id = JNIHandles::make_jmethod_id(method_h);
}
- if (Threads::number_of_threads() == 0 || SafepointSynchronize::is_at_safepoint()) {
- // No need and unsafe to lock the JmethodIdCreation_lock at safepoint.
- id = get_jmethod_id(ik_h, idnum, new_id, new_jmeths);
+ if (Threads::number_of_threads() == 0 ||
+ SafepointSynchronize::is_at_safepoint()) {
+ // we're single threaded or at a safepoint - no locking needed
+ id = get_jmethod_id_fetch_or_update(ik_h, idnum, new_id, new_jmeths,
+ &to_dealloc_id, &to_dealloc_jmeths);
} else {
MutexLocker ml(JmethodIdCreation_lock);
- id = get_jmethod_id(ik_h, idnum, new_id, new_jmeths);
+ id = get_jmethod_id_fetch_or_update(ik_h, idnum, new_id, new_jmeths,
+ &to_dealloc_id, &to_dealloc_jmeths);
+ }
+
+ // The lock has been dropped so we can free resources.
+ // Free up either the old cache or the new cache if we allocated one.
+ if (to_dealloc_jmeths != NULL) {
+ FreeHeap(to_dealloc_jmeths);
+ }
+ // free up the new ID since it wasn't needed
+ if (to_dealloc_id != NULL) {
+ JNIHandles::destroy_jmethod_id(to_dealloc_id);
}
}
return id;
}
-jmethodID instanceKlass::get_jmethod_id(instanceKlassHandle ik_h, size_t idnum,
- jmethodID new_id, jmethodID* new_jmeths) {
- // Retry lookup after we got the lock or ensured we are at safepoint
- jmethodID* jmeths = ik_h->methods_jmethod_ids_acquire();
- jmethodID id = NULL;
- jmethodID to_dealloc_id = NULL;
- jmethodID* to_dealloc_jmeths = NULL;
- size_t length;
+// Common code to fetch the jmethodID from the cache or update the
+// cache with the new jmethodID. This function should never do anything
+// that causes the caller to go to a safepoint or we can deadlock with
+// the VMThread or have cache consistency issues.
+//
+jmethodID instanceKlass::get_jmethod_id_fetch_or_update(
+ instanceKlassHandle ik_h, size_t idnum, jmethodID new_id,
+ jmethodID* new_jmeths, jmethodID* to_dealloc_id_p,
+ jmethodID** to_dealloc_jmeths_p) {
+ assert(new_id != NULL, "sanity check");
+ assert(to_dealloc_id_p != NULL, "sanity check");
+ assert(to_dealloc_jmeths_p != NULL, "sanity check");
+ assert(Threads::number_of_threads() == 0 ||
+ SafepointSynchronize::is_at_safepoint() ||
+ JmethodIdCreation_lock->owned_by_self(), "sanity check");
- if (jmeths == NULL || (length = (size_t)jmeths[0]) <= idnum) {
+ // reacquire the cache - we are locked, single threaded or at a safepoint
+ jmethodID* jmeths = ik_h->methods_jmethod_ids_acquire();
+ jmethodID id = NULL;
+ size_t length = 0;
+
+ if (jmeths == NULL || // no cache yet
+ (length = (size_t)jmeths[0]) <= idnum) { // cache is too short
if (jmeths != NULL) {
- // We have grown the array: copy the existing entries, and delete the old array
+ // copy any existing entries from the old cache
for (size_t index = 0; index < length; index++) {
new_jmeths[index+1] = jmeths[index+1];
}
- to_dealloc_jmeths = jmeths; // using the new jmeths, deallocate the old one
+ *to_dealloc_jmeths_p = jmeths; // save old cache for later delete
}
ik_h->release_set_methods_jmethod_ids(jmeths = new_jmeths);
} else {
+ // fetch jmethodID (if any) from the existing cache
id = jmeths[idnum+1];
- to_dealloc_jmeths = new_jmeths; // using the old jmeths, deallocate the new one
+ *to_dealloc_jmeths_p = new_jmeths; // save new cache for later delete
}
if (id == NULL) {
+ // No matching jmethodID in the existing cache or we have a new
+ // cache or we just grew the cache. This cache write is done here
+ // by the first thread to win the foot race because a jmethodID
+ // needs to be unique once it is generally available.
id = new_id;
- jmeths[idnum+1] = id; // install the new method ID
- } else {
- to_dealloc_id = new_id; // the new id wasn't used, mark it for deallocation
- }
- // Free up unneeded or no longer needed resources
- FreeHeap(to_dealloc_jmeths);
- if (to_dealloc_id != NULL) {
- JNIHandles::destroy_jmethod_id(to_dealloc_id);
+ // The jmethodID cache can be read while unlocked so we have to
+ // make sure the new jmethodID is complete before installing it
+ // in the cache.
+ OrderAccess::release_store_ptr(&jmeths[idnum+1], id);
+ } else {
+ *to_dealloc_id_p = new_id; // save new id for later delete
}
return id;
}
+// Common code to get the jmethodID cache length and the jmethodID
+// value at index idnum if there is one.
+//
+void instanceKlass::get_jmethod_id_length_value(jmethodID* cache,
+ size_t idnum, size_t *length_p, jmethodID* id_p) {
+ assert(cache != NULL, "sanity check");
+ assert(length_p != NULL, "sanity check");
+ assert(id_p != NULL, "sanity check");
+
+ // cache size is stored in element[0], other elements offset by one
+ *length_p = (size_t)cache[0];
+ if (*length_p <= idnum) { // cache is too short
+ *id_p = NULL;
+ } else {
+ *id_p = cache[idnum+1]; // fetch jmethodID (if any)
+ }
+}
+
+
// Lookup a jmethodID, NULL if not found. Do no blocking, no allocations, no handles
jmethodID instanceKlass::jmethod_id_or_null(methodOop method) {
size_t idnum = (size_t)method->method_idnum();
jmethodID* jmeths = methods_jmethod_ids_acquire();
size_t length; // length assigned as debugging crumb
jmethodID id = NULL;
- if (jmeths != NULL && // If there is a jmethodID array,
+ if (jmeths != NULL && // If there is a cache
(length = (size_t)jmeths[0]) > idnum) { // and if it is long enough,
id = jmeths[idnum+1]; // Look up the id (may be NULL)
}
@@ -1074,18 +1167,35 @@ jmethodID instanceKlass::jmethod_id_or_null(methodOop method) {
// Cache an itable index
void instanceKlass::set_cached_itable_index(size_t idnum, int index) {
int* indices = methods_cached_itable_indices_acquire();
- if (indices == NULL || // If there is no index array,
- ((size_t)indices[0]) <= idnum) { // or if it is too short
- // Lock before we allocate the array so we don't leak
+ int* to_dealloc_indices = NULL;
+
+ // We use a double-check locking idiom here because this cache is
+ // performance sensitive. In the normal system, this cache only
+ // transitions from NULL to non-NULL which is safe because we use
+ // release_set_methods_cached_itable_indices() to advertise the
+ // new cache. A partially constructed cache should never be seen
+ // by a racing thread. Cache reads and writes proceed without a
+ // lock, but creation of the cache itself requires no leaks so a
+ // lock is generally acquired in that case.
+ //
+ // If the RedefineClasses() API has been used, then this cache can
+ // grow and we'll have transitions from non-NULL to bigger non-NULL.
+ // Cache creation requires no leaks and we require safety between all
+ // cache accesses and freeing of the old cache so a lock is generally
+ // acquired when the RedefineClasses() API has been used.
+
+ if (indices == NULL || idnum_can_increment()) {
+ // we need a cache or the cache can grow
MutexLocker ml(JNICachedItableIndex_lock);
- // Retry lookup after we got the lock
+ // reacquire the cache to see if another thread already did the work
indices = methods_cached_itable_indices_acquire();
size_t length = 0;
- // array length stored in first element, other elements offset by one
+ // cache size is stored in element[0], other elements offset by one
if (indices == NULL || (length = (size_t)indices[0]) <= idnum) {
size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count());
int* new_indices = NEW_C_HEAP_ARRAY(int, size+1);
- // Copy the existing entries, if any
+ new_indices[0] = (int)size;
+ // copy any existing entries
size_t i;
for (i = 0; i < length; i++) {
new_indices[i+1] = indices[i+1];
@@ -1095,15 +1205,32 @@ void instanceKlass::set_cached_itable_index(size_t idnum, int index) {
new_indices[i+1] = -1;
}
if (indices != NULL) {
- FreeHeap(indices); // delete any old indices
+ // We have an old cache to delete so save it for after we
+ // drop the lock.
+ to_dealloc_indices = indices;
}
release_set_methods_cached_itable_indices(indices = new_indices);
}
+
+ if (idnum_can_increment()) {
+ // this cache can grow so we have to write to it safely
+ indices[idnum+1] = index;
+ }
} else {
CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
}
- // This is a cache, if there is a race to set it, it doesn't matter
- indices[idnum+1] = index;
+
+ if (!idnum_can_increment()) {
+ // The cache cannot grow and this JNI itable index value does not
+ // have to be unique like a jmethodID. If there is a race to set it,
+ // it doesn't matter.
+ indices[idnum+1] = index;
+ }
+
+ if (to_dealloc_indices != NULL) {
+ // we allocated a new cache so free the old one
+ FreeHeap(to_dealloc_indices);
+ }
}
@@ -2299,6 +2426,11 @@ void instanceKlass::set_init_state(ClassState state) {
// Add an information node that contains weak references to the
// interesting parts of the previous version of the_class.
+// This is also where we clean out any unused weak references.
+// Note that while we delete nodes from the _previous_versions
+// array, we never delete the array itself until the klass is
+// unloaded. The has_been_redefined() query depends on that fact.
+//
void instanceKlass::add_previous_version(instanceKlassHandle ikh,
BitMap* emcp_methods, int emcp_method_count) {
assert(Thread::current()->is_VM_thread(),
diff --git a/hotspot/src/share/vm/oops/instanceKlass.hpp b/hotspot/src/share/vm/oops/instanceKlass.hpp
index ffa42d7b2f1..bb992170e02 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp
@@ -217,6 +217,7 @@ class instanceKlass: public Klass {
bool _is_marked_dependent; // used for marking during flushing and deoptimization
bool _rewritten; // methods rewritten.
bool _has_nonstatic_fields; // for sizing with UseCompressedOops
+ bool _should_verify_class; // allow caching of preverification
u2 _minor_version; // minor version number of class file
u2 _major_version; // major version number of class file
ClassState _init_state; // state of class
@@ -362,6 +363,10 @@ class instanceKlass: public Klass {
int get_init_state() { return _init_state; } // Useful for debugging
bool is_rewritten() const { return _rewritten; }
+ // defineClass specified verification
+ bool should_verify_class() const { return _should_verify_class; }
+ void set_should_verify_class(bool value) { _should_verify_class = value; }
+
// marking
bool is_marked_dependent() const { return _is_marked_dependent; }
void set_is_marked_dependent(bool value) { _is_marked_dependent = value; }
@@ -460,6 +465,10 @@ class instanceKlass: public Klass {
// RedefineClasses() support for previous versions:
void add_previous_version(instanceKlassHandle ikh, BitMap *emcp_methods,
int emcp_method_count);
+ // If the _previous_versions array is non-NULL, then this klass
+ // has been redefined at least once even if we aren't currently
+ // tracking a previous version.
+ bool has_been_redefined() const { return _previous_versions != NULL; }
bool has_previous_version() const;
void init_previous_versions() {
_previous_versions = NULL;
@@ -501,9 +510,14 @@ class instanceKlass: public Klass {
void set_bootstrap_method(oop mh) { oop_store(&_bootstrap_method, mh); }
// jmethodID support
- static jmethodID get_jmethod_id(instanceKlassHandle ik_h, size_t idnum,
- jmethodID new_id, jmethodID* new_jmeths);
- static jmethodID jmethod_id_for_impl(instanceKlassHandle ik_h, methodHandle method_h);
+ static jmethodID get_jmethod_id(instanceKlassHandle ik_h,
+ methodHandle method_h);
+ static jmethodID get_jmethod_id_fetch_or_update(instanceKlassHandle ik_h,
+ size_t idnum, jmethodID new_id, jmethodID* new_jmeths,
+ jmethodID* to_dealloc_id_p,
+ jmethodID** to_dealloc_jmeths_p);
+ static void get_jmethod_id_length_value(jmethodID* cache, size_t idnum,
+ size_t *length_p, jmethodID* id_p);
jmethodID jmethod_id_or_null(methodOop method);
// cached itable index support
@@ -749,6 +763,11 @@ private:
void set_init_thread(Thread *thread) { _init_thread = thread; }
u2 idnum_allocated_count() const { return _idnum_allocated_count; }
+ // The RedefineClasses() API can cause new method idnums to be needed
+ // which will cause the caches to grow. Safety requires different
+ // cache management logic if the caches can grow instead of just
+ // going from NULL to non-NULL.
+ bool idnum_can_increment() const { return has_been_redefined(); }
jmethodID* methods_jmethod_ids_acquire() const
{ return (jmethodID*)OrderAccess::load_ptr_acquire(&_methods_jmethod_ids); }
void release_set_methods_jmethod_ids(jmethodID* jmeths)
diff --git a/hotspot/src/share/vm/oops/instanceKlassKlass.hpp b/hotspot/src/share/vm/oops/instanceKlassKlass.hpp
index 2dbaa2a584b..d736ca5eb23 100644
--- a/hotspot/src/share/vm/oops/instanceKlassKlass.hpp
+++ b/hotspot/src/share/vm/oops/instanceKlassKlass.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/oops/instanceRefKlass.cpp b/hotspot/src/share/vm/oops/instanceRefKlass.cpp
index 76f1e574ae1..a8c7baf5214 100644
--- a/hotspot/src/share/vm/oops/instanceRefKlass.cpp
+++ b/hotspot/src/share/vm/oops/instanceRefKlass.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/oops/methodDataOop.hpp b/hotspot/src/share/vm/oops/methodDataOop.hpp
index 8fc4245d4ef..80361d9f9ac 100644
--- a/hotspot/src/share/vm/oops/methodDataOop.hpp
+++ b/hotspot/src/share/vm/oops/methodDataOop.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/oops/methodOop.hpp b/hotspot/src/share/vm/oops/methodOop.hpp
index 5a79ed62609..fc3d3451ca4 100644
--- a/hotspot/src/share/vm/oops/methodOop.hpp
+++ b/hotspot/src/share/vm/oops/methodOop.hpp
@@ -555,7 +555,7 @@ class methodOopDesc : public oopDesc {
// Get this method's jmethodID -- allocate if it doesn't exist
jmethodID jmethod_id() { methodHandle this_h(this);
- return instanceKlass::jmethod_id_for_impl(method_holder(), this_h); }
+ return instanceKlass::get_jmethod_id(method_holder(), this_h); }
// Lookup the jmethodID for this method. Return NULL if not found.
// NOTE that this function can be called from a signal handler
diff --git a/hotspot/src/share/vm/oops/objArrayOop.hpp b/hotspot/src/share/vm/oops/objArrayOop.hpp
index d9d5088f534..626f398a6be 100644
--- a/hotspot/src/share/vm/oops/objArrayOop.hpp
+++ b/hotspot/src/share/vm/oops/objArrayOop.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/opto/compile.hpp b/hotspot/src/share/vm/opto/compile.hpp
index bad984ff65d..4bd1900fc70 100644
--- a/hotspot/src/share/vm/opto/compile.hpp
+++ b/hotspot/src/share/vm/opto/compile.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/opto/escape.cpp b/hotspot/src/share/vm/opto/escape.cpp
index f19a0871ec7..bd04a5ae7ac 100644
--- a/hotspot/src/share/vm/opto/escape.cpp
+++ b/hotspot/src/share/vm/opto/escape.cpp
@@ -439,6 +439,11 @@ static Node* get_addp_base(Node *addp) {
Node *base = addp->in(AddPNode::Base)->uncast();
if (base->is_top()) { // The AddP case #3 and #6.
base = addp->in(AddPNode::Address)->uncast();
+ while (base->is_AddP()) {
+ // Case #6 (unsafe access) may have several chained AddP nodes.
+ assert(base->in(AddPNode::Base)->is_top(), "expected unsafe access address only");
+ base = base->in(AddPNode::Address)->uncast();
+ }
assert(base->Opcode() == Op_ConP || base->Opcode() == Op_ThreadLocal ||
base->Opcode() == Op_CastX2P || base->is_DecodeN() ||
(base->is_Mem() && base->bottom_type() == TypeRawPtr::NOTNULL) ||
diff --git a/hotspot/src/share/vm/opto/graphKit.cpp b/hotspot/src/share/vm/opto/graphKit.cpp
index 955b736eed1..a08ff89f9dc 100644
--- a/hotspot/src/share/vm/opto/graphKit.cpp
+++ b/hotspot/src/share/vm/opto/graphKit.cpp
@@ -622,11 +622,13 @@ BuildCutout::~BuildCutout() {
//---------------------------PreserveReexecuteState----------------------------
PreserveReexecuteState::PreserveReexecuteState(GraphKit* kit) {
+ assert(!kit->stopped(), "must call stopped() before");
_kit = kit;
_sp = kit->sp();
_reexecute = kit->jvms()->_reexecute;
}
PreserveReexecuteState::~PreserveReexecuteState() {
+ if (_kit->stopped()) return;
_kit->jvms()->_reexecute = _reexecute;
_kit->set_sp(_sp);
}
@@ -1086,7 +1088,7 @@ Node* GraphKit::load_array_length(Node* array) {
alen = _gvn.transform( new (C, 3) LoadRangeNode(0, immutable_memory(), r_adr, TypeInt::POS));
} else {
alen = alloc->Ideal_length();
- Node* ccast = alloc->make_ideal_length(_gvn.type(array)->is_aryptr(), &_gvn);
+ Node* ccast = alloc->make_ideal_length(_gvn.type(array)->is_oopptr(), &_gvn);
if (ccast != alen) {
alen = _gvn.transform(ccast);
}
@@ -1123,8 +1125,8 @@ Node* GraphKit::null_check_common(Node* value, BasicType type,
case T_OBJECT : {
const Type *t = _gvn.type( value );
- const TypeInstPtr* tp = t->isa_instptr();
- if (tp != NULL && !tp->klass()->is_loaded()
+ const TypeOopPtr* tp = t->isa_oopptr();
+ if (tp != NULL && tp->klass() != NULL && !tp->klass()->is_loaded()
// Only for do_null_check, not any of its siblings:
&& !assert_null && null_control == NULL) {
// Usually, any field access or invocation on an unloaded oop type
diff --git a/hotspot/src/share/vm/opto/idealKit.cpp b/hotspot/src/share/vm/opto/idealKit.cpp
index 0631d905eb0..d4c26ccca38 100644
--- a/hotspot/src/share/vm/opto/idealKit.cpp
+++ b/hotspot/src/share/vm/opto/idealKit.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/opto/idealKit.hpp b/hotspot/src/share/vm/opto/idealKit.hpp
index 817ed4de2c1..7514d02823b 100644
--- a/hotspot/src/share/vm/opto/idealKit.hpp
+++ b/hotspot/src/share/vm/opto/idealKit.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/opto/ifnode.cpp b/hotspot/src/share/vm/opto/ifnode.cpp
index 98cd93c3ca5..277b2881469 100644
--- a/hotspot/src/share/vm/opto/ifnode.cpp
+++ b/hotspot/src/share/vm/opto/ifnode.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp
index f609eedd931..62424824172 100644
--- a/hotspot/src/share/vm/opto/library_call.cpp
+++ b/hotspot/src/share/vm/opto/library_call.cpp
@@ -3903,19 +3903,10 @@ void LibraryCallKit::copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, b
guarantee(alloc != NULL && alloc->maybe_set_complete(&_gvn), "");
}
- // Cast to Object for arraycopy.
- // We can't use the original CheckCastPP since it should be moved
- // after the arraycopy to prevent stores flowing above it.
- Node* new_obj = new(C, 2) CheckCastPPNode(alloc_obj->in(0), raw_obj,
- TypeInstPtr::NOTNULL);
- new_obj = _gvn.transform(new_obj);
- // Substitute in the locally valid dest_oop.
- replace_in_map(alloc_obj, new_obj);
-
// Copy the fastest available way.
// TODO: generate fields copies for small objects instead.
Node* src = obj;
- Node* dest = new_obj;
+ Node* dest = alloc_obj;
Node* size = _gvn.transform(obj_size);
// Exclude the header but include array length to copy by 8 bytes words.
@@ -3961,7 +3952,7 @@ void LibraryCallKit::copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, b
int raw_adr_idx = Compile::AliasIdxRaw;
post_barrier(control(),
memory(raw_adr_type),
- new_obj,
+ alloc_obj,
no_particular_field,
raw_adr_idx,
no_particular_value,
@@ -3969,16 +3960,8 @@ void LibraryCallKit::copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, b
false);
}
- // Move the original CheckCastPP after arraycopy.
- _gvn.hash_delete(alloc_obj);
- alloc_obj->set_req(0, control());
- // Replace raw memory edge with new CheckCastPP to have a live oop
- // at safepoints instead of raw value.
- assert(new_obj->is_CheckCastPP() && new_obj->in(1) == alloc_obj->in(1), "sanity");
- alloc_obj->set_req(1, new_obj); // cast to the original type
- _gvn.hash_find_insert(alloc_obj); // put back into GVN table
- // Restore in the locally valid dest_oop.
- replace_in_map(new_obj, alloc_obj);
+ // Do not let reads from the cloned object float above the arraycopy.
+ insert_mem_bar(Op_MemBarCPUOrder);
}
//------------------------inline_native_clone----------------------------
@@ -4448,15 +4431,6 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
assert(init->is_complete(), "we just did this");
assert(dest->is_CheckCastPP(), "sanity");
assert(dest->in(0)->in(0) == init, "dest pinned");
-
- // Cast to Object for arraycopy.
- // We can't use the original CheckCastPP since it should be moved
- // after the arraycopy to prevent stores flowing above it.
- Node* new_obj = new(C, 2) CheckCastPPNode(dest->in(0), dest->in(1),
- TypeInstPtr::NOTNULL);
- dest = _gvn.transform(new_obj);
- // Substitute in the locally valid dest_oop.
- replace_in_map(original_dest, dest);
adr_type = TypeRawPtr::BOTTOM; // all initializations are into raw memory
// From this point on, every exit path is responsible for
// initializing any non-copied parts of the object to zero.
@@ -4786,18 +4760,6 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
set_i_o( _gvn.transform(result_i_o) );
set_memory( _gvn.transform(result_memory), adr_type );
- if (dest != original_dest) {
- // Pin the "finished" array node after the arraycopy/zeroing operations.
- _gvn.hash_delete(original_dest);
- original_dest->set_req(0, control());
- // Replace raw memory edge with new CheckCastPP to have a live oop
- // at safepoints instead of raw value.
- assert(dest->is_CheckCastPP() && dest->in(1) == original_dest->in(1), "sanity");
- original_dest->set_req(1, dest); // cast to the original type
- _gvn.hash_find_insert(original_dest); // put back into GVN table
- // Restore in the locally valid dest_oop.
- replace_in_map(dest, original_dest);
- }
// The memory edges above are precise in order to model effects around
// array copies accurately to allow value numbering of field loads around
// arraycopy. Such field loads, both before and after, are common in Java
@@ -4808,7 +4770,9 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
// The next memory barrier is added to avoid it. If the arraycopy can be
// optimized away (which it can, sometimes) then we can manually remove
// the membar also.
- if (InsertMemBarAfterArraycopy)
+ //
+ // Do not let reads from the cloned object float above the arraycopy.
+ if (InsertMemBarAfterArraycopy || alloc != NULL)
insert_mem_bar(Op_MemBarCPUOrder);
}
diff --git a/hotspot/src/share/vm/opto/phaseX.cpp b/hotspot/src/share/vm/opto/phaseX.cpp
index 02007014ddc..4583f0da7b3 100644
--- a/hotspot/src/share/vm/opto/phaseX.cpp
+++ b/hotspot/src/share/vm/opto/phaseX.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/opto/phaseX.hpp b/hotspot/src/share/vm/opto/phaseX.hpp
index cac60f249f7..b9391ba1d97 100644
--- a/hotspot/src/share/vm/opto/phaseX.hpp
+++ b/hotspot/src/share/vm/opto/phaseX.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/opto/postaloc.cpp b/hotspot/src/share/vm/opto/postaloc.cpp
index d6bd919199a..7f73af1ed7e 100644
--- a/hotspot/src/share/vm/opto/postaloc.cpp
+++ b/hotspot/src/share/vm/opto/postaloc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/opto/superword.cpp b/hotspot/src/share/vm/opto/superword.cpp
index c8198392c33..6709d15b9e7 100644
--- a/hotspot/src/share/vm/opto/superword.cpp
+++ b/hotspot/src/share/vm/opto/superword.cpp
@@ -990,8 +990,8 @@ void SuperWord::remove_and_insert(MemNode *current, MemNode *prev, MemNode *lip,
// (5) We know there is no dependence cycle, so there in no other case;
// (6) Finally, all memory ops in another single pack should be moved in the same direction.
//
-// To schedule a load pack: the memory edge of every loads in the pack must be
-// the same as the memory edge of the last executed load in the pack
+// To schedule a load pack, we use the memory state of either the first or the last load in
+// the pack, based on the dependence constraint.
void SuperWord::co_locate_pack(Node_List* pk) {
if (pk->at(0)->is_Store()) {
MemNode* first = executed_first(pk)->as_Mem();
@@ -1076,15 +1076,32 @@ void SuperWord::co_locate_pack(Node_List* pk) {
current = my_mem->as_Mem();
} // end while
} else if (pk->at(0)->is_Load()) { //load
- // all use the memory state that the last executed load uses
- LoadNode* last_load = executed_last(pk)->as_Load();
- Node* last_mem = last_load->in(MemNode::Memory);
- _igvn.hash_delete(last_mem);
- // Give each load same memory state as last
+ // all loads in the pack should have the same memory state. By default,
+ // we use the memory state of the last load. However, if any load could
+ // not be moved down due to the dependence constraint, we use the memory
+ // state of the first load.
+ Node* last_mem = executed_last(pk)->in(MemNode::Memory);
+ Node* first_mem = executed_first(pk)->in(MemNode::Memory);
+ bool schedule_last = true;
+ for (uint i = 0; i < pk->size(); i++) {
+ Node* ld = pk->at(i);
+ for (Node* current = last_mem; current != ld->in(MemNode::Memory);
+ current=current->in(MemNode::Memory)) {
+ assert(current != first_mem, "corrupted memory graph");
+ if(current->is_Mem() && !independent(current, ld)){
+ schedule_last = false; // a later store depends on this load
+ break;
+ }
+ }
+ }
+
+ Node* mem_input = schedule_last ? last_mem : first_mem;
+ _igvn.hash_delete(mem_input);
+ // Give each load the same memory state
for (uint i = 0; i < pk->size(); i++) {
LoadNode* ld = pk->at(i)->as_Load();
_igvn.hash_delete(ld);
- ld->set_req(MemNode::Memory, last_mem);
+ ld->set_req(MemNode::Memory, mem_input);
_igvn._worklist.push(ld);
}
}
diff --git a/hotspot/src/share/vm/opto/type.cpp b/hotspot/src/share/vm/opto/type.cpp
index 1db520a4254..f06726a3c44 100644
--- a/hotspot/src/share/vm/opto/type.cpp
+++ b/hotspot/src/share/vm/opto/type.cpp
@@ -2236,12 +2236,12 @@ TypeOopPtr::TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int
//------------------------------make-------------------------------------------
const TypeOopPtr *TypeOopPtr::make(PTR ptr,
- int offset) {
+ int offset, int instance_id) {
assert(ptr != Constant, "no constant generic pointers");
ciKlass* k = ciKlassKlass::make();
bool xk = false;
ciObject* o = NULL;
- return (TypeOopPtr*)(new TypeOopPtr(OopPtr, ptr, k, xk, o, offset, InstanceBot))->hashcons();
+ return (TypeOopPtr*)(new TypeOopPtr(OopPtr, ptr, k, xk, o, offset, instance_id))->hashcons();
}
@@ -2330,7 +2330,8 @@ const Type *TypeOopPtr::xmeet( const Type *t ) const {
case OopPtr: { // Meeting to other OopPtrs
const TypeOopPtr *tp = t->is_oopptr();
- return make( meet_ptr(tp->ptr()), meet_offset(tp->offset()) );
+ int instance_id = meet_instance_id(tp->instance_id());
+ return make( meet_ptr(tp->ptr()), meet_offset(tp->offset()), instance_id );
}
case InstPtr: // For these, flip the call around to cut down
@@ -2801,7 +2802,7 @@ const Type *TypeInstPtr::xmeet( const Type *t ) const {
case OopPtr: { // Meeting to OopPtrs
// Found a OopPtr type vs self-InstPtr type
- const TypePtr *tp = t->is_oopptr();
+ const TypeOopPtr *tp = t->is_oopptr();
int offset = meet_offset(tp->offset());
PTR ptr = meet_ptr(tp->ptr());
switch (tp->ptr()) {
@@ -2812,8 +2813,10 @@ const Type *TypeInstPtr::xmeet( const Type *t ) const {
(ptr == Constant ? const_oop() : NULL), offset, instance_id);
}
case NotNull:
- case BotPTR:
- return TypeOopPtr::make(ptr, offset);
+ case BotPTR: {
+ int instance_id = meet_instance_id(tp->instance_id());
+ return TypeOopPtr::make(ptr, offset, instance_id);
+ }
default: typerr(t);
}
}
@@ -3259,7 +3262,7 @@ const Type *TypeAryPtr::xmeet( const Type *t ) const {
case OopPtr: { // Meeting to OopPtrs
// Found a OopPtr type vs self-AryPtr type
- const TypePtr *tp = t->is_oopptr();
+ const TypeOopPtr *tp = t->is_oopptr();
int offset = meet_offset(tp->offset());
PTR ptr = meet_ptr(tp->ptr());
switch (tp->ptr()) {
@@ -3270,8 +3273,10 @@ const Type *TypeAryPtr::xmeet( const Type *t ) const {
_ary, _klass, _klass_is_exact, offset, instance_id);
}
case BotPTR:
- case NotNull:
- return TypeOopPtr::make(ptr, offset);
+ case NotNull: {
+ int instance_id = meet_instance_id(tp->instance_id());
+ return TypeOopPtr::make(ptr, offset, instance_id);
+ }
default: ShouldNotReachHere();
}
}
diff --git a/hotspot/src/share/vm/opto/type.hpp b/hotspot/src/share/vm/opto/type.hpp
index 01a652ee799..4ad11402bce 100644
--- a/hotspot/src/share/vm/opto/type.hpp
+++ b/hotspot/src/share/vm/opto/type.hpp
@@ -714,7 +714,7 @@ public:
static const TypeOopPtr* make_from_constant(ciObject* o);
// Make a generic (unclassed) pointer to an oop.
- static const TypeOopPtr* make(PTR ptr, int offset);
+ static const TypeOopPtr* make(PTR ptr, int offset, int instance_id = InstanceBot);
ciObject* const_oop() const { return _const_oop; }
virtual ciKlass* klass() const { return _klass; }
diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp
index bde5dba7771..2bba3e0af03 100644
--- a/hotspot/src/share/vm/prims/jni.cpp
+++ b/hotspot/src/share/vm/prims/jni.cpp
@@ -299,7 +299,8 @@ JNI_ENTRY(jclass, jni_DefineClass(JNIEnv *env, const char *name, jobject loaderR
}
}
klassOop k = SystemDictionary::resolve_from_stream(class_name, class_loader,
- Handle(), &st, CHECK_NULL);
+ Handle(), &st, true,
+ CHECK_NULL);
if (TraceClassResolution && k != NULL) {
trace_class_resolution(k);
diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp
index 3e2e38246d0..36c6507ee72 100644
--- a/hotspot/src/share/vm/prims/jvm.cpp
+++ b/hotspot/src/share/vm/prims/jvm.cpp
@@ -762,7 +762,11 @@ static void is_lock_held_by_thread(Handle loader, PerfCounter* counter, TRAPS) {
}
// common code for JVM_DefineClass() and JVM_DefineClassWithSource()
-static jclass jvm_define_class_common(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source, TRAPS) {
+// and JVM_DefineClassWithSourceCond()
+static jclass jvm_define_class_common(JNIEnv *env, const char *name,
+ jobject loader, const jbyte *buf,
+ jsize len, jobject pd, const char *source,
+ jboolean verify, TRAPS) {
if (source == NULL) source = "__JVM_DefineClass__";
assert(THREAD->is_Java_thread(), "must be a JavaThread");
@@ -803,6 +807,7 @@ static jclass jvm_define_class_common(JNIEnv *env, const char *name, jobject loa
Handle protection_domain (THREAD, JNIHandles::resolve(pd));
klassOop k = SystemDictionary::resolve_from_stream(class_name, class_loader,
protection_domain, &st,
+ verify != 0,
CHECK_NULL);
if (TraceClassResolution && k != NULL) {
@@ -816,16 +821,24 @@ static jclass jvm_define_class_common(JNIEnv *env, const char *name, jobject loa
JVM_ENTRY(jclass, JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd))
JVMWrapper2("JVM_DefineClass %s", name);
- return jvm_define_class_common(env, name, loader, buf, len, pd, NULL, THREAD);
+ return jvm_define_class_common(env, name, loader, buf, len, pd, NULL, true, THREAD);
JVM_END
JVM_ENTRY(jclass, JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source))
JVMWrapper2("JVM_DefineClassWithSource %s", name);
- return jvm_define_class_common(env, name, loader, buf, len, pd, source, THREAD);
+ return jvm_define_class_common(env, name, loader, buf, len, pd, source, true, THREAD);
JVM_END
+JVM_ENTRY(jclass, JVM_DefineClassWithSourceCond(JNIEnv *env, const char *name,
+ jobject loader, const jbyte *buf,
+ jsize len, jobject pd,
+ const char *source, jboolean verify))
+ JVMWrapper2("JVM_DefineClassWithSourceCond %s", name);
+
+ return jvm_define_class_common(env, name, loader, buf, len, pd, source, verify, THREAD);
+JVM_END
JVM_ENTRY(jclass, JVM_FindLoadedClass(JNIEnv *env, jobject loader, jstring name))
JVMWrapper("JVM_FindLoadedClass");
diff --git a/hotspot/src/share/vm/prims/jvm.h b/hotspot/src/share/vm/prims/jvm.h
index fea96ee4aa7..cedfba06d40 100644
--- a/hotspot/src/share/vm/prims/jvm.h
+++ b/hotspot/src/share/vm/prims/jvm.h
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
@@ -417,6 +417,17 @@ JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader,
const jbyte *buf, jsize len, jobject pd,
const char *source);
+/* Define a class with a source with conditional verification (added HSX 14)
+ * -Xverify:all will verify anyway, -Xverify:none will not verify,
+ * -Xverify:remote (default) will obey this conditional
+ * i.e. true = should_verify_class
+ */
+JNIEXPORT jclass JNICALL
+JVM_DefineClassWithSourceCond(JNIEnv *env, const char *name,
+ jobject loader, const jbyte *buf,
+ jsize len, jobject pd, const char *source,
+ jboolean verify);
+
/* Define a class with a source (MLVM) */
JNIEXPORT jclass JNICALL
JVM_DefineClassWithCP(JNIEnv *env, const char *name, jobject loader,
diff --git a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
index ba9b1d877b0..a2a888c33d5 100644
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
@@ -933,7 +933,7 @@ jvmtiError VM_RedefineClasses::load_new_class_versions(TRAPS) {
// description.
RedefineVerifyMark rvm(&the_class, &scratch_class, state);
Verifier::verify(
- scratch_class, Verifier::ThrowException, THREAD);
+ scratch_class, Verifier::ThrowException, true, THREAD);
}
if (HAS_PENDING_EXCEPTION) {
@@ -959,7 +959,7 @@ jvmtiError VM_RedefineClasses::load_new_class_versions(TRAPS) {
// verify what we have done during constant pool merging
{
RedefineVerifyMark rvm(&the_class, &scratch_class, state);
- Verifier::verify(scratch_class, Verifier::ThrowException, THREAD);
+ Verifier::verify(scratch_class, Verifier::ThrowException, true, THREAD);
}
if (HAS_PENDING_EXCEPTION) {
diff --git a/hotspot/src/share/vm/runtime/atomic.hpp b/hotspot/src/share/vm/runtime/atomic.hpp
index 9c8ba27bacc..d4c9bdc83e6 100644
--- a/hotspot/src/share/vm/runtime/atomic.hpp
+++ b/hotspot/src/share/vm/runtime/atomic.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/runtime/perfData.hpp b/hotspot/src/share/vm/runtime/perfData.hpp
index f98a5f3cb44..6535e9f60f3 100644
--- a/hotspot/src/share/vm/runtime/perfData.hpp
+++ b/hotspot/src/share/vm/runtime/perfData.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2001-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/runtime/safepoint.cpp b/hotspot/src/share/vm/runtime/safepoint.cpp
index 01bd705c291..bbe60732c45 100644
--- a/hotspot/src/share/vm/runtime/safepoint.cpp
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp
@@ -769,9 +769,23 @@ void ThreadSafepointState::examine_state_of_thread() {
// to grab the Threads_lock which we own here, so a thread cannot be
// resumed during safepoint synchronization.
- // We check with locking because another thread that has not yet
- // synchronized may be trying to suspend this one.
- bool is_suspended = _thread->is_any_suspended_with_lock();
+ // We check to see if this thread is suspended without locking to
+ // avoid deadlocking with a third thread that is waiting for this
+ // thread to be suspended. The third thread can notice the safepoint
+ // that we're trying to start at the beginning of its SR_lock->wait()
+ // call. If that happens, then the third thread will block on the
+ // safepoint while still holding the underlying SR_lock. We won't be
+ // able to get the SR_lock and we'll deadlock.
+ //
+ // We don't need to grab the SR_lock here for two reasons:
+ // 1) The suspend flags are both volatile and are set with an
+ // Atomic::cmpxchg() call so we should see the suspended
+ // state right away.
+ // 2) We're being called from the safepoint polling loop; if
+ // we don't see the suspended state on this iteration, then
+ // we'll come around again.
+ //
+ bool is_suspended = _thread->is_ext_suspended();
if (is_suspended) {
roll_forward(_at_safepoint);
return;
diff --git a/hotspot/src/share/vm/runtime/sweeper.cpp b/hotspot/src/share/vm/runtime/sweeper.cpp
index 7452d2d9cbb..f99f1c9e1c3 100644
--- a/hotspot/src/share/vm/runtime/sweeper.cpp
+++ b/hotspot/src/share/vm/runtime/sweeper.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp
index 59fb8dbc725..d0faea1a94a 100644
--- a/hotspot/src/share/vm/runtime/thread.cpp
+++ b/hotspot/src/share/vm/runtime/thread.cpp
@@ -1942,7 +1942,7 @@ int JavaThread::java_suspend_self() {
MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);
- assert(!this->is_any_suspended(),
+ assert(!this->is_ext_suspended(),
"a thread trying to self-suspend should not already be suspended");
if (this->is_suspend_equivalent()) {
diff --git a/hotspot/src/share/vm/runtime/thread.hpp b/hotspot/src/share/vm/runtime/thread.hpp
index c1920bb220f..cccb81d93d7 100644
--- a/hotspot/src/share/vm/runtime/thread.hpp
+++ b/hotspot/src/share/vm/runtime/thread.hpp
@@ -967,11 +967,6 @@ class JavaThread: public Thread {
return (_suspend_flags & _ext_suspended) != 0;
}
- // legacy method that checked for either external suspension or vm suspension
- bool is_any_suspended() const {
- return is_ext_suspended();
- }
-
bool is_external_suspend_with_lock() const {
MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);
return is_external_suspend();
@@ -997,10 +992,6 @@ class JavaThread: public Thread {
return ret;
}
- bool is_any_suspended_with_lock() const {
- MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);
- return is_any_suspended();
- }
// utility methods to see if we are doing some kind of suspension
bool is_being_ext_suspended() const {
MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);
diff --git a/hotspot/src/share/vm/runtime/vframeArray.hpp b/hotspot/src/share/vm/runtime/vframeArray.hpp
index 869fcdebe13..e4a2d1fc886 100644
--- a/hotspot/src/share/vm/runtime/vframeArray.hpp
+++ b/hotspot/src/share/vm/runtime/vframeArray.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/runtime/vframe_hp.hpp b/hotspot/src/share/vm/runtime/vframe_hp.hpp
index 3e1a01f2599..efaafa229ae 100644
--- a/hotspot/src/share/vm/runtime/vframe_hp.hpp
+++ b/hotspot/src/share/vm/runtime/vframe_hp.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/services/threadService.cpp b/hotspot/src/share/vm/services/threadService.cpp
index a09ce5a59a3..8f8f3ad4338 100644
--- a/hotspot/src/share/vm/services/threadService.cpp
+++ b/hotspot/src/share/vm/services/threadService.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2009 Sun Microsystems, 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
diff --git a/hotspot/src/share/vm/services/threadService.hpp b/hotspot/src/share/vm/services/threadService.hpp
index eec88a0f88b..6febf428051 100644
--- a/hotspot/src/share/vm/services/threadService.hpp
+++ b/hotspot/src/share/vm/services/threadService.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2009 Sun Microsystems, 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
diff --git a/hotspot/test/compiler/6636138/Test1.java b/hotspot/test/compiler/6636138/Test1.java
index 8efc9d4f192..306db6d106c 100644
--- a/hotspot/test/compiler/6636138/Test1.java
+++ b/hotspot/test/compiler/6636138/Test1.java
@@ -45,7 +45,7 @@ public class Test1 {
for (int i = 0; i < src.length; i++) {
if (src[i] != ref[i]) {
System.out.println("Error: src and ref don't match at " + i);
- System.exit(-1);
+ System.exit(97);
}
}
}
diff --git a/hotspot/test/compiler/6636138/Test2.java b/hotspot/test/compiler/6636138/Test2.java
index 27bc41060c8..b9d9831e6c3 100644
--- a/hotspot/test/compiler/6636138/Test2.java
+++ b/hotspot/test/compiler/6636138/Test2.java
@@ -51,7 +51,7 @@ public class Test2 {
int value = (i-1 + src.length)%src.length; // correct value after shifting
if (src[i] != value) {
System.out.println("Error: src["+i+"] should be "+ value + " instead of " + src[i]);
- System.exit(-1);
+ System.exit(97);
}
}
}
diff --git a/hotspot/test/compiler/6855215/Test6855215.java b/hotspot/test/compiler/6855215/Test6855215.java
new file mode 100644
index 00000000000..259e5135466
--- /dev/null
+++ b/hotspot/test/compiler/6855215/Test6855215.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2009 Sun Microsystems, 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 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.
+ *
+ */
+
+/**
+ * @test
+ * @bug 6855215
+ * @summary Calculation error (NaN) after about 1500 calculations
+ *
+ * @run main/othervm -Xbatch -XX:UseSSE=0 Test6855215
+ */
+
+public class Test6855215 {
+ private double m;
+ private double b;
+
+ public static double log10(double x) {
+ return Math.log(x) / Math.log(10);
+ }
+
+ void calcMapping(double xmin, double xmax, double ymin, double ymax) {
+ m = (ymax - ymin) / (log10(xmax) - log10(xmin));
+ b = (log10(xmin) * ymax - log10(xmax) * ymin);
+ }
+
+ public static void main(String[] args) {
+ Test6855215 c = new Test6855215();
+ for (int i = 0; i < 30000; i++) {
+ c.calcMapping(91, 121, 177, 34);
+ if (c.m != c.m) {
+ throw new InternalError();
+ }
+ }
+ }
+}
diff --git a/hotspot/test/compiler/6865031/Test.java b/hotspot/test/compiler/6865031/Test.java
index 3262410840c..a502f298f9d 100644
--- a/hotspot/test/compiler/6865031/Test.java
+++ b/hotspot/test/compiler/6865031/Test.java
@@ -26,7 +26,7 @@
* @test
* @bug 6865031
* @summary Application gives bad result (throws bad exception) with compressed oops
- * @run main/othervm -XX:+UseCompressedOops -XX:HeapBaseMinAddress=32g -XX:-LoopUnswitching -XX:CompileCommand=inline,AbstractMemoryEfficientList.equals Test hello goodbye
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:HeapBaseMinAddress=32g -XX:-LoopUnswitching -XX:CompileCommand=inline,AbstractMemoryEfficientList.equals Test hello goodbye
*/
import java.lang.ref.ReferenceQueue;
diff --git a/jaxp/.hgignore b/jaxp/.hgignore
index eccd39adfa1..05a4793cff1 100644
--- a/jaxp/.hgignore
+++ b/jaxp/.hgignore
@@ -1,4 +1,5 @@
^build/
^dist/
+^drop/
^webrev/
^nbproject/private/
diff --git a/jaxp/.hgtags b/jaxp/.hgtags
index 96e0e69ab31..4db860001f8 100644
--- a/jaxp/.hgtags
+++ b/jaxp/.hgtags
@@ -46,3 +46,4 @@ a033af8d824a408d3ac602205ecdefc128749e1e jdk7-b67
a4ab0d6ded63bed0fd1e5be55d38090e0ee5efb7 jdk7-b69
c83f0106b78a85c7e614d27a328675460b2081cf jdk7-b70
ff94d8ce0daded647bb326630e643d010357afce jdk7-b71
+37c805b6156fd492c12301688b54a6bcca39e729 jdk7-b72
diff --git a/jaxp/README b/jaxp/README
index 7e023d66c41..f5462658425 100644
--- a/jaxp/README
+++ b/jaxp/README
@@ -1,14 +1,25 @@
README:
- This file should be located at the top of the jaxp Mercurial repository.
+
+ This file should be located at the top of the Mercurial repository.
See http://openjdk.java.net/ for more information about the OpenJDK.
See ../README-builds.html for complete details on build machine requirements.
Simple Build Instructions:
-
+ This repository can be loaded as a NetBeans project, built with ant, or
+ built with GNU make, e.g.
+ ant
+ -OR-
cd make && gnumake
- The files that will be imported into the jdk build will be in the "dist"
- directory.
+ The built files that will be imported into the jdk build will be in the
+ "dist" directory.
+ Help information is available by running "ant -projecthelp" or "make help".
+
+Drop Repository:
+ This repository builds sources from a created "drop" source directory.
+ These files will normally be copied from a shared directory area or
+ downloaded from a public website.
+ See the ant build script (build.xml) for more details.
diff --git a/jaxp/build-defs.xml b/jaxp/build-defs.xml
new file mode 100644
index 00000000000..a20d94791db
--- /dev/null
+++ b/jaxp/build-defs.xml
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jaxp/build-drop-template.xml b/jaxp/build-drop-template.xml
new file mode 100644
index 00000000000..1fe858cef23
--- /dev/null
+++ b/jaxp/build-drop-template.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jaxp/build.properties b/jaxp/build.properties
new file mode 100644
index 00000000000..880b11c8a55
--- /dev/null
+++ b/jaxp/build.properties
@@ -0,0 +1,103 @@
+#
+# Copyright 2007-2009 Sun Microsystems, 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 version 2 only, as
+# published by the Free Software Foundation. Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# 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.
+#
+
+# Base locations where bundles are located
+slashjava=/java
+devtools=${slashjava}/devtools
+
+# This is the JDK used to build and run the bootstrap version of javac.
+# The bootstrap javac is used to compile both boostrap versions of the
+# other tools, and product versions of all the tools.
+# Override this path as needed, either on the command line or in
+# one of the standard user build.properties files (see build.xml)
+javac.jar=${bootstrap.dir}/lib/javac.jar
+
+# options for the tasks used to compile the tools
+javac.source = 7
+javac.target = 7
+javac.debug = true
+javac.no.jdk.warnings = -XDignore.symbol.file=true
+# set the following to -version to verify the versions of javac being used
+javac.version.opt =
+# in time, there should be no exceptions to -Xlint:all
+#javac.lint.opts = -Xlint:all,-unchecked,-deprecation,-fallthrough,-cast,-serial
+javac.lint.opts=
+
+# JVM memory size
+javac.memoryInitialSize = 256m
+javac.memoryMaximumSize = 512m
+
+#------------------------------------------------------------
+
+# Root of output directories
+output.dir=.
+
+# Built files
+build.dir=${output.dir}/build
+build.classes.dir=${build.dir}/classes
+
+# Distributed results
+dist.dir=${output.dir}/dist
+dist.lib.dir=${dist.dir}/lib
+dist.classes.jar=${dist.lib.dir}/classes.jar
+dist.src.zip=${dist.lib.dir}/src.zip
+
+# Where all drop sources live
+drop.dir=./drop
+
+# Where patches to drop bundle sources live
+patches.dir=patches
+
+# Original source area
+orig.dir=src
+orig.src.dir=${orig.dir}/share/classes
+
+# Sanity information
+sanity.info= Sanity Settings:${line.separator}\
+ ant.home=${ant.home}${line.separator}\
+ ant.version=${ant.version}${line.separator}\
+ ant.java.version=${ant.java.version}${line.separator}\
+ java.home=${java.home}${line.separator}\
+ java.version=${java.version}${line.separator}\
+ os.name=${os.name}${line.separator}\
+ os.arch=${os.arch}${line.separator}\
+ os.version=${os.version}${line.separator}\
+ bootstrap.dir=${bootstrap.dir}${line.separator}\
+ javac.jar=${javac.jar}${line.separator}\
+ javac.memoryInitialSize=${javac.memoryInitialSize}${line.separator}\
+ javac.memoryMaximumSize=${javac.memoryMaximumSize}${line.separator}\
+ javac.source=${javac.source}${line.separator}\
+ javac.debug=${javac.debug}${line.separator}\
+ javac.target=${javac.target}${line.separator}\
+ javac.version.opt=${javac.version.opt}${line.separator}\
+ javac.lint.opts=${javac.lint.opts}${line.separator}\
+ javac.no.jdk.warnings=${javac.no.jdk.warnings}${line.separator}\
+ output.dir=${output.dir}${line.separator}\
+ build.dir=${build.dir}${line.separator}\
+ dist.dir=${dist.dir}${line.separator}\
+ drop.dir=${drop.dir}${line.separator}\
+${line.separator}
+
+#------------------------------------------------------------
diff --git a/jaxp/build.xml b/jaxp/build.xml
new file mode 100644
index 00000000000..5e26e78068c
--- /dev/null
+++ b/jaxp/build.xml
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+ Ant build script for the ${ant.project.name} part of the jdk.
+
+ Input Properties: (see build.properties for the ant defaults)
+ bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath
+ javac.debug - true or false for debug classfiles
+ javac.target - classfile version target
+ javac.source - source version
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jaxws/make/build.properties b/jaxp/jaxp.properties
similarity index 57%
rename from jaxws/make/build.properties
rename to jaxp/jaxp.properties
index b47b03277fb..de30baa92d4 100644
--- a/jaxws/make/build.properties
+++ b/jaxp/jaxp.properties
@@ -23,24 +23,14 @@
# have any questions.
#
-# This is the JDK used to build and run the bootstrap version of javac.
-# The bootstrap javac is used to compile both boostrap versions of the
-# other tools, and product versions of all the tools.
-# Override this path as needed, either on the command line or in
-# one of the standard user build.properties files (see build.xml)
+drops.master.copy.base=${devtools}/share/jdk7-drops
+drops.master.url.base=http://kenai.com/projects/jdk7-drops/downloads/download
-# options for the tasks used to compile the tools
-javac.source = 7
-javac.target = 7
-javac.debug = true
-javac.no.jdk.warnings = -XDignore.symbol.file=true
-# set the following to -version to verify the versions of javac being used
-javac.version.opt =
-# in time, there should be no exceptions to -Xlint:all
-javac.lint.opts = -Xlint:all,-unchecked,-deprecation,-fallthrough,-cast,-serial -Werror
+jaxp_src.bundle.name=jdk7-jaxp-2009_09_28.zip
+jaxp_src.master.bundle.dir=${drops.master.copy.base}
+#jaxp_src.bundle.url.base=https://jaxp.dev.java.net/files/documents/913/142147
+jaxp_src.master.bundle.url.base=${drops.master.url.base}
-# JVM memory size
-javac.memoryInitialSize = 128m
-javac.memoryMaximumSize = 256m
-
-#------------------------------------------------------------
+jaxp_tests.bundle.name=jdk7-jaxp-tests-2009_08_28.zip
+jaxp_tests.master.bundle.dir=${drops.master.copy.base}
+jaxp_tests.master.bundle.url.base=${drops.master.url.base}
diff --git a/jaxp/make/Makefile b/jaxp/make/Makefile
index 1e01fc88ee2..74bd74b10fd 100644
--- a/jaxp/make/Makefile
+++ b/jaxp/make/Makefile
@@ -23,7 +23,7 @@
# have any questions.
#
-# Makefile for jaxp: wrapper around Ant build.xml file
+# Makefile wrapper around Ant build.xml file
#
# On Solaris, the 'make' utility from Sun will not work with these makefiles.
@@ -41,38 +41,12 @@ ifdef VERBOSE
ANT_OPTIONS += -verbose
endif
-ifdef JDK_VERSION
- ANT_OPTIONS += -Djdk.version=$(JDK_VERSION)
-endif
-
-ifdef FULL_VERSION
- ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces
-endif
-
-ifdef MILESTONE
- ANT_OPTIONS += -Dmilestone=$(MILESTONE)
-endif
-
-ifdef BUILD_NUMBER
- ANT_OPTIONS += -Dbuild.number=$(BUILD_NUMBER)
-else
- ifdef JDK_BUILD_NUMBER
- ANT_OPTIONS += -Dbuild.number=$(JDK_BUILD_NUMBER)
- endif
-endif
-
-ifeq ($(VARIANT), DBG)
- ANT_OPTIONS += -Djavac.debug=true
-else
- ifeq ($(VARIANT), OPT)
+ifeq ($(VARIANT), OPT)
+ ifneq ($(DEBUG_CLASSFILES), true)
ANT_OPTIONS += -Djavac.debug=false
endif
endif
-ifeq ($(DEBUG_CLASSFILES), true)
- ANT_OPTIONS += -Djavac.debug=true
-endif
-
# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
# and the somewhat misnamed CLASS_VERSION (-target NN)
ifdef TARGET_CLASS_VERSION
@@ -81,7 +55,7 @@ else
ifdef JAVAC_TARGET_ARG
ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG)
endif
-endif
+endif
ifdef SOURCE_LANGUAGE_VERSION
ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
@@ -91,24 +65,53 @@ else
endif
endif
-ifdef ALT_BOOTDIR
- ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
+# Figure out the platform we are using
+_SYSTEM_UNAME := $(shell uname)
+_PLATFORM_KIND = unix
+ifeq ($(_SYSTEM_UNAME), Windows_NT)
+ _PLATFORM_KIND = windows
endif
+ifneq (,$(findstring CYGWIN,$(_SYSTEM_UNAME)))
+ _PLATFORM_KIND = windows
+endif
+
+# Where is /java in case we need it
+ifdef ALT_SLASH_JAVA
+ _SLASHJAVA = $(ALT_SLASH_JAVA)
+else
+ ifeq ($(_PLATFORM_KIND), windows)
+ _SLASHJAVA=J:/
+ else
+ _SLASHJAVA=/java
+ endif
+endif
+
+# Where is /java/devtools in case we need it
+ifdef ALT_JDK_DEVTOOLS_DIR
+ _DEVTOOLS = $(ALT_JDK_DEVTOOLS_DIR)
+else
+ _DEVTOOLS = $(_SLASHJAVA)/devtools
+endif
+
+# Add in path to devtools
+ANT_OPTIONS += -Ddevtools=$(_DEVTOOLS)
ifdef ALT_OUTPUTDIR
OUTPUTDIR = $(ALT_OUTPUTDIR)
- ANT_OPTIONS += -Dbuild.dir=$(ALT_OUTPUTDIR)/build
- ANT_OPTIONS += -Ddist.dir=$(ALT_OUTPUTDIR)/dist
+ ANT_OPTIONS += -Doutput.dir=$(ALT_OUTPUTDIR)
else
OUTPUTDIR = ..
endif
ifdef ALT_LANGTOOLS_DIST
+ ifdef ALT_BOOTDIR
+ ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
+ endif
ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
-endif
-
-ifdef FINDBUGS_HOME
- ANT_OPTIONS += -Dfindbugs.home=$(FINDBUGS_HOME)
+else
+ ifdef ALT_JDK_IMPORT_PATH
+ ANT_JAVA_HOME = JAVA_HOME=$(ALT_JDK_IMPORT_PATH)
+ endif
endif
ifdef ANT_HOME
@@ -124,26 +127,67 @@ else
endif
# Default target and expected 'do everything' target
-all: build
-
-# Standard make clobber target
-clobber: clean
+default: all
# All ant targets of interest
-ANT_TARGETS = build clean sanity # for now
+ANT_TARGETS = all source build dist clobber clean sanity
# Create a make target for each
$(ANT_TARGETS):
- $(ANT_JAVA_HOME) $(ANT) -version
- $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
+ cd .. && $(ANT_JAVA_HOME) $(ANT) -version
+ cd .. && $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
+
+# Help target
+define helpenvline
+@echo " $1";echo " $2"
+endef
+help:
+ @echo "----------------------------------------------------------"
+ @echo " "
+ @echo "Help information for this Makefile:"
+ @echo " "
+ @echo " Targets (see ant project information for descriptions):"
+ @echo " $(ANT_TARGETS)"
+ @echo " "
+ @echo " Environment or command line variables (all optional):"
+ $(call helpenvline, ALT_BOOTDIR,\
+ "JAVA_HOME to use when running ant")
+ $(call helpenvline, ALT_LANGTOOLS_DIST,\
+ "path to langtools repository dist directory")
+ $(call helpenvline, ALT_OUTPUTDIR,\
+ "path to root of output")
+ $(call helpenvline, DEBUG_CLASSFILES,\
+ "if set makes sure ant property javac.debug is true")
+ $(call helpenvline, JAVAC_SOURCE_ARG,\
+ "if SOURCE_LANGUAGE_VERSION not set uses this to set ant property javac.source")
+ $(call helpenvline, JAVAC_TARGET_ARG,\
+ "if TARGET_CLASS_VERSION not set uses this to set ant property javac.target")
+ $(call helpenvline, SOURCE_LANGUAGE_VERSION,\
+ "if set uses this to set ant property javac.source")
+ $(call helpenvline, QUIET,\
+ "if set will pass -quiet to ant")
+ $(call helpenvline, TARGET_CLASS_VERSION,\
+ "JAVA_HOME to use when running ant")
+ $(call helpenvline, VARIANT,\
+ "if set to OPT means optimized build will set javac.debug to false")
+ $(call helpenvline, VERBOSE,\
+ "if set will pass -verbose to ant")
+ @echo " "
+ @echo "----------------------------------------------------------"
+ @echo " "
+ @echo "Ant project file help information:"
+ @echo " "
+ @$(ANT_JAVA_HOME) cd .. && $(ANT) $(ANT_OPTIONS) -p
+ @echo " "
+ @echo "----------------------------------------------------------"
# Targets for Sun's internal JPRT build system
JPRT_ARCHIVE_BUNDLE=$(OUTPUTDIR)/jprt.zip
jprt_build_product jprt_build_debug jprt_build_fastdebug: all
$(RM) $(JPRT_ARCHIVE_BUNDLE)
( cd $(OUTPUTDIR)/dist && \
- zip -q -r $(JPRT_ARCHIVE_BUNDLE) . )
+ zip -q -r $(JPRT_ARCHIVE_BUNDLE) . )
# Declare these phony (not filenames)
-.PHONY: $(ANT_TARGETS) all clobber \
+.PHONY: $(ANT_TARGETS) \
jprt_build_product jprt_build_debug jprt_build_fastdebug
diff --git a/jaxp/make/build.xml b/jaxp/make/build.xml
deleted file mode 100644
index 63a78a18909..00000000000
--- a/jaxp/make/build.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ant.home = ${ant.home}
- java.home = ${env.JAVA_HOME}
- bootstrap.dir = ${bootstrap.dir}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +---------------------------------------+
- + Building JAXP Component +
- +---------------------------------------+
-
-
-
diff --git a/jaxp/make/jprt.properties b/jaxp/make/jprt.properties
index 22c6289406a..ae7b42fe9e8 100644
--- a/jaxp/make/jprt.properties
+++ b/jaxp/make/jprt.properties
@@ -34,8 +34,8 @@ solaris_i586_5.10,\
solaris_x64_5.10,\
linux_i586_2.6,\
linux_x64_2.6,\
-windows_i586,\
-windows_x64
+windows_i586_5.0,\
+windows_x64_5.2
# The different build flavors we want
jprt.build.flavors=product,fastdebug
@@ -49,7 +49,6 @@ jprt.solaris_x64_5.10.build.platform.match32=solaris_i586_5.10
# Standard list of jprt test targets for this workspace
jprt.test.targets=
-# Directories needed to build
-jprt.bundle.src.dirs=make src
+# Directories needing to exclude from source bundles
jprt.bundle.exclude.src.dirs=build dist
diff --git a/jaxp/make/tools/StripProperties/StripProperties.java b/jaxp/make/tools/StripProperties/StripProperties.java
deleted file mode 100644
index 4a3943b0aae..00000000000
--- a/jaxp/make/tools/StripProperties/StripProperties.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright 2001 Sun Microsystems, 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 version 2 only, as
- * published by the Free Software Foundation. Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * 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.
- */
-
-import java.io.BufferedInputStream;
-import java.io.BufferedWriter;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * Reads a properties file from standard input and writes an equivalent
- * properties file without comments to standard output.
- */
-public class StripProperties {
-
- public static void main(String[] args) {
- StripProperties sp = new StripProperties();
- boolean ok = sp.run(args);
- if ( !ok ) {
- System.exit(1);
- }
- }
-
- static interface Log {
- void info(String msg);
- void verbose(String msg);
- void error(String msg, Exception e);
- }
-
- private String propfiles[];
- private String outfiles[] ;
- private int stripCount = 0;
- private boolean quiet = false;
- private Log log;
-
- public void setLog(Log log) {
- this.log = log;
- }
-
- private boolean parseOptions(String args[]) {
- boolean ok = true;
- if ( stripCount > 0 ) {
- String new_propfiles[] = new String[stripCount + args.length];
- String new_outfiles[] = new String[stripCount + args.length];
- System.arraycopy(propfiles, 0, new_propfiles, 0, stripCount);
- System.arraycopy(outfiles, 0, new_outfiles, 0, stripCount);
- propfiles = new_propfiles;
- outfiles = new_outfiles;
- } else {
- propfiles = new String[args.length];
- outfiles = new String[args.length];
- }
-
- for ( int i = 0; i < args.length ; i++ ) {
- if ( "-strip".equals(args[i]) && i+2 < args.length ) {
- propfiles[stripCount] = args[++i];
- outfiles[stripCount] = args[++i];
- stripCount++;
- } else if ( "-optionsfile".equals(args[i]) && i+1 < args.length ) {
- String filename = args[++i];
- FileInputStream finput = null;
- byte contents[] = null;
- try {
- finput = new FileInputStream(filename);
- int byteCount = finput.available();
- if ( byteCount <= 0 ) {
- log.error("The -optionsfile file is empty", null);
- ok = false;
- } else {
- contents = new byte[byteCount];
- int bytesRead = finput.read(contents);
- if ( byteCount != bytesRead ) {
- log.error("Cannot read all of -optionsfile file", null);
- ok = false;
- }
- }
- } catch ( IOException e ) {
- log.error("cannot open " + filename, e);
- ok = false;
- }
- if ( finput != null ) {
- try {
- finput.close();
- } catch ( IOException e ) {
- ok = false;
- log.error("cannot close " + filename, e);
- }
- }
- if ( ok = true && contents != null ) {
- String tokens[] = (new String(contents)).split("\\s+");
- if ( tokens.length > 0 ) {
- ok = parseOptions(tokens);
- }
- }
- if ( !ok ) {
- break;
- }
- } else if ( "-quiet".equals(args[i]) ) {
- quiet = true;
- } else {
- log.error("argument error", null);
- ok = false;
- }
- }
- return ok;
- }
-
- private boolean stripFiles(String propertiesPath, String outputPath) {
- boolean ok = true;
- Properties prop = new Properties();
- InputStream in = null;
- try {
- in = new BufferedInputStream(new FileInputStream(propertiesPath));
- prop.load(in);
- } catch ( FileNotFoundException e ) {
- log.error("Cannot access file " + propertiesPath, e);
- ok = false;
- } catch ( IOException e ) {
- log.error("IO exception processing file " + propertiesPath, e);
- ok = false;
- }
- if ( in != null ) {
- try {
- in.close();
- } catch ( IOException e ) {
- log.error("IO exception closing file " + propertiesPath, e);
- ok = false;
- }
- }
-
- OutputStream out = null;
- try {
- out = new FileOutputStream(outputPath);
- storeProperties(prop, out);
- out.flush();
- } catch ( IOException e ) {
- log.error("IO exception processing file " + outputPath, e);
- e.printStackTrace();
- ok = false;
- }
- if ( out != null ) {
- try {
- out.close();
- } catch ( IOException e ) {
- log.error("IO exception closing file " + outputPath, e);
- ok = false;
- }
- }
- return ok;
- }
-
- /**
- * Strip the properties filenames supplied, replacing their contents.
- * @param args Names of properties files to process and replace contents
- */
- public boolean run(String args[]) {
- if (log == null) {
- log = new Log() {
- public void error(String msg, Exception e) {
- System.err.println("ERROR: StripProperties: " + msg);
- if ( e != null ) {
- System.err.println("EXCEPTION: " + e.toString());
- e.printStackTrace();
- }
- }
- public void info(String msg) {
- System.out.println(msg);
- }
- public void verbose(String msg) {
- if (!quiet)
- System.out.println(msg);
- }
- };
- }
-
- boolean ok = true;
- ok = parseOptions(args);
- if ( ok && stripCount == 0 ) {
- log.error("options parsed but no files to compile", null);
- ok = false;
- }
- /* Need at least one file. */
- if ( !ok ) {
- //usage(log);
- } else {
- /* Process files */
- for ( int i = 0; i < stripCount && ok ; i++ ) {
- ok = stripFiles(propfiles[i], outfiles[i]);
- }
- }
- return ok;
- }
-
- // --- code below here is adapted from java.util.Properties ---
-
- private static final String specialSaveChars = "=: \t\r\n\f#!";
-
- /*
- * Converts unicodes to encoded \uxxxx
- * and writes out any of the characters in specialSaveChars
- * with a preceding slash
- */
- private static String saveConvert(String theString, boolean escapeSpace) {
- int len = theString.length();
- StringBuffer outBuffer = new StringBuffer(len*2);
-
- for(int x=0; x 0x00ff)) {
- outBuffer.append('\\');
- outBuffer.append('u');
- outBuffer.append(toHex((aChar >> 12) & 0xF));
- outBuffer.append(toHex((aChar >> 8) & 0xF));
- outBuffer.append(toHex((aChar >> 4) & 0xF));
- outBuffer.append(toHex( aChar & 0xF));
- } else {
- if (specialSaveChars.indexOf(aChar) != -1) {
- outBuffer.append('\\');
- }
- outBuffer.append(aChar);
- }
- }
- }
- return outBuffer.toString();
- }
-
- /**
- * Writes the content of properties to out.
- * The format is that of Properties.store with the following modifications:
- *
- *
No header or date is written
- *
Latin-1 characters are written as single bytes, not escape sequences
- *
Line breaks are indicated by a single \n independent of platform
- *
- */
- private static void storeProperties(Properties properties, OutputStream out)
- throws IOException {
- BufferedWriter awriter;
- awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1"));
- for (Enumeration e = properties.keys(); e.hasMoreElements();) {
- String key = (String)e.nextElement();
- String val = (String)properties.get(key);
- key = saveConvert(key, true);
-
- /* No need to escape embedded and trailing spaces for value, hence
- * pass false to flag.
- */
- val = saveConvert(val, false);
- writeln(awriter, key + "=" + val);
- }
- awriter.flush();
- }
-
- private static void writeln(BufferedWriter bw, String s) throws IOException {
- bw.write(s);
- bw.write("\n");
- }
-
- /**
- * Convert a nibble to a hex character
- * @param nibble the nibble to convert.
- */
- private static char toHex(int nibble) {
- return hexDigit[(nibble & 0xF)];
- }
-
- /** A table of hex digits */
- private static final char[] hexDigit = {
- '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
- };
-}
diff --git a/jaxp/make/tools/StripProperties/StripPropertiesTask.java b/jaxp/make/tools/StripProperties/StripPropertiesTask.java
deleted file mode 100644
index 59a95ee9037..00000000000
--- a/jaxp/make/tools/StripProperties/StripPropertiesTask.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2007 Sun Microsystems, 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 version 2 only, as
- * published by the Free Software Foundation. Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * 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.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.MatchingTask;
-
-public class StripPropertiesTask extends MatchingTask {
- public void setSrcDir(File srcDir) {
- this.srcDir = srcDir;
- }
-
- public void setDestDir(File destDir) {
- this.destDir = destDir;
- }
-
- public void execute() {
- StripProperties.Log log = new StripProperties.Log() {
- public void error(String msg, Exception e) {
- log(msg, Project.MSG_ERR);
- }
- public void info(String msg) {
- log(msg, Project.MSG_INFO);
- }
- public void verbose(String msg) {
- log(msg, Project.MSG_VERBOSE);
- }
- };
- List mainOpts = new ArrayList();
- int count = 0;
- DirectoryScanner s = getDirectoryScanner(srcDir);
- for (String path: s.getIncludedFiles()) {
- if (path.endsWith(".properties")) {
- File srcFile = new File(srcDir, path);
- File destFile = new File(destDir, path);
- // Arguably, the comparison in the next line should be ">", not ">="
- // but that assumes the resolution of the last modified time is fine
- // grained enough; in practice, it is better to use ">=".
- if (destFile.exists() && destFile.lastModified() >= srcFile.lastModified())
- continue;
- destFile.getParentFile().mkdirs();
- mainOpts.add("-strip");
- mainOpts.add(srcFile.getPath());
- mainOpts.add(destFile.getPath());
- count++;
- }
- }
- if (mainOpts.size() > 0) {
- log("Generating " + count + " resource files to " + destDir, Project.MSG_INFO);
- StripProperties sp = new StripProperties();
- sp.setLog(log);
- boolean ok = sp.run((String[])mainOpts.toArray(new String[mainOpts.size()]));
- if (!ok)
- throw new BuildException("StripProperties failed.");
- }
- }
-
- private File srcDir;
- private File destDir;
-}
diff --git a/jaxp/nbproject/findbugs.settings b/jaxp/nbproject/findbugs.settings
new file mode 100644
index 00000000000..a5d76311443
--- /dev/null
+++ b/jaxp/nbproject/findbugs.settings
@@ -0,0 +1,72 @@
+#FindBugs User Preferences
+#Tue Jun 30 18:33:11 PDT 2009
+detectorAbnormalFinallyBlockReturn=AbnormalFinallyBlockReturn|false
+detectorAbstractClassEmptyMethods=AbstractClassEmptyMethods|false
+detectorAbstractOverriddenMethod=AbstractOverriddenMethod|false
+detectorArrayBasedCollections=ArrayBasedCollections|false
+detectorArrayWrappedCallByReference=ArrayWrappedCallByReference|false
+detectorBloatedAssignmentScope=BloatedAssignmentScope|false
+detectorBloatedSynchronizedBlock=BloatedSynchronizedBlock|false
+detectorClassEnvy=ClassEnvy|false
+detectorCollectStatistics=CollectStatistics|false
+detectorConfusingAutoboxedOverloading=ConfusingAutoboxedOverloading|false
+detectorConstantListIndex=ConstantListIndex|false
+detectorCopiedOverriddenMethod=CopiedOverriddenMethod|false
+detectorCustomBuiltXML=CustomBuiltXML|false
+detectorCyclomaticComplexity=CyclomaticComplexity|false
+detectorDateComparison=DateComparison|false
+detectorDeclaredRuntimeException=DeclaredRuntimeException|false
+detectorDeletingWhileIterating=DeletingWhileIterating|false
+detectorDubiousListCollection=DubiousListCollection|false
+detectorFieldCouldBeLocal=FieldCouldBeLocal|false
+detectorFinalParameters=FinalParameters|false
+detectorFloatingPointLoops=FloatingPointLoops|false
+detectorInefficientStringBuffering=InefficientStringBuffering|false
+detectorInheritanceTypeChecking=InheritanceTypeChecking|false
+detectorJDBCVendorReliance=JDBCVendorReliance|false
+detectorListIndexedIterating=ListIndexedIterating|false
+detectorLiteralStringComparison=LiteralStringComparison|false
+detectorLocalSynchronizedCollection=LocalSynchronizedCollection|false
+detectorLostExceptionStackTrace=LostExceptionStackTrace|false
+detectorManualArrayCopy=ManualArrayCopy|false
+detectorMethodReturnsConstant=MethodReturnsConstant|false
+detectorNeedlessAutoboxing=NeedlessAutoboxing|false
+detectorNeedlessCustomSerialization=NeedlessCustomSerialization|false
+detectorNeedlessInstanceRetrieval=NeedlessInstanceRetrieval|false
+detectorNeedlessMemberCollectionSynchronization=NeedlessMemberCollectionSynchronization|false
+detectorNonCollectionMethodUse=NonCollectionMethodUse|false
+detectorNonOwnedSynchronization=NonOwnedSynchronization|false
+detectorNonRecycleableTaglibs=NonRecycleableTaglibs|false
+detectorOrphanedDOMNode=OrphanedDOMNode|false
+detectorOverlyConcreteParameter=OverlyConcreteParameter|false
+detectorParallelLists=ParallelLists|false
+detectorPartiallyConstructedObjectAccess=PartiallyConstructedObjectAccess|false
+detectorPossibleIncompleteSerialization=PossibleIncompleteSerialization|false
+detectorPossibleMemoryBloat=PossibleMemoryBloat|false
+detectorPossiblyRedundantMethodCalls=PossiblyRedundantMethodCalls|false
+detectorSQLInLoop=SQLInLoop|false
+detectorSection508Compliance=Section508Compliance|false
+detectorSillynessPotPourri=SillynessPotPourri|false
+detectorSloppyClassReflection=SloppyClassReflection|false
+detectorSluggishGui=SluggishGui|false
+detectorSpoiledChildInterfaceImplementor=SpoiledChildInterfaceImplementor|false
+detectorSpuriousThreadStates=SpuriousThreadStates|false
+detectorStaticArrayCreatedInMethod=StaticArrayCreatedInMethod|false
+detectorStaticMethodInstanceInvocation=StaticMethodInstanceInvocation|false
+detectorSuspiciousComparatorReturnValues=SuspiciousComparatorReturnValues|false
+detectorSuspiciousJDKVersionUse=SuspiciousJDKVersionUse|false
+detectorSuspiciousWaitOnConcurrentObject=SuspiciousWaitOnConcurrentObject|false
+detectorSyncCollectionIterators=SyncCollectionIterators|false
+detectorTailRecursion=TailRecursion|false
+detectorUnnecessaryStoreBeforeReturn=UnnecessaryStoreBeforeReturn|false
+detectorUnrelatedCollectionContents=UnrelatedCollectionContents|false
+detectorUnrelatedReturnValues=UnrelatedReturnValues|false
+detectorUseAddAll=UseAddAll|false
+detectorUseCharacterParameterizedMethod=UseCharacterParameterizedMethod|false
+detectorUseEnumCollections=UseEnumCollections|false
+detectorUseSplit=UseSplit|false
+detectorUseToArray=UseToArray|false
+detector_threshold=2
+effort=default
+filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false
+filter_settings_neg=|
diff --git a/jaxp/nbproject/project.xml b/jaxp/nbproject/project.xml
new file mode 100644
index 00000000000..48368ff45c7
--- /dev/null
+++ b/jaxp/nbproject/project.xml
@@ -0,0 +1,50 @@
+
+
+ org.netbeans.modules.ant.freeform
+
+
+ jaxp
+
+
+
+ jaxp
+
+
+
+
+ .
+ UTF-8
+
+
+
+
+ build
+
+
+ clean
+
+
+ clean
+ build
+
+
+
+
+
+ build.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jaxp/nbproject/sqe.properties b/jaxp/nbproject/sqe.properties
new file mode 100644
index 00000000000..978ef5bc013
--- /dev/null
+++ b/jaxp/nbproject/sqe.properties
@@ -0,0 +1,2 @@
+#Path to FindbugsSettingsFile (relative)
+findbugs.settings.file=findbugs.settings
diff --git a/jaxp/patches/jaxp_src/README b/jaxp/patches/jaxp_src/README
new file mode 100644
index 00000000000..644dff0223b
--- /dev/null
+++ b/jaxp/patches/jaxp_src/README
@@ -0,0 +1,5 @@
+
+This directory will hold any patches that need to be applied to the drop files.
+
+The patch order is defined in the ant build script properties.
+
diff --git a/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java b/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
index 513dec48f04..c0c3e414f7c 100644
--- a/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
+++ b/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
@@ -1,5 +1,5 @@
/*
- * Portions Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Portions Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
*/
/*
diff --git a/jaxws/.hgignore b/jaxws/.hgignore
index ca1b0b21ee2..05a4793cff1 100644
--- a/jaxws/.hgignore
+++ b/jaxws/.hgignore
@@ -1,3 +1,5 @@
^build/
^dist/
+^drop/
+^webrev/
^nbproject/private/
diff --git a/jaxws/.hgtags b/jaxws/.hgtags
index 989ee5fd57b..041b3190968 100644
--- a/jaxws/.hgtags
+++ b/jaxws/.hgtags
@@ -46,3 +46,4 @@ faa13cd4d6cdcfb155da5ed23b0da6e0ed0f9ea8 jdk7-b67
3e64fdfb92910e164d1f4b21b147719d5c674254 jdk7-b69
dd3c5f3ec28d5d5e5c0dc3229fdd52d85d04274d jdk7-b70
03314cf56a7212bbb6c186dbc9f15aca988a48ec jdk7-b71
+4c990aa99bc037fd81dd1b1b269690e9bea8a0b4 jdk7-b72
diff --git a/jaxws/README b/jaxws/README
index 3a06b2913cc..f5462658425 100644
--- a/jaxws/README
+++ b/jaxws/README
@@ -1,14 +1,25 @@
README:
- This file should be located at the top of the jaxws Mercurial repository.
+
+ This file should be located at the top of the Mercurial repository.
See http://openjdk.java.net/ for more information about the OpenJDK.
See ../README-builds.html for complete details on build machine requirements.
Simple Build Instructions:
-
+ This repository can be loaded as a NetBeans project, built with ant, or
+ built with GNU make, e.g.
+ ant
+ -OR-
cd make && gnumake
- The files that will be imported into the jdk build will be in the "dist"
- directory.
+ The built files that will be imported into the jdk build will be in the
+ "dist" directory.
+ Help information is available by running "ant -projecthelp" or "make help".
+
+Drop Repository:
+ This repository builds sources from a created "drop" source directory.
+ These files will normally be copied from a shared directory area or
+ downloaded from a public website.
+ See the ant build script (build.xml) for more details.
diff --git a/jaxws/build-defs.xml b/jaxws/build-defs.xml
new file mode 100644
index 00000000000..de2b567dc75
--- /dev/null
+++ b/jaxws/build-defs.xml
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jaxws/build-drop-template.xml b/jaxws/build-drop-template.xml
new file mode 100644
index 00000000000..1fe858cef23
--- /dev/null
+++ b/jaxws/build-drop-template.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jaxws/build.properties b/jaxws/build.properties
new file mode 100644
index 00000000000..880b11c8a55
--- /dev/null
+++ b/jaxws/build.properties
@@ -0,0 +1,103 @@
+#
+# Copyright 2007-2009 Sun Microsystems, 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 version 2 only, as
+# published by the Free Software Foundation. Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# 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.
+#
+
+# Base locations where bundles are located
+slashjava=/java
+devtools=${slashjava}/devtools
+
+# This is the JDK used to build and run the bootstrap version of javac.
+# The bootstrap javac is used to compile both boostrap versions of the
+# other tools, and product versions of all the tools.
+# Override this path as needed, either on the command line or in
+# one of the standard user build.properties files (see build.xml)
+javac.jar=${bootstrap.dir}/lib/javac.jar
+
+# options for the tasks used to compile the tools
+javac.source = 7
+javac.target = 7
+javac.debug = true
+javac.no.jdk.warnings = -XDignore.symbol.file=true
+# set the following to -version to verify the versions of javac being used
+javac.version.opt =
+# in time, there should be no exceptions to -Xlint:all
+#javac.lint.opts = -Xlint:all,-unchecked,-deprecation,-fallthrough,-cast,-serial
+javac.lint.opts=
+
+# JVM memory size
+javac.memoryInitialSize = 256m
+javac.memoryMaximumSize = 512m
+
+#------------------------------------------------------------
+
+# Root of output directories
+output.dir=.
+
+# Built files
+build.dir=${output.dir}/build
+build.classes.dir=${build.dir}/classes
+
+# Distributed results
+dist.dir=${output.dir}/dist
+dist.lib.dir=${dist.dir}/lib
+dist.classes.jar=${dist.lib.dir}/classes.jar
+dist.src.zip=${dist.lib.dir}/src.zip
+
+# Where all drop sources live
+drop.dir=./drop
+
+# Where patches to drop bundle sources live
+patches.dir=patches
+
+# Original source area
+orig.dir=src
+orig.src.dir=${orig.dir}/share/classes
+
+# Sanity information
+sanity.info= Sanity Settings:${line.separator}\
+ ant.home=${ant.home}${line.separator}\
+ ant.version=${ant.version}${line.separator}\
+ ant.java.version=${ant.java.version}${line.separator}\
+ java.home=${java.home}${line.separator}\
+ java.version=${java.version}${line.separator}\
+ os.name=${os.name}${line.separator}\
+ os.arch=${os.arch}${line.separator}\
+ os.version=${os.version}${line.separator}\
+ bootstrap.dir=${bootstrap.dir}${line.separator}\
+ javac.jar=${javac.jar}${line.separator}\
+ javac.memoryInitialSize=${javac.memoryInitialSize}${line.separator}\
+ javac.memoryMaximumSize=${javac.memoryMaximumSize}${line.separator}\
+ javac.source=${javac.source}${line.separator}\
+ javac.debug=${javac.debug}${line.separator}\
+ javac.target=${javac.target}${line.separator}\
+ javac.version.opt=${javac.version.opt}${line.separator}\
+ javac.lint.opts=${javac.lint.opts}${line.separator}\
+ javac.no.jdk.warnings=${javac.no.jdk.warnings}${line.separator}\
+ output.dir=${output.dir}${line.separator}\
+ build.dir=${build.dir}${line.separator}\
+ dist.dir=${dist.dir}${line.separator}\
+ drop.dir=${drop.dir}${line.separator}\
+${line.separator}
+
+#------------------------------------------------------------
diff --git a/jaxws/build.xml b/jaxws/build.xml
new file mode 100644
index 00000000000..f000420aa90
--- /dev/null
+++ b/jaxws/build.xml
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+ Ant build script for the ${ant.project.name} part of the jdk.
+
+ Input Properties: (see build.properties for the ant defaults)
+ bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath
+ javac.debug - true or false for debug classfiles
+ javac.target - classfile version target
+ javac.source - source version
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jaxp/make/build.properties b/jaxws/jaxws.properties
similarity index 57%
rename from jaxp/make/build.properties
rename to jaxws/jaxws.properties
index b47b03277fb..3dfffb135e9 100644
--- a/jaxp/make/build.properties
+++ b/jaxws/jaxws.properties
@@ -23,24 +23,18 @@
# have any questions.
#
-# This is the JDK used to build and run the bootstrap version of javac.
-# The bootstrap javac is used to compile both boostrap versions of the
-# other tools, and product versions of all the tools.
-# Override this path as needed, either on the command line or in
-# one of the standard user build.properties files (see build.xml)
+drops.master.copy.base=${devtools}/share/jdk7-drops
+drops.master.url.base=http://kenai.com/projects/jdk7-drops/downloads/download
-# options for the tasks used to compile the tools
-javac.source = 7
-javac.target = 7
-javac.debug = true
-javac.no.jdk.warnings = -XDignore.symbol.file=true
-# set the following to -version to verify the versions of javac being used
-javac.version.opt =
-# in time, there should be no exceptions to -Xlint:all
-javac.lint.opts = -Xlint:all,-unchecked,-deprecation,-fallthrough,-cast,-serial -Werror
+jaxws_src.bundle.name=jdk7-jaxws-2009_09_28.zip
+jaxws_src.master.bundle.dir=${drops.master.copy.base}
+#jaxws_src.bundle.url.base=https://jaxws.dev.java.net/files/documents/913/142147
+jaxws_src.master.bundle.url.base=${drops.master.url.base}
-# JVM memory size
-javac.memoryInitialSize = 128m
-javac.memoryMaximumSize = 256m
+jaf_src.bundle.name=jdk7-jaf-2009_08_28.zip
+jaf_src.master.bundle.dir=${drops.master.copy.base}
+jaf_src.master.bundle.url.base=${drops.master.url.base}
-#------------------------------------------------------------
+jaxws_tests.bundle.name=jdk7-jaxws-tests-2009_08_28.zip
+jaxws_tests.master.bundle.dir=${drops.master.copy.base}
+jaxws_tests.master.bundle.url.base=${drops.master.url.base}
diff --git a/jaxws/make/Makefile b/jaxws/make/Makefile
index 0aa0eb3651f..74bd74b10fd 100644
--- a/jaxws/make/Makefile
+++ b/jaxws/make/Makefile
@@ -23,7 +23,7 @@
# have any questions.
#
-# Makefile for jaxws: wrapper around Ant build.xml file
+# Makefile wrapper around Ant build.xml file
#
# On Solaris, the 'make' utility from Sun will not work with these makefiles.
@@ -41,38 +41,12 @@ ifdef VERBOSE
ANT_OPTIONS += -verbose
endif
-ifdef JDK_VERSION
- ANT_OPTIONS += -Djdk.version=$(JDK_VERSION)
-endif
-
-ifdef FULL_VERSION
- ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces
-endif
-
-ifdef MILESTONE
- ANT_OPTIONS += -Dmilestone=$(MILESTONE)
-endif
-
-ifdef BUILD_NUMBER
- ANT_OPTIONS += -Dbuild.number=$(BUILD_NUMBER)
-else
- ifdef JDK_BUILD_NUMBER
- ANT_OPTIONS += -Dbuild.number=$(JDK_BUILD_NUMBER)
- endif
-endif
-
-ifeq ($(VARIANT), DBG)
- ANT_OPTIONS += -Djavac.debug=true
-else
- ifeq ($(VARIANT), OPT)
+ifeq ($(VARIANT), OPT)
+ ifneq ($(DEBUG_CLASSFILES), true)
ANT_OPTIONS += -Djavac.debug=false
endif
endif
-ifeq ($(DEBUG_CLASSFILES), true)
- ANT_OPTIONS += -Djavac.debug=true
-endif
-
# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
# and the somewhat misnamed CLASS_VERSION (-target NN)
ifdef TARGET_CLASS_VERSION
@@ -91,24 +65,53 @@ else
endif
endif
-ifdef ALT_BOOTDIR
- ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
+# Figure out the platform we are using
+_SYSTEM_UNAME := $(shell uname)
+_PLATFORM_KIND = unix
+ifeq ($(_SYSTEM_UNAME), Windows_NT)
+ _PLATFORM_KIND = windows
endif
+ifneq (,$(findstring CYGWIN,$(_SYSTEM_UNAME)))
+ _PLATFORM_KIND = windows
+endif
+
+# Where is /java in case we need it
+ifdef ALT_SLASH_JAVA
+ _SLASHJAVA = $(ALT_SLASH_JAVA)
+else
+ ifeq ($(_PLATFORM_KIND), windows)
+ _SLASHJAVA=J:/
+ else
+ _SLASHJAVA=/java
+ endif
+endif
+
+# Where is /java/devtools in case we need it
+ifdef ALT_JDK_DEVTOOLS_DIR
+ _DEVTOOLS = $(ALT_JDK_DEVTOOLS_DIR)
+else
+ _DEVTOOLS = $(_SLASHJAVA)/devtools
+endif
+
+# Add in path to devtools
+ANT_OPTIONS += -Ddevtools=$(_DEVTOOLS)
ifdef ALT_OUTPUTDIR
OUTPUTDIR = $(ALT_OUTPUTDIR)
- ANT_OPTIONS += -Dbuild.dir=$(ALT_OUTPUTDIR)/build
- ANT_OPTIONS += -Ddist.dir=$(ALT_OUTPUTDIR)/dist
+ ANT_OPTIONS += -Doutput.dir=$(ALT_OUTPUTDIR)
else
OUTPUTDIR = ..
endif
ifdef ALT_LANGTOOLS_DIST
+ ifdef ALT_BOOTDIR
+ ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
+ endif
ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
-endif
-
-ifdef FINDBUGS_HOME
- ANT_OPTIONS += -Dfindbugs.home=$(FINDBUGS_HOME)
+else
+ ifdef ALT_JDK_IMPORT_PATH
+ ANT_JAVA_HOME = JAVA_HOME=$(ALT_JDK_IMPORT_PATH)
+ endif
endif
ifdef ANT_HOME
@@ -124,18 +127,59 @@ else
endif
# Default target and expected 'do everything' target
-all: build
-
-# Standard make clobber target
-clobber: clean
+default: all
# All ant targets of interest
-ANT_TARGETS = build clean sanity # for now
+ANT_TARGETS = all source build dist clobber clean sanity
# Create a make target for each
$(ANT_TARGETS):
- $(ANT_JAVA_HOME) $(ANT) -version
- $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
+ cd .. && $(ANT_JAVA_HOME) $(ANT) -version
+ cd .. && $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
+
+# Help target
+define helpenvline
+@echo " $1";echo " $2"
+endef
+help:
+ @echo "----------------------------------------------------------"
+ @echo " "
+ @echo "Help information for this Makefile:"
+ @echo " "
+ @echo " Targets (see ant project information for descriptions):"
+ @echo " $(ANT_TARGETS)"
+ @echo " "
+ @echo " Environment or command line variables (all optional):"
+ $(call helpenvline, ALT_BOOTDIR,\
+ "JAVA_HOME to use when running ant")
+ $(call helpenvline, ALT_LANGTOOLS_DIST,\
+ "path to langtools repository dist directory")
+ $(call helpenvline, ALT_OUTPUTDIR,\
+ "path to root of output")
+ $(call helpenvline, DEBUG_CLASSFILES,\
+ "if set makes sure ant property javac.debug is true")
+ $(call helpenvline, JAVAC_SOURCE_ARG,\
+ "if SOURCE_LANGUAGE_VERSION not set uses this to set ant property javac.source")
+ $(call helpenvline, JAVAC_TARGET_ARG,\
+ "if TARGET_CLASS_VERSION not set uses this to set ant property javac.target")
+ $(call helpenvline, SOURCE_LANGUAGE_VERSION,\
+ "if set uses this to set ant property javac.source")
+ $(call helpenvline, QUIET,\
+ "if set will pass -quiet to ant")
+ $(call helpenvline, TARGET_CLASS_VERSION,\
+ "JAVA_HOME to use when running ant")
+ $(call helpenvline, VARIANT,\
+ "if set to OPT means optimized build will set javac.debug to false")
+ $(call helpenvline, VERBOSE,\
+ "if set will pass -verbose to ant")
+ @echo " "
+ @echo "----------------------------------------------------------"
+ @echo " "
+ @echo "Ant project file help information:"
+ @echo " "
+ @$(ANT_JAVA_HOME) cd .. && $(ANT) $(ANT_OPTIONS) -p
+ @echo " "
+ @echo "----------------------------------------------------------"
# Targets for Sun's internal JPRT build system
JPRT_ARCHIVE_BUNDLE=$(OUTPUTDIR)/jprt.zip
@@ -145,5 +189,5 @@ jprt_build_product jprt_build_debug jprt_build_fastdebug: all
zip -q -r $(JPRT_ARCHIVE_BUNDLE) . )
# Declare these phony (not filenames)
-.PHONY: $(ANT_TARGETS) all clobber \
+.PHONY: $(ANT_TARGETS) \
jprt_build_product jprt_build_debug jprt_build_fastdebug
diff --git a/jaxws/make/build.xml b/jaxws/make/build.xml
deleted file mode 100644
index 390744b7e1b..00000000000
--- a/jaxws/make/build.xml
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ant.home = ${ant.home}
- java.home = ${env.JAVA_HOME}
- bootstrap.dir = ${bootstrap.dir}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +---------------------------------------+
- + Building JAX-WS Component +
- +---------------------------------------+
-
-
-
diff --git a/jaxws/make/jprt.properties b/jaxws/make/jprt.properties
index f75871dec9b..ae7b42fe9e8 100644
--- a/jaxws/make/jprt.properties
+++ b/jaxws/make/jprt.properties
@@ -1,5 +1,5 @@
#
-# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2009 Sun Microsystems, 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
@@ -34,8 +34,8 @@ solaris_i586_5.10,\
solaris_x64_5.10,\
linux_i586_2.6,\
linux_x64_2.6,\
-windows_i586,\
-windows_x64
+windows_i586_5.0,\
+windows_x64_5.2
# The different build flavors we want
jprt.build.flavors=product,fastdebug
@@ -49,7 +49,6 @@ jprt.solaris_x64_5.10.build.platform.match32=solaris_i586_5.10
# Standard list of jprt test targets for this workspace
jprt.test.targets=
-# Directories needed to build
-jprt.bundle.src.dirs=make src
+# Directories needing to exclude from source bundles
jprt.bundle.exclude.src.dirs=build dist
diff --git a/jaxws/make/tools/StripProperties/StripProperties.java b/jaxws/make/tools/StripProperties/StripProperties.java
deleted file mode 100644
index 4a3943b0aae..00000000000
--- a/jaxws/make/tools/StripProperties/StripProperties.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright 2001 Sun Microsystems, 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 version 2 only, as
- * published by the Free Software Foundation. Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * 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.
- */
-
-import java.io.BufferedInputStream;
-import java.io.BufferedWriter;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * Reads a properties file from standard input and writes an equivalent
- * properties file without comments to standard output.
- */
-public class StripProperties {
-
- public static void main(String[] args) {
- StripProperties sp = new StripProperties();
- boolean ok = sp.run(args);
- if ( !ok ) {
- System.exit(1);
- }
- }
-
- static interface Log {
- void info(String msg);
- void verbose(String msg);
- void error(String msg, Exception e);
- }
-
- private String propfiles[];
- private String outfiles[] ;
- private int stripCount = 0;
- private boolean quiet = false;
- private Log log;
-
- public void setLog(Log log) {
- this.log = log;
- }
-
- private boolean parseOptions(String args[]) {
- boolean ok = true;
- if ( stripCount > 0 ) {
- String new_propfiles[] = new String[stripCount + args.length];
- String new_outfiles[] = new String[stripCount + args.length];
- System.arraycopy(propfiles, 0, new_propfiles, 0, stripCount);
- System.arraycopy(outfiles, 0, new_outfiles, 0, stripCount);
- propfiles = new_propfiles;
- outfiles = new_outfiles;
- } else {
- propfiles = new String[args.length];
- outfiles = new String[args.length];
- }
-
- for ( int i = 0; i < args.length ; i++ ) {
- if ( "-strip".equals(args[i]) && i+2 < args.length ) {
- propfiles[stripCount] = args[++i];
- outfiles[stripCount] = args[++i];
- stripCount++;
- } else if ( "-optionsfile".equals(args[i]) && i+1 < args.length ) {
- String filename = args[++i];
- FileInputStream finput = null;
- byte contents[] = null;
- try {
- finput = new FileInputStream(filename);
- int byteCount = finput.available();
- if ( byteCount <= 0 ) {
- log.error("The -optionsfile file is empty", null);
- ok = false;
- } else {
- contents = new byte[byteCount];
- int bytesRead = finput.read(contents);
- if ( byteCount != bytesRead ) {
- log.error("Cannot read all of -optionsfile file", null);
- ok = false;
- }
- }
- } catch ( IOException e ) {
- log.error("cannot open " + filename, e);
- ok = false;
- }
- if ( finput != null ) {
- try {
- finput.close();
- } catch ( IOException e ) {
- ok = false;
- log.error("cannot close " + filename, e);
- }
- }
- if ( ok = true && contents != null ) {
- String tokens[] = (new String(contents)).split("\\s+");
- if ( tokens.length > 0 ) {
- ok = parseOptions(tokens);
- }
- }
- if ( !ok ) {
- break;
- }
- } else if ( "-quiet".equals(args[i]) ) {
- quiet = true;
- } else {
- log.error("argument error", null);
- ok = false;
- }
- }
- return ok;
- }
-
- private boolean stripFiles(String propertiesPath, String outputPath) {
- boolean ok = true;
- Properties prop = new Properties();
- InputStream in = null;
- try {
- in = new BufferedInputStream(new FileInputStream(propertiesPath));
- prop.load(in);
- } catch ( FileNotFoundException e ) {
- log.error("Cannot access file " + propertiesPath, e);
- ok = false;
- } catch ( IOException e ) {
- log.error("IO exception processing file " + propertiesPath, e);
- ok = false;
- }
- if ( in != null ) {
- try {
- in.close();
- } catch ( IOException e ) {
- log.error("IO exception closing file " + propertiesPath, e);
- ok = false;
- }
- }
-
- OutputStream out = null;
- try {
- out = new FileOutputStream(outputPath);
- storeProperties(prop, out);
- out.flush();
- } catch ( IOException e ) {
- log.error("IO exception processing file " + outputPath, e);
- e.printStackTrace();
- ok = false;
- }
- if ( out != null ) {
- try {
- out.close();
- } catch ( IOException e ) {
- log.error("IO exception closing file " + outputPath, e);
- ok = false;
- }
- }
- return ok;
- }
-
- /**
- * Strip the properties filenames supplied, replacing their contents.
- * @param args Names of properties files to process and replace contents
- */
- public boolean run(String args[]) {
- if (log == null) {
- log = new Log() {
- public void error(String msg, Exception e) {
- System.err.println("ERROR: StripProperties: " + msg);
- if ( e != null ) {
- System.err.println("EXCEPTION: " + e.toString());
- e.printStackTrace();
- }
- }
- public void info(String msg) {
- System.out.println(msg);
- }
- public void verbose(String msg) {
- if (!quiet)
- System.out.println(msg);
- }
- };
- }
-
- boolean ok = true;
- ok = parseOptions(args);
- if ( ok && stripCount == 0 ) {
- log.error("options parsed but no files to compile", null);
- ok = false;
- }
- /* Need at least one file. */
- if ( !ok ) {
- //usage(log);
- } else {
- /* Process files */
- for ( int i = 0; i < stripCount && ok ; i++ ) {
- ok = stripFiles(propfiles[i], outfiles[i]);
- }
- }
- return ok;
- }
-
- // --- code below here is adapted from java.util.Properties ---
-
- private static final String specialSaveChars = "=: \t\r\n\f#!";
-
- /*
- * Converts unicodes to encoded \uxxxx
- * and writes out any of the characters in specialSaveChars
- * with a preceding slash
- */
- private static String saveConvert(String theString, boolean escapeSpace) {
- int len = theString.length();
- StringBuffer outBuffer = new StringBuffer(len*2);
-
- for(int x=0; x 0x00ff)) {
- outBuffer.append('\\');
- outBuffer.append('u');
- outBuffer.append(toHex((aChar >> 12) & 0xF));
- outBuffer.append(toHex((aChar >> 8) & 0xF));
- outBuffer.append(toHex((aChar >> 4) & 0xF));
- outBuffer.append(toHex( aChar & 0xF));
- } else {
- if (specialSaveChars.indexOf(aChar) != -1) {
- outBuffer.append('\\');
- }
- outBuffer.append(aChar);
- }
- }
- }
- return outBuffer.toString();
- }
-
- /**
- * Writes the content of properties to out.
- * The format is that of Properties.store with the following modifications:
- *
- *
No header or date is written
- *
Latin-1 characters are written as single bytes, not escape sequences
- *
Line breaks are indicated by a single \n independent of platform
- *
- */
- private static void storeProperties(Properties properties, OutputStream out)
- throws IOException {
- BufferedWriter awriter;
- awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1"));
- for (Enumeration e = properties.keys(); e.hasMoreElements();) {
- String key = (String)e.nextElement();
- String val = (String)properties.get(key);
- key = saveConvert(key, true);
-
- /* No need to escape embedded and trailing spaces for value, hence
- * pass false to flag.
- */
- val = saveConvert(val, false);
- writeln(awriter, key + "=" + val);
- }
- awriter.flush();
- }
-
- private static void writeln(BufferedWriter bw, String s) throws IOException {
- bw.write(s);
- bw.write("\n");
- }
-
- /**
- * Convert a nibble to a hex character
- * @param nibble the nibble to convert.
- */
- private static char toHex(int nibble) {
- return hexDigit[(nibble & 0xF)];
- }
-
- /** A table of hex digits */
- private static final char[] hexDigit = {
- '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
- };
-}
diff --git a/jaxws/make/tools/StripProperties/StripPropertiesTask.java b/jaxws/make/tools/StripProperties/StripPropertiesTask.java
deleted file mode 100644
index 59a95ee9037..00000000000
--- a/jaxws/make/tools/StripProperties/StripPropertiesTask.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2007 Sun Microsystems, 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 version 2 only, as
- * published by the Free Software Foundation. Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * 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.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.MatchingTask;
-
-public class StripPropertiesTask extends MatchingTask {
- public void setSrcDir(File srcDir) {
- this.srcDir = srcDir;
- }
-
- public void setDestDir(File destDir) {
- this.destDir = destDir;
- }
-
- public void execute() {
- StripProperties.Log log = new StripProperties.Log() {
- public void error(String msg, Exception e) {
- log(msg, Project.MSG_ERR);
- }
- public void info(String msg) {
- log(msg, Project.MSG_INFO);
- }
- public void verbose(String msg) {
- log(msg, Project.MSG_VERBOSE);
- }
- };
- List mainOpts = new ArrayList();
- int count = 0;
- DirectoryScanner s = getDirectoryScanner(srcDir);
- for (String path: s.getIncludedFiles()) {
- if (path.endsWith(".properties")) {
- File srcFile = new File(srcDir, path);
- File destFile = new File(destDir, path);
- // Arguably, the comparison in the next line should be ">", not ">="
- // but that assumes the resolution of the last modified time is fine
- // grained enough; in practice, it is better to use ">=".
- if (destFile.exists() && destFile.lastModified() >= srcFile.lastModified())
- continue;
- destFile.getParentFile().mkdirs();
- mainOpts.add("-strip");
- mainOpts.add(srcFile.getPath());
- mainOpts.add(destFile.getPath());
- count++;
- }
- }
- if (mainOpts.size() > 0) {
- log("Generating " + count + " resource files to " + destDir, Project.MSG_INFO);
- StripProperties sp = new StripProperties();
- sp.setLog(log);
- boolean ok = sp.run((String[])mainOpts.toArray(new String[mainOpts.size()]));
- if (!ok)
- throw new BuildException("StripProperties failed.");
- }
- }
-
- private File srcDir;
- private File destDir;
-}
diff --git a/jaxws/nbproject/findbugs.settings b/jaxws/nbproject/findbugs.settings
new file mode 100644
index 00000000000..a5d76311443
--- /dev/null
+++ b/jaxws/nbproject/findbugs.settings
@@ -0,0 +1,72 @@
+#FindBugs User Preferences
+#Tue Jun 30 18:33:11 PDT 2009
+detectorAbnormalFinallyBlockReturn=AbnormalFinallyBlockReturn|false
+detectorAbstractClassEmptyMethods=AbstractClassEmptyMethods|false
+detectorAbstractOverriddenMethod=AbstractOverriddenMethod|false
+detectorArrayBasedCollections=ArrayBasedCollections|false
+detectorArrayWrappedCallByReference=ArrayWrappedCallByReference|false
+detectorBloatedAssignmentScope=BloatedAssignmentScope|false
+detectorBloatedSynchronizedBlock=BloatedSynchronizedBlock|false
+detectorClassEnvy=ClassEnvy|false
+detectorCollectStatistics=CollectStatistics|false
+detectorConfusingAutoboxedOverloading=ConfusingAutoboxedOverloading|false
+detectorConstantListIndex=ConstantListIndex|false
+detectorCopiedOverriddenMethod=CopiedOverriddenMethod|false
+detectorCustomBuiltXML=CustomBuiltXML|false
+detectorCyclomaticComplexity=CyclomaticComplexity|false
+detectorDateComparison=DateComparison|false
+detectorDeclaredRuntimeException=DeclaredRuntimeException|false
+detectorDeletingWhileIterating=DeletingWhileIterating|false
+detectorDubiousListCollection=DubiousListCollection|false
+detectorFieldCouldBeLocal=FieldCouldBeLocal|false
+detectorFinalParameters=FinalParameters|false
+detectorFloatingPointLoops=FloatingPointLoops|false
+detectorInefficientStringBuffering=InefficientStringBuffering|false
+detectorInheritanceTypeChecking=InheritanceTypeChecking|false
+detectorJDBCVendorReliance=JDBCVendorReliance|false
+detectorListIndexedIterating=ListIndexedIterating|false
+detectorLiteralStringComparison=LiteralStringComparison|false
+detectorLocalSynchronizedCollection=LocalSynchronizedCollection|false
+detectorLostExceptionStackTrace=LostExceptionStackTrace|false
+detectorManualArrayCopy=ManualArrayCopy|false
+detectorMethodReturnsConstant=MethodReturnsConstant|false
+detectorNeedlessAutoboxing=NeedlessAutoboxing|false
+detectorNeedlessCustomSerialization=NeedlessCustomSerialization|false
+detectorNeedlessInstanceRetrieval=NeedlessInstanceRetrieval|false
+detectorNeedlessMemberCollectionSynchronization=NeedlessMemberCollectionSynchronization|false
+detectorNonCollectionMethodUse=NonCollectionMethodUse|false
+detectorNonOwnedSynchronization=NonOwnedSynchronization|false
+detectorNonRecycleableTaglibs=NonRecycleableTaglibs|false
+detectorOrphanedDOMNode=OrphanedDOMNode|false
+detectorOverlyConcreteParameter=OverlyConcreteParameter|false
+detectorParallelLists=ParallelLists|false
+detectorPartiallyConstructedObjectAccess=PartiallyConstructedObjectAccess|false
+detectorPossibleIncompleteSerialization=PossibleIncompleteSerialization|false
+detectorPossibleMemoryBloat=PossibleMemoryBloat|false
+detectorPossiblyRedundantMethodCalls=PossiblyRedundantMethodCalls|false
+detectorSQLInLoop=SQLInLoop|false
+detectorSection508Compliance=Section508Compliance|false
+detectorSillynessPotPourri=SillynessPotPourri|false
+detectorSloppyClassReflection=SloppyClassReflection|false
+detectorSluggishGui=SluggishGui|false
+detectorSpoiledChildInterfaceImplementor=SpoiledChildInterfaceImplementor|false
+detectorSpuriousThreadStates=SpuriousThreadStates|false
+detectorStaticArrayCreatedInMethod=StaticArrayCreatedInMethod|false
+detectorStaticMethodInstanceInvocation=StaticMethodInstanceInvocation|false
+detectorSuspiciousComparatorReturnValues=SuspiciousComparatorReturnValues|false
+detectorSuspiciousJDKVersionUse=SuspiciousJDKVersionUse|false
+detectorSuspiciousWaitOnConcurrentObject=SuspiciousWaitOnConcurrentObject|false
+detectorSyncCollectionIterators=SyncCollectionIterators|false
+detectorTailRecursion=TailRecursion|false
+detectorUnnecessaryStoreBeforeReturn=UnnecessaryStoreBeforeReturn|false
+detectorUnrelatedCollectionContents=UnrelatedCollectionContents|false
+detectorUnrelatedReturnValues=UnrelatedReturnValues|false
+detectorUseAddAll=UseAddAll|false
+detectorUseCharacterParameterizedMethod=UseCharacterParameterizedMethod|false
+detectorUseEnumCollections=UseEnumCollections|false
+detectorUseSplit=UseSplit|false
+detectorUseToArray=UseToArray|false
+detector_threshold=2
+effort=default
+filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false
+filter_settings_neg=|
diff --git a/jaxws/nbproject/project.xml b/jaxws/nbproject/project.xml
new file mode 100644
index 00000000000..36adb0c1bac
--- /dev/null
+++ b/jaxws/nbproject/project.xml
@@ -0,0 +1,50 @@
+
+
+ org.netbeans.modules.ant.freeform
+
+
+ jaxws
+
+
+
+ jaxws
+
+
+
+
+ .
+ UTF-8
+
+
+
+
+ build
+
+
+ clean
+
+
+ clean
+ build
+
+
+
+
+
+ build.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jaxws/nbproject/sqe.properties b/jaxws/nbproject/sqe.properties
new file mode 100644
index 00000000000..978ef5bc013
--- /dev/null
+++ b/jaxws/nbproject/sqe.properties
@@ -0,0 +1,2 @@
+#Path to FindbugsSettingsFile (relative)
+findbugs.settings.file=findbugs.settings
diff --git a/jaxws/patches/jaxws_src/README b/jaxws/patches/jaxws_src/README
new file mode 100644
index 00000000000..644dff0223b
--- /dev/null
+++ b/jaxws/patches/jaxws_src/README
@@ -0,0 +1,5 @@
+
+This directory will hold any patches that need to be applied to the drop files.
+
+The patch order is defined in the ant build script properties.
+
diff --git a/jdk/.hgtags b/jdk/.hgtags
index e7963e7c7ab..1a27baa7cac 100644
--- a/jdk/.hgtags
+++ b/jdk/.hgtags
@@ -46,3 +46,4 @@ b23d905cb5d3b382295240d28ab0bfb266b4503c jdk7-b68
226b20019b1f020c09ea97d137d98e011ce65d76 jdk7-b69
893bcca951b747ddcf6986362b877f0e1dbb835b jdk7-b70
b3f3240135f0c10b9f2481c174b81b7fcf0daa60 jdk7-b71
+460639b036f327282832a4fe52b7aa45688afd50 jdk7-b72
diff --git a/jdk/make/java/java/FILES_java.gmk b/jdk/make/java/java/FILES_java.gmk
index e8a2223f67a..2ad599cbe23 100644
--- a/jdk/make/java/java/FILES_java.gmk
+++ b/jdk/make/java/java/FILES_java.gmk
@@ -454,6 +454,8 @@ JAVA_JAVA_java = \
sun/misc/JavaLangAccess.java \
sun/misc/JavaIOAccess.java \
sun/misc/JavaIOFileDescriptorAccess.java \
- sun/misc/JavaNioAccess.java
+ sun/misc/JavaNioAccess.java \
+ sun/misc/Perf.java \
+ sun/misc/PerfCounter.java
FILES_java = $(JAVA_JAVA_java)
diff --git a/jdk/make/java/logging/Makefile b/jdk/make/java/logging/Makefile
index c6ed1879fec..444c1c63b5a 100644
--- a/jdk/make/java/logging/Makefile
+++ b/jdk/make/java/logging/Makefile
@@ -31,7 +31,7 @@ include $(BUILDDIR)/common/Defs.gmk
#
# Files to compile.
#
-AUTO_FILES_JAVA_DIRS = java/util/logging
+AUTO_FILES_JAVA_DIRS = java/util/logging sun/util/logging
#
# Resources
@@ -46,7 +46,6 @@ RESOURCE_BUNDLES_COMPILED_PROPERTIES = \
include $(BUILDDIR)/common/Classes.gmk
properties: $(LIBDIR)/logging.properties
-
$(LIBDIR)/logging.properties: $(SHARE_SRC)/lib/logging.properties
$(install-file)
diff --git a/jdk/make/sun/net/FILES_java.gmk b/jdk/make/sun/net/FILES_java.gmk
index 5082c3d370f..19dd2d6d7f5 100644
--- a/jdk/make/sun/net/FILES_java.gmk
+++ b/jdk/make/sun/net/FILES_java.gmk
@@ -86,9 +86,11 @@ FILES_java = \
sun/net/www/protocol/http/AuthCache.java \
sun/net/www/protocol/http/AuthCacheImpl.java \
sun/net/www/protocol/http/AuthCacheValue.java \
+ sun/net/www/protocol/http/AuthScheme.java \
sun/net/www/protocol/http/BasicAuthentication.java \
sun/net/www/protocol/http/DigestAuthentication.java \
sun/net/www/protocol/http/NTLMAuthentication.java \
+ sun/net/www/protocol/http/NTLMAuthenticationProxy.java \
sun/net/www/protocol/http/NegotiateAuthentication.java \
sun/net/www/protocol/http/NegotiatorImpl.java \
sun/net/www/protocol/http/NegotiateCallbackHandler.java \
@@ -123,8 +125,7 @@ FILES_java = \
sun/net/idn/UCharacterEnums.java \
sun/net/idn/UCharacterDirection.java \
sun/net/idn/StringPrepDataReader.java \
- sun/net/idn/StringPrep.java \
- sun/net/www/protocol/http/InMemoryCookieStore.java
+ sun/net/idn/StringPrep.java
ifeq ($(PLATFORM), windows)
FILES_java += sun/net/www/protocol/http/NTLMAuthSequence.java
diff --git a/jdk/make/sun/security/Makefile b/jdk/make/sun/security/Makefile
index 2b7cc6b2ab3..92371cc60cb 100644
--- a/jdk/make/sun/security/Makefile
+++ b/jdk/make/sun/security/Makefile
@@ -60,8 +60,15 @@ ifeq ($(PLATFORM), windows)
endif
endif
-SUBDIRS = ec other action util tools jgss krb5 smartcardio $(PKCS11) \
- $(JGSS_WRAPPER) $(MSCAPI)
+# Build in-tree elliptic curve crypto provider only when
+# DISABLE_INTREE_EC is not set
+INTREE_EC = ec
+ifdef DISABLE_INTREE_EC
+ INTREE_EC =
+endif
+
+SUBDIRS = $(INTREE_EC) other action util tools jgss krb5 smartcardio \
+ $(PKCS11) $(JGSS_WRAPPER) $(MSCAPI)
all build clean clobber::
$(SUBDIRS-loop)
diff --git a/jdk/make/sun/security/ec/Makefile b/jdk/make/sun/security/ec/Makefile
index 297a2deab08..53a3e3e9e51 100644
--- a/jdk/make/sun/security/ec/Makefile
+++ b/jdk/make/sun/security/ec/Makefile
@@ -24,7 +24,7 @@
#
#
-# Makefile for building sunec.jar and sunecc native library.
+# Makefile for building sunec.jar and sunec native library.
#
# This file was derived from make/com/sun/crypto/provider/Makefile.
#
@@ -121,7 +121,15 @@ CLASSDESTDIR = $(TEMPDIR)/classes
#
AUTO_FILES_JAVA_DIRS = $(PKGDIR)
-include $(BUILDDIR)/common/Classes.gmk
+#
+# Exclude the sources that get built by ../other/Makefile
+#
+AUTO_JAVA_PRUNE = \
+ ECKeyFactory.java \
+ ECParameters.java \
+ ECPrivateKeyImpl.java \
+ ECPublicKeyImpl.java \
+ NamedCurve.java
#
# Some licensees do not get the native ECC sources, but we still need to
@@ -130,7 +138,7 @@ include $(BUILDDIR)/common/Classes.gmk
#
NATIVE_ECC_AVAILABLE := $(shell \
- if [ -d $(SHARE_SRC)/native/$(PKGDIR) ] ; then \
+ if [ -d $(SHARE_SRC)/native/$(PKGDIR)/impl ] ; then \
$(ECHO) true; \
else \
$(ECHO) false; \
@@ -138,7 +146,7 @@ NATIVE_ECC_AVAILABLE := $(shell \
ifeq ($(NATIVE_ECC_AVAILABLE), true)
- LIBRARY = sunecc
+ LIBRARY = sunec
#
# Java files that define native methods
@@ -166,12 +174,12 @@ ifeq ($(NATIVE_ECC_AVAILABLE), true)
#
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
- vpath %.c $(SHARE_SRC)/native/$(PKGDIR)
+ vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/impl
#
# Find include files
#
- OTHER_INCLUDES += -I$(SHARE_SRC)/native/$(PKGDIR)
+ OTHER_INCLUDES += -I$(SHARE_SRC)/native/$(PKGDIR)/impl
#
# Compiler flags
@@ -191,6 +199,10 @@ ifeq ($(NATIVE_ECC_AVAILABLE), true)
include $(BUILDDIR)/common/Library.gmk
+else # NATIVE_ECC_AVAILABLE
+
+ include $(BUILDDIR)/common/Classes.gmk
+
endif # NATIVE_ECC_AVAILABLE
#
diff --git a/jdk/make/sun/security/other/Makefile b/jdk/make/sun/security/other/Makefile
index 3f120fa473f..2722fbc32cd 100644
--- a/jdk/make/sun/security/other/Makefile
+++ b/jdk/make/sun/security/other/Makefile
@@ -44,6 +44,16 @@ AUTO_FILES_JAVA_DIRS = \
sun/security/x509 \
com/sun/net/ssl/internal/ssl
+#
+# EC classes used by the packages above
+#
+FILES_java += \
+ sun/security/ec/ECKeyFactory.java \
+ sun/security/ec/ECParameters.java \
+ sun/security/ec/ECPrivateKeyImpl.java \
+ sun/security/ec/ECPublicKeyImpl.java \
+ sun/security/ec/NamedCurve.java
+
#
# Rules
#
diff --git a/jdk/src/share/bin/java.h b/jdk/src/share/bin/java.h
index fe039cdcc88..cebdb5fc81a 100644
--- a/jdk/src/share/bin/java.h
+++ b/jdk/src/share/bin/java.h
@@ -187,9 +187,6 @@ void InitLauncher(jboolean javaw);
*
*/
typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
- const char *name,
- jboolean init,
- jobject loader,
- jboolean throwError));
+ const char *name));
jclass FindBootStrapClass(JNIEnv *env, const char *classname);
#endif /* _JAVA_H_ */
diff --git a/jdk/src/share/bin/parse_manifest.c b/jdk/src/share/bin/parse_manifest.c
index 6dcca091a4b..a59540213c2 100644
--- a/jdk/src/share/bin/parse_manifest.c
+++ b/jdk/src/share/bin/parse_manifest.c
@@ -59,7 +59,7 @@ inflate_file(int fd, zentry *entry, int *size_out)
char *out;
z_stream zs;
- if (entry->csize == 0xffffffff || entry->isize == 0xffffffff)
+ if (entry->csize == (size_t) -1 || entry->isize == (size_t) -1 )
return (NULL);
if (lseek(fd, entry->offset, SEEK_SET) < (off_t)0)
return (NULL);
diff --git a/jdk/src/share/classes/com/sun/rowset/JdbcRowSetResourceBundle.java b/jdk/src/share/classes/com/sun/rowset/JdbcRowSetResourceBundle.java
index 002d20785ff..1ebeb565ddb 100644
--- a/jdk/src/share/classes/com/sun/rowset/JdbcRowSetResourceBundle.java
+++ b/jdk/src/share/classes/com/sun/rowset/JdbcRowSetResourceBundle.java
@@ -133,7 +133,7 @@ public class JdbcRowSetResourceBundle implements Serializable {
* This method returns an enumerated handle of the keys
* which correspond to values translated to various locales.
*
- * @returns an enumerated keys which have messages tranlated to
+ * @return an enumeration of keys which have messages tranlated to
* corresponding locales.
*/
public Enumeration getKeys() {
@@ -146,7 +146,7 @@ public class JdbcRowSetResourceBundle implements Serializable {
* returns the corresponding value reading it
* from the Resource Bundle loaded earlier.
*
- * @returns value in locale specific language
+ * @return value in locale specific language
* according to the key passed.
*/
public Object handleGetObject(String key) {
diff --git a/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java b/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java
index 7908848b297..d301c605cdb 100644
--- a/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java
+++ b/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java
@@ -3737,7 +3737,6 @@ public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet {
* Returns a result set containing the original value of the current
* row only.
*
- * @return the original result set of the row
* @throws SQLException if there is no current row
* @see #setOriginalRow
*/
diff --git a/jdk/src/share/classes/com/sun/rowset/internal/WebRowSetXmlReader.java b/jdk/src/share/classes/com/sun/rowset/internal/WebRowSetXmlReader.java
index 8db17537187..f25cec7e62e 100644
--- a/jdk/src/share/classes/com/sun/rowset/internal/WebRowSetXmlReader.java
+++ b/jdk/src/share/classes/com/sun/rowset/internal/WebRowSetXmlReader.java
@@ -46,6 +46,17 @@ import javax.sql.rowset.spi.*;
*/
public class WebRowSetXmlReader implements XmlReader, Serializable {
+
+ private JdbcRowSetResourceBundle resBundle;
+
+ public WebRowSetXmlReader(){
+ try {
+ resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
+ } catch(IOException ioe) {
+ throw new RuntimeException(ioe);
+ }
+ }
+
/**
* Parses the given WebRowSet object, getting its input from
* the given java.io.Reader object. The parser will send
@@ -69,17 +80,6 @@ public class WebRowSetXmlReader implements XmlReader, Serializable {
* reader for the given rowset
* @see XmlReaderContentHandler
*/
-
- private JdbcRowSetResourceBundle resBundle;
-
- public WebRowSetXmlReader(){
- try {
- resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
- } catch(IOException ioe) {
- throw new RuntimeException(ioe);
- }
- }
-
public void readXML(WebRowSet caller, java.io.Reader reader) throws SQLException {
try {
// Crimson Parser(as in J2SE 1.4.1 is NOT able to handle
diff --git a/jdk/src/share/classes/java/lang/Class.java b/jdk/src/share/classes/java/lang/Class.java
index ddf57631790..46414ad8491 100644
--- a/jdk/src/share/classes/java/lang/Class.java
+++ b/jdk/src/share/classes/java/lang/Class.java
@@ -565,8 +565,9 @@ public final
* represented by this object.
*/
public String getName() {
+ String name = this.name;
if (name == null)
- name = getName0();
+ this.name = name = getName0();
return name;
}
diff --git a/jdk/src/share/classes/java/lang/ClassLoader.java b/jdk/src/share/classes/java/lang/ClassLoader.java
index d25100958a0..9fec9b570a0 100644
--- a/jdk/src/share/classes/java/lang/ClassLoader.java
+++ b/jdk/src/share/classes/java/lang/ClassLoader.java
@@ -380,16 +380,28 @@ public abstract class ClassLoader {
// First, check if the class has already been loaded
Class c = findLoadedClass(name);
if (c == null) {
+ long t0 = System.nanoTime();
try {
if (parent != null) {
c = parent.loadClass(name, false);
} else {
- c = findBootstrapClass0(name);
+ c = findBootstrapClassOrNull(name);
}
} catch (ClassNotFoundException e) {
+ // ClassNotFoundException thrown if class not found
+ // from the non-null parent class loader
+ }
+
+ if (c == null) {
// If still not found, then invoke findClass in order
// to find the class.
+ long t1 = System.nanoTime();
c = findClass(name);
+
+ // this is the defining class loader; record the stats
+ sun.misc.PerfCounter.getParentDelegationTime().addTime(t1 - t0);
+ sun.misc.PerfCounter.getFindClassTime().addElapsedTimeFrom(t1);
+ sun.misc.PerfCounter.getFindClasses().increment();
}
}
if (resolve) {
@@ -1008,22 +1020,29 @@ public abstract class ClassLoader {
if (system == null) {
if (!checkName(name))
throw new ClassNotFoundException(name);
- return findBootstrapClass(name);
+ Class cls = findBootstrapClass(name);
+ if (cls == null) {
+ throw new ClassNotFoundException(name);
+ }
+ return cls;
}
return system.loadClass(name);
}
- private Class findBootstrapClass0(String name)
- throws ClassNotFoundException
+ /**
+ * Returns a class loaded by the bootstrap class loader;
+ * or return null if not found.
+ */
+ private Class findBootstrapClassOrNull(String name)
{
check();
- if (!checkName(name))
- throw new ClassNotFoundException(name);
+ if (!checkName(name)) return null;
+
return findBootstrapClass(name);
}
- private native Class findBootstrapClass(String name)
- throws ClassNotFoundException;
+ // return null if not found
+ private native Class findBootstrapClass(String name);
// Check to make sure the class loader has been initialized.
private void check() {
diff --git a/jdk/src/share/classes/java/net/CookieManager.java b/jdk/src/share/classes/java/net/CookieManager.java
index 32790a8f185..95de8c0db3b 100644
--- a/jdk/src/share/classes/java/net/CookieManager.java
+++ b/jdk/src/share/classes/java/net/CookieManager.java
@@ -157,7 +157,7 @@ public class CookieManager extends CookieHandler
// if not specify CookieStore to use, use default one
if (store == null) {
- cookieJar = new sun.net.www.protocol.http.InMemoryCookieStore();
+ cookieJar = new InMemoryCookieStore();
} else {
cookieJar = store;
}
diff --git a/jdk/src/share/classes/sun/net/www/protocol/http/InMemoryCookieStore.java b/jdk/src/share/classes/java/net/InMemoryCookieStore.java
similarity index 99%
rename from jdk/src/share/classes/sun/net/www/protocol/http/InMemoryCookieStore.java
rename to jdk/src/share/classes/java/net/InMemoryCookieStore.java
index 2e7b54f70c0..697ca88d710 100644
--- a/jdk/src/share/classes/sun/net/www/protocol/http/InMemoryCookieStore.java
+++ b/jdk/src/share/classes/java/net/InMemoryCookieStore.java
@@ -23,7 +23,7 @@
* have any questions.
*/
-package sun.net.www.protocol.http;
+package java.net;
import java.net.URI;
import java.net.CookieStore;
@@ -43,7 +43,7 @@ import java.util.concurrent.locks.ReentrantLock;
* @author Edward Wang
* @since 1.6
*/
-public class InMemoryCookieStore implements CookieStore {
+class InMemoryCookieStore implements CookieStore {
// the in-memory representation of cookies
private List cookieJar = null;
diff --git a/jdk/src/share/classes/java/net/URLClassLoader.java b/jdk/src/share/classes/java/net/URLClassLoader.java
index 22be20b7ecd..c4f775db71a 100644
--- a/jdk/src/share/classes/java/net/URLClassLoader.java
+++ b/jdk/src/share/classes/java/net/URLClassLoader.java
@@ -340,6 +340,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* used.
*/
private Class defineClass(String name, Resource res) throws IOException {
+ long t0 = System.nanoTime();
int i = name.lastIndexOf('.');
URL url = res.getCodeSourceURL();
if (i != -1) {
@@ -370,12 +371,14 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
// Use (direct) ByteBuffer:
CodeSigner[] signers = res.getCodeSigners();
CodeSource cs = new CodeSource(url, signers);
+ sun.misc.PerfCounter.getReadClassBytesTime().addElapsedTimeFrom(t0);
return defineClass(name, bb, cs);
} else {
byte[] b = res.getBytes();
// must read certificates AFTER reading bytes.
CodeSigner[] signers = res.getCodeSigners();
CodeSource cs = new CodeSource(url, signers);
+ sun.misc.PerfCounter.getReadClassBytesTime().addElapsedTimeFrom(t0);
return defineClass(name, b, 0, b.length, cs);
}
}
diff --git a/jdk/src/share/classes/java/net/doc-files/net-properties.html b/jdk/src/share/classes/java/net/doc-files/net-properties.html
index e6b6330ba42..384abd8d93f 100644
--- a/jdk/src/share/classes/java/net/doc-files/net-properties.html
+++ b/jdk/src/share/classes/java/net/doc-files/net-properties.html
@@ -71,12 +71,12 @@ of proxies.
HTTP
The following proxy settings are used by the HTTP protocol handler.
-
http.proxyHost (default: <none>)
+
http.proxyHost (default: <none>)
The hostname, or address, of the proxy server
http.proxyPort (default: 80)
The port number of the proxy server.
-
http.nonProxyHosts (default: <none>)
+
http.nonProxyHosts (default: localhost|127.*|[::1])
Indicates the hosts that should be accessed without going
through the proxy. Typically this defines internal hosts.
The value of this property is a list of hosts,
@@ -86,7 +86,8 @@ of proxies.
will indicate that every hosts in the foo.com domain and the
localhost should be accessed directly even if a proxy server is
specified.
-
+
The default value excludes all common variations of the loopback address.
+
HTTPS This is HTTP over SSL, a secure version of HTTP
mainly used when confidentiality (like on payment sites) is needed.
The following proxy settings are used by the HTTPS protocol handler.
@@ -107,7 +108,7 @@ of proxies.
ftp.proxyPort (default: 80)
The port number of the proxy server.
-
ftp.nonProxyHosts (default: <none>)
+
ftp.nonProxyHosts (default: localhost|127.*|[::1])
Indicates the hosts that should be accessed without going
through the proxy. Typically this defines internal hosts.
The value of this property is a list of hosts, separated by
@@ -117,6 +118,7 @@ of proxies.
will indicate that every hosts in the foo.com domain and the
localhost should be accessed directly even if a proxy server is
specified.
+
The default value excludes all common variations of the loopback address.
SOCKS This is another type of proxy. It allows for lower
level type of tunneling since it works at the TCP level. In effect,
diff --git a/jdk/src/share/classes/java/nio/file/FileTreeWalker.java b/jdk/src/share/classes/java/nio/file/FileTreeWalker.java
index 71cb86eb88a..1452bd66b2a 100644
--- a/jdk/src/share/classes/java/nio/file/FileTreeWalker.java
+++ b/jdk/src/share/classes/java/nio/file/FileTreeWalker.java
@@ -41,8 +41,12 @@ class FileTreeWalker {
private final boolean detectCycles;
private final LinkOption[] linkOptions;
private final FileVisitor super Path> visitor;
+ private final int maxDepth;
- FileTreeWalker(Set options, FileVisitor super Path> visitor) {
+ FileTreeWalker(Set options,
+ FileVisitor super Path> visitor,
+ int maxDepth)
+ {
boolean fl = false;
boolean dc = false;
for (FileVisitOption option: options) {
@@ -58,18 +62,15 @@ class FileTreeWalker {
this.linkOptions = (fl) ? new LinkOption[0] :
new LinkOption[] { LinkOption.NOFOLLOW_LINKS };
this.visitor = visitor;
+ this.maxDepth = maxDepth;
}
/**
* Walk file tree starting at the given file
*/
- void walk(Path start, int maxDepth) {
- // don't use attributes of starting file as they may be stale
- if (start instanceof BasicFileAttributesHolder) {
- ((BasicFileAttributesHolder)start).invalidate();
- }
+ void walk(Path start) {
FileVisitResult result = walk(start,
- maxDepth,
+ 0,
new ArrayList());
if (result == null) {
throw new NullPointerException("Visitor returned 'null'");
@@ -89,12 +90,15 @@ class FileTreeWalker {
List ancestors)
{
// depth check
- if (depth-- < 0)
+ if (depth > maxDepth)
return FileVisitResult.CONTINUE;
// if attributes are cached then use them if possible
BasicFileAttributes attrs = null;
- if (file instanceof BasicFileAttributesHolder) {
+ if ((depth > 0) &&
+ (file instanceof BasicFileAttributesHolder) &&
+ (System.getSecurityManager() == null))
+ {
BasicFileAttributes cached = ((BasicFileAttributesHolder)file).get();
if (!followLinks || !cached.isSymbolicLink())
attrs = cached;
@@ -120,6 +124,10 @@ class FileTreeWalker {
}
}
} catch (SecurityException x) {
+ // If access to starting file is denied then SecurityException
+ // is thrown, otherwise the file is ignored.
+ if (depth == 0)
+ throw x;
return FileVisitResult.CONTINUE;
}
}
@@ -196,7 +204,7 @@ class FileTreeWalker {
try {
for (Path entry: stream) {
inAction = true;
- result = walk(entry, depth, ancestors);
+ result = walk(entry, depth+1, ancestors);
inAction = false;
// returning null will cause NPE to be thrown
diff --git a/jdk/src/share/classes/java/nio/file/Files.java b/jdk/src/share/classes/java/nio/file/Files.java
index bf596409e5a..ca5bc5698e1 100644
--- a/jdk/src/share/classes/java/nio/file/Files.java
+++ b/jdk/src/share/classes/java/nio/file/Files.java
@@ -223,7 +223,7 @@ public final class Files {
{
if (maxDepth < 0)
throw new IllegalArgumentException("'maxDepth' is negative");
- new FileTreeWalker(options, visitor).walk(start, maxDepth);
+ new FileTreeWalker(options, visitor, maxDepth).walk(start);
}
/**
diff --git a/jdk/src/share/classes/java/util/Currency.java b/jdk/src/share/classes/java/util/Currency.java
index 5c9124a90c8..714bd3b2363 100644
--- a/jdk/src/share/classes/java/util/Currency.java
+++ b/jdk/src/share/classes/java/util/Currency.java
@@ -35,12 +35,12 @@ import java.io.Serializable;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.logging.Level;
-import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.util.spi.CurrencyNameProvider;
import java.util.spi.LocaleServiceProvider;
import sun.util.LocaleServiceProviderPool;
+import sun.util.logging.PlatformLogger;
import sun.util.resources.LocaleData;
import sun.util.resources.OpenListResourceBundle;
@@ -244,7 +244,7 @@ public final class Currency implements Serializable {
}
}
} catch (IOException e) {
- log(Level.INFO, "currency.properties is ignored because of an IOException", e);
+ info("currency.properties is ignored because of an IOException", e);
}
return null;
}
@@ -686,7 +686,7 @@ public final class Currency implements Serializable {
.append("The entry in currency.properties for ")
.append(ctry).append(" is ignored because of the invalid country code.")
.toString();
- log(Level.INFO, message, null);
+ info(message, null);
return;
}
@@ -698,7 +698,7 @@ public final class Currency implements Serializable {
.append(ctry)
.append(" is ignored because the value format is not recognized.")
.toString();
- log(Level.INFO, message, null);
+ info(message, null);
return;
}
@@ -726,13 +726,13 @@ public final class Currency implements Serializable {
setMainTableEntry(ctry.charAt(0), ctry.charAt(1), entry);
}
- private static void log(Level level, String message, Throwable t) {
- Logger logger = Logger.getLogger("java.util.Currency");
- if (logger.isLoggable(level)) {
+ private static void info(String message, Throwable t) {
+ PlatformLogger logger = PlatformLogger.getLogger("java.util.Currency");
+ if (logger.isLoggable(PlatformLogger.INFO)) {
if (t != null) {
- logger.log(level, message, t);
+ logger.info(message, t);
} else {
- logger.log(level, message);
+ logger.info(message);
}
}
}
diff --git a/jdk/src/share/classes/java/util/jar/Attributes.java b/jdk/src/share/classes/java/util/jar/Attributes.java
index 27a2aba8ef9..e9a9e6e6f69 100644
--- a/jdk/src/share/classes/java/util/jar/Attributes.java
+++ b/jdk/src/share/classes/java/util/jar/Attributes.java
@@ -34,7 +34,7 @@ import java.util.Set;
import java.util.Collection;
import java.util.AbstractSet;
import java.util.Iterator;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import java.util.Comparator;
import sun.misc.ASCIICaseInsensitiveComparator;
@@ -419,7 +419,7 @@ public class Attributes implements Map