This commit is contained in:
J. Duke 2017-07-05 17:01:13 +02:00
commit 758d479de5
313 changed files with 25737 additions and 3622 deletions

View file

@ -46,3 +46,4 @@ e1b972ff53cd58f825791f8ed9b2deffd16e768c jdk7-b68
82e6c820c51ac27882b77755d42efefdbf1dcda0 jdk7-b69 82e6c820c51ac27882b77755d42efefdbf1dcda0 jdk7-b69
175cb3fe615998d1004c6d3fd96e6d2e86b6772d jdk7-b70 175cb3fe615998d1004c6d3fd96e6d2e86b6772d jdk7-b70
4c36e9853dda27bdac5ef4839a610509fbe31d34 jdk7-b71 4c36e9853dda27bdac5ef4839a610509fbe31d34 jdk7-b71
0d7e03b426df27c21dcc44ffb9178eacd1b04f10 jdk7-b72

View file

@ -38,12 +38,17 @@
<ul> <ul>
<li><a href="#introduction">Introduction</a></li> <li><a href="#introduction">Introduction</a></li>
<li><a href="#MBE">Minimum Build Environments</a></li> <li><a href="#MBE">Minimum Build Environments</a></li>
<li><a href="#SDBE">Specific Developer Build Environments</a></li> <li><a href="#SDBE">Specific Developer Build Environments</a>
<ul> <ul>
<li><a href="#fedora">Fedora Linux</a> </li> <li><a href="#fedora">Fedora Linux</a> </li>
<li><a href="#centos">CentOS Linux</a> </li> <li><a href="#centos">CentOS Linux</a> </li>
<li><a href="#ubuntu">Ubuntu Linux</a> </li> <li><a href="#debian">Debian GNU/Linux</a></li>
<li><a href="#ubuntu">Ubuntu Linux</a> </li>
<li><a href="#opensuse">OpenSUSE</a></li>
<li><a href="#mandriva">Mandriva</a></li>
<li><a href="#opensolaris">OpenSolaris</a></li>
</ul> </ul>
</li>
<li><a href="#directories">Source Directory Structure</a> </li> <li><a href="#directories">Source Directory Structure</a> </li>
<li><a href="#building">Build Information</a> <li><a href="#building">Build Information</a>
<ul> <ul>
@ -209,24 +214,59 @@
we will try to provide what information we have available to us. we will try to provide what information we have available to us.
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
<h3><a name="fedora">Fedora 9</a></h3> <h3><a name="fedora">Fedora</a></h3>
<blockquote> <blockquote>
After installing <h4>Fedora 9</h4>
<a href="http://www.fedoraproject.org/">Fedora 9</a> <p>
you need to make sure you have <blockquote>
the "Software Development" bundle installed, plus the After installing <a href="http://fedoraproject.org">Fedora</a> 9
following packages: you need to install several build dependencies. The simplest
<blockquote> way to do it is to execute the following commands as user
<ul> <tt>root</tt>:
<li>cups devel: Cups Development Package</li> <p/>
<li>freetype 2.3+ devel: Freetype 2.3 Development Package</li> <code>yum-builddep java-openjdk</code>
<li>hg: Mercurial, if you need to clone or manage source repositories</li> <p/>
<li>ksh: May be needed when using <tt>webrev</tt></li> <code>yum install gcc gcc-c++</code>
</ul> <p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
</blockquote> </blockquote>
<p> <h4>Fedora 10</h4>
Always a good idea to do a complete Software Update/Refresh <p>
after you get all the packages installed. <blockquote>
After installing <a href="http://fedoraproject.org">Fedora</a> 10
you need to install several build dependencies. The simplest
way to do it is to execute the following commands as user
<tt>root</tt>:
<p/>
<code>yum-builddep java-1.6.0-openjdk</code>
<p/>
<code>yum install gcc gcc-c++</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
</blockquote>
<h4>Fedora 11</h4>
<p>
<blockquote>
After installing <a href="http://fedoraproject.org">Fedora</a> 11
you need to install several build dependencies. The simplest
way to do it is to execute the following commands as user
<tt>root</tt>:
<p/>
<code>yum-builddep java-1.6.0-openjdk</code>
<p/>
<code>yum install gcc gcc-c++</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
</blockquote>
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
<h3><a name="centos">CentOS 5.2</a></h3> <h3><a name="centos">CentOS 5.2</a></h3>
@ -269,143 +309,144 @@
it's needed. it's needed.
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
<h3><a name="ubuntu">Ubuntu</a></h3> <h3><a name="debian">Debian</a></h3>
<blockquote> <blockquote>
In addition to needing the Bootstrap JDK and the Binary Plugs, <h4>Debian 5.0 (Lenny)</h4>
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.
<!-- ------------------------------------------------------ -->
<h4>Ubuntu 6.06</h4>
<p> <p>
The following list of packages for Ubuntu 6.06 is a working set that <blockquote>
does appear to work. After installing <a href="http://debian.org">Debian</a> 5
you need to install several build dependencies.
The simplest way to install the build dependencies is to
execute the following commands as user <tt>root</tt>:
<p/>
<code>aptitude build-dep openjdk-6</code>
<p/>
<code>aptitude install openjdk-6-jdk libmotif-dev</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote>
</blockquote>
<!-- ====================================================== -->
<h3><a name="ubuntu">Ubuntu</a></h3>
<blockquote>
<h4>Ubuntu 8.04</h4>
<p> <p>
<b>Note that it's quite possible that some of these <blockquote>
packages are not required, so anyone discovering that some of the After installing <a href="http://ubuntu.org">Ubuntu</a> 8.04
packages listed below are NOT required, you need to install several build dependencies.
please let the <p/>
OpenJDK First, you need to enable the universe repository in the
team know.</b> Software Sources application and reload the repository
information. The Software Sources application is available
under the System/Administration menu.
<p/>
The simplest way to install the build dependencies is to
execute the following commands:
<p/>
<code>sudo aptitude build-dep openjdk-6</code>
<p/>
<code>sudo aptitude install openjdk-6-jdk</code>
<p/>
In addition, it's necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote>
<h4>Ubuntu 8.10</h4>
<p> <p>
All the packages below can be installed with the <blockquote>
Synaptic Package manager provided with the base Ubuntu 6.06 release. After installing <a href="http://ubuntu.org">Ubuntu</a> 8.10
<blockquote> you need to install several build dependencies. The simplest
<ul> way to do it is to execute the following commands:
<li>binutils (2.16.1cvs20060117-1ubuntu2.1)</li> <p/>
<li>cpp (4:4.0.3-1)</li> <code>sudo aptitude build-dep openjdk-6</code>
<li>cpp-4.0 (4.0.3-1ubuntu5)</li> <p/>
<li>libfreetype6-dev</li> <code>sudo aptitude install openjdk-6-jdk</code>
<li>g++ (4:4.0.3-1)</li> <p/>
<li>g++-4.0 (4.0.3-1ubuntu5)</li> In addition, it's necessary to set a few environment variables for the build:
<li>gawk (1:3.1.5-2build1)</li> <p/>
<li>gcc (4:4.0.3-1)</li> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
<li>gcc-4.0 (4.0.3-1ubuntu5)</li> </blockquote>
<li>libasound2-dev (1.0.10-2ubuntu4)</li> <h4>Ubuntu 9.04</h4>
<li>libc6 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4</li>
<li>libc6-dev (2.3.6-0ubuntu20.4)</li>
<li>libc6-i686 (2.3.6-0ubuntu20) to 2.3.6-0ubuntu20.4</li>
<li>libcupsys2-dev (1.2.2-0ubuntu0.6.06)</li>
<li>libgcrypt11-dev (1.2.2-1)</li>
<li>libgnutls-dev (1.2.9-2ubuntu1.1)</li>
<li>libgnutls12 (1.2.9-2ubuntu1) to 1.2.9-2ubuntu1.1</li>
<li>libgpg-error-dev (1.1-4)</li>
<li>libice-dev (2:1.0.0-0ubuntu2)</li>
<li>liblockfile1 (1.06.1)</li>
<li>libopencdk8-dev (0.5.7-2)</li>
<li>libpopt-dev (1.7-5)</li>
<li>libsm-dev (2:1.0.0-0ubuntu2)</li>
<li>libstdc++6-4.0-dev (4.0.3-1ubuntu5)</li>
<li>libtasn1-2-dev (0.2.17-1ubuntu1)</li>
<li>libx11-dev (2:1.0.0-0ubuntu9)</li>
<li>libxau-dev (1:1.0.0-0ubuntu4)</li>
<li>libxaw-headers (2:1.0.1-0ubuntu3)</li>
<li>libxaw7-dev (2:1.0.1-0ubuntu3)</li>
<li>libxdmcp-dev (1:1.0.0-0ubuntu2)</li>
<li>libxext-dev (2:1.0.0-0ubuntu4)</li>
<li>libxi-dev (2:1.0.0-0ubuntu3) </li>
<li>libxmu-dev (2:1.0.0-0ubuntu3)</li>
<li>libxmu-headers (2:1.0.0-0ubuntu3)</li>
<li>libxmuu-dev (2:1.0.0-0ubuntu3)</li>
<li>libxp-dev (6.8.2-11ubuntu2)</li>
<li>libxpm-dev (1:3.5.4.2-0ubuntu3)</li>
<li>libxrandr-dev (1:1.1.0.2-0ubuntu4)</li>
<li>libxt-dev (1:1.0.0-0ubuntu3)</li>
<li>libxtrap-dev (2:1.0.0-0ubuntu2)</li>
<li>libxtst-dev (2:1.0.1-0ubuntu2)</li>
<li>libxv-dev (2:1.0.1-0ubuntu3)</li>
<li>linux-kernel-headers (2.6.11.2-0ubuntu18)</li>
<li>m4 (1.4.4-1)</li>
<li>make (3.80+3.81.b4-1)</li>
<li>ssl-cert (1.0.13)</li>
<li>x-dev (7.0.4-0ubuntu2)</li>
<li>x11proto-core-dev (7.0.4-0ubuntu2)</li>
<li>x11proto-input-dev (1.3.2-0ubuntu2)</li>
<li>x11proto-kb-dev (1.0.2-0ubuntu2)</li>
<li>x11proto-randr-dev (1.1.2-0ubuntu2)</li>
<li>x11proto-record-dev (1.13.2-0ubuntu2)</li>
<li>x11proto-trap-dev (3.4.3-0ubuntu2)</li>
<li>x11proto-video-dev (2.2.2-0ubuntu2)</li>
<li>x11proto-xext-dev (7.0.2-0ubuntu2)</li>
<li>xlibs-dev (7.0.0-0ubuntu45)</li>
<li>zlib1g-dev (1:1.2.3-6ubuntu4)</li>
</ul>
</blockquote>
<!-- ------------------------------------------------------ -->
<h4>Ubuntu 7.04</h4>
<p> <p>
Using the Synaptic Package Manager, download the following <blockquote>
packages (double indented packages are automatically aquired After installing <a href="http://ubuntu.org">Ubuntu</a> 9.04
due to package dependencies): you need to install several build dependencies. The simplest
<blockquote> way to do it is to execute the following commands:
<ul> <p/>
<li>build-essential</li> <code>sudo aptitude build-dep openjdk-6</code>
<ul> <p/>
<li>dpkg-dev</li> <code>sudo aptitude install openjdk-6-jdk</code>
<li>g++</li> <p/>
<li>g++-4.1</li> In addition, it's necessary to set a few environment variables for the build:
<li>libc6-dev</li> <p/>
<li>libstdc++6.4.1-dev</li> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
<li>linux-libc-dev</li> </blockquote>
</ul> </blockquote>
<li>gawk</li> <!-- ====================================================== -->
<li>m4</li> <h3><a name="opensuse">OpenSUSE</a></h3>
<li>libasound2-dev</li> <blockquote>
<li>libcupsys2-dev</li> <h4>OpenSUSE 11.1</h4>
<ul> <p>
<li>libgcrypt11-dev</li> <blockquote>
<li>lgnutls-dev</li> After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1
<li>libgpg-error-dev</li> you need to install several build dependencies.
<li>liblzo-dev</li> The simplest way to install the build dependencies is to
<li>libopencdk8-dev</li> execute the following commands:
<li>libpopt-dev</li> <p/>
<li>libtasn1-3-dev</li> <code>sudo zypper source-install -d java-1_6_0-openjdk</code>
<li>zlib1g-dev</li> <p/>
</ul> <code>sudo zypper install make</code>
<li>sun-java6-jdk</li> <p/>
<ul> In addition, it is necessary to set a few environment variables for the build:
<li>java-common</li> <p/>
<li>libltdl3</li> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
<li>odbcinst1debian1</li> <p/>
<li>sun-java6-bin</li> Finally, you need to unset the <code>JAVA_HOME</code> environment variable:
<li>sun-java6-jre</li> <p/>
<li>unixodbc</li> <code>export -n JAVA_HOME</code>
</ul> </blockquote>
<li>xlibs-dev</li> </blockquote>
<ul> <!-- ====================================================== -->
<li>(many)</li> <h3><a name="mandriva">Mandriva</a></h3>
</ul> <blockquote>
<li>x11proto-print-dev</li> <h4>Mandriva Linux One 2009 Spring</h4>
<li>libxaw7-dev</li> <p>
<ul> <blockquote>
<li>libxaw-headers</li> After installing <a href="http://mandriva.org">Mandriva</a> Linux One 2009 Spring
</ul> you need to install several build dependencies.
<li>libxp-dev</li> The simplest way to install the build dependencies is to
<li>libfreetype6-dev</li> execute the following commands as user <tt>root</tt>:
</ul> <p/>
</blockquote> <code>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</code>
<p/>
In addition, it is necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
</blockquote>
</blockquote>
<!-- ====================================================== -->
<h3><a name="opensolaris">OpenSolaris</a></h3>
<blockquote>
<h4>OpenSolaris 2009.06</h4>
<p>
<blockquote>
After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06
you need to install several build dependencies.
The simplest way to install the build dependencies is to
execute the following commands:
<p/>
<code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</code>
<p/>
In addition, it is necessary to set a few environment variables for the build:
<p/>
<code>export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/</code>
<p/>
Finally, you need to make sure that the build process can find the Sun Studio compilers:
<p/>
<code>export PATH=$PATH:/opt/SunStudioExpress/bin/</code>
</blockquote>
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
<hr> <hr>

View file

@ -46,3 +46,4 @@ a12ea7c7b497b4ba7830550095ef633bd6f43971 jdk7-b67
8120d308ec4e805c5588b8d9372844d781c4112d jdk7-b69 8120d308ec4e805c5588b8d9372844d781c4112d jdk7-b69
175bd68779546078dbdb6dacd7f0aced79ed22b1 jdk7-b70 175bd68779546078dbdb6dacd7f0aced79ed22b1 jdk7-b70
3f1ef7f899ea2aec189c4fb67e5c8fa374437c50 jdk7-b71 3f1ef7f899ea2aec189c4fb67e5c8fa374437c50 jdk7-b71
c793a31209263fbb867c23c752599d85c21abb73 jdk7-b72

View file

@ -141,12 +141,12 @@ $(CLASSES_JAR):
#----- src.zip #----- 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 = $(LIB_DIR)/src.zip
$(SRC_ZIP): $(SRC_ZIP_FILES) $(SRC_ZIP): $(SRC_ZIP_FILES)
abs_src_zip=`cd $(@D) ; pwd`/$(@F) ; \ 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 -@ ) ; ( cd $(GENSRC_DIR) ; $(FIND) . -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ;
#----- bin.zip #----- bin.zip

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -25,21 +25,28 @@
# Input: BUILDDIR PACKAGE PKGDIR PROGRAM BUILDTOOL_SOURCE_ROOT BUILDTOOL_MAIN # 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_MAIN_SOURCE_FILE = $(BUILDTOOL_SOURCE_ROOT)/$(BUILDTOOL_MAIN)
BUILDTOOL_MANIFEST_FILE = $(BUILDTOOLCLASSDIR)/$(PROGRAM)_manifest.mf BUILDTOOL_MANIFEST_FILE = $(BUILDTOOLCLASSDIR)/$(PROGRAM)_manifest.mf
BUILDTOOL_JAR_FILE = $(BUILDTOOLJARDIR)/$(PROGRAM).jar BUILDTOOL_JAR_FILE = $(BUILDTOOLJARDIR)/$(PROGRAM).jar
BUILDTOOL_ALL_FILES := $(shell $(CD) $(BUILDTOOL_SOURCE_ROOT) \ BUILTTOOL_MAINCLASS = $(subst /,.,$(BUILDTOOL_MAIN:%.java=%))
&& $(FIND) $(PKGDIR) $(SCM_DIRS_prune) -o -type f -print)
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) $(BUILDTOOL_MANIFEST_FILE): $(BUILDTOOL_MAIN_SOURCE_FILE)
@$(prep-target) @$(prep-target)
$(ECHO) "Main-Class: $(BUILTTOOL_MAINCLASS)" > $@ $(ECHO) "Main-Class: $(BUILTTOOL_MAINCLASS)" > $@
$(BUILDTOOL_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) \ $(BUILDTOOL_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) $(BUILDTOOL_SRC_FILES)
$(BUILDTOOL_ALL_FILES:%=$(BUILDTOOL_SOURCE_ROOT)/%)
@$(prep-target) @$(prep-target)
@$(MKDIR) -p $(BUILDTOOLCLASSDIR) @$(MKDIR) -p $(BUILDTOOLCLASSDIR)
$(BOOT_JAVAC_CMD) -d $(BUILDTOOLCLASSDIR) \ $(BOOT_JAVAC_CMD) -d $(BUILDTOOLCLASSDIR) \
@ -49,23 +56,8 @@ $(BUILDTOOL_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) \
$(JAR_JFLAGS) || $(RM) $@ $(JAR_JFLAGS) || $(RM) $@
@$(java-vm-cleanup) @$(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:: clean clobber::
$(RM) -r $(BUILDTOOLCLASSDIR)/$(PKGDIR) $(RM) -r $(BUILDTOOLCLASSDIR)/$(PKGDIR) \
$(RM) $(BUILDTOOL_MANIFEST_FILE) $(BUILDTOOL_MANIFEST_FILE) \
$(RM) $(BUILDTOOL_JAR_FILE) $(BUILDTOOL_JAR_FILE)

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -56,11 +56,3 @@ ifndef USE_IMPLICITS
%: %.sh %: %.sh
endif 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

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # 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-clobber = INCREMENTAL_BUILD=false
SUBDIRS_MAKEFLAGS-clean = 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 # Given a SUBDIRS list, cd into them and make them
# SUBDIRS_MAKEFLAGS Make settings for a subdir make # SUBDIRS_MAKEFLAGS Make settings for a subdir make
# SUBDIRS_MAKEFLAGS-$@ Make settings specific to this target # SUBDIRS_MAKEFLAGS-$@ Make settings specific to this target
define SUBDIRS-loop define SUBDIRS-loop
@$(ECHO) "Begin Processing SUBDIRS: $(SUBDIRS)"
@for i in DUMMY $(SUBDIRS) ; do \ @for i in DUMMY $(SUBDIRS) ; do \
if [ "$$i" != "DUMMY" ] ; then \ if [ "$$i" != "DUMMY" ] ; then \
$(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \ $(MAKE) -C $${i} $@ \
timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \ $(SUBDIRS_MAKEFLAGS) \
$(call TIMING_start,startTime); \ $(SUBDIRS_MAKEFLAGS-$@) \
curDir=$(CURRENT_DIRECTORY); \ FULL_VERSION=$(FULL_VERSION) \
$(CD) $$i; $(MAKE) $@ TIMING_ID=$${timing_id} \ RELEASE=$(RELEASE) || exit 1; \
$(SUBDIRS_MAKEFLAGS) \
$(SUBDIRS_MAKEFLAGS-$@) \
FULL_VERSION=$(FULL_VERSION) \
RELEASE=$(RELEASE) || exit 1; \
$(CD) $${curDir}; \
$(call TIMING_end,startTime,timing_id); \
$(ECHO) "<<<Finished Recursively making "$$i" "$@" @ `$(DATE)`." ; \
fi ; \ fi ; \
done done
@$(ECHO) "Done Processing SUBDIRS: $(SUBDIRS)"
endef endef
# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define) # Given a OTHERSUBDIRS list, cd into them and make them (extra loop define)
# OTHERSUBDIRS_MAKEFLAGS Make settings for a subdir make # OTHERSUBDIRS_MAKEFLAGS Make settings for a subdir make
define OTHERSUBDIRS-loop define OTHERSUBDIRS-loop
@$(ECHO) "Begin Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
@for i in DUMMY $(OTHERSUBDIRS) ; do \ @for i in DUMMY $(OTHERSUBDIRS) ; do \
if [ "$$i" != "DUMMY" ] ; then \ if [ "$$i" != "DUMMY" ] ; then \
$(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \ $(MAKE) -C $${i} $@ \
timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \ $(OTHERSUBDIRS_MAKEFLAGS) \
$(call TIMING_start,startTime); \ FULL_VERSION=$(FULL_VERSION) \
curDir=$(CURRENT_DIRECTORY); \ RELEASE=$(RELEASE) || exit 1; \
$(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) "<<<Finished Recursively making "$$i" "$@" @ `$(DATE)`." ; \
fi ; \ fi ; \
done done
@$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
endef endef
# #
@ -460,46 +367,23 @@ else
VERSION_DEFINES = -DRELEASE='"$(RELEASE)"' VERSION_DEFINES = -DRELEASE='"$(RELEASE)"'
endif endif
# Note: As a rule, GNU Make rules should not appear in any of the # Prevent the use of many default suffix rules we do not need
# Defs*.gmk files. These were added for Kestrel-Solaris and do address .SUFFIXES:
# a TeamWare bug. They should be moved elsewhere for Merlin. .SUFFIXES: .c .o .h .obj .cpp .hpp .java .class
#
# Override gnumake built-in rules which do sccs get operations badly.
# (They put the checked out code in the current directory, not in the
# directory of the original file.)
# Since this is a symptom of a teamware failure, complain and die on the spot.
# This message immediately goes to stdout and the build terminates.
define SCCS-trouble
$(error \
"ERROR: File $@ referenced while building in $(CURRENT_DIRECTORY) \
is out of date with respect to its SCCS file $<. \
This can happen from an unresolved Teamware conflict, a file movement, or \
a failure in which SCCS files are updated but the 'sccs get' was not done. \
You should double check for other out of date files in your workspace. \
Or run: cd $(TOPDIR) && $(MAKE) sccs_get")
endef
%:: s.%
@$(SCCS-trouble)
%:: SCCS/s.%
@$(SCCS-trouble)
@$(ECHO) " is out of date with respect to its SCCS file." >> $(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
# Make sure we are all insane
ifdef INSANE ifdef INSANE
export INSANE export INSANE
endif endif
ifdef ALT_COPYRIGHT_YEAR # Make sure we have the current year
COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR) ifndef COPYRIGHT_YEAR
else ifdef ALT_COPYRIGHT_YEAR
COPYRIGHT_YEAR = $(shell $(DATE) '+%Y') COPYRIGHT_YEAR := $(ALT_COPYRIGHT_YEAR)
else
COPYRIGHT_YEAR := $(shell $(DATE) '+%Y')
endif
export COPYRIGHT_YEAR
endif endif
# Install of imported file (JDK_IMPORT_PATH, or some other external location) # Install of imported file (JDK_IMPORT_PATH, or some other external location)

View file

@ -27,17 +27,6 @@
# #
# Rules shared by all Java makefiles. # 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 # Make sure the default rule is all
rules_default_rule: all rules_default_rule: all
@ -162,7 +151,6 @@ JAVA_SOURCE_LIST=$(TEMPDIR)/.classes.list
# Add a java source to the list # Add a java source to the list
define add-java-file define add-java-file
$(ECHO) "$?" >> $(JAVA_SOURCE_LIST) $(ECHO) "$?" >> $(JAVA_SOURCE_LIST)
$(check-conventions)
endef endef
$(CLASSDESTDIR)/%.class: $(GENSRCDIR)/%.java $(CLASSDESTDIR)/%.class: $(GENSRCDIR)/%.java
@ -197,11 +185,8 @@ JAVAC_PREFER_SOURCE = -Xprefer:source
.compile.classlist : $(JAVA_SOURCE_LIST) .compile.classlist : $(JAVA_SOURCE_LIST)
@$(MKDIR) -p $(CLASSDESTDIR) @$(MKDIR) -p $(CLASSDESTDIR)
@if [ `$(CAT) $(JAVA_SOURCE_LIST) | $(WC) -l` -ge 1 ] ; then \ if [ -s $(JAVA_SOURCE_LIST) ] ; then \
$(ECHO) "# Java sources to be compiled: (listed in file $(JAVA_SOURCE_LIST))"; \
$(CAT) $(JAVA_SOURCE_LIST); \ $(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); \ $(JAVAC_CMD) $(JAVAC_PREFER_SOURCE) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
fi fi
@$(java-vm-cleanup) @$(java-vm-cleanup)
@ -220,10 +205,7 @@ endif
packages.clean: packages.clean:
ifeq ($(DONT_CLOBBER_CLASSES),false) ifeq ($(DONT_CLOBBER_CLASSES),false)
ifdef AUTO_FILES_JAVA_DIRS ifdef AUTO_FILES_JAVA_DIRS
@for sdir in $(AUTO_FILES_JAVA_DIRS); do \ $(RM) -r $(patsubst %, $(CLASSDESTDIR)/%, $(AUTO_FILES_JAVA_DIRS))
$(ECHO) "$(RM) -r $(CLASSDESTDIR)/$$sdir"; \
$(RM) -r $(CLASSDESTDIR)/$$sdir; \
done
else else
$(RM) -r $(CLASSDESTDIR)/$(PKGDIR) $(RM) -r $(CLASSDESTDIR)/$(PKGDIR)
endif endif
@ -259,15 +241,13 @@ classheaders: classes $(CLASSHDR_DOTFILE)
$(CLASSHDR_DOTFILE): $(CLASSES_export) $(CLASSHDR_DOTFILE): $(CLASSES_export)
$(prep-target) $(prep-target)
@$(ECHO) "# Running javah:"
$(JAVAH_CMD) -d $(CLASSHDRDIR)/ \ $(JAVAH_CMD) -d $(CLASSHDRDIR)/ \
$(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner)) $(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner))
@$(java-vm-cleanup) @$(java-vm-cleanup)
@$(TOUCH) $@ @$(TOUCH) $@
classheaders.clean: classheaders.clean:
$(RM) $(CLASSHDR_DOTFILE) $(RM) -r $(CLASSHDRDIR) $(CLASSHDR_DOTFILE)
$(RM) -r $(CLASSHDRDIR)
else # FILES_export else # FILES_export

View file

@ -48,11 +48,17 @@ ifeq ($(PLATFORM), windows)
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
# Compiler version and type (Always get word after "Version") # 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... # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
ifeq ($(ARCH_DATA_MODEL), 32) 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)) CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
ifeq ($(CC_MAJORVER), 13) ifeq ($(CC_MAJORVER), 13)
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077 # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
@ -93,7 +99,10 @@ ifeq ($(PLATFORM), windows)
endif endif
else else
# else ARCH_DATA_MODEL is 64 # 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_MAJORVER :=$(call MajorVersion,$(CC_VER))
CC_MINORVER :=$(call MinorVersion,$(CC_VER)) CC_MINORVER :=$(call MinorVersion,$(CC_VER))
CC_MICROVER :=$(call MicroVersion,$(CC_VER)) CC_MICROVER :=$(call MicroVersion,$(CC_VER))

View file

@ -116,7 +116,6 @@ RC = $(UTILS_COMMAND_PATH)rc
RMDIR = $(UTILS_COMMAND_PATH)rmdir RMDIR = $(UTILS_COMMAND_PATH)rmdir
RPM = $(UTILS_COMMAND_PATH)rpm RPM = $(UTILS_COMMAND_PATH)rpm
RPMBUILD = $(UTILS_COMMAND_PATH)rpmbuild RPMBUILD = $(UTILS_COMMAND_PATH)rpmbuild
SCCS = $(UTILS_CCS_BIN_PATH)sccs
SED = $(UTILS_COMMAND_PATH)sed SED = $(UTILS_COMMAND_PATH)sed
SH = $(UTILS_COMMAND_PATH)sh SH = $(UTILS_COMMAND_PATH)sh
SHOWREV = $(UTILS_USR_BIN_PATH)showrev SHOWREV = $(UTILS_USR_BIN_PATH)showrev

View file

@ -113,32 +113,38 @@ _system_drive:=$(call CheckValue,_system_drive,C:)
# UNIXCOMMAND_PATH: path to where the most common Unix commands are. # UNIXCOMMAND_PATH: path to where the most common Unix commands are.
# NOTE: Must end with / so that it could be empty, allowing PATH usage. # NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifdef ALT_UNIXCOMMAND_PATH ifndef UNIXCOMMAND_PATH
xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))" ifdef ALT_UNIXCOMMAND_PATH
fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH)) xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH)) fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
else UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
ifdef USING_CYGWIN
UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
else else
ifdef ROOTDIR ifdef USING_CYGWIN
xROOTDIR :="$(subst \,/,$(ROOTDIR))" UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
_rootdir :=$(call FullPath,$(xROOTDIR))
else else
xROOTDIR :="$(_system_drive)/mksnt" ifdef ROOTDIR
_rootdir :=$(call FullPath,$(xROOTDIR)) xROOTDIR :="$(subst \,/,$(ROOTDIR))"
endif _rootdir :=$(call FullPath,$(xROOTDIR))
ifneq ($(_rootdir),) else
UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt) xROOTDIR :="$(_system_drive)/mksnt"
_rootdir :=$(call FullPath,$(xROOTDIR))
endif
ifneq ($(_rootdir),)
UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
endif
endif endif
endif endif
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
export UNIXCOMMAND_PATH
endif endif
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
# Get version of MKS or CYGWIN # Get version of MKS or CYGWIN
ifdef USING_CYGWIN ifdef USING_CYGWIN
_CYGWIN_VER :=$(shell $(UNAME)) ifndef CYGWIN_VER
CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER)) _CYGWIN_VER :=$(shell $(UNAME))
CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER))
export CYGWIN_VER
endif
else # MKS else # MKS
_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@') _MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
MKS_VER :=$(call GetVersion,$(_MKS_VER)) MKS_VER :=$(call GetVersion,$(_MKS_VER))
@ -168,235 +174,234 @@ endif # MKS
# Process Windows values into FullPath values, these paths may have \ chars # Process Windows values into FullPath values, these paths may have \ chars
# System root # Program Files directory
ifdef SYSTEMROOT ifndef SHORTPROGRAMFILES
xSYSTEMROOT :="$(subst \,/,$(SYSTEMROOT))" ifdef PROGRAMFILES
_system_root :=$(call FullPath,$(xSYSTEMROOT)) xPROGRAMFILES :="$(subst \,/,$(PROGRAMFILES))"
else
ifdef SystemRoot
xSYSTEMROOT :="$(subst \,/,$(SystemRoot))"
_system_root :=$(call FullPath,$(xSYSTEMROOT))
else else
ifdef WINDIR ifeq ($(ARCH_DATA_MODEL), 32)
xWINDIR :="$(subst \,/,$(WINDIR))" xPROGRAMFILES :="$(_system_drive)/Program Files"
_system_root :=$(call FullPath,$(xWINDIR))
else else
ifdef windir xPROGRAMFILES :="$(_system_drive)/Program Files (x86)"
xWINDIR :="$(subst \,/,$(windir))"
_system_root :=$(call FullPath,$(xWINDIR))
endif
endif endif
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) ifeq ($(ARCH_DATA_MODEL), 32)
xPROGRAMFILES :="$(_system_drive)/Program Files" SHORTPROGRAMFILES :=$(call FullPath,$(xPROGRAMFILES))
else 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
endif ifneq ($(word 1,$(SHORTPROGRAMFILES)),$(SHORTPROGRAMFILES))
ifeq ($(ARCH_DATA_MODEL), 32) SHORTPROGRAMFILES :=
_program_files :=$(call FullPath,$(xPROGRAMFILES))
else
ifdef PROGRAMW6432
xPROGRAMW6432 :="$(subst \,/,$(PROGRAMW6432))"
else
xPROGRAMW6432 :="$(_system_drive)/Program Files"
endif endif
_program_files :=$(call FullPath,$(xPROGRAMW6432)) export SHORTPROGRAMFILES
_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:=
endif endif
# Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit] # Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit]
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
# Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat) ifndef SHORTMSVCDIR
ifdef MSVCDIR # Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat)
xMSVCDIR :="$(subst \,/,$(MSVCDIR))" ifdef MSVCDIR
_msvc_dir :=$(call FullPath,$(xMSVCDIR)) xMSVCDIR :="$(subst \,/,$(MSVCDIR))"
else SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
ifdef MSVCDir
xMSVCDIR :="$(subst \,/,$(MSVCDir))"
_msvc_dir :=$(call FullPath,$(xMSVCDIR))
else else
ifneq ($(_program_files),) ifdef MSVCDir
xMSVCDIR :="$(_program_files)/Microsoft Visual Studio .NET 2003/Vc7" xMSVCDIR :="$(subst \,/,$(MSVCDir))"
_msvc_dir :=$(call FullPath,$(xMSVCDIR)) SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
else
ifneq ($(SHORTPROGRAMFILES),)
xMSVCDIR :="$(SHORTPROGRAMFILES)/Microsoft Visual Studio .NET 2003/Vc7"
SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
endif
endif endif
endif endif
endif ifneq ($(subst MSDev98,OLDOLDOLD,$(SHORTMSVCDIR)),$(SHORTMSVCDIR))
ifneq ($(subst MSDev98,OLDOLDOLD,$(_msvc_dir)),$(_msvc_dir)) SHORTMSVCDIR :=
_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))
endif endif
ifneq ($(_vs71tools),) # If we still don't have it, look for VS71COMNTOOLS, setup by installer?
_msvc_dir :=$(_vs71tools)/../../Vc7 ifeq ($(SHORTMSVCDIR),)
ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
_vs71tools :=$(call FullPath,$(xVS71COMNTOOLS))
endif
ifneq ($(_vs71tools),)
SHORTMSVCDIR :=$(_vs71tools)/../../Vc7
endif
endif endif
export SHORTMSVCDIR
endif endif
ifneq ($(_msvc_dir),) ifneq ($(SHORTMSVCDIR),)
_compiler_bin :=$(_msvc_dir)/Bin SHORTCOMPILERBIN :=$(SHORTMSVCDIR)/Bin
_redist_sdk :=$(_msvc_dir)/../SDK/v1.1/Bin SHORTPSDK :=$(SHORTMSVCDIR)/PlatformSDK
_ms_sdk :=$(_msvc_dir)/PlatformSDK export SHORTCOMPILERBIN
export SHORTPSDK
endif endif
endif endif
# The Microsoft Platform SDK installed by itself # The Microsoft Platform SDK installed by itself
ifneq ($(_program_files),) ifneq ($(SHORTPROGRAMFILES),)
xPSDK :="$(_program_files)/Microsoft Platform SDK" ifndef SHORTPSDK
_psdk :=$(call FullPath,$(xPSDK)) xPSDK :="$(SHORTPROGRAMFILES)/Microsoft Platform SDK"
ifeq ($(_psdk),) SHORTPSDK :=$(call FullPath,$(xPSDK))
xPSDK :="$(_program_files)/Microsoft SDK" ifeq ($(SHORTPSDK),)
_psdk :=$(call FullPath,$(xMSSDK)) xPSDK :="$(SHORTPROGRAMFILES)/Microsoft SDK"
SHORTPSDK :=$(call FullPath,$(xMSSDK))
endif
export SHORTPSDK
endif endif
endif endif
# If no SDK found yet, look in other places # If no SDK found yet, look in other places
ifeq ($(_ms_sdk),) ifndef SHORTPSDK
ifdef MSSDK ifdef MSSDK
xMSSDK :="$(subst \,/,$(MSSDK))" xMSSDK :="$(subst \,/,$(MSSDK))"
_ms_sdk :=$(call FullPath,$(xMSSDK)) SHORTPSDK :=$(call FullPath,$(xMSSDK))
else else
ifdef MSSdk ifdef MSSdk
xMSSDK :="$(subst \,/,$(MSSdk))" xMSSDK :="$(subst \,/,$(MSSdk))"
_ms_sdk :=$(call FullPath,$(xMSSDK)) SHORTPSDK :=$(call FullPath,$(xMSSDK))
else
_ms_sdk :=$(_psdk)
endif endif
endif endif
export SHORTPSDK
endif endif
# Compilers for 64bit are from SDK # Compilers for 64bit are from SDK
ifeq ($(ARCH_DATA_MODEL), 64) ifeq ($(ARCH_DATA_MODEL), 64)
xMSSDK61 :="C:/Program Files/Microsoft SDKs/Windows/v6.1/" ifndef SHORTCOMPILERBIN
MSSDK61 :=$(call FullPath,$(xMSSDK61)) xMSSDK61 :="C:/Program Files/Microsoft SDKs/Windows/v6.1/"
xVS2008 :="C:/Program Files (x86)/Microsoft Visual Studio 9.0/" MSSDK61 :=$(call FullPath,$(xMSSDK61))
_vs2008 :=$(call FullPath,$(xVS2008)) xVS2008 :="C:/Program Files (x86)/Microsoft Visual Studio 9.0/"
ifneq ($(_vs2008),) _vs2008 :=$(call FullPath,$(xVS2008))
ifeq ($(ARCH), ia64) ifneq ($(_vs2008),)
_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),)
ifeq ($(ARCH), ia64) ifeq ($(ARCH), ia64)
_compiler_bin :=$(_ms_sdk)/Bin/Win64 SHORTCOMPILERBIN :=$(_vs2008)/VC/Bin/x86_ia64
endif endif
ifeq ($(ARCH), amd64) ifeq ($(ARCH), amd64)
_compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH) SHORTCOMPILERBIN :=$(_vs2008)/VC/Bin/$(ARCH)
_redist_sdk :=$(_ms_sdk)/redist/win64/AMD64 endif
else
ifneq ($(SHORTPSDK),)
ifeq ($(ARCH), ia64)
SHORTCOMPILERBIN :=$(SHORTPSDK)/Bin/Win64
endif
ifeq ($(ARCH), amd64)
SHORTCOMPILERBIN :=$(SHORTPSDK)/Bin/Win64/x86/$(ARCH)
endif
endif endif
endif endif
export SHORTCOMPILERBIN
endif endif
endif endif
# Location on system where jdk installs might be # Location on system where jdk installs might be
ifneq ($(_program_files),) ifneq ($(SHORTPROGRAMFILES),)
USRJDKINSTANCES_PATH =$(_program_files)/Java USRJDKINSTANCES_PATH =$(SHORTPROGRAMFILES)/Java
else else
USRJDKINSTANCES_PATH =$(_system_drive)/ USRJDKINSTANCES_PATH =$(_system_drive)/
endif endif
# SLASH_JAVA: location of all network accessable files # SLASH_JAVA: location of all network accessable files
ifdef ALT_SLASH_JAVA ifndef SLASH_JAVA
xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))" ifdef ALT_SLASH_JAVA
SLASH_JAVA :=$(call FullPath,$(xALT_SLASH_JAVA)) xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
else SLASH_JAVA :=$(call FullPath,$(xALT_SLASH_JAVA))
ifdef ALT_JDK_JAVA_DRIVE
SLASH_JAVA =$(JDK_JAVA_DRIVE)
else else
SLASH_JAVA =J: ifdef ALT_JDK_JAVA_DRIVE
SLASH_JAVA =$(JDK_JAVA_DRIVE)
else
SLASH_JAVA =J:
endif
endif endif
SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
export SLASH_JAVA
endif endif
SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
# JDK_DEVTOOLS_DIR: common path for all the java devtools # JDK_DEVTOOLS_DIR: common path for all the java devtools
ifdef ALT_JDK_DEVTOOLS_DIR ifndef JDK_DEVTOOLS_DIR
xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))" ifdef ALT_JDK_DEVTOOLS_DIR
JDK_DEVTOOLS_DIR :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR)) xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
else JDK_DEVTOOLS_DIR :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools 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 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. # COMPILER_PATH: path to where the compiler and tools are installed.
# NOTE: Must end with / so that it could be empty, allowing PATH usage. # NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifdef ALT_COMPILER_PATH ifndef COMPILER_PATH
xALT_COMPILER_PATH :="$(subst \,/,$(ALT_COMPILER_PATH))" ifdef ALT_COMPILER_PATH
fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH)) xALT_COMPILER_PATH :="$(subst \,/,$(ALT_COMPILER_PATH))"
COMPILER_PATH :=$(call PrefixPath,$(fxALT_COMPILER_PATH)) fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
else COMPILER_PATH :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin)) else
COMPILER_PATH :=$(call PrefixPath,$(SHORTCOMPILERBIN))
endif
COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
export COMPILER_PATH
endif endif
COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
# MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are. # MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
# NOTE: Must end with / so that it could be empty, allowing PATH usage. # NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifdef ALT_MSDEVTOOLS_PATH ifndef MSDEVTOOLS_PATH
xALT_MSDEVTOOLS_PATH :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))" ifdef ALT_MSDEVTOOLS_PATH
fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH)) xALT_MSDEVTOOLS_PATH :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
MSDEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH)) fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
else MSDEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
ifeq ($(ARCH_DATA_MODEL), 64) else
ifdef MSTOOLS ifeq ($(ARCH_DATA_MODEL), 64)
xMSTOOLS :="$(subst \,/,$(MSTOOLS))" ifdef MSTOOLS
_ms_tools :=$(call FullPath,$(xMSTOOLS)) xMSTOOLS :="$(subst \,/,$(MSTOOLS))"
else
ifdef Mstools
xMSTOOLS :="$(subst \,/,$(Mstools))"
_ms_tools :=$(call FullPath,$(xMSTOOLS)) _ms_tools :=$(call FullPath,$(xMSTOOLS))
else 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
endif
ifneq ($(_ms_tools),)
_ms_tools_bin :=$(_ms_tools)/Bin
else else
# Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up _ms_tools_bin :=$(SHORTCOMPILERBIN)
_ms_tools_bin :=$(_compiler_bin)/../../..
endif endif
else MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
_ms_tools_bin :=$(_compiler_bin)
endif endif
MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin)) MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
export MSDEVTOOLS_PATH
endif endif
MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.) # 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. # NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifdef ALT_DEVTOOLS_PATH ifndef DEVTOOLS_PATH
xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))" ifdef ALT_DEVTOOLS_PATH
fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH)) xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
DEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH)) fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
else DEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
ifdef USING_CYGWIN
DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
else else
xDEVTOOLS_PATH :="$(_system_drive)/utils" ifdef USING_CYGWIN
fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH)) DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH)) else
xDEVTOOLS_PATH :="$(_system_drive)/utils"
fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
endif
endif endif
DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
export DEVTOOLS_PATH
endif endif
DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK. # _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
# _BOOTDIR2: Second choice # _BOOTDIR2: Second choice
@ -410,20 +415,26 @@ endif
# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for # BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc. # multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
ifdef ALT_BUILD_JDK_IMPORT_PATH ifndef BUILD_JDK_IMPORT_PATH
BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH)) ifdef ALT_BUILD_JDK_IMPORT_PATH
else BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES) 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 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 # JDK_IMPORT_PATH: location of previously built JDK (this version) to import
ifdef ALT_JDK_IMPORT_PATH ifndef JDK_IMPORT_PATH
JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH)) ifdef ALT_JDK_IMPORT_PATH
else JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT) 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 endif
JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)

View file

@ -228,12 +228,15 @@ else
endif endif
# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set # FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
ifdef BUILD_NUMBER ifndef FULL_VERSION
FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER) ifdef BUILD_NUMBER
else FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
BUILD_NUMBER = b00 else
USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`) BUILD_NUMBER = b00
FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER) 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 endif
# Promoted build location # Promoted build location

View file

@ -84,21 +84,14 @@ PLATFORM_SHARED=done
# REQUIRED_LINUX_VER linux only: required version of linux # REQUIRED_LINUX_VER linux only: required version of linux
# REQUIRED_LINUX_FULLVER linux only: required full 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 # Normal boot jdk is previous release, but a hard requirement is a 1.5 boot
REQUIRED_BOOT_VER = 1.5 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 # Don't define this unless it's not defined
ifndef VARIANT ifndef VARIANT
VARIANT=OPT VARIANT=OPT
@ -372,14 +365,17 @@ ifeq ($(PLATFORM), windows)
REQUIRED_FREE_SPACE=500000 REQUIRED_FREE_SPACE=500000
OS_VENDOR = Microsoft OS_VENDOR = Microsoft
# How much RAM does this machine have: # How much RAM does this machine have:
MB_OF_MEMORY := $(shell \ ifndef MB_OF_MEMORY
if [ -f "C:/cygwin/bin/free.exe" ] ; then \ MB_OF_MEMORY := $(shell \
( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \ if [ -f "C:/cygwin/bin/free.exe" ] ; then \
grep Mem: | \ ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \ grep Mem: | \
else \ sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
echo "512"; \ else \
fi) echo "512"; \
fi)
export MB_OF_MEMORY
endif
endif endif
# Machines with 512Mb or less of real memory are considered low memory # Machines with 512Mb or less of real memory are considered low memory
@ -387,30 +383,36 @@ endif
# system swapping during the build. # system swapping during the build.
# If we don't know, assume 512. Subtract 128 from MB for VM MAX. # If we don't know, assume 512. Subtract 128 from MB for VM MAX.
# Don't set VM max over 1024-128=896. # Don't set VM max over 1024-128=896.
ifneq ($(MB_OF_MEMORY),) ifndef MAX_VM_MEMORY
LOW_MEMORY_MACHINE := $(shell \ ifneq ($(MB_OF_MEMORY),)
if [ $(MB_OF_MEMORY) -le 512 ] ; then \ LOW_MEMORY_MACHINE := $(shell \
echo "true"; \ if [ $(MB_OF_MEMORY) -le 512 ] ; then \
else \ echo "true"; \
echo "false"; \ else \
fi) echo "false"; \
MAX_VM_MEMORY := $(shell \ fi)
if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ MAX_VM_MEMORY := $(shell \
expr $(MB_OF_MEMORY) '-' 128 ; \ if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
else \ expr $(MB_OF_MEMORY) '-' 128 ; \
echo "896"; \ else \
fi) echo "896"; \
MIN_VM_MEMORY := $(shell \ fi)
if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ MIN_VM_MEMORY := $(shell \
expr $(MAX_VM_MEMORY) '-' 8 ; \ if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
else \ expr $(MAX_VM_MEMORY) '-' 8 ; \
echo "128"; \ else \
fi) echo "128"; \
else fi)
MB_OF_MEMORY := unknown else
LOW_MEMORY_MACHINE := true MB_OF_MEMORY := unknown
MAX_VM_MEMORY := 384 LOW_MEMORY_MACHINE := true
MIN_VM_MEMORY := 128 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 endif
REQUIRED_ZIP_VER = 2.2 REQUIRED_ZIP_VER = 2.2

View file

@ -34,8 +34,8 @@ solaris_i586_5.10,\
solaris_x64_5.10,\ solaris_x64_5.10,\
linux_i586_2.6,\ linux_i586_2.6,\
linux_x64_2.6,\ linux_x64_2.6,\
windows_i586,\ windows_i586_5.0,\
windows_x64 windows_x64_5.2
# The different build flavors we want # The different build flavors we want
jprt.build.flavors=product,fastdebug jprt.build.flavors=product,fastdebug

View file

@ -46,3 +46,4 @@ d07e68298d4e17ebf93d8299e43fcc3ded26472a jdk7-b68
54fd4d9232969ea6cd3d236e5ad276183bb0d423 jdk7-b69 54fd4d9232969ea6cd3d236e5ad276183bb0d423 jdk7-b69
0632c3e615a315ff11e2ab1d64f4d82ff9853461 jdk7-b70 0632c3e615a315ff11e2ab1d64f4d82ff9853461 jdk7-b70
50a95aa4a247f0cbbf66df285a8b1d78ffb153d9 jdk7-b71 50a95aa4a247f0cbbf66df285a8b1d78ffb153d9 jdk7-b71
a94714c550658fd6741793ef036cb9625dc2ab1a jdk7-b72

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2009
HS_MAJOR_VER=17 HS_MAJOR_VER=17
HS_MINOR_VER=0 HS_MINOR_VER=0
HS_BUILD_NUMBER=01 HS_BUILD_NUMBER=02
JDK_MAJOR_VER=1 JDK_MAJOR_VER=1
JDK_MINOR_VER=7 JDK_MINOR_VER=7

View file

@ -70,10 +70,10 @@ all: $(JvmtiGeneratedFiles)
both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl
$(JvmtiGenClass): $(JvmtiGenSource) $(JvmtiGenClass): $(JvmtiGenSource)
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiGenSource) $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
$(JvmtiEnvFillClass): $(JvmtiEnvFillSource) $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiEnvFillSource) $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo Generating $@

View file

@ -74,6 +74,7 @@ SUNWprivate_1.1 {
JVM_CurrentTimeMillis; JVM_CurrentTimeMillis;
JVM_DefineClass; JVM_DefineClass;
JVM_DefineClassWithSource; JVM_DefineClassWithSource;
JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus; JVM_DesiredAssertionStatus;
JVM_DisableCompiler; JVM_DisableCompiler;
JVM_DoPrivileged; JVM_DoPrivileged;

View file

@ -74,6 +74,7 @@ SUNWprivate_1.1 {
JVM_CurrentTimeMillis; JVM_CurrentTimeMillis;
JVM_DefineClass; JVM_DefineClass;
JVM_DefineClassWithSource; JVM_DefineClassWithSource;
JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus; JVM_DesiredAssertionStatus;
JVM_DisableCompiler; JVM_DisableCompiler;
JVM_DoPrivileged; JVM_DoPrivileged;

View file

@ -122,12 +122,20 @@ endif
endif endif
endif endif
COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS)
SUM = /usr/bin/sum SUM = /usr/bin/sum
# 'gmake MAKE_VERBOSE=y' gives all the gory details. # 'gmake MAKE_VERBOSE=y' gives all the gory details.
QUIETLY$(MAKE_VERBOSE) = @ QUIETLY$(MAKE_VERBOSE) = @
RUN.JAR$(MAKE_VERBOSE) += >/dev/null 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. # With parallel makes, print a message at the end of compilation.
ifeq ($(findstring j,$(MFLAGS)),j) ifeq ($(findstring j,$(MFLAGS)),j)
COMPILE_DONE = && { echo Done with $<; } COMPILE_DONE = && { echo Done with $<; }

View file

@ -74,8 +74,8 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
mkdir -p $(SA_CLASSDIR); \ mkdir -p $(SA_CLASSDIR); \
fi 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 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -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_FILES2)
$(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer $(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)

View file

@ -24,7 +24,7 @@
# top.make is included in the Makefile in the build directories. # 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 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: # It also:
# -builds and runs adlc via adlc.make # -builds and runs adlc via adlc.make
# -generates JVMTI source and docs via jvmti.make (JSR-163) # -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) # make makeDeps: (and zap the cached db files to force a nonincremental run)
$(GENERATED)/$(MakeDepsClass): $(MakeDepsSources) $(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. @echo Removing $(Incremental_Lists) to force regeneration.
@rm -f $(Incremental_Lists) @rm -f $(Incremental_Lists)
@$(CDG) echo >$(Cached_plat) @$(CDG) echo >$(Cached_plat)

View file

@ -69,10 +69,10 @@ all: $(JvmtiGeneratedFiles)
both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl
$(JvmtiGenClass): $(JvmtiGenSource) $(JvmtiGenClass): $(JvmtiGenSource)
$(QUIETLY) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiGenSource) $(QUIETLY) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
$(JvmtiEnvFillClass): $(JvmtiEnvFillSource) $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
$(QUIETLY) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiEnvFillSource) $(QUIETLY) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo Generating $@

View file

@ -74,6 +74,7 @@ SUNWprivate_1.1 {
JVM_CurrentTimeMillis; JVM_CurrentTimeMillis;
JVM_DefineClass; JVM_DefineClass;
JVM_DefineClassWithSource; JVM_DefineClassWithSource;
JVM_DefineClassWithSourceCond;
JVM_DesiredAssertionStatus; JVM_DesiredAssertionStatus;
JVM_DisableCompiler; JVM_DisableCompiler;
JVM_DoPrivileged; JVM_DoPrivileged;

View file

@ -122,12 +122,20 @@ endif
endif endif
endif endif
COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS)
SUM = /usr/bin/sum SUM = /usr/bin/sum
# 'gmake MAKE_VERBOSE=y' gives all the gory details. # 'gmake MAKE_VERBOSE=y' gives all the gory details.
QUIETLY$(MAKE_VERBOSE) = @ QUIETLY$(MAKE_VERBOSE) = @
RUN.JAR$(MAKE_VERBOSE) += >/dev/null 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. # With parallel makes, print a message at the end of compilation.
ifeq ($(findstring j,$(MFLAGS)),j) ifeq ($(findstring j,$(MFLAGS)),j)
COMPILE_DONE = && { echo Done with $<; } COMPILE_DONE = && { echo Done with $<; }

View file

@ -67,8 +67,8 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
$(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \ $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
mkdir -p $(SA_CLASSDIR); \ mkdir -p $(SA_CLASSDIR); \
fi 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 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -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_FILES2)
$(QUIETLY) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer $(QUIETLY) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)

View file

@ -24,7 +24,7 @@
# top.make is included in the Makefile in the build directories. # 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 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: # It also:
# -builds and runs adlc via adlc.make # -builds and runs adlc via adlc.make
# -generates JVMTI source and docs via jvmti.make (JSR-163) # -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) # make makeDeps: (and zap the cached db files to force a nonincremental run)
$(GENERATED)/$(MakeDepsClass): $(MakeDepsSources) $(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. @echo Removing $(Incremental_Lists) to force regeneration.
@rm -f $(Incremental_Lists) @rm -f $(Incremental_Lists)
@$(CDG) echo >$(Cached_plat) @$(CDG) echo >$(Cached_plat)

View file

@ -91,7 +91,7 @@ includeDB.current Dependencies: classes/MakeDeps.class $(IncludeDBs)
classes/MakeDeps.class: $(MakeDepsSources) classes/MakeDeps.class: $(MakeDepsSources)
if exist classes rmdir /s /q classes if exist classes rmdir /s /q classes
mkdir 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") !if ("$(Variant)" == "compiler2") || ("$(Variant)" == "tiered")

View file

@ -68,10 +68,10 @@ default::
@if not exist $(JvmtiOutDir) mkdir $(JvmtiOutDir) @if not exist $(JvmtiOutDir) mkdir $(JvmtiOutDir)
$(JvmtiGenClass): $(JvmtiGenSource) $(JvmtiGenClass): $(JvmtiGenSource)
$(COMPILE_JAVAC) -g -d $(JvmtiOutDir) $(JvmtiGenSource) $(COMPILE_JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
$(JvmtiEnvFillClass): $(JvmtiEnvFillSource) $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
@$(COMPILE_JAVAC) -g -d $(JvmtiOutDir) $(JvmtiEnvFillSource) @$(COMPILE_JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
@echo Generating $@ @echo Generating $@

View file

@ -29,7 +29,7 @@ RUN_JAVA=$(BootStrapDir)\bin\java
RUN_JAVAP=$(BootStrapDir)\bin\javap RUN_JAVAP=$(BootStrapDir)\bin\javap
RUN_JAVAH=$(BootStrapDir)\bin\javah RUN_JAVAH=$(BootStrapDir)\bin\javah
RUN_JAR=$(BootStrapDir)\bin\jar RUN_JAR=$(BootStrapDir)\bin\jar
COMPILE_JAVAC=$(BootStrapDir)\bin\javac COMPILE_JAVAC=$(BootStrapDir)\bin\javac $(BOOTSTRAP_JAVAC_FLAGS)
COMPILE_RMIC=$(BootStrapDir)\bin\rmic COMPILE_RMIC=$(BootStrapDir)\bin\rmic
BOOT_JAVA_HOME=$(BootStrapDir) BOOT_JAVA_HOME=$(BootStrapDir)
!else !else
@ -37,11 +37,17 @@ RUN_JAVA=java
RUN_JAVAP=javap RUN_JAVAP=javap
RUN_JAVAH=javah RUN_JAVAH=javah
RUN_JAR=jar RUN_JAR=jar
COMPILE_JAVAC=javac COMPILE_JAVAC=javac $(BOOTSTRAP_JAVAC_FLAGS)
COMPILE_RMIC=rmic COMPILE_RMIC=rmic
BOOT_JAVA_HOME= BOOT_JAVA_HOME=
!endif !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 ProjectFile=vm.vcproj
!if "$(MSC_VER)" == "1200" !if "$(MSC_VER)" == "1200"

View file

@ -55,9 +55,9 @@ default:: $(GENERATED)\sa-jdi.jar
$(GENERATED)\sa-jdi.jar: $(AGENT_FILES1:/=\) $(AGENT_FILES2:/=\) $(GENERATED)\sa-jdi.jar: $(AGENT_FILES1:/=\) $(AGENT_FILES2:/=\)
@if not exist $(SA_CLASSDIR) mkdir $(SA_CLASSDIR) @if not exist $(SA_CLASSDIR) mkdir $(SA_CLASSDIR)
@echo ...Building sa-jdi.jar @echo ...Building sa-jdi.jar
@echo ...$(COMPILE_JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -g -d $(SA_CLASSDIR) .... @echo ...$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -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 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1:/=\)
@$(COMPILE_JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES2:/=\) @$(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 $(COMPILE_RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
$(QUIETLY) echo $(SA_BUILD_VERSION_PROP)> $(SA_PROPERTIES) $(QUIETLY) echo $(SA_BUILD_VERSION_PROP)> $(SA_PROPERTIES)
$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js

View file

@ -179,6 +179,6 @@ clean:
$(HOTSPOTBUILDSPACE)/classes/MakeDeps.class: $(MakeDepsSources) $(HOTSPOTBUILDSPACE)/classes/MakeDeps.class: $(MakeDepsSources)
@if exist $(HOTSPOTBUILDSPACE)\classes rmdir /s /q $(HOTSPOTBUILDSPACE)\classes @if exist $(HOTSPOTBUILDSPACE)\classes rmdir /s /q $(HOTSPOTBUILDSPACE)\classes
@mkdir $(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: FORCE:

View file

@ -1696,6 +1696,9 @@ void InterpreterMacroAssembler::profile_virtual_call(Register receiver,
void InterpreterMacroAssembler::record_klass_in_profile_helper( void InterpreterMacroAssembler::record_klass_in_profile_helper(
Register receiver, Register scratch, Register receiver, Register scratch,
int start_row, Label& done) { int start_row, Label& done) {
if (TypeProfileWidth == 0)
return;
int last_row = VirtualCallData::row_limit() - 1; int last_row = VirtualCallData::row_limit() - 1;
assert(start_row <= last_row, "must be work left to do"); assert(start_row <= last_row, "must be work left to do");
// Test this row for both the receiver and for null. // Test this row for both the receiver and for null.

View file

@ -5707,7 +5707,7 @@ instruct loadUS2L_immI16(iRegL dst, memory mem, immI16 mask, iRegL tmp) %{
effect(TEMP dst, TEMP tmp); effect(TEMP dst, TEMP tmp);
ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST); 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" format %{ "LDUH $mem,$dst\t! ushort/char & 16-bit mask -> long\n\t"
"SET $mask,$tmp\n\t" "SET $mask,$tmp\n\t"
"AND $dst,$tmp,$dst" %} "AND $dst,$tmp,$dst" %}
@ -5851,7 +5851,7 @@ instruct loadI2L_immI(iRegL dst, memory mem, immI mask, iRegL tmp) %{
effect(TEMP dst, TEMP tmp); effect(TEMP dst, TEMP tmp);
ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST); 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" format %{ "LDUW $mem,$dst\t! int & 32-bit mask -> long\n\t"
"SET $mask,$tmp\n\t" "SET $mask,$tmp\n\t"
"AND $dst,$tmp,$dst" %} "AND $dst,$tmp,$dst" %}

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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::_dsin: __ sin (calc_input, calc_result, tmp1, tmp2); break;
case vmIntrinsics::_dcos: __ cos (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::_dtan: __ tan (calc_input, calc_result, tmp1, tmp2); break;
case vmIntrinsics::_dlog: __ log (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, LIR_OprFact::illegalOpr); break; case vmIntrinsics::_dlog10: __ log10(calc_input, calc_result, tmp1); break;
default: ShouldNotReachHere(); default: ShouldNotReachHere();
} }

View file

@ -764,8 +764,6 @@ void FpuStackAllocator::handle_op2(LIR_Op2* op2) {
break; break;
} }
case lir_log:
case lir_log10:
case lir_abs: case lir_abs:
case lir_sqrt: { case lir_sqrt: {
// Right argument appears to be unused // Right argument appears to be unused
@ -785,6 +783,30 @@ void FpuStackAllocator::handle_op2(LIR_Op2* op2) {
break; 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_tan:
case lir_sin: case lir_sin:

View file

@ -1262,6 +1262,9 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper(
Register receiver, Register mdp, Register receiver, Register mdp,
Register reg2, Register reg2,
int start_row, Label& done) { int start_row, Label& done) {
if (TypeProfileWidth == 0)
return;
int last_row = VirtualCallData::row_limit() - 1; int last_row = VirtualCallData::row_limit() - 1;
assert(start_row <= last_row, "must be work left to do"); assert(start_row <= last_row, "must be work left to do");
// Test this row for both the receiver and for null. // Test this row for both the receiver and for null.

View file

@ -1272,6 +1272,9 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper(
Register receiver, Register mdp, Register receiver, Register mdp,
Register reg2, Register reg2,
int start_row, Label& done) { int start_row, Label& done) {
if (TypeProfileWidth == 0)
return;
int last_row = VirtualCallData::row_limit() - 1; int last_row = VirtualCallData::row_limit() - 1;
assert(start_row <= last_row, "must be work left to do"); assert(start_row <= last_row, "must be work left to do");
// Test this row for both the receiver and for null. // Test this row for both the receiver and for null.

View file

@ -1526,7 +1526,8 @@ void os::print_os_info(outputStream* st) {
case 5000: st->print(" Windows 2000"); break; case 5000: st->print(" Windows 2000"); break;
case 5001: st->print(" Windows XP"); break; case 5001: st->print(" Windows XP"); break;
case 5002: case 5002:
case 6000: { case 6000:
case 6001: {
// Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could // Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could
// find out whether we are running on 64 bit processor or not. // find out whether we are running on 64 bit processor or not.
SYSTEM_INFO si; SYSTEM_INFO si;
@ -1549,13 +1550,27 @@ void os::print_os_info(outputStream* st) {
st->print(" Windows XP x64 Edition"); st->print(" Windows XP x64 Edition");
else else
st->print(" Windows Server 2003 family"); st->print(" Windows Server 2003 family");
} else { // os_vers == 6000 } else if (os_vers == 6000) {
if (osvi.wProductType == VER_NT_WORKSTATION) if (osvi.wProductType == VER_NT_WORKSTATION)
st->print(" Windows Vista"); st->print(" Windows Vista");
else else
st->print(" Windows Server 2008"); st->print(" Windows Server 2008");
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
st->print(" , 64 bit"); 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; break;
} }

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -1031,7 +1031,8 @@ void ArchDesc::initBaseOpTypes() {
//---------------------------addSUNcopyright------------------------------- //---------------------------addSUNcopyright-------------------------------
// output SUN copyright info // output SUN copyright info
void ArchDesc::addSunCopyright(char* legal, int size, FILE *fp) { 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,"\n");
fprintf(fp,"// Machine Generated File. Do Not Edit!\n"); fprintf(fp,"// Machine Generated File. Do Not Edit!\n");
fprintf(fp,"\n"); fprintf(fp,"\n");

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -567,8 +567,6 @@ void LIR_OpVisitState::visit(LIR_Op* op) {
case lir_rem: case lir_rem:
case lir_sqrt: case lir_sqrt:
case lir_abs: case lir_abs:
case lir_log:
case lir_log10:
case lir_logic_and: case lir_logic_and:
case lir_logic_or: case lir_logic_or:
case lir_logic_xor: case lir_logic_xor:
@ -644,13 +642,16 @@ void LIR_OpVisitState::visit(LIR_Op* op) {
case lir_tan: case lir_tan:
case lir_sin: case lir_sin:
case lir_cos: { case lir_cos:
case lir_log:
case lir_log10: {
assert(op->as_Op2() != NULL, "must be"); assert(op->as_Op2() != NULL, "must be");
LIR_Op2* op2 = (LIR_Op2*)op; LIR_Op2* op2 = (LIR_Op2*)op;
// sin and cos need two temporary fpu stack slots, so register // On x86 tan/sin/cos need two temporary fpu stack slots and
// two temp operands. Register input operand as temp to // log/log10 need one so handle opr2 and tmp as temp inputs.
// guarantee that they do not overlap // Register input operand as temp to guarantee that it doesn't
// overlap with the input.
assert(op2->_info == NULL, "not used"); assert(op2->_info == NULL, "not used");
assert(op2->_opr1->is_valid(), "used"); assert(op2->_opr1->is_valid(), "used");
do_input(op2->_opr1); do_temp(op2->_opr1); do_input(op2->_opr1); do_temp(op2->_opr1);

View file

@ -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 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 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 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, tmp, to)); } 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 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 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)); } void tan (LIR_Opr from, LIR_Opr to, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_Op2(lir_tan , from, tmp1, to, tmp2)); }

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -2547,6 +2547,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
KlassHandle host_klass, KlassHandle host_klass,
GrowableArray<Handle>* cp_patches, GrowableArray<Handle>* cp_patches,
symbolHandle& parsed_name, symbolHandle& parsed_name,
bool verify,
TRAPS) { TRAPS) {
// So that JVMTI can cache class file in the state before retransformable agents // So that JVMTI can cache class file in the state before retransformable agents
// have modified it // have modified it
@ -2591,7 +2592,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
instanceKlassHandle nullHandle; instanceKlassHandle nullHandle;
// Figure out whether we can skip format checking (matching classic VM behavior) // 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 // Set the verify flag in stream
cfs->set_verify(_need_verify); cfs->set_verify(_need_verify);
@ -3210,6 +3211,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name,
// Fill in information already parsed // Fill in information already parsed
this_klass->set_access_flags(access_flags); this_klass->set_access_flags(access_flags);
this_klass->set_should_verify_class(verify);
jint lh = Klass::instance_layout_helper(instance_size, false); jint lh = Klass::instance_layout_helper(instance_size, false);
this_klass->set_layout_helper(lh); this_klass->set_layout_helper(lh);
assert(this_klass->oop_is_instance(), "layout is correct"); 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_has_final_method();
} }
this_klass->set_method_ordering(method_ordering()); 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_initial_method_idnum(methods->length());
this_klass->set_name(cp->klass_name_at(this_class_index)); this_klass->set_name(cp->klass_name_at(this_class_index));
if (LinkWellKnownClasses || is_anonymous()) // I am well known to myself if (LinkWellKnownClasses || is_anonymous()) // I am well known to myself

View file

@ -260,9 +260,10 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
Handle class_loader, Handle class_loader,
Handle protection_domain, Handle protection_domain,
symbolHandle& parsed_name, symbolHandle& parsed_name,
bool verify,
TRAPS) { TRAPS) {
KlassHandle no_host_klass; 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, instanceKlassHandle parseClassFile(symbolHandle name,
Handle class_loader, Handle class_loader,
@ -270,6 +271,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
KlassHandle host_klass, KlassHandle host_klass,
GrowableArray<Handle>* cp_patches, GrowableArray<Handle>* cp_patches,
symbolHandle& parsed_name, symbolHandle& parsed_name,
bool verify,
TRAPS); TRAPS);
// Verifier checks // Verifier checks

View file

@ -874,6 +874,7 @@ instanceKlassHandle ClassLoader::load_classfile(symbolHandle h_name, TRAPS) {
class_loader, class_loader,
protection_domain, protection_domain,
parsed_name, parsed_name,
false,
CHECK_(h)); CHECK_(h));
// add to package table // add to package table

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -252,7 +252,7 @@ symbolHandle java_lang_String::as_symbol(Handle java_string, TRAPS) {
typeArrayOop value = java_lang_String::value(obj); typeArrayOop value = java_lang_String::value(obj);
int offset = java_lang_String::offset(obj); int offset = java_lang_String::offset(obj);
int length = java_lang_String::length(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); symbolOop sym = SymbolTable::lookup_unicode(base, length, THREAD);
return symbolHandle(THREAD, sym); 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); typeArrayOop value = java_lang_String::value(java_string);
int offset = java_lang_String::offset(java_string); int offset = java_lang_String::offset(java_string);
int length = java_lang_String::length(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); return SymbolTable::probe_unicode(base, length);
} }

View file

@ -970,6 +970,7 @@ klassOop SystemDictionary::parse_stream(symbolHandle class_name,
host_klass, host_klass,
cp_patches, cp_patches,
parsed_name, parsed_name,
true,
THREAD); THREAD);
@ -1025,6 +1026,7 @@ klassOop SystemDictionary::resolve_from_stream(symbolHandle class_name,
Handle class_loader, Handle class_loader,
Handle protection_domain, Handle protection_domain,
ClassFileStream* st, ClassFileStream* st,
bool verify,
TRAPS) { TRAPS) {
// Classloaders that support parallelism, e.g. bootstrap classloader, // Classloaders that support parallelism, e.g. bootstrap classloader,
@ -1055,6 +1057,7 @@ klassOop SystemDictionary::resolve_from_stream(symbolHandle class_name,
class_loader, class_loader,
protection_domain, protection_domain,
parsed_name, parsed_name,
verify,
THREAD); THREAD);
const char* pkg = "java/"; const char* pkg = "java/";

View file

@ -259,7 +259,9 @@ public:
TRAPS); TRAPS);
// Resolve from stream (called by jni_DefineClass and JVM_DefineClass) // 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. // Lookup an already loaded class. If not found NULL is returned.
static klassOop find(symbolHandle class_name, Handle class_loader, Handle protection_domain, TRAPS); static klassOop find(symbolHandle class_name, Handle class_loader, Handle protection_domain, TRAPS);

View file

@ -53,8 +53,8 @@ static void* verify_byte_codes_fn() {
// Methods in Verifier // Methods in Verifier
bool Verifier::should_verify_for(oop class_loader) { bool Verifier::should_verify_for(oop class_loader, bool should_verify_class) {
return class_loader == NULL ? return (class_loader == NULL || !should_verify_class) ?
BytecodeVerificationLocal : BytecodeVerificationRemote; BytecodeVerificationLocal : BytecodeVerificationRemote;
} }
@ -68,7 +68,7 @@ bool Verifier::relax_verify_for(oop loader) {
return !need_verify; 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); ResourceMark rm(THREAD);
HandleMark hm; 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 // If the class should be verified, first see if we can use the split
// verifier. If not, or if verification fails and FailOverToOldVerifier // verifier. If not, or if verification fails and FailOverToOldVerifier
// is set, then call the inference verifier. // is set, then call the inference verifier.
if (is_eligible_for_verification(klass)) { if (is_eligible_for_verification(klass, should_verify_class)) {
if (TraceClassInitialization) { if (TraceClassInitialization) {
tty->print_cr("Start class verification for: %s", klassName); 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(); symbolOop name = klass->name();
klassOop refl_magic_klass = SystemDictionary::reflect_magic_klass(); 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 // 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 // We need to skip the following four for bootstraping
name != vmSymbols::java_lang_Object() && name != vmSymbols::java_lang_Object() &&
name != vmSymbols::java_lang_Class() && name != vmSymbols::java_lang_Class() &&

View file

@ -34,16 +34,18 @@ class Verifier : AllStatic {
* Otherwise, no exception is thrown and the return indicates the * Otherwise, no exception is thrown and the return indicates the
* error. * 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. // Return false if the class is loaded by the bootstrap loader,
static bool should_verify_for(oop class_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. // Relax certain verifier checks to enable some broken 1.1 apps to run on 1.2.
static bool relax_verify_for(oop class_loader); static bool relax_verify_for(oop class_loader);
private: 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( static symbolHandle inference_verify(
instanceKlassHandle klass, char* msg, size_t msg_len, TRAPS); instanceKlassHandle klass, char* msg, size_t msg_len, TRAPS);
}; };

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -302,9 +302,9 @@ MemRegion HeapRegionSeq::shrink_by(size_t shrink_bytes,
if (cur->isHumongous()) { if (cur->isHumongous()) {
return MemRegion(last_start, end); return MemRegion(last_start, end);
} }
cur->reset_zero_fill();
assert(cur == _regions.top(), "Should be top"); assert(cur == _regions.top(), "Should be top");
if (!cur->is_empty()) break; if (!cur->is_empty()) break;
cur->reset_zero_fill();
shrink_bytes -= cur->capacity(); shrink_bytes -= cur->capacity();
num_regions_deleted++; num_regions_deleted++;
_regions.pop(); _regions.pop();

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -2752,7 +2752,6 @@ PSParallelCompact::revisit_weak_klass_link(ParCompactionManager* cm, Klass* k) {
cm->revisit_klass_stack()->push(k); cm->revisit_klass_stack()->push(k);
} }
#if ( defined(COMPILER1) || defined(COMPILER2) )
void PSParallelCompact::revisit_mdo(ParCompactionManager* cm, DataLayout* p) { void PSParallelCompact::revisit_mdo(ParCompactionManager* cm, DataLayout* p) {
cm->revisit_mdo_stack()->push(p); cm->revisit_mdo_stack()->push(p);
} }
@ -2778,7 +2777,6 @@ void PSParallelCompact::follow_mdo_weak_refs() {
follow_stack(cm); follow_stack(cm);
} }
} }
#endif // ( COMPILER1 || COMPILER2 )
#ifdef VALIDATE_MARK_SWEEP #ifdef VALIDATE_MARK_SWEEP

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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(); follow_stack();
} }
#if ( defined(COMPILER1) || defined(COMPILER2) )
void MarkSweep::revisit_mdo(DataLayout* p) { void MarkSweep::revisit_mdo(DataLayout* p) {
_revisit_mdo_stack->push(p); _revisit_mdo_stack->push(p);
} }
@ -92,7 +91,6 @@ void MarkSweep::follow_mdo_weak_refs() {
} }
follow_stack(); follow_stack();
} }
#endif // ( COMPILER1 || COMPILER2 )
MarkSweep::FollowRootClosure MarkSweep::follow_root_closure; MarkSweep::FollowRootClosure MarkSweep::follow_root_closure;

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -110,7 +110,7 @@ bool instanceKlass::verify_code(
// 1) Verify the bytecodes // 1) Verify the bytecodes
Verifier::Mode mode = Verifier::Mode mode =
throw_verifyerror ? Verifier::ThrowException : Verifier::NoException; 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. // Lookup or create a jmethodID.
// This code can be called by the VM thread. For this reason it is critical that // This code is called by the VMThread and JavaThreads so the
// there are no blocking operations (safepoints) while the lock is held -- or a // locking has to be done very carefully to avoid deadlocks
// deadlock can occur. // and/or other cache consistency problems.
jmethodID instanceKlass::jmethod_id_for_impl(instanceKlassHandle ik_h, methodHandle method_h) { //
jmethodID instanceKlass::get_jmethod_id(instanceKlassHandle ik_h, methodHandle method_h) {
size_t idnum = (size_t)method_h->method_idnum(); size_t idnum = (size_t)method_h->method_idnum();
jmethodID* jmeths = ik_h->methods_jmethod_ids_acquire(); jmethodID* jmeths = ik_h->methods_jmethod_ids_acquire();
size_t length = 0; size_t length = 0;
jmethodID id = NULL; 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. // We use a double-check locking idiom here because this cache is
// These allocations will have to be freed if they are unused. // 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; jmethodID* new_jmeths = NULL;
if (length <= idnum) { 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()); size_t size = MAX2(idnum+1, (size_t)ik_h->idnum_allocated_count());
new_jmeths = NEW_C_HEAP_ARRAY(jmethodID, size+1); new_jmeths = NEW_C_HEAP_ARRAY(jmethodID, size+1);
memset(new_jmeths, 0, (size+1)*sizeof(jmethodID)); 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; jmethodID new_id = NULL;
if (method_h->is_old() && !method_h->is_obsolete()) { 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 // 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); new_id = JNIHandles::make_jmethod_id(method_h);
} }
if (Threads::number_of_threads() == 0 || SafepointSynchronize::is_at_safepoint()) { if (Threads::number_of_threads() == 0 ||
// No need and unsafe to lock the JmethodIdCreation_lock at safepoint. SafepointSynchronize::is_at_safepoint()) {
id = get_jmethod_id(ik_h, idnum, new_id, new_jmeths); // 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 { } else {
MutexLocker ml(JmethodIdCreation_lock); 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; return id;
} }
jmethodID instanceKlass::get_jmethod_id(instanceKlassHandle ik_h, size_t idnum, // Common code to fetch the jmethodID from the cache or update the
jmethodID new_id, jmethodID* new_jmeths) { // cache with the new jmethodID. This function should never do anything
// Retry lookup after we got the lock or ensured we are at safepoint // that causes the caller to go to a safepoint or we can deadlock with
jmethodID* jmeths = ik_h->methods_jmethod_ids_acquire(); // the VMThread or have cache consistency issues.
jmethodID id = NULL; //
jmethodID to_dealloc_id = NULL; jmethodID instanceKlass::get_jmethod_id_fetch_or_update(
jmethodID* to_dealloc_jmeths = NULL; instanceKlassHandle ik_h, size_t idnum, jmethodID new_id,
size_t length; 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) { 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++) { for (size_t index = 0; index < length; index++) {
new_jmeths[index+1] = jmeths[index+1]; 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); ik_h->release_set_methods_jmethod_ids(jmeths = new_jmeths);
} else { } else {
// fetch jmethodID (if any) from the existing cache
id = jmeths[idnum+1]; 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) { 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; 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 // The jmethodID cache can be read while unlocked so we have to
FreeHeap(to_dealloc_jmeths); // make sure the new jmethodID is complete before installing it
if (to_dealloc_id != NULL) { // in the cache.
JNIHandles::destroy_jmethod_id(to_dealloc_id); OrderAccess::release_store_ptr(&jmeths[idnum+1], id);
} else {
*to_dealloc_id_p = new_id; // save new id for later delete
} }
return id; 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 // Lookup a jmethodID, NULL if not found. Do no blocking, no allocations, no handles
jmethodID instanceKlass::jmethod_id_or_null(methodOop method) { jmethodID instanceKlass::jmethod_id_or_null(methodOop method) {
size_t idnum = (size_t)method->method_idnum(); size_t idnum = (size_t)method->method_idnum();
jmethodID* jmeths = methods_jmethod_ids_acquire(); jmethodID* jmeths = methods_jmethod_ids_acquire();
size_t length; // length assigned as debugging crumb size_t length; // length assigned as debugging crumb
jmethodID id = NULL; 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, (length = (size_t)jmeths[0]) > idnum) { // and if it is long enough,
id = jmeths[idnum+1]; // Look up the id (may be NULL) 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 // Cache an itable index
void instanceKlass::set_cached_itable_index(size_t idnum, int index) { void instanceKlass::set_cached_itable_index(size_t idnum, int index) {
int* indices = methods_cached_itable_indices_acquire(); int* indices = methods_cached_itable_indices_acquire();
if (indices == NULL || // If there is no index array, int* to_dealloc_indices = NULL;
((size_t)indices[0]) <= idnum) { // or if it is too short
// Lock before we allocate the array so we don't leak // 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); 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(); indices = methods_cached_itable_indices_acquire();
size_t length = 0; 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) { if (indices == NULL || (length = (size_t)indices[0]) <= idnum) {
size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count()); size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count());
int* new_indices = NEW_C_HEAP_ARRAY(int, size+1); 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; size_t i;
for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
new_indices[i+1] = indices[i+1]; 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; new_indices[i+1] = -1;
} }
if (indices != NULL) { 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); 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 { } else {
CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops()); 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 // Add an information node that contains weak references to the
// interesting parts of the previous version of the_class. // 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, void instanceKlass::add_previous_version(instanceKlassHandle ikh,
BitMap* emcp_methods, int emcp_method_count) { BitMap* emcp_methods, int emcp_method_count) {
assert(Thread::current()->is_VM_thread(), assert(Thread::current()->is_VM_thread(),

View file

@ -217,6 +217,7 @@ class instanceKlass: public Klass {
bool _is_marked_dependent; // used for marking during flushing and deoptimization bool _is_marked_dependent; // used for marking during flushing and deoptimization
bool _rewritten; // methods rewritten. bool _rewritten; // methods rewritten.
bool _has_nonstatic_fields; // for sizing with UseCompressedOops 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 _minor_version; // minor version number of class file
u2 _major_version; // major version number of class file u2 _major_version; // major version number of class file
ClassState _init_state; // state of class ClassState _init_state; // state of class
@ -362,6 +363,10 @@ class instanceKlass: public Klass {
int get_init_state() { return _init_state; } // Useful for debugging int get_init_state() { return _init_state; } // Useful for debugging
bool is_rewritten() const { return _rewritten; } 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 // marking
bool is_marked_dependent() const { return _is_marked_dependent; } bool is_marked_dependent() const { return _is_marked_dependent; }
void set_is_marked_dependent(bool value) { _is_marked_dependent = value; } void set_is_marked_dependent(bool value) { _is_marked_dependent = value; }
@ -460,6 +465,10 @@ class instanceKlass: public Klass {
// RedefineClasses() support for previous versions: // RedefineClasses() support for previous versions:
void add_previous_version(instanceKlassHandle ikh, BitMap *emcp_methods, void add_previous_version(instanceKlassHandle ikh, BitMap *emcp_methods,
int emcp_method_count); 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; bool has_previous_version() const;
void init_previous_versions() { void init_previous_versions() {
_previous_versions = NULL; _previous_versions = NULL;
@ -501,9 +510,14 @@ class instanceKlass: public Klass {
void set_bootstrap_method(oop mh) { oop_store(&_bootstrap_method, mh); } void set_bootstrap_method(oop mh) { oop_store(&_bootstrap_method, mh); }
// jmethodID support // jmethodID support
static jmethodID get_jmethod_id(instanceKlassHandle ik_h, size_t idnum, static jmethodID get_jmethod_id(instanceKlassHandle ik_h,
jmethodID new_id, jmethodID* new_jmeths); methodHandle method_h);
static jmethodID jmethod_id_for_impl(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); jmethodID jmethod_id_or_null(methodOop method);
// cached itable index support // cached itable index support
@ -749,6 +763,11 @@ private:
void set_init_thread(Thread *thread) { _init_thread = thread; } void set_init_thread(Thread *thread) { _init_thread = thread; }
u2 idnum_allocated_count() const { return _idnum_allocated_count; } 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 jmethodID* methods_jmethod_ids_acquire() const
{ return (jmethodID*)OrderAccess::load_ptr_acquire(&_methods_jmethod_ids); } { return (jmethodID*)OrderAccess::load_ptr_acquire(&_methods_jmethod_ids); }
void release_set_methods_jmethod_ids(jmethodID* jmeths) void release_set_methods_jmethod_ids(jmethodID* jmeths)

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -555,7 +555,7 @@ class methodOopDesc : public oopDesc {
// Get this method's jmethodID -- allocate if it doesn't exist // Get this method's jmethodID -- allocate if it doesn't exist
jmethodID jmethod_id() { methodHandle this_h(this); 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. // Lookup the jmethodID for this method. Return NULL if not found.
// NOTE that this function can be called from a signal handler // NOTE that this function can be called from a signal handler

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -439,6 +439,11 @@ static Node* get_addp_base(Node *addp) {
Node *base = addp->in(AddPNode::Base)->uncast(); Node *base = addp->in(AddPNode::Base)->uncast();
if (base->is_top()) { // The AddP case #3 and #6. if (base->is_top()) { // The AddP case #3 and #6.
base = addp->in(AddPNode::Address)->uncast(); 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 || assert(base->Opcode() == Op_ConP || base->Opcode() == Op_ThreadLocal ||
base->Opcode() == Op_CastX2P || base->is_DecodeN() || base->Opcode() == Op_CastX2P || base->is_DecodeN() ||
(base->is_Mem() && base->bottom_type() == TypeRawPtr::NOTNULL) || (base->is_Mem() && base->bottom_type() == TypeRawPtr::NOTNULL) ||

View file

@ -622,11 +622,13 @@ BuildCutout::~BuildCutout() {
//---------------------------PreserveReexecuteState---------------------------- //---------------------------PreserveReexecuteState----------------------------
PreserveReexecuteState::PreserveReexecuteState(GraphKit* kit) { PreserveReexecuteState::PreserveReexecuteState(GraphKit* kit) {
assert(!kit->stopped(), "must call stopped() before");
_kit = kit; _kit = kit;
_sp = kit->sp(); _sp = kit->sp();
_reexecute = kit->jvms()->_reexecute; _reexecute = kit->jvms()->_reexecute;
} }
PreserveReexecuteState::~PreserveReexecuteState() { PreserveReexecuteState::~PreserveReexecuteState() {
if (_kit->stopped()) return;
_kit->jvms()->_reexecute = _reexecute; _kit->jvms()->_reexecute = _reexecute;
_kit->set_sp(_sp); _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)); alen = _gvn.transform( new (C, 3) LoadRangeNode(0, immutable_memory(), r_adr, TypeInt::POS));
} else { } else {
alen = alloc->Ideal_length(); 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) { if (ccast != alen) {
alen = _gvn.transform(ccast); alen = _gvn.transform(ccast);
} }
@ -1123,8 +1125,8 @@ Node* GraphKit::null_check_common(Node* value, BasicType type,
case T_OBJECT : { case T_OBJECT : {
const Type *t = _gvn.type( value ); const Type *t = _gvn.type( value );
const TypeInstPtr* tp = t->isa_instptr(); const TypeOopPtr* tp = t->isa_oopptr();
if (tp != NULL && !tp->klass()->is_loaded() if (tp != NULL && tp->klass() != NULL && !tp->klass()->is_loaded()
// Only for do_null_check, not any of its siblings: // Only for do_null_check, not any of its siblings:
&& !assert_null && null_control == NULL) { && !assert_null && null_control == NULL) {
// Usually, any field access or invocation on an unloaded oop type // Usually, any field access or invocation on an unloaded oop type

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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), ""); 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. // Copy the fastest available way.
// TODO: generate fields copies for small objects instead. // TODO: generate fields copies for small objects instead.
Node* src = obj; Node* src = obj;
Node* dest = new_obj; Node* dest = alloc_obj;
Node* size = _gvn.transform(obj_size); Node* size = _gvn.transform(obj_size);
// Exclude the header but include array length to copy by 8 bytes words. // 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; int raw_adr_idx = Compile::AliasIdxRaw;
post_barrier(control(), post_barrier(control(),
memory(raw_adr_type), memory(raw_adr_type),
new_obj, alloc_obj,
no_particular_field, no_particular_field,
raw_adr_idx, raw_adr_idx,
no_particular_value, no_particular_value,
@ -3969,16 +3960,8 @@ void LibraryCallKit::copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, b
false); false);
} }
// Move the original CheckCastPP after arraycopy. // Do not let reads from the cloned object float above the arraycopy.
_gvn.hash_delete(alloc_obj); insert_mem_bar(Op_MemBarCPUOrder);
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);
} }
//------------------------inline_native_clone---------------------------- //------------------------inline_native_clone----------------------------
@ -4448,15 +4431,6 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
assert(init->is_complete(), "we just did this"); assert(init->is_complete(), "we just did this");
assert(dest->is_CheckCastPP(), "sanity"); assert(dest->is_CheckCastPP(), "sanity");
assert(dest->in(0)->in(0) == init, "dest pinned"); 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 adr_type = TypeRawPtr::BOTTOM; // all initializations are into raw memory
// From this point on, every exit path is responsible for // From this point on, every exit path is responsible for
// initializing any non-copied parts of the object to zero. // 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_i_o( _gvn.transform(result_i_o) );
set_memory( _gvn.transform(result_memory), adr_type ); 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 // The memory edges above are precise in order to model effects around
// array copies accurately to allow value numbering of field loads around // array copies accurately to allow value numbering of field loads around
// arraycopy. Such field loads, both before and after, are common in Java // 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 // 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 // optimized away (which it can, sometimes) then we can manually remove
// the membar also. // 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); insert_mem_bar(Op_MemBarCPUOrder);
} }

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -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; // (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. // (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 // To schedule a load pack, we use the memory state of either the first or the last load in
// the same as the memory edge of the last executed load in the pack // the pack, based on the dependence constraint.
void SuperWord::co_locate_pack(Node_List* pk) { void SuperWord::co_locate_pack(Node_List* pk) {
if (pk->at(0)->is_Store()) { if (pk->at(0)->is_Store()) {
MemNode* first = executed_first(pk)->as_Mem(); MemNode* first = executed_first(pk)->as_Mem();
@ -1076,15 +1076,32 @@ void SuperWord::co_locate_pack(Node_List* pk) {
current = my_mem->as_Mem(); current = my_mem->as_Mem();
} // end while } // end while
} else if (pk->at(0)->is_Load()) { //load } else if (pk->at(0)->is_Load()) { //load
// all use the memory state that the last executed load uses // all loads in the pack should have the same memory state. By default,
LoadNode* last_load = executed_last(pk)->as_Load(); // we use the memory state of the last load. However, if any load could
Node* last_mem = last_load->in(MemNode::Memory); // not be moved down due to the dependence constraint, we use the memory
_igvn.hash_delete(last_mem); // state of the first load.
// Give each load same memory state as last 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++) { for (uint i = 0; i < pk->size(); i++) {
LoadNode* ld = pk->at(i)->as_Load(); LoadNode* ld = pk->at(i)->as_Load();
_igvn.hash_delete(ld); _igvn.hash_delete(ld);
ld->set_req(MemNode::Memory, last_mem); ld->set_req(MemNode::Memory, mem_input);
_igvn._worklist.push(ld); _igvn._worklist.push(ld);
} }
} }

View file

@ -2236,12 +2236,12 @@ TypeOopPtr::TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int
//------------------------------make------------------------------------------- //------------------------------make-------------------------------------------
const TypeOopPtr *TypeOopPtr::make(PTR ptr, const TypeOopPtr *TypeOopPtr::make(PTR ptr,
int offset) { int offset, int instance_id) {
assert(ptr != Constant, "no constant generic pointers"); assert(ptr != Constant, "no constant generic pointers");
ciKlass* k = ciKlassKlass::make(); ciKlass* k = ciKlassKlass::make();
bool xk = false; bool xk = false;
ciObject* o = NULL; 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 case OopPtr: { // Meeting to other OopPtrs
const TypeOopPtr *tp = t->is_oopptr(); 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 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 case OopPtr: { // Meeting to OopPtrs
// Found a OopPtr type vs self-InstPtr type // 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()); int offset = meet_offset(tp->offset());
PTR ptr = meet_ptr(tp->ptr()); PTR ptr = meet_ptr(tp->ptr());
switch (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); (ptr == Constant ? const_oop() : NULL), offset, instance_id);
} }
case NotNull: case NotNull:
case BotPTR: case BotPTR: {
return TypeOopPtr::make(ptr, offset); int instance_id = meet_instance_id(tp->instance_id());
return TypeOopPtr::make(ptr, offset, instance_id);
}
default: typerr(t); default: typerr(t);
} }
} }
@ -3259,7 +3262,7 @@ const Type *TypeAryPtr::xmeet( const Type *t ) const {
case OopPtr: { // Meeting to OopPtrs case OopPtr: { // Meeting to OopPtrs
// Found a OopPtr type vs self-AryPtr type // 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()); int offset = meet_offset(tp->offset());
PTR ptr = meet_ptr(tp->ptr()); PTR ptr = meet_ptr(tp->ptr());
switch (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); _ary, _klass, _klass_is_exact, offset, instance_id);
} }
case BotPTR: case BotPTR:
case NotNull: case NotNull: {
return TypeOopPtr::make(ptr, offset); int instance_id = meet_instance_id(tp->instance_id());
return TypeOopPtr::make(ptr, offset, instance_id);
}
default: ShouldNotReachHere(); default: ShouldNotReachHere();
} }
} }

Some files were not shown because too many files have changed in this diff Show more