This commit is contained in:
Sean Mullan 2011-01-24 15:08:37 -05:00
commit 4ab19f8be4
4844 changed files with 141632 additions and 89345 deletions

View File

@ -1,3 +1,4 @@
^build/
^dist/
/nbproject/private/
^webrev

12
.hgtags
View File

@ -88,3 +88,15 @@ a6442d6bc38a44152e0662688213ce4d2701f42a jdk7-b110
69f3edf083477955b5bd2f754252c7504167d8e1 jdk7-b111
f960f117f1623629f64203e2b09a92a8f6f14ff5 jdk7-b112
1fee41c7ed2b3388970a756a85aa693c0de8407a jdk7-b113
750c1ccb2f2d1ddfa95ab6c7f897fdab2f87f7e9 jdk7-b114
9cb24917216bc68997154f6e9566c3de62acb2f4 jdk7-b115
a4e6aa1f45ad23a6f083ed98d970b5006ea4d292 jdk7-b116
228e73f288c543a8c34e2a54227103ae5649e6af jdk7-b117
2e876e59938a853934aa738c811b26c452bd9fe8 jdk7-b118
4951967a61b4dbbf514828879f57bd1a0d4b420b jdk7-b119
8c840d3ab24f8d0f422b991638acb44b6ab1d98c jdk7-b120
0ce0a2c3a6926677dc507839a820ab6625541e5a jdk7-b121
6f09ea1c034f087916d2a8cf0d22be768400118f jdk7-b122
142129d8599d1f56b29387e7f9a5fad53b6d61df jdk7-b123
aa894c225b1a517b665ac2a58295217ea2245134 jdk7-b124
f658ec2730fa29323c36d23c27e54c7219ef5e16 jdk7-b125

View File

@ -88,3 +88,15 @@ f8be576feefce0c6695f188ef97ec16b73ad9cfd jdk7-b104
9702d6fef68e17533ee7fcf5923b11ead3e912ce jdk7-b111
b852103caf73da70068473777ae867a457bb3ae1 jdk7-b112
c1df968c4527bfab5f97662a89245f15d12d378b jdk7-b113
27985a5c6e5268014d25d55886e0ecb96af4763d jdk7-b114
e8ebdf41b9c01a26642848f4134f5504e8fb3233 jdk7-b115
94e9a1bfba8b8d1fe0bfd43b88629b1f27b02a76 jdk7-b116
7220e60b097fa027e922f1aeecdd330f3e37409f jdk7-b117
a12a9e78df8a9d534da0b4a244ed68f0de0bd58e jdk7-b118
661360bef6ccad6c119f067f5829b207de80c936 jdk7-b119
366ff0b6d2151595629806b033e2e1497e3a55d4 jdk7-b120
2c2d4f88637b488014c37e1a2eb401f68bca8838 jdk7-b121
f1591eed71f64f6eba79fb7426f5616cc4dfea73 jdk7-b122
ed6950da30cf1e8904b4bdb034d471647942271f jdk7-b123
024a6755895bf91b5a3c98984c89ee018efbf538 jdk7-b124
5c4df7e992775c102f08e9f1c0a124b324641b70 jdk7-b125

View File

@ -156,12 +156,6 @@ ifeq ($(BUILD_DEPLOY), true)
clobber:: deploy-clobber
endif
ifeq ($(BUILD_JDK), true)
ifeq ($(BUNDLE_RULES_AVAILABLE), true)
generic_build_repo_series:: openjdk-binary-plugs-bundles
endif
endif
# The debug build, fastdebug or debug. Needs special handling.
# Note that debug builds do NOT do INSTALL steps, but must be done
# after the product build and before the INSTALL step of the product build.
@ -301,7 +295,6 @@ ifneq ($(SKIP_OPENJDK_BUILD), true)
ifeq ($(BUILD_JDK), true)
ifeq ($(BUNDLE_RULES_AVAILABLE), true)
OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output
OPENJDK_BUILD_NAME \
= openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
@ -330,7 +323,6 @@ openjdk_build:
GENERATE_DOCS=false \
ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \
ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \
product_build )
@ -456,7 +448,6 @@ CACERTS_FILE.desc = Location of certificates file
DEVTOOLS_PATH.desc = Directory containing zip and gnumake
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
DXSDK_PATH.desc = Root directory of DirectX SDK
MSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe)
MSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
# Make variables to print out (description and value)
@ -487,12 +478,10 @@ ifeq ($(PLATFORM), windows)
VARIABLE_PRINTVAL_LIST += \
DXSDK_PATH \
MSDEVTOOLS_PATH \
MSVCRT_DLL_PATH
VARIABLE_CHECKDIR_LIST += \
DXSDK_PATH \
MSDEVTOOLS_PATH \
MSVCRT_DLL_PATH
endif
@ -548,7 +537,7 @@ examples_help:
"
################################################################
# Source and binary plug bundling
# Source bundling
################################################################
ifeq ($(BUNDLE_RULES_AVAILABLE), true)
include $(BUNDLE_RULES)

40
README
View File

@ -1,31 +1,41 @@
README:
This file should be located at the top of the OpenJDK Mercurial repository
forest. This top or enclosing repository will include a "make" directory,
and a Makefile at the very top of the repository.
It should also include the 6 repositories: "jdk", "hotspot", "langtools",
"corba", "jaxws" and "jaxp".
This file should be located at the top of the OpenJDK Mercurial root
repository. This root repository will include a "make" directory,
and a Makefile for building the entire OpenJDK.
A full OpenJDK repository set (forest) should also include the following
6 nested repositories:
"jdk", "hotspot", "langtools", "corba", "jaxws" and "jaxp".
There are also several source downloads for the jax* repositories that
will be needed.
This one root repository can be obtained with something like:
hg clone http://hg.openjdk.java.net/jdk7/jdk7 openjdk7
To make sure you have all the nested repositories, you can run:
cd openjdk7 && sh ./get_source.sh
(This is identical to using the Mercurial Forest Extension command
'hg fclone http://hg.openjdk.java.net/jdk7/jdk7 openjdk7').
People unfamiliar with Mercurial should read the first few chapters of
the Mercurial book: http://hgbook.red-bean.com/read/
See http://openjdk.java.net/ for more information about the OpenJDK.
Simple Build Instructions:
1. Download and install a JDK 6 from
0. Get the necessary system software/packages installed on your system, see
http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html
1. If you don't have a jdk6 installed, download and install a JDK 6 from
http://java.sun.com/javase/downloads/index.jsp
Set the environment variable ALT_BOOTDIR to the location of this JDK 6.
Set the environment variable ALT_BOOTDIR to the location of JDK 6.
2. Download and install the Binary Plugs for the most recent JDK7 from
http://download.java.net/openjdk/jdk7/
Set the environment variable ALT_BINARY_PLUGS_PATH to the location of
these binary plugs.
3. Check the sanity of doing a build with the current machine:
2. Check the sanity of doing a build with your current system:
gnumake sanity
See README-builds.html if you run into problems.
4. Do a complete build of the jdk:
3. Do a complete build of the OpenJDK:
gnumake all
The resulting JDK image should be found in build/*/j2sdk-image
where gnumake is GNU make 3.78.1 or newer, /usr/bin/make on Linux and
where gnumake is GNU make 3.81 or newer, /usr/bin/make on Linux and
/usr/sfw/bin/gmake or /opt/sfw/bin/gmake on Solaris.

View File

@ -37,6 +37,11 @@
<blockquote>
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#hg">Use of Mercurial</a>
<ul>
<li><a href="#get_source">Getting the Source</a></li>
</ul>
</li>
<li><a href="#MBE">Minimum Build Environments</a></li>
<li><a href="#SDBE">Specific Developer Build Environments</a>
<ul>
@ -56,10 +61,9 @@
<li><a href="#linux">Basic Linux System Setup</a> </li>
<li><a href="#solaris">Basic Solaris System Setup</a> </li>
<li><a href="#windows">Basic Windows System Setup</a> </li>
<li><a href="#dependencies">Build Dependencies</a> </li>
<li><a href="#dependencies">Build Dependencies</a>
<ul>
<li><a href="#bootjdk">Bootstrap JDK</a> </li>
<li><a href="#binaryplugs">Binary Plugs</a> </li>
<li><a href="#importjdk">Optional Import JDK</a> </li>
<li><a href="#ant">Ant</a> </li>
<li><a href="#cacerts">Certificate Authority File (cacert)</a> </li>
@ -92,6 +96,7 @@
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#creating">Creating the Build</a> </li>
@ -100,6 +105,76 @@
<li><a href="#troubleshooting">Troubleshooting</a></li>
</ul>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h2><a name="hg">Use of Mercurial</a></h2>
<blockquote>
The OpenJDK sources are maintained with the revision control system
<a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a>.
If you are new to Mercurial, please see the
<a href="http://mercurial.selenic.com/wiki/BeginnersGuides">Beginner Guides</a>
or refer to the <a href=""http://hgbook.red-bean.com/">Mercurial Book</a>.
The first few chapters of the book provide an excellent overview of
Mercurial, what it is and how it works.
<br>
For using Mercurial with the OpenJDK refer to the
<a href=""http://openjdk.java.net/guide/repositories.html#installConfig">
Developer Guide: Installing and Configuring Mercurial</a>
section for more information.
The Forest Extension is not part of the Mercurial install,
and is optional,
but can be obtained with the following commands:
<blockquote>
<tt>
hg clone https://bitbucket.org/pmezard/hgforest-crew/overview/ <i>YourHgForest</i>
</tt>
</blockquote>
Once you have the file <tt>forest.py</tt>, you need to add these
lines to your <tt>${HOME}/.hgrc</tt> file:
<blockquote>
<tt>
[extensions]
<br>forest = <i>YourHgForest</i>/forest.py
</tt>
</blockquote>
<!-- ------------------------------------------------------ -->
<h3><a name="get_source">Getting the Source</a></h3>
<blockquote>
To get the entire set of OpenJDK Mercurial repositories
using the Forest Extension:
<blockquote>
<tt>
hg fclone http://openjdk.java.net/jdk7/jdk7 <i>YourOpenJDK</i>
</tt>
</blockquote>
To get the entire set of OpenJDK Mercurial repositories
without using the Forest Extension:
<blockquote>
<tt>
hg clone http://openjdk.java.net/jdk7/jdk7 <i>YourOpenJDK</i>
<br>cd <i>YourOpenJDK</i>
<br>sh ./get_source.sh
</tt>
</blockquote>
Once you have all the repositories, the
script <tt>make/scripts/hgforest.sh</tt>
can be used to repeat the same <tt>hg</tt>
command on every repository in the forest, e.g.
<blockquote>
<tt>
cd <i>YourOpenJDK</i>
<br>sh ./make/scripts/hgforest.sh pull -u
</tt>
</blockquote>
You may find this script <tt>make/scripts/hgforest.sh</tt> faster
than the <tt>hg</tt> forest commands provided by the
Forest Extension.
</blockquote>
</blockquote>
<!-- ------------------------------------------------------ -->
<hr>
<h2><a name="MBE">Minimum Build Environments</a></h2>
@ -524,7 +599,7 @@
A few notes about using GNU make:
<ul>
<li>
In general, you need GNU make version 3.78.1 or newer.
In general, you need GNU make version 3.81 or newer.
</li>
<li>
Place the location of the GNU make binary in the <tt>PATH</tt>.
@ -628,11 +703,6 @@
<a href="#bootjdk">Bootstrap JDK</a>, set
<tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
</li>
<li>
Install the
<a href="#binaryplugs">Binary Plugs</a>, set
<tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>.
</li>
<li>
<a href="#importjdk">Optional Import JDK</a>, set
<tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
@ -687,11 +757,6 @@
<a href="#bootjdk">Bootstrap JDK</a>, set
<tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
</li>
<li>
Install the
<a href="#binaryplugs">Binary Plugs</a>, set
<tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>.
</li>
<li>
<a href="#importjdk">Optional Import JDK</a>, set
<tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
@ -779,11 +844,6 @@
<a href="#bootjdk">Bootstrap JDK</a>, set
<tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a></tt>.
</li>
<li>
Install the
<a href="#binaryplugs">Binary Plugs</a>, set
<tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>..
</li>
<li>
<a href="#importjdk">Optional Import JDK</a>, set
<tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
@ -849,38 +909,6 @@
the makefiles will look in that location for a JDK it can use.
</blockquote>
<!-- ------------------------------------------------------ -->
<h4><a name="binaryplugs">Binary Plugs</a></h4>
<blockquote>
Not all of the source code that makes up the JDK is available
under an open-source license.
This is a temporary situation and these binary plugs will be
replaced with fully open source replacements as soon as possible.
So currently, in order to build a complete OpenJDK image,
you must first download and install the appropriate
binary plug bundles for the OpenJDK, go to the
<a href="http://openjdk.java.net" target="_blank">OpenJDK</a> site and select
the
"<b>Bundles(7)</b>"
link and download the binaryplugs for
your particular platform.
The file downloaded is a jar file that must be extracted by running
the jar file with:
<blockquote>
<pre>
<tt><b>java -jar jdk-7-ea-plug-b<i>nn</i>-<i>os</i>-<i>arch</i>-<i>dd</i>_<i>month</i>_<i>year</i>.jar</b></tt>
</pre>
</blockquote>
A prompt will be issued for acceptance of these binary plug files.
During the OpenJDK build process these "binary plugs"
for the encumbered components will be copied into your
resulting OpenJDK binary build image.
These binary plug files are only for the purpose of
building an OpenJDK binary.
Make sure you set
<tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>
to the root of this installation.
</blockquote>
<!-- ------------------------------------------------------ -->
<h4><a name="importjdk">Optional Import JDK</a></h4>
<blockquote>
The <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
@ -1018,20 +1046,20 @@
</blockquote>
<strong><a name="msvc32">Windows i586: Microsoft Visual Studio 2010 Compilers</a></strong>
<blockquote>
<p>
<b>BEGIN WARNING</b>: At this time (Spring/Summer 2010) JDK 7 is starting a transition to
use the newest VS2010 Microsoft compilers. These build instructions are updated
to show where we are going. We have a QA process to go through before
official builds actually use VS2010. So for now, official builds are
still using VS2003. No other compilers are known to build the entire JDK,
including non-open portions.
So for now you should be able to build with either VS2003 or VS2010.
We do not guarantee that VS2008 will work, although there is sufficient
makefile support to make at least basic JDK builds plausible.
Visual Studio 2010 Express compilers are now able to build all the
open source repositories, but this is 32 bit only. To build 64 bit
Windows binaries use the the 7.1 Windows SDK.<b>END WARNING.</b>
<p>
<p>
<b>BEGIN WARNING</b>: At this time (Spring/Summer 2010) JDK 7 is starting a transition to
use the newest VS2010 Microsoft compilers. These build instructions are updated
to show where we are going. We have a QA process to go through before
official builds actually use VS2010. So for now, official builds are
still using VS2003. No other compilers are known to build the entire JDK,
including non-open portions.
So for now you should be able to build with either VS2003 or VS2010.
We do not guarantee that VS2008 will work, although there is sufficient
makefile support to make at least basic JDK builds plausible.
Visual Studio 2010 Express compilers are now able to build all the
open source repositories, but this is 32 bit only. To build 64 bit
Windows binaries use the the 7.1 Windows SDK.<b>END WARNING.</b>
<p>
The 32-bit OpenJDK Windows build
requires
Microsoft Visual Studio C++ 2010 (VS2010) Professional
@ -1071,20 +1099,20 @@ Windows binaries use the the 7.1 Windows SDK.<b>END WARNING.</b>
<strong><a name="mssdk64">Windows x64: Microsoft Windows 7.1 SDK 64 bit compilers.</a></strong>
For a free alternative for 64 bit builds, use the 7.1 SDK.
Microsoft say that to set up your paths for this run
<pre>
<pre>
c:\Program Files\Microsoft SDKs\Windows\v7.1\bin\setenv.cmd /x64.
</pre>
</pre>
What was tested is just directly setting up LIB, INCLUDE,
PATH and based on the installation directories using the
DOS short name appropriate for the system, (you will
need to set them for yours, not just blindly copy this) eg :
<pre>
<pre>
set VSINSTALLDIR=c:\PROGRA~2\MICROS~1.0
set WindowsSdkDir=c:\PROGRA~1\MICROS~1\Windows\v7.1
set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%PATH%
set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64
</pre>
</pre>
</blockquote>
<!-- ------------------------------------------------------ -->
<h4><a name="zip">Zip and Unzip</a></h4>
@ -1450,16 +1478,18 @@ Windows binaries use the the 7.1 Windows SDK.<b>END WARNING.</b>
The default output directory is
<tt>build/<i>platform</i></tt>,
where <tt><i>platform</i></tt> is one of
<tt><ul>
<li>solaris-sparc</li>
<li>solaris-sparcv9</li>
<li>solaris-i586</li>
<li>solaris-amd64</li>
<li>linux-i586</li>
<li>linux-amd64</li>
<li>windows-i586</li>
<li>windows-amd64</li>
</ul></tt>
<blockquote>
<ul>
<li><tt>solaris-sparc</tt></li>
<li><tt>solaris-sparcv9</tt></li>
<li><tt>solaris-i586</tt></li>
<li><tt>solaris-amd64</tt></li>
<li><tt>linux-i586</tt></li>
<li><tt>linux-amd64</tt></li>
<li><tt>windows-i586</tt></li>
<li><tt>windows-amd64</tt></li>
</ul>
</blockquote>
In particular, the
<tt>build/<i>platform</i>/j2sdk-image/bin</tt>
directory should contain executables for the
@ -1523,14 +1553,6 @@ Windows binaries use the the 7.1 Windows SDK.<b>END WARNING.</b>
You should always install your own local Bootstrap JDK and
always set <tt>ALT_BOOTDIR</tt> explicitly.
</dd>
<dt><a name="ALT_BINARY_PLUGS_PATH"><tt>ALT_BINARY_PLUGS_PATH</tt></a></dt>
<dd>
The location of the binary plugs installation.
See <a href="#binaryplugs">Binary Plugs</a> for more information.
You should always have a local copy of a
recent Binary Plugs install image
and set this variable to that location.
</dd>
<dt><a name="ALT_JDK_IMPORT_PATH"><tt>ALT_JDK_IMPORT_PATH</tt></a></dt>
<dd>
The location of a previously built JDK installation.
@ -1627,36 +1649,19 @@ Windows binaries use the the 7.1 Windows SDK.<b>END WARNING.</b>
Where each of these directories contain the import JDK image
for that platform.
</dd>
<dt><a name="ALT_BUILD_BINARY_PLUGS_PATH"><tt>ALT_BUILD_BINARY_PLUGS_PATH</tt></a></dt>
<dd>
These are useful in managing builds on multiple platforms.
The default network location for all of the binary plug images
for all platforms.
If <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>
is not set, this directory will be used and should contain
the following directories:
<tt>solaris-sparc</tt>,
<tt>solaris-i586</tt>,
<tt>solaris-sparcv9</tt>,
<tt>solaris-amd64</tt>,
<tt>linux-i586</tt>,
<tt>linux-amd64</tt>,
<tt>windows-i586</tt>,
and
<tt>windows-amd64</tt>.
Where each of these directories contain the binary plugs image
for that platform.
</dd>
<dt><strong>Windows specific:</strong></dt>
<dd>
<dl>
<dt><a name="ALT_MSDEVTOOLS_PATH"><tt>ALT_MSDEVTOOLS_PATH</tt></a> </dt>
<dt><a name="ALT_WINDOWSSDKDIR"><tt>ALT_WINDOWSSDKDIR</tt></a> </dt>
<dd>
The location of the
Microsoft Visual Studio
tools 'bin' directory.
The default is usually derived from
<a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
Microsoft Windows SDK where some tools will be
located.
The default is whatever WINDOWSSDKDIR is set to
(or WindowsSdkDir) or the path
<pre>
c:\Program Files\Microsoft SDKs\Windows\v6.1a
</pre>
</dd>
<dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt>
<dd>
@ -1781,18 +1786,15 @@ Windows binaries use the the 7.1 Windows SDK.<b>END WARNING.</b>
performance reasons.
<p>
To completely disable SELinux:
<tt>
<ol>
<li>$ su root</li>
<li># system-config-securitylevel</li>
<li>In the window that appears, select the SELinux tab</li>
<li>Disable SELinux</li>
<li><tt>$ su root</tt></li>
<li><tt># system-config-securitylevel</tt></li>
<li><tt>In the window that appears, select the SELinux tab</tt></li>
<li><tt>Disable SELinux</tt></li>
</ol>
</tt>
<p>
Alternatively, instead of completely disabling it you could
disable just this one check.
<tt>
<ol>
<li>Select System->Administration->SELinux Management</li>
<li>In the SELinux Management Tool which appears,
@ -1801,7 +1803,6 @@ Windows binaries use the the 7.1 Windows SDK.<b>END WARNING.</b>
<li>Check the first item, labeled
"Allow all unconfined executables to use libraries requiring text relocation ..."</li>
</ol>
</tt>
</blockquote>
</li>
<li>

View File

@ -88,3 +88,15 @@ c3dd858e09b20206459d9e7b0ead99d27ab00eab jdk7-b109
640fa4d4e2ad4c2d7e4815c955026740d8c52b7a jdk7-b111
cc67fdc4fee9a5b25caee4e71b51a8ff24ae7d1a jdk7-b112
a89a6c5be9d1a754868d3d359cbf7ad36aa95631 jdk7-b113
88fddb73c5c4a4b50c319cbae9380caf5172ab45 jdk7-b114
da7561d479e0ddaa4650d8023ac0fc7294e014e3 jdk7-b115
98c028de4301106f2285ac0e128a1bb9b4c24f5c jdk7-b116
fa502e4834dac2176499cc1f44794d5dc32a11b9 jdk7-b117
42e77836fded7c2a3080d27316b96634ea9e33c6 jdk7-b118
39829414ae31a0080578a49b751899edd518cd7d jdk7-b119
cff5a173ec1e89013359e804a3e31736ef6fb462 jdk7-b120
2cc9f32992101732b23730b737740e64ebc5fa89 jdk7-b121
1523a060032c8a5b7840198da8911abeff88118f jdk7-b122
a230c142628cea22475ab9dc5cd544266ddf2466 jdk7-b123
f90b3e014e831eb4f32ef035a1dad2b8ba87949f jdk7-b124
1ce58c72b7892cb813eb920276c7e7f17a1b79fe jdk7-b125

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -383,7 +383,7 @@ endif
REQUIRED_ZIP_VER = 2.2
REQUIRED_UNZIP_VER = 5.12
REQUIRED_MAKE_VER = 3.78
REQUIRED_MAKE_VER = 3.81
# Unix type settings (same for all unix platforms)
ifneq ($(PLATFORM), windows)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,12 +30,14 @@ import com.sun.corba.se.impl.orbutil.ORBConstants;
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase;
import com.sun.corba.se.impl.protocol.giopmsgheaders.FragmentMessage;
import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage;
import com.sun.corba.se.impl.encoding.BufferManagerWrite;
import com.sun.corba.se.impl.encoding.ByteBufferWithInfo;
import com.sun.corba.se.impl.encoding.CDROutputObject;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.pept.transport.Connection;
import com.sun.corba.se.pept.encoding.OutputObject;
import org.omg.CORBA.SystemException;
/**
* Streaming buffer manager.
@ -66,7 +68,13 @@ public class BufferManagerWriteStream extends BufferManagerWrite
// Set the fragment's moreFragments field to true
MessageBase.setFlag(bbwi.byteBuffer, Message.MORE_FRAGMENTS_BIT);
try {
sendFragment(false);
} catch(SystemException se){
orb.getPIHandler().invokeClientPIEndingPoint(
ReplyMessage.SYSTEM_EXCEPTION, se);
throw se;
}
// Reuse the old buffer

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -74,6 +74,7 @@ import com.sun.corba.se.spi.ior.iiop.IIOPProfileTemplate;
import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.protocol.CorbaMessageMediator;
import com.sun.corba.se.spi.protocol.RetryType;
import com.sun.corba.se.spi.transport.CorbaContactInfo;
import com.sun.corba.se.spi.transport.CorbaContactInfoList;
import com.sun.corba.se.spi.transport.CorbaContactInfoListIterator;
@ -110,7 +111,7 @@ public final class ClientRequestInfoImpl
// The current retry request status. True if this request is being
// retried and this info object is to be reused, or false otherwise.
private boolean retryRequest;
private RetryType retryRequest;
// The number of times this info object has been (re)used. This is
// incremented every time a request is retried, and decremented every
@ -163,7 +164,8 @@ public final class ClientRequestInfoImpl
// Please keep these in the same order that they're declared above.
retryRequest = false;
// 6763340
retryRequest = RetryType.NONE;
// Do not reset entryCount because we need to know when to pop this
// from the stack.
@ -824,14 +826,15 @@ public final class ClientRequestInfoImpl
/**
* Set or reset the retry request flag.
*/
void setRetryRequest( boolean retryRequest ) {
void setRetryRequest( RetryType retryRequest ) {
this.retryRequest = retryRequest;
}
/**
* Retrieve the current retry request status.
*/
boolean getRetryRequest() {
RetryType getRetryRequest() {
// 6763340
return this.retryRequest;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -70,6 +70,7 @@ import com.sun.corba.se.spi.orbutil.closure.ClosureFactory;
import com.sun.corba.se.spi.protocol.CorbaMessageMediator;
import com.sun.corba.se.spi.protocol.ForwardException;
import com.sun.corba.se.spi.protocol.PIHandler;
import com.sun.corba.se.spi.protocol.RetryType;
import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.impl.logging.InterceptorsSystemException;
@ -372,9 +373,24 @@ public class PIHandlerImpl implements PIHandler
}
}
public Exception invokeClientPIEndingPoint(
int replyStatus, Exception exception )
{
// Needed when an error forces a retry AFTER initiateClientPIRequest
// but BEFORE invokeClientPIStartingPoint.
public Exception makeCompletedClientRequest( int replyStatus,
Exception exception ) {
// 6763340
return handleClientPIEndingPoint( replyStatus, exception, false ) ;
}
public Exception invokeClientPIEndingPoint( int replyStatus,
Exception exception ) {
// 6763340
return handleClientPIEndingPoint( replyStatus, exception, true ) ;
}
public Exception handleClientPIEndingPoint(
int replyStatus, Exception exception, boolean invokeEndingPoint ) {
if( !hasClientInterceptors ) return exception;
if( !isClientPIEnabledForThisThread() ) return exception;
@ -388,24 +404,31 @@ public class PIHandlerImpl implements PIHandler
ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
info.setReplyStatus( piReplyStatus );
info.setException( exception );
if (invokeEndingPoint) {
// 6763340
interceptorInvoker.invokeClientInterceptorEndingPoint( info );
piReplyStatus = info.getReplyStatus();
}
// Check reply status:
if( (piReplyStatus == LOCATION_FORWARD.value) ||
(piReplyStatus == TRANSPORT_RETRY.value) )
{
(piReplyStatus == TRANSPORT_RETRY.value) ) {
// If this is a forward or a retry, reset and reuse
// info object:
info.reset();
info.setRetryRequest( true );
// fix for 6763340:
if (invokeEndingPoint) {
info.setRetryRequest( RetryType.AFTER_RESPONSE ) ;
} else {
info.setRetryRequest( RetryType.BEFORE_RESPONSE ) ;
}
// ... and return a RemarshalException so the orb internals know
exception = new RemarshalException();
}
else if( (piReplyStatus == SYSTEM_EXCEPTION.value) ||
(piReplyStatus == USER_EXCEPTION.value) )
{
} else if( (piReplyStatus == SYSTEM_EXCEPTION.value) ||
(piReplyStatus == USER_EXCEPTION.value) ) {
exception = info.getException();
}
@ -421,18 +444,21 @@ public class PIHandlerImpl implements PIHandler
RequestInfoStack infoStack =
(RequestInfoStack)threadLocalClientRequestInfoStack.get();
ClientRequestInfoImpl info = null;
if( !infoStack.empty() ) info =
(ClientRequestInfoImpl)infoStack.peek();
if( !diiRequest && (info != null) && info.isDIIInitiate() ) {
if (!infoStack.empty() ) {
info = (ClientRequestInfoImpl)infoStack.peek();
}
if (!diiRequest && (info != null) && info.isDIIInitiate() ) {
// In RequestImpl.doInvocation we already called
// initiateClientPIRequest( true ), so ignore this initiate.
info.setDIIInitiate( false );
}
else {
} else {
// If there is no info object or if we are not retrying a request,
// push a new ClientRequestInfoImpl on the stack:
if( (info == null) || !info.getRetryRequest() ) {
// 6763340: don't push unless this is not a retry
if( (info == null) || !info.getRetryRequest().isRetry() ) {
info = new ClientRequestInfoImpl( orb );
infoStack.push( info );
printPush();
@ -442,9 +468,15 @@ public class PIHandlerImpl implements PIHandler
// Reset the retry request flag so that recursive calls will
// push a new info object, and bump up entry count so we know
// when to pop this info object:
info.setRetryRequest( false );
info.setRetryRequest( RetryType.NONE );
info.incrementEntryCount();
// KMC 6763340: I don't know why this wasn't set earlier,
// but we do not want a retry to pick up the previous
// reply status, so clear it here. Most likely a new
// info was pushed before, so that this was not a problem.
info.setReplyStatus( RequestInfoImpl.UNINITIALIZED ) ;
// If this is a DII request, make sure we ignore the next initiate.
if( diiRequest ) {
info.setDIIInitiate( true );
@ -457,6 +489,10 @@ public class PIHandlerImpl implements PIHandler
if( !isClientPIEnabledForThisThread() ) return;
ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
RetryType rt = info.getRetryRequest() ;
// fix for 6763340
if (!rt.equals( RetryType.BEFORE_RESPONSE )) {
// If the replyStatus has not yet been set, this is an indication
// that the ORB threw an exception before we had a chance to
@ -467,15 +503,20 @@ public class PIHandlerImpl implements PIHandler
// to gracefully handle this in any of the calling code.
// This is a rare corner case, so we will ignore this for now.
short replyStatus = info.getReplyStatus();
if( replyStatus == info.UNINITIALIZED ) {
if (replyStatus == info.UNINITIALIZED ) {
invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
wrapper.unknownRequestInvoke(
CompletionStatus.COMPLETED_MAYBE ) ) ;
}
}
// Decrement entry count, and if it is zero, pop it from the stack.
info.decrementEntryCount();
if( info.getEntryCount() == 0 ) {
// fix for 6763340, and probably other cases (non-recursive retry)
if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
// RequestInfoStack<ClientRequestInfoImpl> infoStack =
// threadLocalClientRequestInfoStack.get();
RequestInfoStack infoStack =
(RequestInfoStack)threadLocalClientRequestInfoStack.get();
infoStack.pop();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -107,6 +107,11 @@ public class PINoOpHandlerImpl implements PIHandler
return null;
}
public Exception makeCompletedClientRequest(
int replyStatus, Exception exception ) {
return null;
}
public void initiateClientPIRequest( boolean diiRequest ) {
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -187,7 +187,8 @@ public abstract class RequestInfoImpl
startingPointCall = 0;
intermediatePointCall = 0;
endingPointCall = 0;
replyStatus = UNINITIALIZED;
// 6763340
setReplyStatus( UNINITIALIZED ) ;
currentExecutionPoint = EXECUTION_POINT_STARTING;
alreadyExecuted = false;
connection = null;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1012,7 +1012,11 @@ public class IIOPInputStream
* else,
* Handle it as a serializable class.
*/
if (currentClassDesc.isExternalizable()) {
if (Enum.class.isAssignableFrom( clz )) {
int ordinal = orbStream.read_long() ;
String value = (String)orbStream.read_value( String.class ) ;
return Enum.valueOf( clz, value ) ;
} else if (currentClassDesc.isExternalizable()) {
try {
currentObject = (currentClass == null) ?
null : currentClassDesc.newInstance();
@ -2553,8 +2557,8 @@ public class IIOPInputStream
bridge.putObject( o, key, v ) ;
} catch (Exception e) {
throw utilWrapper.errorSetObjectField( e, fieldName,
ObjectUtility.compactObjectToString( o ),
ObjectUtility.compactObjectToString( v )) ;
o.toString(),
v.toString() ) ;
}
}
@ -2566,7 +2570,7 @@ public class IIOPInputStream
bridge.putBoolean( o, key, v ) ;
} catch (Exception e) {
throw utilWrapper.errorSetBooleanField( e, fieldName,
ObjectUtility.compactObjectToString( o ),
o.toString(),
new Boolean(v) ) ;
}
}
@ -2579,7 +2583,7 @@ public class IIOPInputStream
bridge.putByte( o, key, v ) ;
} catch (Exception e) {
throw utilWrapper.errorSetByteField( e, fieldName,
ObjectUtility.compactObjectToString( o ),
o.toString(),
new Byte(v) ) ;
}
}
@ -2592,7 +2596,7 @@ public class IIOPInputStream
bridge.putChar( o, key, v ) ;
} catch (Exception e) {
throw utilWrapper.errorSetCharField( e, fieldName,
ObjectUtility.compactObjectToString( o ),
o.toString(),
new Character(v) ) ;
}
}
@ -2605,7 +2609,7 @@ public class IIOPInputStream
bridge.putShort( o, key, v ) ;
} catch (Exception e) {
throw utilWrapper.errorSetShortField( e, fieldName,
ObjectUtility.compactObjectToString( o ),
o.toString(),
new Short(v) ) ;
}
}
@ -2618,7 +2622,7 @@ public class IIOPInputStream
bridge.putInt( o, key, v ) ;
} catch (Exception e) {
throw utilWrapper.errorSetIntField( e, fieldName,
ObjectUtility.compactObjectToString( o ),
o.toString(),
new Integer(v) ) ;
}
}
@ -2631,7 +2635,7 @@ public class IIOPInputStream
bridge.putLong( o, key, v ) ;
} catch (Exception e) {
throw utilWrapper.errorSetLongField( e, fieldName,
ObjectUtility.compactObjectToString( o ),
o.toString(),
new Long(v) ) ;
}
}
@ -2644,7 +2648,7 @@ public class IIOPInputStream
bridge.putFloat( o, key, v ) ;
} catch (Exception e) {
throw utilWrapper.errorSetFloatField( e, fieldName,
ObjectUtility.compactObjectToString( o ),
o.toString(),
new Float(v) ) ;
}
}
@ -2657,7 +2661,7 @@ public class IIOPInputStream
bridge.putDouble( o, key, v ) ;
} catch (Exception e) {
throw utilWrapper.errorSetDoubleField( e, fieldName,
ObjectUtility.compactObjectToString( o ),
o.toString(),
new Double(v) ) ;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -85,6 +85,9 @@ public class ObjectStreamClass implements java.io.Serializable {
private static Hashtable translatedFields;
/** true if represents enum type */
private boolean isEnum;
private static final Bridge bridge =
(Bridge)AccessController.doPrivileged(
new PrivilegedAction() {
@ -359,6 +362,7 @@ public class ObjectStreamClass implements java.io.Serializable {
}
name = cl.getName();
isEnum = Enum.class.isAssignableFrom(cl);
superclass = superdesc;
serializable = serial;
if (!forProxyClass) {
@ -401,7 +405,8 @@ public class ObjectStreamClass implements java.io.Serializable {
if (!serializable ||
externalizable ||
forProxyClass ||
name.equals("java.lang.String")) {
name.equals("java.lang.String") ||
isEnum) {
fields = NO_FIELDS;
} else if (serializable) {
/* Ask for permission to override field access checks.
@ -502,7 +507,7 @@ public class ObjectStreamClass implements java.io.Serializable {
*
* NonSerializable classes have a serialVerisonUID of 0L.
*/
if (isNonSerializable()) {
if (isNonSerializable() || isEnum) {
suid = 0L;
} else {
// Lookup special Serializable members using reflection.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -32,32 +32,22 @@
package com.sun.corba.se.impl.io;
import javax.rmi.CORBA.Util;
import javax.rmi.PortableRemoteObject;
import java.util.Hashtable;
import java.util.Stack;
import java.io.IOException;
import java.util.EmptyStackException;
import com.sun.corba.se.impl.util.Utility;
import com.sun.corba.se.impl.io.IIOPInputStream;
import com.sun.corba.se.impl.io.IIOPOutputStream;
import com.sun.corba.se.impl.util.RepositoryId;
import com.sun.corba.se.impl.util.Utility;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.BAD_PARAM;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.portable.IndirectionException;
import com.sun.org.omg.SendingContext.CodeBase;
import com.sun.org.omg.SendingContext.CodeBaseHelper;
import java.security.AccessController;
import java.security.PrivilegedAction;
import com.sun.corba.se.impl.io.IIOPInputStream.ActiveRecursionManager;
import java.security.PrivilegedExceptionAction;
import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.impl.logging.OMGSystemException;
@ -809,46 +799,149 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
return "com.sun.corba.se.impl.io.IIOPOutputStream";
}
private com.sun.corba.se.impl.io.IIOPOutputStream createOutputStream() {
return (com.sun.corba.se.impl.io.IIOPOutputStream)AccessController.doPrivileged(
new StreamFactory(getOutputStreamClassName()));
private IIOPOutputStream createOutputStream() {
final String name = getOutputStreamClassName();
try {
IIOPOutputStream stream = createOutputStreamBuiltIn(name);
if (stream != null) {
return stream;
}
return createCustom(IIOPOutputStream.class, name);
} catch (Throwable t) {
// Throw exception under the carpet.
InternalError ie = new InternalError(
"Error loading " + name
);
ie.initCause(t);
throw ie;
}
}
/**
* Construct a built in implementation with priveleges.
* Returning null indicates a non-built is specified.
*/
private IIOPOutputStream createOutputStreamBuiltIn(
final String name
) throws Throwable {
try {
return AccessController.doPrivileged(
new PrivilegedExceptionAction<IIOPOutputStream>() {
public IIOPOutputStream run() throws IOException {
return createOutputStreamBuiltInNoPriv(name);
}
}
);
} catch (java.security.PrivilegedActionException exc) {
throw exc.getCause();
}
}
/**
* Returning null indicates a non-built is specified.
*/
private IIOPOutputStream createOutputStreamBuiltInNoPriv(
final String name
) throws IOException {
return
name.equals(
IIOPOutputStream
.class.getName()
) ?
new IIOPOutputStream() :
name.equals(
com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3
.class.getName()
) ?
new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3() :
name.equals(
com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1
.class.getName()
) ?
new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1() :
null;
}
protected String getInputStreamClassName() {
return "com.sun.corba.se.impl.io.IIOPInputStream";
}
private com.sun.corba.se.impl.io.IIOPInputStream createInputStream() {
return (com.sun.corba.se.impl.io.IIOPInputStream)AccessController.doPrivileged(
new StreamFactory(getInputStreamClassName()));
private IIOPInputStream createInputStream() {
final String name = getInputStreamClassName();
try {
IIOPInputStream stream = createInputStreamBuiltIn(name);
if (stream != null) {
return stream;
}
return createCustom(IIOPInputStream.class, name);
} catch (Throwable t) {
// Throw exception under the carpet.
InternalError ie = new InternalError(
"Error loading " + name
);
ie.initCause(t);
throw ie;
}
}
/**
* Instantiates a class of the given name using the system ClassLoader
* as part of a PrivilegedAction.
*
* It's private final so hopefully people can't grab it outside of
* this class.
*
* If you're worried that someone could subclass ValueHandlerImpl,
* install his own streams, and snoop what's on the wire:
* Someone can do that only if he's allowed to use the feature
* of installing his own javax.rmi.CORBA.Util delegate (via a
* JVM property or orb.properties file, read the first time the
* Util class is used). If he can do that, he can snoop
* anything on the wire, anyway, without abusing the
* StreamFactory class.
* Construct a built in implementation with priveleges.
* Returning null indicates a non-built is specified.
*/
private static final class StreamFactory implements PrivilegedAction {
private String className;
public StreamFactory (String _className) {
className = _className;
private IIOPInputStream createInputStreamBuiltIn(
final String name
) throws Throwable {
try {
return AccessController.doPrivileged(
new PrivilegedExceptionAction<IIOPInputStream>() {
public IIOPInputStream run() throws IOException {
return createInputStreamBuiltInNoPriv(name);
}
}
);
} catch (java.security.PrivilegedActionException exc) {
throw exc.getCause();
}
}
public Object run() {
try {
// Note: We must use the system ClassLoader here
/**
* Returning null indicates a non-built is specified.
*/
private IIOPInputStream createInputStreamBuiltInNoPriv(
final String name
) throws IOException {
return
name.equals(
IIOPInputStream
.class.getName()
) ?
new IIOPInputStream() :
name.equals(
com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3
.class.getName()
) ?
new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3() :
name.equals(
com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1
.class.getName()
) ?
new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1() :
null;
}
/**
* Create a custom implementation without privileges.
*/
private <T> T createCustom(
final Class<T> type, final String className
) throws Throwable {
// Note: We use the thread context or system ClassLoader here
// since we want to load classes outside of the
// core JDK when running J2EE Pure ORB and
// talking to Kestrel.
@ -856,18 +949,13 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
if (cl == null)
cl = ClassLoader.getSystemClassLoader();
Class streamClass = cl.loadClass(className);
Class<?> clazz = cl.loadClass(className);
Class<? extends T> streamClass = clazz.asSubclass(type);
// Since the ClassLoader should cache the class, this isn't
// as expensive as it looks.
return streamClass.newInstance();
} catch(Throwable t) {
InternalError ie = new InternalError( "Error loading " + className ) ;
ie.initCause( t ) ;
throw ie ;
}
}
}
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -45,6 +45,10 @@ import com.sun.corba.se.spi.orbutil.fsm.StateEngineFactory ;
import com.sun.corba.se.impl.orbutil.concurrent.Mutex ;
import com.sun.corba.se.impl.orbutil.concurrent.CondVar ;
import org.omg.CORBA.SystemException ;
import org.omg.PortableServer.POAPackage.ObjectAlreadyActive ;
/** AOMEntry represents a Servant or potential Servant in the ActiveObjectMap.
* It may be in several states to allow for long incarnate or etherealize operations.
* The methods on this class mostly represent input symbols to the state machine
@ -121,6 +125,12 @@ public class AOMEntry extends FSMImpl {
}
} ;
private static Action oaaAction = new ActionBase( "throwObjectAlreadyActive" ) {
public void doIt( FSM fsm, Input in ) {
throw new RuntimeException( new ObjectAlreadyActive() ) ;
}
} ;
private static Guard waitGuard = new GuardBase( "wait" ) {
public Guard.Result evaluate( FSM fsm, Input in ) {
AOMEntry entry = (AOMEntry)fsm ;
@ -173,19 +183,23 @@ public class AOMEntry extends FSMImpl {
engine.add( INCARN, START_ETH, waitGuard, null, INCARN ) ;
engine.add( INCARN, INC_DONE, null, VALID ) ;
engine.add( INCARN, INC_FAIL, decrementAction, INVALID ) ;
engine.add( INCARN, ACTIVATE, oaaAction, INCARN ) ;
engine.add( VALID, ENTER, incrementAction, VALID ) ;
engine.add( VALID, EXIT, decrementAction, VALID ) ;
engine.add( VALID, START_ETH, greaterZeroGuard, null, ETHP ) ;
engine.add( VALID, START_ETH, zeroGuard, null, ETH ) ;
engine.add( VALID, ACTIVATE, oaaAction, VALID ) ;
engine.add( ETHP, ENTER, waitGuard, null, ETHP ) ;
engine.add( ETHP, START_ETH, null, ETHP ) ;
engine.add( ETHP, EXIT, greaterOneGuard, decrementAction, ETHP ) ;
engine.add( ETHP, EXIT, oneGuard, decrementAction, ETH ) ;
engine.add( ETHP, ACTIVATE, oaaAction, ETHP ) ;
engine.add( ETH, START_ETH, null, ETH ) ;
engine.add( ETH, ETH_DONE, null, DESTROYED ) ;
engine.add( ETH, ACTIVATE, oaaAction, ETH ) ;
engine.add( ETH, ENTER, waitGuard, null, ETH ) ;
engine.setDefault( DESTROYED, throwIllegalStateExceptionAction, DESTROYED ) ;
@ -217,7 +231,17 @@ public class AOMEntry extends FSMImpl {
public void etherealizeComplete() { doIt( ETH_DONE ) ; }
public void incarnateComplete() { doIt( INC_DONE ) ; }
public void incarnateFailure() { doIt( INC_FAIL ) ; }
public void activateObject() { doIt( ACTIVATE ) ; }
public void activateObject() throws ObjectAlreadyActive {
try {
doIt( ACTIVATE ) ;
} catch (RuntimeException exc) {
Throwable thr = exc.getCause() ;
if (thr instanceof ObjectAlreadyActive)
throw (ObjectAlreadyActive)thr ;
else
throw exc ;
}
}
public void enter() { doIt( ENTER ) ; }
public void exit() { doIt( EXIT ) ; }
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -107,13 +107,9 @@ public abstract class POAPolicyMediatorBase_R extends POAPolicyMediatorBase {
throw new ServantAlreadyActive();
ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;
// Note that this can't happen for system assigned IDs since the
// POA never hands out the same ID. However, we make this redundant
// check here to share the code.
if (activeObjectMap.containsKey(key))
throw new ObjectAlreadyActive() ;
AOMEntry entry = activeObjectMap.get( key ) ;
// Check for an ObjectAlreadyActive error
entry.activateObject() ;
activateServant( key, entry, servant ) ;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -245,7 +245,14 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
// All access to resolver, localResolver, and urlOperation must be protected using
// resolverLock. Do not hold the ORBImpl lock while accessing
// resolver, or deadlocks may occur.
private Object resolverLock ;
// Note that we now have separate locks for each resolver type. This is due
// to bug 6980681 and 6238477, which was caused by a deadlock while resolving a
// corbaname: URL that contained a reference to the same ORB as the
// ORB making the call to string_to_object. This caused a deadlock between the
// client thread holding the single lock for access to the urlOperation,
// and the server thread handling the client is_a request waiting on the
// same lock to access the localResolver.
// Used for resolver_initial_references and list_initial_services
private Resolver resolver ;
@ -255,8 +262,14 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
// Converts strings to object references for resolvers and string_to_object
private Operation urlOperation ;
private final Object urlOperationLock = new java.lang.Object() ;
private CorbaServerRequestDispatcher insNamingDelegate ;
// resolverLock must be used for all access to either resolver or
// localResolver, since it is possible for the resolver to indirectly
// refer to the localResolver. Also used to protect access to
// insNamingDelegate.
private final Object resolverLock = new Object() ;
private TaggedComponentFactoryFinder taggedComponentFactoryFinder ;
@ -396,7 +409,6 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
}
};
resolverLock = new java.lang.Object() ;
requestDispatcherRegistry = new RequestDispatcherRegistryImpl(
this, ORBConstants.DEFAULT_SCID);
@ -832,7 +844,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
if (str == null)
throw wrapper.nullParam() ;
synchronized (resolverLock) {
synchronized (urlOperationLock) {
org.omg.CORBA.Object obj = (org.omg.CORBA.Object)op.operate( str ) ;
return obj ;
}
@ -1672,6 +1684,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
{
StackImpl invocationInfoStack =
(StackImpl)clientInvocationInfoStack.get();
int entryCount = -1;
ClientInvocationInfo clientInvocationInfo = null;
if (!invocationInfoStack.empty()) {
clientInvocationInfo =
@ -1680,8 +1693,12 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
throw wrapper.invocationInfoStackEmpty() ;
}
clientInvocationInfo.decrementEntryCount();
entryCount = clientInvocationInfo.getEntryCount();
if (clientInvocationInfo.getEntryCount() == 0) {
// 6763340: don't pop if this is a retry!
if (!clientInvocationInfo.isRetryInvocation()) {
invocationInfoStack.pop();
}
finishedDispatch();
}
}
@ -1773,7 +1790,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/
public void setURLOperation( Operation stringToObject )
{
synchronized (resolverLock) {
synchronized (urlOperationLock) {
urlOperation = stringToObject ;
}
}
@ -1783,7 +1800,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/
public Operation getURLOperation()
{
synchronized (resolverLock) {
synchronized (urlOperationLock) {
return urlOperation ;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -110,7 +110,7 @@ public class PrefixParserAction extends ParserActionBase {
throw wrapper.couldNotSetArray( thr,
getPropertyName(), new Integer(ctr),
componentType, new Integer(size),
ObjectUtility.compactObjectToString( obj )) ;
obj.toString() ) ;
}
ctr++ ;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -50,103 +50,8 @@ import java.math.BigInteger ;
import java.math.BigDecimal ;
public final class ObjectUtility {
private boolean useToString ;
private boolean isIndenting ;
private int initialLevel ;
private int increment ;
private ClassMap classToPrinter = new ClassMap() ;
private ObjectUtility() {}
private static ObjectUtility standard = new ObjectUtility( false, true,
0, 4 ) ;
private static ObjectUtility compact = new ObjectUtility( true, false,
0, 4 ) ;
private ObjectUtility( boolean useToString, boolean isIndenting,
int initialLevel, int increment )
{
this.useToString = useToString ;
this.isIndenting = isIndenting ;
this.initialLevel = initialLevel ;
this.increment = increment ;
classToPrinter.put( Properties.class, propertiesPrinter ) ;
classToPrinter.put( Collection.class, collectionPrinter ) ;
classToPrinter.put( Map.class, mapPrinter ) ;
}
/** Construct an Utility instance with the desired objectToString
* behavior.
*/
public static ObjectUtility make( boolean useToString, boolean isIndenting,
int initialLevel, int increment )
{
return new ObjectUtility( useToString, isIndenting, initialLevel,
increment ) ;
}
/** Construct an Utility instance with the desired objectToString
* behavior.
*/
public static ObjectUtility make( boolean useToString, boolean isIndenting )
{
return new ObjectUtility( useToString, isIndenting, 0, 4 ) ;
}
/** Get the standard Utility object that supports objectToString with
* indented display and no use of toString() methods.
*/
public static ObjectUtility make()
{
return standard ;
}
/** A convenience method that gives the default behavior: use indenting
* to display the object's structure and do not use built-in toString
* methods.
*/
public static String defaultObjectToString( java.lang.Object object )
{
return standard.objectToString( object ) ;
}
public static String compactObjectToString( java.lang.Object object )
{
return compact.objectToString( object ) ;
}
/** objectToString handles display of arbitrary objects. It correctly
* handles objects whose elements form an arbitrary graph. It uses
* reflection to display the contents of any kind of object.
* An object's toString() method may optionally be used, but the default
* is to ignore all toString() methods except for those defined for
* primitive types, primitive type wrappers, and strings.
*/
public String objectToString(java.lang.Object obj)
{
IdentityHashMap printed = new IdentityHashMap() ;
ObjectWriter result = ObjectWriter.make( isIndenting, initialLevel,
increment ) ;
objectToStringHelper( printed, result, obj ) ;
return result.toString() ;
}
// Perform a deep structural equality comparison of the two objects.
// This handles all arrays, maps, and sets specially, otherwise
// it just calls the object's equals() method.
public static boolean equals( java.lang.Object obj1, java.lang.Object obj2 )
{
// Set of pairs of objects that have been (or are being) considered for
// equality. Such pairs are presumed to be equals. If they are not,
// this will be detected eventually and the equals method will return
// false.
Set considered = new HashSet() ;
// Map that gives the corresponding component of obj2 for a component
// of obj1. This is used to check for the same aliasing and use of
// equal objects in both objects.
Map counterpart = new IdentityHashMap() ;
return equalsHelper( counterpart, considered, obj1, obj2 ) ;
}
/** If arr1 and arr2 are both arrays of the same component type,
* return an array of that component type that consists of the
@ -179,544 +84,4 @@ public final class ObjectUtility {
return result ;
}
//===========================================================================
// Implementation
//===========================================================================
private void objectToStringHelper( IdentityHashMap printed,
ObjectWriter result, java.lang.Object obj)
{
if (obj==null) {
result.append( "null" ) ;
result.endElement() ;
} else {
Class cls = obj.getClass() ;
result.startObject( obj ) ;
if (printed.keySet().contains( obj )) {
result.endObject( "*VISITED*" ) ;
} else {
printed.put( obj, null ) ;
if (mustUseToString(cls)) {
result.endObject( obj.toString() ) ;
} else {
// First, handle any classes that have special printer
// methods defined. This is useful when the class
// overrides toString with something that
// is not sufficiently detailed.
ObjectPrinter printer = (ObjectPrinter)(classToPrinter.get(
cls )) ;
if (printer != null) {
printer.print( printed, result, obj ) ;
result.endObject() ;
} else {
Class compClass = cls.getComponentType() ;
if (compClass == null)
// handleObject always calls endObject
handleObject( printed, result, obj ) ;
else {
handleArray( printed, result, obj ) ;
result.endObject() ;
}
}
}
}
}
}
private static interface ObjectPrinter {
void print( IdentityHashMap printed, ObjectWriter buff,
java.lang.Object obj ) ;
}
private ObjectPrinter propertiesPrinter = new ObjectPrinter() {
public void print( IdentityHashMap printed, ObjectWriter buff,
java.lang.Object obj )
{
if (!(obj instanceof Properties))
throw new Error() ;
Properties props = (Properties)obj ;
Enumeration keys = props.propertyNames() ;
while (keys.hasMoreElements()) {
String key = (String)(keys.nextElement()) ;
String value = props.getProperty( key ) ;
buff.startElement() ;
buff.append( key ) ;
buff.append( "=" ) ;
buff.append( value ) ;
buff.endElement() ;
}
}
} ;
private ObjectPrinter collectionPrinter = new ObjectPrinter() {
public void print( IdentityHashMap printed, ObjectWriter buff,
java.lang.Object obj )
{
if (!(obj instanceof Collection))
throw new Error() ;
Collection coll = (Collection)obj ;
Iterator iter = coll.iterator() ;
while (iter.hasNext()) {
java.lang.Object element = iter.next() ;
buff.startElement() ;
objectToStringHelper( printed, buff, element ) ;
buff.endElement() ;
}
}
} ;
private ObjectPrinter mapPrinter = new ObjectPrinter() {
public void print( IdentityHashMap printed, ObjectWriter buff,
java.lang.Object obj )
{
if (!(obj instanceof Map))
throw new Error() ;
Map map = (Map)obj ;
Iterator iter = map.entrySet().iterator() ;
while (iter.hasNext()) {
Entry entry = (Entry)(iter.next()) ;
buff.startElement() ;
objectToStringHelper( printed, buff, entry.getKey() ) ;
buff.append( "=>" ) ;
objectToStringHelper( printed, buff, entry.getValue() ) ;
buff.endElement() ;
}
}
} ;
private static class ClassMap {
ArrayList data ;
public ClassMap()
{
data = new ArrayList() ;
}
/** Return the first element of the ClassMap that is assignable to cls.
* The order is determined by the order in which the put method was
* called. Returns null if there is no match.
*/
public java.lang.Object get( Class cls )
{
Iterator iter = data.iterator() ;
while (iter.hasNext()) {
java.lang.Object[] arr = (java.lang.Object[])(iter.next()) ;
Class key = (Class)(arr[0]) ;
if (key.isAssignableFrom( cls ))
return arr[1] ;
}
return null ;
}
/** Add obj to the map with key cls. Note that order matters,
* as the first match is returned.
*/
public void put( Class cls, java.lang.Object obj )
{
java.lang.Object[] pair = { cls, obj } ;
data.add( pair ) ;
}
}
private boolean mustUseToString( Class cls )
{
// These probably never occur
if (cls.isPrimitive())
return true ;
// We must use toString for all primitive wrappers, since
// otherwise the code recurses endlessly (access value field
// inside Integer, returns another Integer through reflection).
if ((cls == Integer.class) ||
(cls == BigInteger.class) ||
(cls == BigDecimal.class) ||
(cls == String.class) ||
(cls == StringBuffer.class) ||
(cls == Long.class) ||
(cls == Short.class) ||
(cls == Byte.class) ||
(cls == Character.class) ||
(cls == Float.class) ||
(cls == Double.class) ||
(cls == Boolean.class))
return true ;
if (useToString) {
try {
cls.getDeclaredMethod( "toString", (Class[])null ) ;
return true ;
} catch (Exception exc) {
return false ;
}
}
return false ;
}
private void handleObject( IdentityHashMap printed, ObjectWriter result,
java.lang.Object obj )
{
Class cls = obj.getClass() ;
try {
Field[] fields;
SecurityManager security = System.getSecurityManager();
if (security != null && !Modifier.isPublic(cls.getModifiers())) {
fields = new Field[0];
} else {
fields = cls.getDeclaredFields();
}
for (int ctr=0; ctr<fields.length; ctr++ ) {
final Field fld = fields[ctr] ;
int modifiers = fld.getModifiers() ;
// Do not display field if it is static, since these fields
// are always the same for every instances. This could
// be made configurable, but I don't think it is
// useful to do so.
if (!Modifier.isStatic( modifiers )) {
if (security != null) {
if (!Modifier.isPublic(modifiers))
continue;
}
result.startElement() ;
result.append( fld.getName() ) ;
result.append( ":" ) ;
try {
// Make sure that we can read the field if it is
// not public
AccessController.doPrivileged( new PrivilegedAction() {
public Object run() {
fld.setAccessible( true ) ;
return null ;
}
} ) ;
java.lang.Object value = fld.get( obj ) ;
objectToStringHelper( printed, result, value ) ;
} catch (Exception exc2) {
result.append( "???" ) ;
}
result.endElement() ;
}
}
result.endObject() ;
} catch (Exception exc2) {
result.endObject( obj.toString() ) ;
}
}
private void handleArray( IdentityHashMap printed, ObjectWriter result,
java.lang.Object obj )
{
Class compClass = obj.getClass().getComponentType() ;
if (compClass == boolean.class) {
boolean[] arr = (boolean[])obj ;
for (int ctr=0; ctr<arr.length; ctr++) {
result.startElement() ;
result.append( arr[ctr] ) ;
result.endElement() ;
}
} else if (compClass == byte.class) {
byte[] arr = (byte[])obj ;
for (int ctr=0; ctr<arr.length; ctr++) {
result.startElement() ;
result.append( arr[ctr] ) ;
result.endElement() ;
}
} else if (compClass == short.class) {
short[] arr = (short[])obj ;
for (int ctr=0; ctr<arr.length; ctr++) {
result.startElement() ;
result.append( arr[ctr] ) ;
result.endElement() ;
}
} else if (compClass == int.class) {
int[] arr = (int[])obj ;
for (int ctr=0; ctr<arr.length; ctr++) {
result.startElement() ;
result.append( arr[ctr] ) ;
result.endElement() ;
}
} else if (compClass == long.class) {
long[] arr = (long[])obj ;
for (int ctr=0; ctr<arr.length; ctr++) {
result.startElement() ;
result.append( arr[ctr] ) ;
result.endElement() ;
}
} else if (compClass == char.class) {
char[] arr = (char[])obj ;
for (int ctr=0; ctr<arr.length; ctr++) {
result.startElement() ;
result.append( arr[ctr] ) ;
result.endElement() ;
}
} else if (compClass == float.class) {
float[] arr = (float[])obj ;
for (int ctr=0; ctr<arr.length; ctr++) {
result.startElement() ;
result.append( arr[ctr] ) ;
result.endElement() ;
}
} else if (compClass == double.class) {
double[] arr = (double[])obj ;
for (int ctr=0; ctr<arr.length; ctr++) {
result.startElement() ;
result.append( arr[ctr] ) ;
result.endElement() ;
}
} else { // array of object
java.lang.Object[] arr = (java.lang.Object[])obj ;
for (int ctr=0; ctr<arr.length; ctr++) {
result.startElement() ;
objectToStringHelper( printed, result, arr[ctr] ) ;
result.endElement() ;
}
}
}
private static class Pair
{
private java.lang.Object obj1 ;
private java.lang.Object obj2 ;
Pair( java.lang.Object obj1, java.lang.Object obj2 )
{
this.obj1 = obj1 ;
this.obj2 = obj2 ;
}
public boolean equals( java.lang.Object obj )
{
if (!(obj instanceof Pair))
return false ;
Pair other = (Pair)obj ;
return other.obj1 == obj1 && other.obj2 == obj2 ;
}
public int hashCode()
{
return System.identityHashCode( obj1 ) ^
System.identityHashCode( obj2 ) ;
}
}
private static boolean equalsHelper( Map counterpart, Set considered,
java.lang.Object obj1, java.lang.Object obj2 )
{
if ((obj1 == null) || (obj2 == null))
return obj1 == obj2 ;
java.lang.Object other2 = counterpart.get( obj1 ) ;
if (other2 == null) {
other2 = obj2 ;
counterpart.put( obj1, other2 ) ;
}
if (obj1 == other2)
return true ;
if (obj2 != other2)
return false ;
Pair pair = new Pair( obj1, obj2 ) ;
if (considered.contains( pair ))
return true ;
else
considered.add( pair ) ;
if (obj1 instanceof java.lang.Object[] &&
obj2 instanceof java.lang.Object[])
return equalArrays( counterpart, considered,
(java.lang.Object[])obj1, (java.lang.Object[])obj2 ) ;
else if (obj1 instanceof Map && obj2 instanceof Map)
return equalMaps( counterpart, considered,
(Map)obj1, (Map)obj2 ) ;
else if (obj1 instanceof Set && obj2 instanceof Set)
return equalSets( counterpart, considered,
(Set)obj1, (Set)obj2 ) ;
else if (obj1 instanceof List && obj2 instanceof List)
return equalLists( counterpart, considered,
(List)obj1, (List)obj2 ) ;
else if (obj1 instanceof boolean[] && obj2 instanceof boolean[])
return Arrays.equals( (boolean[])obj1, (boolean[])obj2 ) ;
else if (obj1 instanceof byte[] && obj2 instanceof byte[])
return Arrays.equals( (byte[])obj1, (byte[])obj2 ) ;
else if (obj1 instanceof char[] && obj2 instanceof char[])
return Arrays.equals( (char[])obj1, (char[])obj2 ) ;
else if (obj1 instanceof double[] && obj2 instanceof double[])
return Arrays.equals( (double[])obj1, (double[])obj2 ) ;
else if (obj1 instanceof float[] && obj2 instanceof float[])
return Arrays.equals( (float[])obj1, (float[])obj2 ) ;
else if (obj1 instanceof int[] && obj2 instanceof int[])
return Arrays.equals( (int[])obj1, (int[])obj2 ) ;
else if (obj1 instanceof long[] && obj2 instanceof long[])
return Arrays.equals( (long[])obj1, (long[])obj2 ) ;
else {
Class cls = obj1.getClass() ;
if (cls != obj2.getClass())
return obj1.equals( obj2 ) ;
else
return equalsObject( counterpart, considered, cls, obj1, obj2 ) ;
}
}
private static boolean equalsObject( Map counterpart, Set considered,
Class cls, java.lang.Object obj1, java.lang.Object obj2 )
{
Class objectClass = java.lang.Object.class ;
if (cls == objectClass)
return true ;
Class[] equalsTypes = { objectClass } ;
try {
Method equalsMethod = cls.getDeclaredMethod( "equals",
equalsTypes ) ;
return obj1.equals( obj2 ) ;
} catch (Exception exc) {
if (equalsObjectFields( counterpart, considered,
cls, obj1, obj2 ))
return equalsObject( counterpart, considered,
cls.getSuperclass(), obj1, obj2 ) ;
else
return false ;
}
}
private static boolean equalsObjectFields( Map counterpart, Set considered,
Class cls, java.lang.Object obj1, java.lang.Object obj2 )
{
Field[] fields = cls.getDeclaredFields() ;
for (int ctr=0; ctr<fields.length; ctr++) {
try {
final Field field = fields[ctr] ;
// Ignore static fields
if (!Modifier.isStatic( field.getModifiers())) {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
field.setAccessible( true ) ;
return null ;
}
} ) ;
java.lang.Object value1 = field.get( obj1 ) ;
java.lang.Object value2 = field.get( obj2 ) ;
if (!equalsHelper( counterpart, considered, value1,
value2 ))
return false ;
}
} catch (IllegalAccessException exc) {
return false ;
}
}
return true ;
}
private static boolean equalArrays( Map counterpart, Set considered,
java.lang.Object[] arr1, java.lang.Object[] arr2 )
{
int len = arr1.length ;
if (len != arr2.length)
return false ;
for (int ctr = 0; ctr<len; ctr++ )
if (!equalsHelper( counterpart, considered, arr1[ctr], arr2[ctr] ))
return false ;
return true ;
}
private static boolean equalMaps( Map counterpart, Set considered,
Map map1, Map map2 )
{
if (map2.size() != map1.size())
return false;
try {
Iterator i = map1.entrySet().iterator();
while (i.hasNext()) {
Entry e = (Entry) i.next();
java.lang.Object key = e.getKey();
java.lang.Object value = e.getValue();
if (value == null) {
if (!(map2.get(key)==null && map2.containsKey(key)))
return false;
} else {
if (!equalsHelper( counterpart, considered,
value, map2.get(key)))
return false;
}
}
} catch(ClassCastException unused) {
return false;
} catch(NullPointerException unused) {
return false;
}
return true;
}
// Obviously this is an inefficient quadratic algorithm.
// This is taken pretty directly from AbstractSet and AbstractCollection
// in the JDK.
// For HashSet, an O(n) (with a good hash function) algorithm
// is possible, and likewise TreeSet, since it is
// ordered, is O(n). But this is not worth the effort here.
// Note that the inner loop uses equals, not equalsHelper.
// This is needed because of the searching behavior of this test.
// However, note that this will NOT correctly handle sets that
// contain themselves as members, or that have members that reference
// themselves. These cases will cause infinite regress!
private static boolean equalSets( Map counterpart, Set considered,
Set set1, Set set2 )
{
if (set1.size() != set2.size())
return false ;
Iterator e1 = set1.iterator() ;
while (e1.hasNext()) {
java.lang.Object obj1 = e1.next() ;
boolean found = false ;
Iterator e2 = set2.iterator() ;
while (e2.hasNext() && !found) {
java.lang.Object obj2 = e2.next() ;
found = equals( obj1, obj2 ) ;
}
if (!found)
return false ;
}
return true ;
}
private static boolean equalLists( Map counterpart, Set considered,
List list1, List list2 )
{
ListIterator e1 = list1.listIterator();
ListIterator e2 = list2.listIterator();
while(e1.hasNext() && e2.hasNext()) {
java.lang.Object o1 = e1.next();
java.lang.Object o2 = e2.next();
if (!(o1==null ? o2==null : equalsHelper(
counterpart, considered, o1, o2)))
return false;
}
return !(e1.hasNext() || e2.hasNext());
}
}

View File

@ -0,0 +1,107 @@
# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
orbd.usage=Uso: {0} <options> \n\nem que <options> inclui:\n -port porta de ativa\u00e7\u00e3o na qual o ORBD deve ser iniciado, padr\u00e3o 1049 (opcional)\n -defaultdb diret\u00f3rio dos arquivos ORBD, padr\u00e3o "./orb.db" (opcional)\n -serverid id do servidor para ORBD, padr\u00e3o 1 (opcional)\n -ORBInitialPort porta inicial (necess\u00e1rio)\n -ORBInitialHost nome de host inicial (necess\u00e1rio)\n
servertool.usage=Uso: {0} <options> \n\nem que <options> inclui:\n -ORBInitialPort porta inicial (necess\u00e1rio)\n -ORBInitialHost nome de host inicial (necess\u00e1rio)\n
servertool.banner=\n\nBem-vindo a ferramenta de servidor IDL Java \ninsira os comandos no prompt \n
servertool.shorthelp=\n\n\tComandos dispon\u00edveis: \n\t------------------- \n
servertool.baddef=Servidor mal definido: {0}
servertool.nosuchserver=\tservidor n\u00e3o encontrado.
servertool.helddown=\to servidor est\u00e1 em espera.
servertool.nosuchorb=\tORB inv\u00e1lido.
servertool.serverup=\to servidor j\u00e1 est\u00e1 ativo.
servertool.appname=\tapplicationName - {0}
servertool.name=\tname - {0}
servertool.classpath=\tclasspath - {0}
servertool.args=\targs - {0}
servertool.vmargs=\tvmargs - {0}
servertool.serverid=\tserver id - {0}
servertool.servernotrunning=\to servidor n\u00e3o est\u00e1 em execu\u00e7\u00e3o.
servertool.register=\n\n\tregister -server <server class name> \n\t -applicationName <alternate server name> \n\t -classpath <classpath to server> \n\t -args <args to server> \n\t -vmargs <args to server Java VM>\n
servertool.register1=registra um servidor ativ\u00e1vel
servertool.register2=\tservidor registrado (serverid = {0}).
servertool.register3=\tservidor registrado, mas em espera (serverid = {0}).
servertool.register4=\tservidor j\u00e1 registrado (serverid = {0}).
servertool.unregister=\n\tunregister [ -serverid <server id> | -applicationName <name> ] \n
servertool.unregister1=cancela o registro de um servidor registrado
servertool.unregister2=\tservidor n\u00e3o registrado.
servertool.locate=\n\tlocate [ -serverid <server id> | -applicationName <name> ] [ <-endpointType <endpointType> ] \n
servertool.locate1=localiza portas de tipo espec\u00edfico para um servidor registrado
servertool.locate2=\n\n\tNome do host {0} \n\n\t\tPorta\t\tTipo de porta\t\tId do ORB\n\t\t----\t\t---------\t\t------\n
servertool.locateorb=\n\tlocateperorb [ -serverid <server id> | -applicationName <name> ] [ -orbid <ORB name> ]\n
servertool.locateorb1=localiza portas para um orb espec\u00edfico de servidor registrado
servertool.locateorb2=\n\n\tNome do host {0} \n\n\t\tPorta\t\tTipo de porta\t\tId do ORB\n\t\t----\t\t--------\t\t------\n
servertool.getserverid=\n\tgetserverid [ -applicationName <name> ] \n
servertool.getserverid1=retorna o id do servidor de um applicationName
servertool.getserverid2=\tID do servidor de applicationName {0} \u00e9 {1}
servertool.list=\n\tlist\n
servertool.list1=lista todos os servidores registrados
servertool.list2=\n\tId do servidor\tNome de classe do servidor\t\tAplicativo do servidor\n\t---------\t-----------------\t\t------------------\n
servertool.listactive=\n\tlistactive
servertool.listactive1=lista os servidores atualmente ativos
servertool.listappnames=\tlistappnames\n
servertool.listappnames1=lista os applicationNames atualmente definidos
servertool.listappnames2=applicationNames do servidor atualmente definidos:
servertool.shutdown=\n\tshutdown [ -serverid <server id> | -applicationName <name> ]\n
servertool.shutdown1=desliga um servidor registrado
servertool.shutdown2=\tservidor desligado com \u00eaxito.
servertool.startserver=\n\tstartup [ -serverid <server id> | -applicationName <name> ]\n
servertool.startserver1=inicia um servidor registrado
servertool.startserver2=\tservidor iniciado com \u00eaxito.
servertool.quit=\n\tquit\n
servertool.quit1=sai desta ferramenta
servertool.help=\thelp\n\tOR\n\thelp <command name>\n
servertool.help1=obt\u00e9m ajuda
servertool.orbidmap=\tUso: orblist [ -serverid <server id> | -applicationName <name> ]\n
servertool.orbidmap1=lista de nomes de orb e seus mapeamentos
servertool.orbidmap2=\n\tId de ORB\t\tNome de ORB\n\t------\t\t--------\n
pnameserv.success=NameServer persistente iniciado com \u00eaxito
bootstrap.usage=Uso: {0} <options> \n\nem que <options> inclui:\n -ORBInitialPort porta inicial (necess\u00e1rio)\n -InitialServicesFile arquivo que cont\u00e9m a lista de servi\u00e7os iniciais (necess\u00e1rio)\n
bootstrap.success=configurando porta para {0} e lendo servi\u00e7os de {1}
bootstrap.filenotreadable=o arquivo {0} n\u00e3o \u00e9 leg\u00edvel
bootstrap.filenotfound=arquivo {0} n\u00e3o encontrado
bootstrap.exception=exce\u00e7\u00e3o capturada ao salvar as propriedades no arquivo {0}: Exce\u00e7\u00e3o {1}
tnameserv.exception=uma exce\u00e7\u00e3o capturada ao iniciar o servi\u00e7o de inicializa\u00e7\u00e3o na porta {0}
tnameserv.usage=tente usar outra porta com os argumentos de linha de comando -ORBInitialPort <portno>
tnameserv.invalidhostoption=ORBInitialHost n\u00e3o \u00e9 uma op\u00e7\u00e3o v\u00e1lida para NameService
tnameserv.orbinitialport0=ORBInitialPort 0 n\u00e3o \u00e9 uma op\u00e7\u00e3o v\u00e1lida para NameService
tnameserv.hs1=Contexto de nomea\u00e7\u00e3o inicial:\n{0}
tnameserv.hs2=TransientNameServer: definindo porta para as refer\u00eancias de objeto iniciais: {0}
tnameserv.hs3=Pronto.
orbd.commfailure=\nFalha ao iniciar ORBD porque ORBinitialPort j\u00e1 est\u00e1 em uso
orbd.internalexception=\nFalha ao iniciar ORBD devido a uma exce\u00e7\u00e3o interna. \nPoss\u00edveis causas: \n1. ORBInitialPort especificado ou ORBActivationPort j\u00e1 em uso \n2. Sem permiss\u00e3o de grava\u00e7\u00e3o para gravar orb.db

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -122,9 +122,6 @@ public class CorbaClientRequestDispatcherImpl
implements
ClientRequestDispatcher
{
// Used for locking
private Object lock = new Object();
public OutputObject beginRequest(Object self, String opName,
boolean isOneWay, ContactInfo contactInfo)
{
@ -151,7 +148,8 @@ public class CorbaClientRequestDispatcherImpl
// This locking is done so that multiple connections are not created
// for the same endpoint
synchronized (lock) {
//6929137 - Synchronized on contactInfo to avoid blocking across multiple endpoints
synchronized (contactInfo) {
if (contactInfo.isConnectionBased()) {
if (contactInfo.shouldCacheConnection()) {
connection = (CorbaConnection)
@ -185,6 +183,7 @@ public class CorbaClientRequestDispatcherImpl
if(getContactInfoListIterator(orb).hasNext()) {
contactInfo = (ContactInfo)
getContactInfoListIterator(orb).next();
unregisterWaiter(orb);
return beginRequest(self, opName,
isOneWay, contactInfo);
} else {
@ -255,7 +254,7 @@ public class CorbaClientRequestDispatcherImpl
registerWaiter(messageMediator);
// Do connection reclaim now
synchronized (lock) {
synchronized (contactInfo) {
if (contactInfo.isConnectionBased()) {
if (contactInfo.shouldCacheConnection()) {
OutboundConnectionCache connectionCache =
@ -292,10 +291,22 @@ public class CorbaClientRequestDispatcherImpl
// ContactInfoList outside of subcontract.
// Want to move that update to here.
if (getContactInfoListIterator(orb).hasNext()) {
contactInfo = (ContactInfo)
getContactInfoListIterator(orb).next();
contactInfo = (ContactInfo)getContactInfoListIterator(orb).next();
if (orb.subcontractDebugFlag) {
dprint( "RemarshalException: hasNext true\ncontact info " + contactInfo );
}
// Fix for 6763340: Complete the first attempt before starting another.
orb.getPIHandler().makeCompletedClientRequest(
ReplyMessage.LOCATION_FORWARD, null ) ;
unregisterWaiter(orb);
orb.getPIHandler().cleanupClientPIRequest() ;
return beginRequest(self, opName, isOneWay, contactInfo);
} else {
if (orb.subcontractDebugFlag) {
dprint( "RemarshalException: hasNext false" );
}
ORBUtilSystemException wrapper =
ORBUtilSystemException.get(orb,
CORBALogDomains.RPC_PROTOCOL);
@ -374,11 +385,15 @@ public class CorbaClientRequestDispatcherImpl
boolean retry =
getContactInfoListIterator(orb)
.reportException(messageMediator.getContactInfo(), e);
if (retry) {
//Bug 6382377: must not lose exception in PI
// Must run interceptor end point before retrying.
Exception newException =
orb.getPIHandler().invokeClientPIEndingPoint(
ReplyMessage.SYSTEM_EXCEPTION, e);
if (retry) {
if (newException == e) {
continueOrThrowSystemOrRemarshal(messageMediator,
new RemarshalException());
@ -387,6 +402,14 @@ public class CorbaClientRequestDispatcherImpl
newException);
}
} else {
if (newException instanceof RuntimeException){
throw (RuntimeException)newException;
}
else if (newException instanceof RemarshalException)
{
throw (RemarshalException)newException;
}
// NOTE: Interceptor ending point will run in releaseReply.
throw e;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,6 +34,7 @@ import com.sun.corba.se.pept.transport.ConnectionCache;
import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.transport.CorbaConnection;
import com.sun.corba.se.spi.transport.CorbaConnectionCache;
import com.sun.corba.se.impl.logging.ORBUtilSystemException;
@ -87,6 +88,14 @@ public abstract class CorbaConnectionCacheBase
}
}
public void close() {
synchronized (backingStore()) {
for (Object obj : values()) {
((CorbaConnection)obj).closeConnectionResources() ;
}
}
}
public long numberOfIdleConnections()
{
long count = 0;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,6 +38,7 @@ import org.omg.CORBA.INTERNAL;
import org.omg.CORBA.CompletionStatus;
import com.sun.corba.se.pept.transport.Acceptor;
import com.sun.corba.se.pept.transport.ConnectionCache;
import com.sun.corba.se.pept.transport.ByteBufferPool;
import com.sun.corba.se.pept.transport.ContactInfo;
import com.sun.corba.se.pept.transport.InboundConnectionCache;
@ -49,6 +50,8 @@ import com.sun.corba.se.spi.ior.ObjectAdapterId;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.transport.CorbaAcceptor;
import com.sun.corba.se.spi.transport.CorbaTransportManager;
import com.sun.corba.se.pept.transport.Connection;
import com.sun.corba.se.pept.transport.ConnectionCache;
// REVISIT - impl/poa specific:
import com.sun.corba.se.impl.oa.poa.Policies;
@ -182,6 +185,12 @@ public class CorbaTransportManagerImpl
if (orb.transportDebugFlag) {
dprint(".close->");
}
for (Object cc : outboundConnectionCaches.values()) {
((ConnectionCache)cc).close() ;
}
for (Object cc : inboundConnectionCaches.values()) {
((ConnectionCache)cc).close() ;
}
getSelector(0).close();
} finally {
if (orb.transportDebugFlag) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -32,6 +32,7 @@ import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;
import java.util.List;
@ -66,7 +67,7 @@ public class SelectorImpl
private List deferredRegistrations;
private List interestOpsList;
private HashMap listenerThreads;
private HashMap readerThreads;
private Map readerThreads;
private boolean selectorStarted;
private boolean closed;
private ORBUtilSystemException wrapper ;
@ -81,7 +82,7 @@ public class SelectorImpl
deferredRegistrations = new ArrayList();
interestOpsList = new ArrayList();
listenerThreads = new HashMap();
readerThreads = new HashMap();
readerThreads = java.util.Collections.synchronizedMap(new HashMap());
closed = false;
wrapper = ORBUtilSystemException.get(orb,CORBALogDomains.RPC_TRANSPORT);
}
@ -178,8 +179,13 @@ public class SelectorImpl
}
if (eventHandler.shouldUseSelectThreadToWait()) {
SelectionKey selectionKey = eventHandler.getSelectionKey();
SelectionKey selectionKey ;
synchronized(deferredRegistrations) {
selectionKey = eventHandler.getSelectionKey();
}
if (selectionKey != null) {
selectionKey.cancel();
}
selector.wakeup();
return;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,14 +33,7 @@ import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.INTERNAL;
import com.sun.corba.se.pept.broker.Broker;
import com.sun.corba.se.pept.encoding.InputObject;
@ -61,18 +54,12 @@ import com.sun.corba.se.spi.ior.iiop.IIOPFactories;
import com.sun.corba.se.spi.ior.iiop.IIOPProfileTemplate ;
import com.sun.corba.se.spi.ior.iiop.GIOPVersion ;
import com.sun.corba.se.spi.ior.iiop.AlternateIIOPAddressComponent;
import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo;
import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.spi.monitoring.LongMonitoredAttributeBase;
import com.sun.corba.se.spi.monitoring.MonitoringConstants;
import com.sun.corba.se.spi.monitoring.MonitoringFactories;
import com.sun.corba.se.spi.monitoring.MonitoredObject;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.orbutil.threadpool.Work;
import com.sun.corba.se.spi.protocol.CorbaMessageMediator;
import com.sun.corba.se.spi.transport.CorbaAcceptor;
import com.sun.corba.se.spi.transport.CorbaConnection;
import com.sun.corba.se.spi.transport.CorbaContactInfo;
import com.sun.corba.se.spi.transport.SocketInfo;
import com.sun.corba.se.spi.transport.SocketOrChannelAcceptor;
@ -82,7 +69,6 @@ import com.sun.corba.se.impl.logging.ORBUtilSystemException;
import com.sun.corba.se.impl.oa.poa.Policies; // REVISIT impl/poa specific
import com.sun.corba.se.impl.orbutil.ORBConstants;
import com.sun.corba.se.impl.orbutil.ORBUtility;
import com.sun.corba.se.impl.ior.iiop.JavaSerializationComponent;
// BEGIN Legacy support.
import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo;
@ -442,12 +428,7 @@ public class SocketOrChannelAcceptorImpl
dprint(".doWork->: " + this);
}
if (selectionKey.isAcceptable()) {
AccessController.doPrivileged(new PrivilegedAction() {
public java.lang.Object run() {
accept();
return null;
}
});
} else {
if (orb.transportDebugFlag) {
dprint(".doWork: ! selectionKey.isAcceptable: " + this);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -811,6 +811,7 @@ public class SocketOrChannelConnectionImpl
dprint(".close: " + this, e);
}
}
closeConnectionResources();
} finally {
if (orb.transportDebugFlag) {
dprint(".close<-: " + this);
@ -818,6 +819,28 @@ public class SocketOrChannelConnectionImpl
}
}
public void closeConnectionResources() {
if (orb.transportDebugFlag) {
dprint(".closeConnectionResources->: " + this);
}
Selector selector = orb.getTransportManager().getSelector(0);
selector.unregisterForEvent(this);
try {
if (socketChannel != null)
socketChannel.close() ;
if (socket != null && !socket.isClosed())
socket.close() ;
} catch (IOException e) {
if (orb.transportDebugFlag) {
dprint( ".closeConnectionResources: " + this, e ) ;
}
}
if (orb.transportDebugFlag) {
dprint(".closeConnectionResources<-: " + this);
}
}
public Acceptor getAcceptor()
{
return acceptor;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -41,6 +41,12 @@ public interface ConnectionCache
public long numberOfBusyConnections();
public boolean reclaim();
/** Close all connections in the connection cache.
* This is used as a final cleanup, and will result
* in abrupt termination of any pending communications.
*/
public void close();
}
// End of file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
package com.sun.corba.se.spi.orb ;
import java.util.StringTokenizer ;
import java.util.Arrays ;
import java.lang.reflect.Array ;
@ -446,7 +447,7 @@ public abstract class OperationFactory {
public String toString() {
return "sequenceAction(separator=\"" + sep +
"\",actions=" +
ObjectUtility.compactObjectToString(actions) + ")" ;
Arrays.toString(actions) + ")" ;
}
}
@ -533,7 +534,7 @@ public abstract class OperationFactory {
public String toString() {
return "mapSequenceAction(" +
ObjectUtility.compactObjectToString(op) + ")" ;
Arrays.toString(op) + ")" ;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -125,7 +125,7 @@ public abstract class ParserImplBase {
// Since exc wraps the actual exception, use exc.getCause()
// instead of exc.
throw wrapper.errorSettingField( exc.getCause(), name,
ObjectUtility.compactObjectToString(value) ) ;
value.toString() ) ;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -141,6 +141,27 @@ public interface PIHandler {
Exception invokeClientPIEndingPoint(
int replyStatus, Exception exception ) ;
/**
* Called when a retry is needed after initiateClientPIRequest but
* before invokeClientPIRequest. In this case, we need to properly
* balance initiateClientPIRequest/cleanupClientPIRequest calls,
* but WITHOUT extraneous calls to invokeClientPIEndingPoint
* (see bug 6763340).
*
* @param replyStatus One of the constants in iiop.messages.ReplyMessage
* indicating which reply status to set.
* @param exception The exception before ending interception points have
* been invoked, or null if no exception at the moment.
* @return The exception to be thrown, after having gone through
* all ending points, or null if there is no exception to be
* thrown. Note that this exception can be either the same or
* different from the exception set using setClientPIException.
* There are four possible return types: null (no exception),
* SystemException, UserException, or RemarshalException.
*/
Exception makeCompletedClientRequest(
int replyStatus, Exception exception ) ;
/**
* Invoked when a request is about to be created. Must be called before
* any of the setClientPI* methods so that a new info object can be

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,15 +23,30 @@
* questions.
*/
#ifndef _JAVASOFT_SOLARIS_HPI_INIT_H_
#define _JAVASOFT_SOLARIS_HPI_INIT_H_
package com.sun.corba.se.spi.protocol ;
#ifndef NATIVE
extern void InitializeSbrk(void);
extern void InitializeAsyncIO(void);
extern void InitializeHelperThreads(void);
#endif /* NATIVE */
// Introduce more information about WHY we are re-trying a request
// so we can properly handle the two cases:
// - BEFORE_RESPONSE means that the retry is caused by
// something that happened BEFORE the message was sent: either
// an exception from the SocketFactory, or one from the
// Client side send_request interceptor point.
// - AFTER_RESPONSE means that the retry is a result either of the
// request sent to the server (from the response), or from the
// Client side receive_xxx interceptor point.
public enum RetryType {
NONE( false ),
BEFORE_RESPONSE( true ),
AFTER_RESPONSE( true ) ;
extern void InitializeMem(void);
private final boolean isRetry ;
RetryType( boolean isRetry ) {
this.isRetry = isRetry ;
}
public boolean isRetry() {
return this.isRetry ;
}
} ;
#endif /* _JAVASOFT_SOLARIS_HPI_INIT_H_ */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -163,6 +163,10 @@ public interface CorbaConnection
// REVISIT - MessageMediator parameter?
public void serverRequestProcessingBegins();
public void serverRequestProcessingEnds();
/** Clean up all connection resources. Used when shutting down an ORB.
*/
public void closeConnectionResources();
}
// End of file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -344,17 +344,27 @@ public class Stub implements AuxGen
stream.println (" String str = s.readUTF ();");
stream.println (" String[] args = null;");
stream.println (" java.util.Properties props = null;");
stream.println (" org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);");
stream.println (" org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);");
stream.println (" try {");
stream.println (" org.omg.CORBA.Object obj = orb.string_to_object (str);");
stream.println (" org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();");
stream.println (" _set_delegate (delegate);");
stream.println (" } finally {");
stream.println (" orb.destroy() ;");
stream.println (" }");
stream.println (" }");
stream.println ();
stream.println (" private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException");
stream.println (" {");
stream.println (" String[] args = null;");
stream.println (" java.util.Properties props = null;");
stream.println (" String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);");
stream.println (" org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);");
stream.println (" try {");
stream.println (" String str = orb.object_to_string (this);");
stream.println (" s.writeUTF (str);");
stream.println (" } finally {");
stream.println (" orb.destroy() ;");
stream.println (" }");
stream.println (" }");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,7 @@
#!/bin/sh
#
# Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -23,10 +25,9 @@
# questions.
#
SUNWprivate_1.1 {
global:
DLL_Initialize;
# Get clones of all nested repositories
sh ./make/scripts/hgforest.sh clone
# Update all existing repositories to the latest sources
sh ./make/scripts/hgforest.sh pull -u
local:
*;
};

View File

@ -123,3 +123,21 @@ cc4bb3022b3144dc5db0805b9ef6c7eff2aa3b81 jdk7-b109
07b042e13dde4f3479ba9ec55120fcd5e8623323 jdk7-b111
5511edd5d719f3fc9fdd04879482026a3d2c8652 jdk7-b112
beef35b96b81129c375d572357fb9548d9020db1 jdk7-b113
68d6141ea19de3a9ba98ef753f0da41a61f736a0 jdk7-b114
5511edd5d719f3fc9fdd04879482026a3d2c8652 hs20-b01
bdbc48857210a509b3c50a3291ecb9dd6a72e016 jdk7-b115
96b3f2a7add0b445b8aa421f6823cff5a2e2fe03 jdk7-b116
52f19c724d9634af79044a2e0defbe4a5f1adbda hs20-b02
806d0c037e6bbb88dac0699673f4ba55ee8c02da jdk7-b117
698b7b727e12de44139d8cca6ab9a494ead13253 jdk7-b118
3ef7426b4deac5dcfd4afb35cabe9ab3d666df91 hs20-b02
5484e7c53fa7da5e869902437ee08a9ae10c1c69 jdk7-b119
f5603a6e50422046ebc0d2f1671d55cb8f1bf1e9 jdk7-b120
3f3653ab7af8dc1ddb9fa75dad56bf94f89e81a8 jdk7-b121
3a548dc9cb456110ca8fc1514441a8c3bda0014d jdk7-b122
5484e7c53fa7da5e869902437ee08a9ae10c1c69 hs20-b03
9669f9b284108a9ee0a0ccbe215c37a130c9dcf5 jdk7-b123
9669f9b284108a9ee0a0ccbe215c37a130c9dcf5 hs20-b04
0a8e0d4345b37b71ec49dda08ee03b68c4f1b592 jdk7-b124
0a8e0d4345b37b71ec49dda08ee03b68c4f1b592 hs20-b05
e24ab3fa6aafad3efabbe7dba9918c5f461a20b1 jdk7-b125

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -121,15 +121,13 @@ static bool process_get_lwp_regs(struct ps_prochandle* ph, pid_t pid, struct use
#define ptrace_getregs(request, pid, addr, data) ptrace(request, pid, data, addr)
#endif
#ifdef _LP64
#ifdef PTRACE_GETREGS64
#if defined(_LP64) && defined(PTRACE_GETREGS64)
#define PTRACE_GETREGS_REQ PTRACE_GETREGS64
#endif
#else
#if defined(PTRACE_GETREGS) || defined(PT_GETREGS)
#elif defined(PTRACE_GETREGS)
#define PTRACE_GETREGS_REQ PTRACE_GETREGS
#elif defined(PT_GETREGS)
#define PTRACE_GETREGS_REQ PT_GETREGS
#endif
#endif /* _LP64 */
#ifdef PTRACE_GETREGS_REQ
if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, user, NULL) < 0) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -99,15 +99,8 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
long typeEntrySizeOffset;
long typeEntryArrayStride;
typeEntryTypeNameOffset = getLongValueFromProcess("gHotSpotVMTypeEntryTypeNameOffset");
typeEntrySuperclassNameOffset = getLongValueFromProcess("gHotSpotVMTypeEntrySuperclassNameOffset");
typeEntryIsOopTypeOffset = getLongValueFromProcess("gHotSpotVMTypeEntryIsOopTypeOffset");
typeEntryIsIntegerTypeOffset = getLongValueFromProcess("gHotSpotVMTypeEntryIsIntegerTypeOffset");
typeEntryIsUnsignedOffset = getLongValueFromProcess("gHotSpotVMTypeEntryIsUnsignedOffset");
typeEntrySizeOffset = getLongValueFromProcess("gHotSpotVMTypeEntrySizeOffset");
typeEntryArrayStride = getLongValueFromProcess("gHotSpotVMTypeEntryArrayStride");
// Fetch the address of the VMTypeEntry*
// Fetch the address of the VMTypeEntry*. We get this symbol first
// and try to use it to make sure that symbol lookup is working.
Address entryAddr = lookupInProcess("gHotSpotVMTypes");
// System.err.println("gHotSpotVMTypes address = " + entryAddr);
// Dereference this once to get the pointer to the first VMTypeEntry
@ -118,6 +111,14 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
throw new RuntimeException("gHotSpotVMTypes was not initialized properly in the remote process; can not continue");
}
typeEntryTypeNameOffset = getLongValueFromProcess("gHotSpotVMTypeEntryTypeNameOffset");
typeEntrySuperclassNameOffset = getLongValueFromProcess("gHotSpotVMTypeEntrySuperclassNameOffset");
typeEntryIsOopTypeOffset = getLongValueFromProcess("gHotSpotVMTypeEntryIsOopTypeOffset");
typeEntryIsIntegerTypeOffset = getLongValueFromProcess("gHotSpotVMTypeEntryIsIntegerTypeOffset");
typeEntryIsUnsignedOffset = getLongValueFromProcess("gHotSpotVMTypeEntryIsUnsignedOffset");
typeEntrySizeOffset = getLongValueFromProcess("gHotSpotVMTypeEntrySizeOffset");
typeEntryArrayStride = getLongValueFromProcess("gHotSpotVMTypeEntryArrayStride");
// Start iterating down it until we find an entry with no name
Address typeNameAddr = null;
do {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -122,10 +122,14 @@ public class COFFFileParser {
private MemoizedObject[] sectionHeaders;
private MemoizedObject[] symbols;
// Init stringTable at decl time since other fields init'ed in the
// constructor need the String Table.
private MemoizedObject stringTable = new MemoizedObject() {
public Object computeValue() {
// the String Table follows the Symbol Table
int ptr = getPointerToSymbolTable();
if (ptr == 0) {
// no Symbol Table so no String Table
return new StringTable(0);
} else {
return new StringTable(ptr + SYMBOL_SIZE * getNumberOfSymbols());
@ -140,6 +144,8 @@ public class COFFFileParser {
timeDateStamp = readInt();
pointerToSymbolTable = readInt();
numberOfSymbols = readInt();
// String Table can be accessed at this point because
// pointerToSymbolTable and numberOfSymbols fields are set.
sizeOfOptionalHeader = readShort();
characteristics = readShort();
@ -222,6 +228,8 @@ public class COFFFileParser {
private MemoizedObject windowsSpecificFields;
private MemoizedObject dataDirectories;
// We use an offset of 2 because OptionalHeaderStandardFieldsImpl doesn't
// include the 'magic' field.
private static final int STANDARD_FIELDS_OFFSET = 2;
private static final int PE32_WINDOWS_SPECIFIC_FIELDS_OFFSET = 28;
private static final int PE32_DATA_DIRECTORIES_OFFSET = 96;
@ -288,7 +296,7 @@ public class COFFFileParser {
private int sizeOfUninitializedData;
private int addressOfEntryPoint;
private int baseOfCode;
private int baseOfData;
private int baseOfData; // only set in PE32
OptionalHeaderStandardFieldsImpl(int offset,
boolean isPE32Plus) {
@ -301,7 +309,8 @@ public class COFFFileParser {
sizeOfUninitializedData = readInt();
addressOfEntryPoint = readInt();
baseOfCode = readInt();
if (isPE32Plus) {
if (!isPE32Plus) {
// only available in PE32
baseOfData = readInt();
}
}
@ -433,7 +442,10 @@ public class COFFFileParser {
if (dir.getRVA() == 0 || dir.getSize() == 0) {
return null;
}
return new ExportDirectoryTableImpl(rvaToFileOffset(dir.getRVA()), dir.getSize());
// ExportDirectoryTableImpl needs both the RVA and the
// RVA converted to a file offset.
return new
ExportDirectoryTableImpl(dir.getRVA(), dir.getSize());
}
};
@ -526,6 +538,7 @@ public class COFFFileParser {
}
class ExportDirectoryTableImpl implements ExportDirectoryTable {
private int exportDataDirRVA;
private int offset;
private int size;
@ -548,8 +561,9 @@ public class COFFFileParser {
private MemoizedObject exportOrdinalTable;
private MemoizedObject exportAddressTable;
ExportDirectoryTableImpl(int offset, int size) {
this.offset = offset;
ExportDirectoryTableImpl(int exportDataDirRVA, int size) {
this.exportDataDirRVA = exportDataDirRVA;
offset = rvaToFileOffset(exportDataDirRVA);
this.size = size;
seek(offset);
exportFlags = readInt();
@ -595,6 +609,7 @@ public class COFFFileParser {
exportOrdinalTable = new MemoizedObject() {
public Object computeValue() {
// number of ordinals is same as the number of name pointers
short[] ordinals = new short[getNumberOfNamePointers()];
seek(rvaToFileOffset(getOrdinalTableRVA()));
for (int i = 0; i < ordinals.length; i++) {
@ -608,14 +623,18 @@ public class COFFFileParser {
public Object computeValue() {
int[] addresses = new int[getNumberOfAddressTableEntries()];
seek(rvaToFileOffset(getExportAddressTableRVA()));
// Must make two passes to avoid rvaToFileOffset
// destroying seek() position
// The Export Address Table values are a union of two
// possible values:
// Export RVA - The address of the exported symbol when
// loaded into memory, relative to the image base.
// This value doesn't get converted into a file offset.
// Forwarder RVA - The pointer to a null-terminated ASCII
// string in the export section. This value gets
// converted into a file offset because we have to
// fetch the string.
for (int i = 0; i < addresses.length; i++) {
addresses[i] = readInt();
}
for (int i = 0; i < addresses.length; i++) {
addresses[i] = rvaToFileOffset(addresses[i]);
}
return addresses;
}
};
@ -648,11 +667,12 @@ public class COFFFileParser {
public boolean isExportAddressForwarder(short ordinal) {
int addr = getExportAddress(ordinal);
return ((offset <= addr) && (addr < (offset + size)));
return ((exportDataDirRVA <= addr) &&
(addr < (exportDataDirRVA + size)));
}
public String getExportAddressForwarder(short ordinal) {
seek(getExportAddress(ordinal));
seek(rvaToFileOffset(getExportAddress(ordinal)));
return readCString();
}
@ -3371,10 +3391,17 @@ public class COFFFileParser {
throw new COFFException(e);
}
// Look up in string table
// FIXME: this index value is assumed to be in the valid range
name = getStringTable().get(index);
} else {
try {
name = new String(tmpName, US_ASCII);
int length = 0;
// find last non-NULL
for (; length < tmpName.length && tmpName[length] != '\0';) {
length++;
}
// don't include NULL chars in returned name String
name = new String(tmpName, 0, length, US_ASCII);
} catch (UnsupportedEncodingException e) {
throw new COFFException(e);
}
@ -3487,6 +3514,7 @@ public class COFFFileParser {
tmpName[5] << 16 |
tmpName[6] << 8 |
tmpName[7]);
// FIXME: stringOffset is assumed to be in the valid range
name = getStringTable().getAtOffset(stringOffset);
}
@ -3698,12 +3726,13 @@ public class COFFFileParser {
StringTable(int offset) {
if (offset == 0) {
// no String Table
strings = new COFFString[0];
return;
}
seek(offset);
int length = readInt();
int length = readInt(); // length includes itself
byte[] data = new byte[length - 4];
int numBytesRead = readBytes(data);
if (numBytesRead != data.length) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -37,35 +37,48 @@ public class DumpExports {
String filename = args[0];
COFFFile file = COFFFileParser.getParser().parse(filename);
ExportDirectoryTable exports =
file.getHeader().
getOptionalHeader().
getDataDirectories().
getExportDirectoryTable();
// get common point for both things we want to dump
OptionalHeaderDataDirectories dataDirs = file.getHeader().getOptionalHeader().
getDataDirectories();
// dump the header data directory for the Export Table:
DataDirectory dir = dataDirs.getExportTable();
System.out.println("Export table: RVA = " + dir.getRVA() + "/0x" +
Integer.toHexString(dir.getRVA()) + ", size = " + dir.getSize() + "/0x" +
Integer.toHexString(dir.getSize()));
System.out.println(file.getHeader().getNumberOfSections() + " sections in file");
for (int i = 1; i <= file.getHeader().getNumberOfSections(); i++) {
SectionHeader sec = file.getHeader().getSectionHeader(i);
System.out.println(" Section " + i + ":");
System.out.println(" Name = '" + sec.getName() + "'");
System.out.println(" VirtualSize = " + sec.getSize() + "/0x" +
Integer.toHexString(sec.getSize()));
System.out.println(" VirtualAddress = " + sec.getVirtualAddress() + "/0x" +
Integer.toHexString(sec.getVirtualAddress()));
System.out.println(" SizeOfRawData = " + sec.getSizeOfRawData() + "/0x" +
Integer.toHexString(sec.getSizeOfRawData()));
System.out.println(" PointerToRawData = " + sec.getPointerToRawData() + "/0x" +
Integer.toHexString(sec.getPointerToRawData()));
}
ExportDirectoryTable exports = dataDirs.getExportDirectoryTable();
if (exports == null) {
System.out.println("No exports found.");
} else {
System.out.println(file.getHeader().getNumberOfSections() + " sections in file");
for (int i = 0; i < file.getHeader().getNumberOfSections(); i++) {
System.out.println(" Section " + i + ": " + file.getHeader().getSectionHeader(1 + i).getName());
}
DataDirectory dir = file.getHeader().getOptionalHeader().getDataDirectories().getExportTable();
System.out.println("Export table: RVA = 0x" + Integer.toHexString(dir.getRVA()) +
", size = 0x" + Integer.toHexString(dir.getSize()));
System.out.println("DLL name: " + exports.getDLLName());
System.out.println("Time/date stamp 0x" + Integer.toHexString(exports.getTimeDateStamp()));
System.out.println("Major version 0x" + Integer.toHexString(exports.getMajorVersion() & 0xFFFF));
System.out.println("Minor version 0x" + Integer.toHexString(exports.getMinorVersion() & 0xFFFF));
System.out.println(exports.getNumberOfNamePointers() + " functions found");
System.out.println(exports.getNumberOfNamePointers() + " exports found");
for (int i = 0; i < exports.getNumberOfNamePointers(); i++) {
System.out.println(" 0x" +
Integer.toHexString(exports.getExportAddress(exports.getExportOrdinal(i))) +
" " +
(exports.isExportAddressForwarder(exports.getExportOrdinal(i)) ?
("Forwarded to " + exports.getExportAddressForwarder(exports.getExportOrdinal(i))) :
exports.getExportName(i)));
short ordinal = exports.getExportOrdinal(i);
System.out.print("[" + i + "] '" + exports.getExportName(i) + "': [" +
ordinal + "] = 0x" + Integer.toHexString(exports.getExportAddress(ordinal)));
System.out.println(exports.isExportAddressForwarder(ordinal)
? " Forwarded to '" + exports.getExportAddressForwarder(ordinal) + "'"
: "");
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,8 +42,8 @@ public class TestParser {
COFFHeader header = file.getHeader();
int numSections = header.getNumberOfSections();
System.out.println(numSections + " sections detected.");
for (int i = 0; i < numSections; i++) {
SectionHeader secHeader = header.getSectionHeader(1 + i);
for (int i = 1; i <= numSections; i++) {
SectionHeader secHeader = header.getSectionHeader(i);
System.out.println(secHeader.getName());
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -506,7 +506,6 @@ public class WindbgDebuggerLocal extends DebuggerBase implements WindbgDebugger
throw new DebuggerException("Unimplemented");
}
private static String DTFWHome;
private static String imagePath;
private static String symbolPath;
private static boolean useNativeLookup;
@ -514,81 +513,143 @@ public class WindbgDebuggerLocal extends DebuggerBase implements WindbgDebugger
static {
/*
* sawindbg.dll depends on dbgeng.dll which
* itself depends on dbghelp.dll. dbgeng.dll and dbghelp.dll.
* On systems newer than Windows 2000, these two .dlls are
* in the standard system directory so we will find them there.
* On Windows 2000 and earlier, these files do not exist.
* The user must download Debugging Tools For Windows (DTFW)
* and install it in order to use SA.
* sawindbg.dll depends on dbgeng.dll which itself depends on
* dbghelp.dll. We have to make sure that the dbgeng.dll and
* dbghelp.dll that we load are compatible with each other. We
* load both of those libraries from the same directory based
* on the theory that co-located libraries are compatible.
*
* We have to make sure we use the two files from the same directory
* in case there are more than one copy on the system because
* one version of dbgeng.dll might not be compatible with a
* different version of dbghelp.dll.
* We first look for them in the directory pointed at by
* env. var. DEBUGGINGTOOLSFORWINDOWS, next in the default
* installation dir for DTFW, and lastly in the standard
* system directory. We expect that that we will find
* them in the standard system directory on all systems
* newer than Windows 2000.
* On Windows 2000 and earlier, dbgeng.dll and dbghelp.dll were
* not included as part of the standard system directory. On
* systems newer than Windows 2000, dbgeng.dll and dbghelp.dll
* are included in the standard system directory. However, the
* versions included in the standard system directory may not
* be able to handle symbol information for the newer compilers.
*
* We search for and explicitly load the libraries using the
* following directory search order:
*
* - java.home/bin (same as $JAVA_HOME/jre/bin)
* - dir named by DEBUGGINGTOOLSFORWINDOWS environment variable
* - various "Debugging Tools For Windows" program directories
* - the system directory ($SYSROOT/system32)
*
* If SA is invoked with -Dsun.jvm.hotspot.loadLibrary.DEBUG=1,
* then debug messages about library loading are printed to
* System.err.
*/
String dirName = null;
DTFWHome = System.getenv("DEBUGGINGTOOLSFORWINDOWS");
if (DTFWHome == null) {
// See if we have the files in the default location.
String sysRoot = System.getenv("SYSTEMROOT");
DTFWHome = sysRoot + File.separator +
".." + File.separator + "Program Files" +
File.separator + "Debugging Tools For Windows";
}
String dbgengPath = null;
String dbghelpPath = null;
String sawindbgPath = null;
List searchList = new ArrayList();
boolean loadLibraryDEBUG =
System.getProperty("sun.jvm.hotspot.loadLibrary.DEBUG") != null;
{
String dbghelp = DTFWHome + File.separator + "dbghelp.dll";
String dbgeng = DTFWHome + File.separator + "dbgeng.dll";
File fhelp = new File(dbghelp);
File feng = new File(dbgeng);
if (fhelp.exists() && feng.exists()) {
// found both, we are happy.
// First place to search is co-located with sawindbg.dll in
// $JAVA_HOME/jre/bin (java.home property is set to $JAVA_HOME/jre):
searchList.add(System.getProperty("java.home") + File.separator + "bin");
sawindbgPath = (String) searchList.get(0) + File.separator +
"sawindbg.dll";
// second place to search is specified by an environment variable:
String DTFWHome = System.getenv("DEBUGGINGTOOLSFORWINDOWS");
if (DTFWHome != null) {
searchList.add(DTFWHome);
}
// The third place to search is the install directory for the
// "Debugging Tools For Windows" package; so far there are three
// name variations that we know of:
String sysRoot = System.getenv("SYSTEMROOT");
DTFWHome = sysRoot + File.separator + ".." + File.separator +
"Program Files" + File.separator + "Debugging Tools For Windows";
searchList.add(DTFWHome);
searchList.add(DTFWHome + " (x86)");
searchList.add(DTFWHome + " (x64)");
// The last place to search is the system directory:
searchList.add(sysRoot + File.separator + "system32");
}
for (int i = 0; i < searchList.size(); i++) {
File dir = new File((String) searchList.get(i));
if (!dir.exists()) {
if (loadLibraryDEBUG) {
System.err.println("DEBUG: '" + searchList.get(i) +
"': directory does not exist.");
}
// this search directory doesn't exist so skip it
continue;
}
dbgengPath = (String) searchList.get(i) + File.separator + "dbgeng.dll";
dbghelpPath = (String) searchList.get(i) + File.separator + "dbghelp.dll";
File feng = new File(dbgengPath);
File fhelp = new File(dbghelpPath);
if (feng.exists() && fhelp.exists()) {
// both files exist so we have a match
break;
}
// At least one of the files does not exist; no warning if both
// don't exist. If just one doesn't exist then we don't check
// loadLibraryDEBUG because we have a mis-configured system.
if (feng.exists()) {
System.err.println("WARNING: found '" + dbgengPath +
"' but did not find '" + dbghelpPath + "'; ignoring '" +
dbgengPath + "'.");
} else if (fhelp.exists()) {
System.err.println("WARNING: found '" + dbghelpPath +
"' but did not find '" + dbgengPath + "'; ignoring '" +
dbghelpPath + "'.");
} else if (loadLibraryDEBUG) {
System.err.println("DEBUG: searched '" + searchList.get(i) +
"': dbgeng.dll and dbghelp.dll were not found.");
}
dbgengPath = null;
dbghelpPath = null;
}
if (dbgengPath == null || dbghelpPath == null) {
// at least one of the files wasn't found anywhere we searched
String mesg = null;
if (dbgengPath == null && dbghelpPath == null) {
mesg = "dbgeng.dll and dbghelp.dll cannot be found. ";
} else if (dbgengPath == null) {
mesg = "dbgeng.dll cannot be found (dbghelp.dll was found). ";
} else {
mesg = "dbghelp.dll cannot be found (dbgeng.dll was found). ";
}
throw new UnsatisfiedLinkError(mesg +
"Please search microsoft.com for 'Debugging Tools For Windows', " +
"and either download it to the default location, or download it " +
"to a custom location and set environment variable " +
"'DEBUGGINGTOOLSFORWINDOWS' to the pathname of that location.");
}
// NOTE: The order of loads is important! If we load dbgeng.dll
// first, then the dependency - dbghelp.dll - will be loaded
// from usual DLL search thereby defeating the purpose!
System.load(dbghelp);
System.load(dbgeng);
} else if (! fhelp.exists() && ! feng.exists()) {
// neither exist. We will ignore this dir and assume
// they are in the system dir.
DTFWHome = null;
} else {
// one exists but not the other
//System.err.println("Error: Both files dbghelp.dll and dbgeng.dll "
// "must exist in directory " + DTFWHome);
throw new UnsatisfiedLinkError("Both files dbghelp.dll and " +
"dbgeng.dll must exist in " +
"directory " + DTFWHome);
}
}
if (DTFWHome == null) {
// The files better be in the system dir.
String sysDir = System.getenv("SYSTEMROOT") +
File.separator + "system32";
File feng = new File(sysDir + File.separator + "dbgeng.dll");
if (!feng.exists()) {
throw new UnsatisfiedLinkError("File dbgeng.dll does not exist in " +
sysDir + ". Please search microsoft.com " +
"for Debugging Tools For Windows, and " +
"either download it to the default " +
"location, or download it to a custom " +
"location and set environment variable " +
" DEBUGGINGTOOLSFORWINDOWS " +
"to the pathname of that location.");
if (loadLibraryDEBUG) {
System.err.println("DEBUG: loading '" + dbghelpPath + "'.");
}
System.load(dbghelpPath);
if (loadLibraryDEBUG) {
System.err.println("DEBUG: loading '" + dbgengPath + "'.");
}
System.load(dbgengPath);
// Now, load sawindbg.dll
System.loadLibrary("sawindbg");
if (loadLibraryDEBUG) {
System.err.println("DEBUG: loading '" + sawindbgPath + "'.");
}
System.load(sawindbgPath);
// where do I find '.exe', '.dll' files?
imagePath = System.getProperty("sun.jvm.hotspot.debugger.windbg.imagePath");
if (imagePath == null) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -188,7 +188,7 @@ public class BytecodeLoadConstant extends BytecodeWithCPIndex {
} else {
throw new RuntimeException("should not reach here");
}
} else if (ctag.isMethodHandle() || ctag.isMethodType()) {
} else if (ctag.isMethodHandle()) {
Oop x = getCachedConstant();
int refidx = cpool.getMethodHandleIndexAt(cpIndex);
int refkind = cpool.getMethodHandleRefKindAt(cpIndex);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -53,11 +53,16 @@ public class ConstantPool extends Oop implements ClassConstants {
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("constantPoolOopDesc");
tags = new OopField(type.getOopField("_tags"), 0);
operands = new OopField(type.getOopField("_operands"), 0);
cache = new OopField(type.getOopField("_cache"), 0);
poolHolder = new OopField(type.getOopField("_pool_holder"), 0);
length = new CIntField(type.getCIntegerField("_length"), 0);
headerSize = type.getSize();
elementSize = 0;
// fetch constants:
INDY_BSM_OFFSET = db.lookupIntConstant("constantPoolOopDesc::_indy_bsm_offset").intValue();
INDY_ARGC_OFFSET = db.lookupIntConstant("constantPoolOopDesc::_indy_argc_offset").intValue();
INDY_ARGV_OFFSET = db.lookupIntConstant("constantPoolOopDesc::_indy_argv_offset").intValue();
}
ConstantPool(OopHandle handle, ObjectHeap heap) {
@ -67,6 +72,7 @@ public class ConstantPool extends Oop implements ClassConstants {
public boolean isConstantPool() { return true; }
private static OopField tags;
private static OopField operands;
private static OopField cache;
private static OopField poolHolder;
private static CIntField length; // number of elements in oop
@ -74,7 +80,12 @@ public class ConstantPool extends Oop implements ClassConstants {
private static long headerSize;
private static long elementSize;
private static int INDY_BSM_OFFSET;
private static int INDY_ARGC_OFFSET;
private static int INDY_ARGV_OFFSET;
public TypeArray getTags() { return (TypeArray) tags.getValue(this); }
public TypeArray getOperands() { return (TypeArray) operands.getValue(this); }
public ConstantPoolCache getCache() { return (ConstantPoolCache) cache.getValue(this); }
public Klass getPoolHolder() { return (Klass) poolHolder.getValue(this); }
public int getLength() { return (int)length.getValue(this); }
@ -278,6 +289,28 @@ public class ConstantPool extends Oop implements ClassConstants {
return res;
}
/** Lookup for multi-operand (InvokeDynamic) entries. */
public short[] getBootstrapSpecifierAt(int i) {
if (Assert.ASSERTS_ENABLED) {
Assert.that(getTagAt(i).isInvokeDynamic(), "Corrupted constant pool");
}
if (getTagAt(i).value() == JVM_CONSTANT_InvokeDynamicTrans)
return null;
int bsmSpec = extractLowShortFromInt(this.getIntAt(i));
TypeArray operands = getOperands();
if (operands == null) return null; // safety first
int basePos = VM.getVM().buildIntFromShorts(operands.getShortAt(bsmSpec * 2 + 0),
operands.getShortAt(bsmSpec * 2 + 1));
int argv = basePos + INDY_ARGV_OFFSET;
int argc = operands.getShortAt(basePos + INDY_ARGC_OFFSET);
int endPos = argv + argc;
short[] values = new short[endPos - basePos];
for (int j = 0; j < values.length; j++) {
values[j] = operands.getShortAt(basePos+j);
}
return values;
}
final private static String[] nameForTag = new String[] {
};
@ -298,6 +331,7 @@ public class ConstantPool extends Oop implements ClassConstants {
case JVM_CONSTANT_MethodHandle: return "JVM_CONSTANT_MethodHandle";
case JVM_CONSTANT_MethodType: return "JVM_CONSTANT_MethodType";
case JVM_CONSTANT_InvokeDynamic: return "JVM_CONSTANT_InvokeDynamic";
case JVM_CONSTANT_InvokeDynamicTrans: return "JVM_CONSTANT_InvokeDynamic/transitional";
case JVM_CONSTANT_Invalid: return "JVM_CONSTANT_Invalid";
case JVM_CONSTANT_UnresolvedClass: return "JVM_CONSTANT_UnresolvedClass";
case JVM_CONSTANT_UnresolvedClassInError: return "JVM_CONSTANT_UnresolvedClassInError";
@ -357,6 +391,7 @@ public class ConstantPool extends Oop implements ClassConstants {
case JVM_CONSTANT_MethodHandle:
case JVM_CONSTANT_MethodType:
case JVM_CONSTANT_InvokeDynamic:
case JVM_CONSTANT_InvokeDynamicTrans:
visitor.doInt(new IntField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
break;
}
@ -520,17 +555,19 @@ public class ConstantPool extends Oop implements ClassConstants {
break;
}
case JVM_CONSTANT_InvokeDynamicTrans:
case JVM_CONSTANT_InvokeDynamic: {
dos.writeByte(cpConstType);
int value = getIntAt(ci);
short bootstrapMethodIndex = (short) extractLowShortFromInt(value);
short bsmIndex = (short) extractLowShortFromInt(value);
short nameAndTypeIndex = (short) extractHighShortFromInt(value);
dos.writeShort(bootstrapMethodIndex);
dos.writeShort(bsmIndex);
dos.writeShort(nameAndTypeIndex);
if (DEBUG) debugMessage("CP[" + ci + "] = indy BSM = " + bootstrapMethodIndex
if (DEBUG) debugMessage("CP[" + ci + "] = indy BSM = " + bsmIndex
+ ", N&T = " + nameAndTypeIndex);
break;
}
default:
throw new InternalError("unknown tag: " + cpConstType);
} // switch

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -42,7 +42,8 @@ public interface ClassConstants
public static final int JVM_CONSTANT_NameAndType = 12;
public static final int JVM_CONSTANT_MethodHandle = 15;
public static final int JVM_CONSTANT_MethodType = 16;
public static final int JVM_CONSTANT_InvokeDynamic = 17;
public static final int JVM_CONSTANT_InvokeDynamicTrans = 17; // only occurs in old class files
public static final int JVM_CONSTANT_InvokeDynamic = 18;
// JVM_CONSTANT_MethodHandle subtypes
public static final int JVM_REF_getField = 1;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -303,12 +303,12 @@ public class ClassWriter implements /* imports */ ClassConstants
case JVM_CONSTANT_MethodHandle: {
dos.writeByte(cpConstType);
int value = cpool.getIntAt(ci);
short bootstrapMethodIndex = (short) extractLowShortFromInt(value);
short nameAndTypeIndex = (short) extractHighShortFromInt(value);
dos.writeShort(bootstrapMethodIndex);
dos.writeShort(nameAndTypeIndex);
if (DEBUG) debugMessage("CP[" + ci + "] = indy BSM = " +
bootstrapMethodIndex + ", N&T = " + nameAndTypeIndex);
byte refKind = (byte) extractLowShortFromInt(value);
short memberIndex = (short) extractHighShortFromInt(value);
dos.writeByte(refKind);
dos.writeShort(memberIndex);
if (DEBUG) debugMessage("CP[" + ci + "] = MH kind = " +
refKind + ", mem = " + memberIndex);
break;
}
@ -321,12 +321,16 @@ public class ClassWriter implements /* imports */ ClassConstants
break;
}
case JVM_CONSTANT_InvokeDynamicTrans:
case JVM_CONSTANT_InvokeDynamic: {
dos.writeByte(cpConstType);
int value = cpool.getIntAt(ci);
short refIndex = (short) value;
dos.writeShort(refIndex);
if (DEBUG) debugMessage("CP[" + ci + "] = MT index = " + refIndex);
short bsmIndex = (short) extractLowShortFromInt(value);
short nameAndTypeIndex = (short) extractHighShortFromInt(value);
dos.writeShort(bsmIndex);
dos.writeShort(nameAndTypeIndex);
if (DEBUG) debugMessage("CP[" + ci + "] = INDY bsm = " +
bsmIndex + ", N&T = " + nameAndTypeIndex);
break;
}

View File

@ -30,6 +30,7 @@ import sun.jvm.hotspot.asm.*;
import sun.jvm.hotspot.asm.sparc.*;
import sun.jvm.hotspot.asm.x86.*;
import sun.jvm.hotspot.asm.ia64.*;
import sun.jvm.hotspot.asm.amd64.*;
import sun.jvm.hotspot.code.*;
import sun.jvm.hotspot.compiler.*;
import sun.jvm.hotspot.debugger.*;
@ -198,6 +199,8 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
cpuHelper = new SPARCHelper();
} else if (cpu.equals("x86")) {
cpuHelper = new X86Helper();
} else if (cpu.equals("amd64")) {
cpuHelper = new AMD64Helper();
} else if (cpu.equals("ia64")) {
cpuHelper = new IA64Helper();
} else {
@ -460,6 +463,19 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
return buf.toString();
}
private String genListOfShort(short[] values) {
if (values == null || values.length == 0) return "";
Formatter buf = new Formatter(genHTML);
buf.append('[');
for (int i = 0; i < values.length; i++) {
if (i > 0) buf.append(' ');
buf.append('#');
buf.append(Integer.toString(values[i]));
}
buf.append(']');
return buf.toString();
}
protected String genHTMLTableForConstantPool(ConstantPool cpool) {
Formatter buf = new Formatter(genHTML);
buf.beginTable(1);
@ -582,9 +598,11 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
buf.cell(Integer.toString(cpool.getIntAt(index)));
break;
case JVM_CONSTANT_InvokeDynamicTrans:
case JVM_CONSTANT_InvokeDynamic:
buf.cell("JVM_CONSTANT_InvokeDynamic");
buf.cell(genLowHighShort(cpool.getIntAt(index)));
buf.cell(genLowHighShort(cpool.getIntAt(index)) +
genListOfShort(cpool.getBootstrapSpecifierAt(index)));
break;
default:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -40,7 +40,8 @@ public class ConstantTag {
private static int JVM_CONSTANT_NameAndType = 12;
private static int JVM_CONSTANT_MethodHandle = 15; // JSR 292
private static int JVM_CONSTANT_MethodType = 16; // JSR 292
private static int JVM_CONSTANT_InvokeDynamic = 17; // JSR 292
private static int JVM_CONSTANT_InvokeDynamicTrans = 17; // JSR 292, only occurs in old class files
private static int JVM_CONSTANT_InvokeDynamic = 18; // JSR 292
private static int JVM_CONSTANT_Invalid = 0; // For bad value initialization
private static int JVM_CONSTANT_UnresolvedClass = 100; // Temporary tag until actual use
private static int JVM_CONSTANT_ClassIndex = 101; // Temporary tag while constructing constant pool
@ -66,6 +67,8 @@ public class ConstantTag {
this.tag = tag;
}
public int value() { return tag; }
public boolean isKlass() { return tag == JVM_CONSTANT_Class; }
public boolean isField () { return tag == JVM_CONSTANT_Fieldref; }
public boolean isMethod() { return tag == JVM_CONSTANT_Methodref; }
@ -80,6 +83,7 @@ public class ConstantTag {
public boolean isMethodHandle() { return tag == JVM_CONSTANT_MethodHandle; }
public boolean isMethodType() { return tag == JVM_CONSTANT_MethodType; }
public boolean isInvokeDynamic() { return tag == JVM_CONSTANT_InvokeDynamic; }
public boolean isInvokeDynamicTrans() { return tag == JVM_CONSTANT_InvokeDynamicTrans; }
public boolean isInvalid() { return tag == JVM_CONSTANT_Invalid; }

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it

View File

@ -101,15 +101,14 @@ ifndef HOTSPOT_RELEASE_VERSION
endif
ifdef HOTSPOT_BUILD_VERSION
# specified in command line (PRT build)
# specified in command line
else
ifdef JPRT_BUILD_VERSION
# JPR build
HOTSPOT_BUILD_VERSION=$(JPRT_BUILD_VERSION)
else
ifdef COOKED_BUILD_NUMBER
# JRE build
HOTSPOT_BUILD_VERSION=
else
ifdef USER_RELEASE_SUFFIX
HOTSPOT_BUILD_VERSION=internal-$(USER_RELEASE_SUFFIX)
else
HOTSPOT_BUILD_VERSION=internal
endif

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -31,11 +31,11 @@
#
# Don't put quotes (fail windows build).
HOTSPOT_VM_COPYRIGHT=Copyright 2010
HOTSPOT_VM_COPYRIGHT=Copyright 2011
HS_MAJOR_VER=20
HS_MINOR_VER=0
HS_BUILD_NUMBER=01
HS_BUILD_NUMBER=06
JDK_MAJOR_VER=1
JDK_MINOR_VER=7

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,9 +25,6 @@
# JPRT rule to build this workspace
JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
ifdef JPRT_BUILD_VERSION
MILESTONE=$(JPRT_BUILD_VERSION)
endif
ifeq ($(OSNAME),windows)
ZIPFLAGS=-q

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -150,6 +150,7 @@ jprt.build.targets= \
jprt.my.solaris.sparc.test.targets= \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jvm98, \
${jprt.my.solaris.sparc}-{product|fastdebug}-c2-jvm98_tiered, \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-scimark, \
${jprt.my.solaris.sparc}-product-{c1|c2}-runThese, \
${jprt.my.solaris.sparc}-fastdebug-c1-runThese_Xshare, \
@ -168,6 +169,7 @@ jprt.my.solaris.sparc.test.targets= \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_G1, \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_ParOldGC, \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_default, \
${jprt.my.solaris.sparc}-{product|fastdebug}-c2-jbb_default_tiered, \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_SerialGC, \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_ParallelGC, \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_CMS, \
@ -176,6 +178,7 @@ jprt.my.solaris.sparc.test.targets= \
jprt.my.solaris.sparcv9.test.targets= \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98_tiered, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark, \
${jprt.my.solaris.sparcv9}-product-c2-runThese, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_default, \
@ -193,6 +196,7 @@ jprt.my.solaris.sparcv9.test.targets= \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_G1, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_ParOldGC, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_default, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_default_tiered, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_SerialGC, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_ParallelGC, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_CMS, \
@ -201,6 +205,7 @@ jprt.my.solaris.sparcv9.test.targets= \
jprt.my.solaris.x64.test.targets= \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98_tiered, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-scimark, \
${jprt.my.solaris.x64}-product-c2-runThese, \
${jprt.my.solaris.x64}-product-c2-runThese_Xcomp, \
@ -219,6 +224,7 @@ jprt.my.solaris.x64.test.targets= \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_G1, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_ParOldGC, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_default, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_default_tiered, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_SerialGC, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_ParallelGC, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_CMS, \
@ -227,6 +233,7 @@ jprt.my.solaris.x64.test.targets= \
jprt.my.solaris.i586.test.targets= \
${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
${jprt.my.solaris.i586}-{product|fastdebug}-c2-jvm98_tiered, \
${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark, \
${jprt.my.solaris.i586}-product-{c1|c2}-runThese_Xcomp, \
${jprt.my.solaris.i586}-fastdebug-c1-runThese_Xcomp, \
@ -253,6 +260,7 @@ jprt.my.solaris.i586.test.targets= \
${jprt.my.solaris.i586}-product-c1-GCOld_G1, \
${jprt.my.solaris.i586}-product-c1-GCOld_ParOldGC, \
${jprt.my.solaris.i586}-fastdebug-c2-jbb_default, \
${jprt.my.solaris.i586}-fastdebug-c2-jbb_default_tiered, \
${jprt.my.solaris.i586}-fastdebug-c2-jbb_ParallelGC, \
${jprt.my.solaris.i586}-fastdebug-c2-jbb_CMS, \
${jprt.my.solaris.i586}-fastdebug-c2-jbb_G1, \
@ -260,6 +268,7 @@ jprt.my.solaris.i586.test.targets= \
jprt.my.linux.i586.test.targets = \
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
${jprt.my.linux.i586}-{product|fastdebug}-c2-jvm98_tiered, \
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
@ -279,6 +288,7 @@ jprt.my.linux.i586.test.targets = \
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_G1, \
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParOldGC, \
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
${jprt.my.linux.i586}-{product|fastdebug}-c2-jbb_default_tiered, \
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_G1, \
@ -286,6 +296,7 @@ jprt.my.linux.i586.test.targets = \
jprt.my.linux.x64.test.targets = \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98_tiered, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-scimark, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_default, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
@ -302,12 +313,14 @@ jprt.my.linux.x64.test.targets = \
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_G1, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_ParOldGC, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_default, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_default_tiered, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_ParallelGC, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_G1, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_ParOldGC
jprt.my.windows.i586.test.targets = \
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
${jprt.my.windows.i586}-{product|fastdebug}-c2-jvm98_tiered, \
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-scimark, \
${jprt.my.windows.i586}-product-{c1|c2}-runThese, \
${jprt.my.windows.i586}-product-{c1|c2}-runThese_Xcomp, \
@ -327,6 +340,7 @@ jprt.my.windows.i586.test.targets = \
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_G1, \
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_ParOldGC, \
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jbb_default, \
${jprt.my.windows.i586}-{product|fastdebug}-c2-jbb_default_tiered, \
${jprt.my.windows.i586}-product-{c1|c2}-jbb_ParallelGC, \
${jprt.my.windows.i586}-product-{c1|c2}-jbb_CMS, \
${jprt.my.windows.i586}-product-{c1|c2}-jbb_G1, \
@ -334,6 +348,7 @@ jprt.my.windows.i586.test.targets = \
jprt.my.windows.x64.test.targets = \
${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98_tiered, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-scimark, \
${jprt.my.windows.x64}-product-c2-runThese, \
${jprt.my.windows.x64}-product-c2-runThese_Xcomp, \
@ -351,6 +366,7 @@ jprt.my.windows.x64.test.targets = \
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_G1, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_ParOldGC, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-jbb_default, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-jbb_default_tiered, \
${jprt.my.windows.x64}-product-c2-jbb_CMS, \
${jprt.my.windows.x64}-product-c2-jbb_ParallelGC, \
${jprt.my.windows.x64}-product-c2-jbb_G1, \

View File

@ -62,7 +62,9 @@ endif
include $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
ifndef CC_INTERP
FORCE_TIERED=1
ifndef FORCE_TIERED
FORCE_TIERED=1
endif
endif
ifdef LP64
@ -254,7 +256,7 @@ $(SUBDIRS_TIERED): $(BUILDTREE_MAKE)
$(BUILDTREE) VARIANT=tiered
$(SUBDIRS_C2): $(BUILDTREE_MAKE)
ifdef FORCE_TIERED
ifeq ($(FORCE_TIERED),1)
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
$(BUILDTREE) VARIANT=tiered FORCE_TIERED=1
else

View File

@ -15,5 +15,6 @@ fix_lines() {
' F2=$2
mv $1+ $1
}
[ -f $3/$1 ] && (fix_lines $2/$1 $3/$1; cmp -s $2/$1 $3/$1) || \
fix_lines $2/$1 $3/$1
[ -f $3/$1 ] && cmp -s $2/$1 $3/$1 || \
( [ -f $3/$1 ] && echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 )

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