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/ ^build/
^dist/ ^dist/
/nbproject/private/ /nbproject/private/
^webrev

12
.hgtags
View File

@ -88,3 +88,15 @@ a6442d6bc38a44152e0662688213ce4d2701f42a jdk7-b110
69f3edf083477955b5bd2f754252c7504167d8e1 jdk7-b111 69f3edf083477955b5bd2f754252c7504167d8e1 jdk7-b111
f960f117f1623629f64203e2b09a92a8f6f14ff5 jdk7-b112 f960f117f1623629f64203e2b09a92a8f6f14ff5 jdk7-b112
1fee41c7ed2b3388970a756a85aa693c0de8407a jdk7-b113 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 9702d6fef68e17533ee7fcf5923b11ead3e912ce jdk7-b111
b852103caf73da70068473777ae867a457bb3ae1 jdk7-b112 b852103caf73da70068473777ae867a457bb3ae1 jdk7-b112
c1df968c4527bfab5f97662a89245f15d12d378b jdk7-b113 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 clobber:: deploy-clobber
endif 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. # The debug build, fastdebug or debug. Needs special handling.
# Note that debug builds do NOT do INSTALL steps, but must be done # 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. # 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 ($(BUILD_JDK), true)
ifeq ($(BUNDLE_RULES_AVAILABLE), true) ifeq ($(BUNDLE_RULES_AVAILABLE), true)
OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output
OPENJDK_BUILD_NAME \ OPENJDK_BUILD_NAME \
= openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE) = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
@ -330,7 +323,6 @@ openjdk_build:
GENERATE_DOCS=false \ GENERATE_DOCS=false \
ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \ ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \ ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \ ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \
ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \ ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \
product_build ) product_build )
@ -456,7 +448,6 @@ CACERTS_FILE.desc = Location of certificates file
DEVTOOLS_PATH.desc = Directory containing zip and gnumake DEVTOOLS_PATH.desc = Directory containing zip and gnumake
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
DXSDK_PATH.desc = Root directory of DirectX SDK 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 MSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
# Make variables to print out (description and value) # Make variables to print out (description and value)
@ -487,12 +478,10 @@ ifeq ($(PLATFORM), windows)
VARIABLE_PRINTVAL_LIST += \ VARIABLE_PRINTVAL_LIST += \
DXSDK_PATH \ DXSDK_PATH \
MSDEVTOOLS_PATH \
MSVCRT_DLL_PATH MSVCRT_DLL_PATH
VARIABLE_CHECKDIR_LIST += \ VARIABLE_CHECKDIR_LIST += \
DXSDK_PATH \ DXSDK_PATH \
MSDEVTOOLS_PATH \
MSVCRT_DLL_PATH MSVCRT_DLL_PATH
endif endif
@ -548,7 +537,7 @@ examples_help:
" "
################################################################ ################################################################
# Source and binary plug bundling # Source bundling
################################################################ ################################################################
ifeq ($(BUNDLE_RULES_AVAILABLE), true) ifeq ($(BUNDLE_RULES_AVAILABLE), true)
include $(BUNDLE_RULES) include $(BUNDLE_RULES)

40
README
View File

@ -1,31 +1,41 @@
README: README:
This file should be located at the top of the OpenJDK Mercurial repository This file should be located at the top of the OpenJDK Mercurial root
forest. This top or enclosing repository will include a "make" directory, repository. This root repository will include a "make" directory,
and a Makefile at the very top of the repository. and a Makefile for building the entire OpenJDK.
It should also include the 6 repositories: "jdk", "hotspot", "langtools", A full OpenJDK repository set (forest) should also include the following
"corba", "jaxws" and "jaxp". 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. See http://openjdk.java.net/ for more information about the OpenJDK.
Simple Build Instructions: Simple Build Instructions:
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. Download and install a JDK 6 from 1. If you don't have a jdk6 installed, download and install a JDK 6 from
http://java.sun.com/javase/downloads/index.jsp 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 2. Check the sanity of doing a build with your current system:
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:
gnumake sanity gnumake sanity
See README-builds.html if you run into problems. 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 gnumake all
The resulting JDK image should be found in build/*/j2sdk-image 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. /usr/sfw/bin/gmake or /opt/sfw/bin/gmake on Solaris.

File diff suppressed because it is too large Load Diff

View File

@ -88,3 +88,15 @@ c3dd858e09b20206459d9e7b0ead99d27ab00eab jdk7-b109
640fa4d4e2ad4c2d7e4815c955026740d8c52b7a jdk7-b111 640fa4d4e2ad4c2d7e4815c955026740d8c52b7a jdk7-b111
cc67fdc4fee9a5b25caee4e71b51a8ff24ae7d1a jdk7-b112 cc67fdc4fee9a5b25caee4e71b51a8ff24ae7d1a jdk7-b112
a89a6c5be9d1a754868d3d359cbf7ad36aa95631 jdk7-b113 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
# #
# Copyright (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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -34,7 +34,7 @@ com_sun_corba_se_impl_io_java = \
com/sun/corba/se/impl/io/ObjectStreamField.java \ com/sun/corba/se/impl/io/ObjectStreamField.java \
com/sun/corba/se/impl/io/OptionalDataException.java \ com/sun/corba/se/impl/io/OptionalDataException.java \
com/sun/corba/se/impl/io/ValueHandlerImpl.java \ com/sun/corba/se/impl/io/ValueHandlerImpl.java \
com/sun/corba/se/impl/io/IIOPInputStream.java \ com/sun/corba/se/impl/io/IIOPInputStream.java \
com/sun/corba/se/impl/io/IIOPOutputStream.java \ com/sun/corba/se/impl/io/IIOPOutputStream.java \
com/sun/corba/se/impl/io/TypeMismatchException.java \ com/sun/corba/se/impl/io/TypeMismatchException.java \
com/sun/corba/se/impl/io/InputStreamHook.java \ com/sun/corba/se/impl/io/InputStreamHook.java \

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
# #
# Copyright (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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -383,7 +383,7 @@ endif
REQUIRED_ZIP_VER = 2.2 REQUIRED_ZIP_VER = 2.2
REQUIRED_UNZIP_VER = 5.12 REQUIRED_UNZIP_VER = 5.12
REQUIRED_MAKE_VER = 3.78 REQUIRED_MAKE_VER = 3.81
# Unix type settings (same for all unix platforms) # Unix type settings (same for all unix platforms)
ifneq ($(PLATFORM), windows) 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -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.Message;
import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase; 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.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.BufferManagerWrite;
import com.sun.corba.se.impl.encoding.ByteBufferWithInfo; import com.sun.corba.se.impl.encoding.ByteBufferWithInfo;
import com.sun.corba.se.impl.encoding.CDROutputObject; import com.sun.corba.se.impl.encoding.CDROutputObject;
import com.sun.corba.se.spi.orb.ORB; import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.pept.transport.Connection; import com.sun.corba.se.pept.transport.Connection;
import com.sun.corba.se.pept.encoding.OutputObject; import com.sun.corba.se.pept.encoding.OutputObject;
import org.omg.CORBA.SystemException;
/** /**
* Streaming buffer manager. * Streaming buffer manager.
@ -66,7 +68,13 @@ public class BufferManagerWriteStream extends BufferManagerWrite
// Set the fragment's moreFragments field to true // Set the fragment's moreFragments field to true
MessageBase.setFlag(bbwi.byteBuffer, Message.MORE_FRAGMENTS_BIT); MessageBase.setFlag(bbwi.byteBuffer, Message.MORE_FRAGMENTS_BIT);
sendFragment(false); try {
sendFragment(false);
} catch(SystemException se){
orb.getPIHandler().invokeClientPIEndingPoint(
ReplyMessage.SYSTEM_EXCEPTION, se);
throw se;
}
// Reuse the old buffer // 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -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.ior.iiop.GIOPVersion;
import com.sun.corba.se.spi.orb.ORB; import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.protocol.CorbaMessageMediator; 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.CorbaContactInfo;
import com.sun.corba.se.spi.transport.CorbaContactInfoList; import com.sun.corba.se.spi.transport.CorbaContactInfoList;
import com.sun.corba.se.spi.transport.CorbaContactInfoListIterator; 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 // The current retry request status. True if this request is being
// retried and this info object is to be reused, or false otherwise. // 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 // The number of times this info object has been (re)used. This is
// incremented every time a request is retried, and decremented every // 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. // 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 // Do not reset entryCount because we need to know when to pop this
// from the stack. // from the stack.
@ -824,14 +826,15 @@ public final class ClientRequestInfoImpl
/** /**
* Set or reset the retry request flag. * Set or reset the retry request flag.
*/ */
void setRetryRequest( boolean retryRequest ) { void setRetryRequest( RetryType retryRequest ) {
this.retryRequest = retryRequest; this.retryRequest = retryRequest;
} }
/** /**
* Retrieve the current retry request status. * Retrieve the current retry request status.
*/ */
boolean getRetryRequest() { RetryType getRetryRequest() {
// 6763340
return this.retryRequest; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -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.CorbaMessageMediator;
import com.sun.corba.se.spi.protocol.ForwardException; import com.sun.corba.se.spi.protocol.ForwardException;
import com.sun.corba.se.spi.protocol.PIHandler; 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.spi.logging.CORBALogDomains;
import com.sun.corba.se.impl.logging.InterceptorsSystemException; import com.sun.corba.se.impl.logging.InterceptorsSystemException;
@ -372,9 +373,24 @@ public class PIHandlerImpl implements PIHandler
} }
} }
public Exception invokeClientPIEndingPoint( // Needed when an error forces a retry AFTER initiateClientPIRequest
int replyStatus, Exception exception ) // 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( !hasClientInterceptors ) return exception;
if( !isClientPIEnabledForThisThread() ) return exception; if( !isClientPIEnabledForThisThread() ) return exception;
@ -388,24 +404,31 @@ public class PIHandlerImpl implements PIHandler
ClientRequestInfoImpl info = peekClientRequestInfoImplStack(); ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
info.setReplyStatus( piReplyStatus ); info.setReplyStatus( piReplyStatus );
info.setException( exception ); info.setException( exception );
interceptorInvoker.invokeClientInterceptorEndingPoint( info );
piReplyStatus = info.getReplyStatus(); if (invokeEndingPoint) {
// 6763340
interceptorInvoker.invokeClientInterceptorEndingPoint( info );
piReplyStatus = info.getReplyStatus();
}
// Check reply status: // Check reply status:
if( (piReplyStatus == LOCATION_FORWARD.value) || if( (piReplyStatus == LOCATION_FORWARD.value) ||
(piReplyStatus == TRANSPORT_RETRY.value) ) (piReplyStatus == TRANSPORT_RETRY.value) ) {
{
// If this is a forward or a retry, reset and reuse // If this is a forward or a retry, reset and reuse
// info object: // info object:
info.reset(); 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 // ... and return a RemarshalException so the orb internals know
exception = new RemarshalException(); exception = new RemarshalException();
} } else if( (piReplyStatus == SYSTEM_EXCEPTION.value) ||
else if( (piReplyStatus == SYSTEM_EXCEPTION.value) || (piReplyStatus == USER_EXCEPTION.value) ) {
(piReplyStatus == USER_EXCEPTION.value) )
{
exception = info.getException(); exception = info.getException();
} }
@ -421,18 +444,21 @@ public class PIHandlerImpl implements PIHandler
RequestInfoStack infoStack = RequestInfoStack infoStack =
(RequestInfoStack)threadLocalClientRequestInfoStack.get(); (RequestInfoStack)threadLocalClientRequestInfoStack.get();
ClientRequestInfoImpl info = null; 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 // In RequestImpl.doInvocation we already called
// initiateClientPIRequest( true ), so ignore this initiate. // initiateClientPIRequest( true ), so ignore this initiate.
info.setDIIInitiate( false ); info.setDIIInitiate( false );
} } else {
else {
// If there is no info object or if we are not retrying a request, // If there is no info object or if we are not retrying a request,
// push a new ClientRequestInfoImpl on the stack: // 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 ); info = new ClientRequestInfoImpl( orb );
infoStack.push( info ); infoStack.push( info );
printPush(); printPush();
@ -442,9 +468,15 @@ public class PIHandlerImpl implements PIHandler
// Reset the retry request flag so that recursive calls will // Reset the retry request flag so that recursive calls will
// push a new info object, and bump up entry count so we know // push a new info object, and bump up entry count so we know
// when to pop this info object: // when to pop this info object:
info.setRetryRequest( false ); info.setRetryRequest( RetryType.NONE );
info.incrementEntryCount(); 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 this is a DII request, make sure we ignore the next initiate.
if( diiRequest ) { if( diiRequest ) {
info.setDIIInitiate( true ); info.setDIIInitiate( true );
@ -457,25 +489,34 @@ public class PIHandlerImpl implements PIHandler
if( !isClientPIEnabledForThisThread() ) return; if( !isClientPIEnabledForThisThread() ) return;
ClientRequestInfoImpl info = peekClientRequestInfoImplStack(); ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
RetryType rt = info.getRetryRequest() ;
// If the replyStatus has not yet been set, this is an indication // fix for 6763340
// that the ORB threw an exception before we had a chance to if (!rt.equals( RetryType.BEFORE_RESPONSE )) {
// invoke the client interceptor ending points.
// // If the replyStatus has not yet been set, this is an indication
// _REVISIT_ We cannot handle any exceptions or ForwardRequests // that the ORB threw an exception before we had a chance to
// flagged by the ending points here because there is no way // invoke the client interceptor ending points.
// to gracefully handle this in any of the calling code. //
// This is a rare corner case, so we will ignore this for now. // _REVISIT_ We cannot handle any exceptions or ForwardRequests
short replyStatus = info.getReplyStatus(); // flagged by the ending points here because there is no way
if( replyStatus == info.UNINITIALIZED ) { // to gracefully handle this in any of the calling code.
invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION, // This is a rare corner case, so we will ignore this for now.
wrapper.unknownRequestInvoke( short replyStatus = info.getReplyStatus();
CompletionStatus.COMPLETED_MAYBE ) ) ; 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. // Decrement entry count, and if it is zero, pop it from the stack.
info.decrementEntryCount(); 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 infoStack =
(RequestInfoStack)threadLocalClientRequestInfoStack.get(); (RequestInfoStack)threadLocalClientRequestInfoStack.get();
infoStack.pop(); 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -107,6 +107,11 @@ public class PINoOpHandlerImpl implements PIHandler
return null; return null;
} }
public Exception makeCompletedClientRequest(
int replyStatus, Exception exception ) {
return null;
}
public void initiateClientPIRequest( boolean diiRequest ) { 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -187,7 +187,8 @@ public abstract class RequestInfoImpl
startingPointCall = 0; startingPointCall = 0;
intermediatePointCall = 0; intermediatePointCall = 0;
endingPointCall = 0; endingPointCall = 0;
replyStatus = UNINITIALIZED; // 6763340
setReplyStatus( UNINITIALIZED ) ;
currentExecutionPoint = EXECUTION_POINT_STARTING; currentExecutionPoint = EXECUTION_POINT_STARTING;
alreadyExecuted = false; alreadyExecuted = false;
connection = null; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1012,7 +1012,11 @@ public class IIOPInputStream
* else, * else,
* Handle it as a serializable class. * 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 { try {
currentObject = (currentClass == null) ? currentObject = (currentClass == null) ?
null : currentClassDesc.newInstance(); null : currentClassDesc.newInstance();
@ -2553,8 +2557,8 @@ public class IIOPInputStream
bridge.putObject( o, key, v ) ; bridge.putObject( o, key, v ) ;
} catch (Exception e) { } catch (Exception e) {
throw utilWrapper.errorSetObjectField( e, fieldName, throw utilWrapper.errorSetObjectField( e, fieldName,
ObjectUtility.compactObjectToString( o ), o.toString(),
ObjectUtility.compactObjectToString( v )) ; v.toString() ) ;
} }
} }
@ -2566,7 +2570,7 @@ public class IIOPInputStream
bridge.putBoolean( o, key, v ) ; bridge.putBoolean( o, key, v ) ;
} catch (Exception e) { } catch (Exception e) {
throw utilWrapper.errorSetBooleanField( e, fieldName, throw utilWrapper.errorSetBooleanField( e, fieldName,
ObjectUtility.compactObjectToString( o ), o.toString(),
new Boolean(v) ) ; new Boolean(v) ) ;
} }
} }
@ -2579,7 +2583,7 @@ public class IIOPInputStream
bridge.putByte( o, key, v ) ; bridge.putByte( o, key, v ) ;
} catch (Exception e) { } catch (Exception e) {
throw utilWrapper.errorSetByteField( e, fieldName, throw utilWrapper.errorSetByteField( e, fieldName,
ObjectUtility.compactObjectToString( o ), o.toString(),
new Byte(v) ) ; new Byte(v) ) ;
} }
} }
@ -2592,7 +2596,7 @@ public class IIOPInputStream
bridge.putChar( o, key, v ) ; bridge.putChar( o, key, v ) ;
} catch (Exception e) { } catch (Exception e) {
throw utilWrapper.errorSetCharField( e, fieldName, throw utilWrapper.errorSetCharField( e, fieldName,
ObjectUtility.compactObjectToString( o ), o.toString(),
new Character(v) ) ; new Character(v) ) ;
} }
} }
@ -2605,7 +2609,7 @@ public class IIOPInputStream
bridge.putShort( o, key, v ) ; bridge.putShort( o, key, v ) ;
} catch (Exception e) { } catch (Exception e) {
throw utilWrapper.errorSetShortField( e, fieldName, throw utilWrapper.errorSetShortField( e, fieldName,
ObjectUtility.compactObjectToString( o ), o.toString(),
new Short(v) ) ; new Short(v) ) ;
} }
} }
@ -2618,7 +2622,7 @@ public class IIOPInputStream
bridge.putInt( o, key, v ) ; bridge.putInt( o, key, v ) ;
} catch (Exception e) { } catch (Exception e) {
throw utilWrapper.errorSetIntField( e, fieldName, throw utilWrapper.errorSetIntField( e, fieldName,
ObjectUtility.compactObjectToString( o ), o.toString(),
new Integer(v) ) ; new Integer(v) ) ;
} }
} }
@ -2631,7 +2635,7 @@ public class IIOPInputStream
bridge.putLong( o, key, v ) ; bridge.putLong( o, key, v ) ;
} catch (Exception e) { } catch (Exception e) {
throw utilWrapper.errorSetLongField( e, fieldName, throw utilWrapper.errorSetLongField( e, fieldName,
ObjectUtility.compactObjectToString( o ), o.toString(),
new Long(v) ) ; new Long(v) ) ;
} }
} }
@ -2644,7 +2648,7 @@ public class IIOPInputStream
bridge.putFloat( o, key, v ) ; bridge.putFloat( o, key, v ) ;
} catch (Exception e) { } catch (Exception e) {
throw utilWrapper.errorSetFloatField( e, fieldName, throw utilWrapper.errorSetFloatField( e, fieldName,
ObjectUtility.compactObjectToString( o ), o.toString(),
new Float(v) ) ; new Float(v) ) ;
} }
} }
@ -2657,7 +2661,7 @@ public class IIOPInputStream
bridge.putDouble( o, key, v ) ; bridge.putDouble( o, key, v ) ;
} catch (Exception e) { } catch (Exception e) {
throw utilWrapper.errorSetDoubleField( e, fieldName, throw utilWrapper.errorSetDoubleField( e, fieldName,
ObjectUtility.compactObjectToString( o ), o.toString(),
new Double(v) ) ; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -85,6 +85,9 @@ public class ObjectStreamClass implements java.io.Serializable {
private static Hashtable translatedFields; private static Hashtable translatedFields;
/** true if represents enum type */
private boolean isEnum;
private static final Bridge bridge = private static final Bridge bridge =
(Bridge)AccessController.doPrivileged( (Bridge)AccessController.doPrivileged(
new PrivilegedAction() { new PrivilegedAction() {
@ -359,6 +362,7 @@ public class ObjectStreamClass implements java.io.Serializable {
} }
name = cl.getName(); name = cl.getName();
isEnum = Enum.class.isAssignableFrom(cl);
superclass = superdesc; superclass = superdesc;
serializable = serial; serializable = serial;
if (!forProxyClass) { if (!forProxyClass) {
@ -401,7 +405,8 @@ public class ObjectStreamClass implements java.io.Serializable {
if (!serializable || if (!serializable ||
externalizable || externalizable ||
forProxyClass || forProxyClass ||
name.equals("java.lang.String")) { name.equals("java.lang.String") ||
isEnum) {
fields = NO_FIELDS; fields = NO_FIELDS;
} else if (serializable) { } else if (serializable) {
/* Ask for permission to override field access checks. /* 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. * NonSerializable classes have a serialVerisonUID of 0L.
*/ */
if (isNonSerializable()) { if (isNonSerializable() || isEnum) {
suid = 0L; suid = 0L;
} else { } else {
// Lookup special Serializable members using reflection. // 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,32 +32,22 @@
package com.sun.corba.se.impl.io; package com.sun.corba.se.impl.io;
import javax.rmi.CORBA.Util; import javax.rmi.CORBA.Util;
import javax.rmi.PortableRemoteObject;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Stack;
import java.io.IOException; 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.RepositoryId;
import com.sun.corba.se.impl.util.Utility; import com.sun.corba.se.impl.util.Utility;
import org.omg.CORBA.TCKind; 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 org.omg.CORBA.portable.IndirectionException;
import com.sun.org.omg.SendingContext.CodeBase; import com.sun.org.omg.SendingContext.CodeBase;
import com.sun.org.omg.SendingContext.CodeBaseHelper; import com.sun.org.omg.SendingContext.CodeBaseHelper;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
import com.sun.corba.se.impl.io.IIOPInputStream.ActiveRecursionManager;
import com.sun.corba.se.spi.logging.CORBALogDomains; import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.impl.logging.OMGSystemException; import com.sun.corba.se.impl.logging.OMGSystemException;
@ -809,65 +799,163 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
return "com.sun.corba.se.impl.io.IIOPOutputStream"; return "com.sun.corba.se.impl.io.IIOPOutputStream";
} }
private com.sun.corba.se.impl.io.IIOPOutputStream createOutputStream() { private IIOPOutputStream createOutputStream() {
return (com.sun.corba.se.impl.io.IIOPOutputStream)AccessController.doPrivileged( final String name = getOutputStreamClassName();
new StreamFactory(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() { protected String getInputStreamClassName() {
return "com.sun.corba.se.impl.io.IIOPInputStream"; return "com.sun.corba.se.impl.io.IIOPInputStream";
} }
private com.sun.corba.se.impl.io.IIOPInputStream createInputStream() { private IIOPInputStream createInputStream() {
return (com.sun.corba.se.impl.io.IIOPInputStream)AccessController.doPrivileged( final String name = getInputStreamClassName();
new StreamFactory(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 * Construct a built in implementation with priveleges.
* as part of a PrivilegedAction. * Returning null indicates a non-built is specified.
*
* 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.
*/ */
private static final class StreamFactory implements PrivilegedAction { private IIOPInputStream createInputStreamBuiltIn(
private String className; 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 StreamFactory (String _className) { /**
className = _className; * Returning null indicates a non-built is specified.
} */
private IIOPInputStream createInputStreamBuiltInNoPriv(
final String name
) throws IOException {
return
name.equals(
IIOPInputStream
.class.getName()
) ?
new IIOPInputStream() :
public Object run() { name.equals(
try { com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3
// Note: We must use the system ClassLoader here .class.getName()
// since we want to load classes outside of the ) ?
// core JDK when running J2EE Pure ORB and new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3() :
// talking to Kestrel.
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.
ClassLoader cl = Thread.currentThread().getContextClassLoader(); ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) if (cl == null)
cl = ClassLoader.getSystemClassLoader(); 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 // Since the ClassLoader should cache the class, this isn't
// as expensive as it looks. // as expensive as it looks.
return streamClass.newInstance(); 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -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.Mutex ;
import com.sun.corba.se.impl.orbutil.concurrent.CondVar ; 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. /** AOMEntry represents a Servant or potential Servant in the ActiveObjectMap.
* It may be in several states to allow for long incarnate or etherealize operations. * 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 * 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" ) { private static Guard waitGuard = new GuardBase( "wait" ) {
public Guard.Result evaluate( FSM fsm, Input in ) { public Guard.Result evaluate( FSM fsm, Input in ) {
AOMEntry entry = (AOMEntry)fsm ; AOMEntry entry = (AOMEntry)fsm ;
@ -173,19 +183,23 @@ public class AOMEntry extends FSMImpl {
engine.add( INCARN, START_ETH, waitGuard, null, INCARN ) ; engine.add( INCARN, START_ETH, waitGuard, null, INCARN ) ;
engine.add( INCARN, INC_DONE, null, VALID ) ; engine.add( INCARN, INC_DONE, null, VALID ) ;
engine.add( INCARN, INC_FAIL, decrementAction, INVALID ) ; engine.add( INCARN, INC_FAIL, decrementAction, INVALID ) ;
engine.add( INCARN, ACTIVATE, oaaAction, INCARN ) ;
engine.add( VALID, ENTER, incrementAction, VALID ) ; engine.add( VALID, ENTER, incrementAction, VALID ) ;
engine.add( VALID, EXIT, decrementAction, VALID ) ; engine.add( VALID, EXIT, decrementAction, VALID ) ;
engine.add( VALID, START_ETH, greaterZeroGuard, null, ETHP ) ; engine.add( VALID, START_ETH, greaterZeroGuard, null, ETHP ) ;
engine.add( VALID, START_ETH, zeroGuard, null, ETH ) ; engine.add( VALID, START_ETH, zeroGuard, null, ETH ) ;
engine.add( VALID, ACTIVATE, oaaAction, VALID ) ;
engine.add( ETHP, ENTER, waitGuard, null, ETHP ) ; engine.add( ETHP, ENTER, waitGuard, null, ETHP ) ;
engine.add( ETHP, START_ETH, null, ETHP ) ; engine.add( ETHP, START_ETH, null, ETHP ) ;
engine.add( ETHP, EXIT, greaterOneGuard, decrementAction, ETHP ) ; engine.add( ETHP, EXIT, greaterOneGuard, decrementAction, ETHP ) ;
engine.add( ETHP, EXIT, oneGuard, decrementAction, ETH ) ; engine.add( ETHP, EXIT, oneGuard, decrementAction, ETH ) ;
engine.add( ETHP, ACTIVATE, oaaAction, ETHP ) ;
engine.add( ETH, START_ETH, null, ETH ) ; engine.add( ETH, START_ETH, null, ETH ) ;
engine.add( ETH, ETH_DONE, null, DESTROYED ) ; engine.add( ETH, ETH_DONE, null, DESTROYED ) ;
engine.add( ETH, ACTIVATE, oaaAction, ETH ) ;
engine.add( ETH, ENTER, waitGuard, null, ETH ) ; engine.add( ETH, ENTER, waitGuard, null, ETH ) ;
engine.setDefault( DESTROYED, throwIllegalStateExceptionAction, DESTROYED ) ; engine.setDefault( DESTROYED, throwIllegalStateExceptionAction, DESTROYED ) ;
@ -217,7 +231,17 @@ public class AOMEntry extends FSMImpl {
public void etherealizeComplete() { doIt( ETH_DONE ) ; } public void etherealizeComplete() { doIt( ETH_DONE ) ; }
public void incarnateComplete() { doIt( INC_DONE ) ; } public void incarnateComplete() { doIt( INC_DONE ) ; }
public void incarnateFailure() { doIt( INC_FAIL ) ; } 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 enter() { doIt( ENTER ) ; }
public void exit() { doIt( EXIT ) ; } 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -107,13 +107,9 @@ public abstract class POAPolicyMediatorBase_R extends POAPolicyMediatorBase {
throw new ServantAlreadyActive(); throw new ServantAlreadyActive();
ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ; 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 ) ; AOMEntry entry = activeObjectMap.get( key ) ;
// Check for an ObjectAlreadyActive error
entry.activateObject() ; entry.activateObject() ;
activateServant( key, entry, servant ) ; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -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 // All access to resolver, localResolver, and urlOperation must be protected using
// resolverLock. Do not hold the ORBImpl lock while accessing // resolverLock. Do not hold the ORBImpl lock while accessing
// resolver, or deadlocks may occur. // 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 // Used for resolver_initial_references and list_initial_services
private Resolver resolver ; 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 // Converts strings to object references for resolvers and string_to_object
private Operation urlOperation ; private Operation urlOperation ;
private final Object urlOperationLock = new java.lang.Object() ;
private CorbaServerRequestDispatcher insNamingDelegate ; 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 ; 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( requestDispatcherRegistry = new RequestDispatcherRegistryImpl(
this, ORBConstants.DEFAULT_SCID); this, ORBConstants.DEFAULT_SCID);
@ -832,7 +844,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
if (str == null) if (str == null)
throw wrapper.nullParam() ; throw wrapper.nullParam() ;
synchronized (resolverLock) { synchronized (urlOperationLock) {
org.omg.CORBA.Object obj = (org.omg.CORBA.Object)op.operate( str ) ; org.omg.CORBA.Object obj = (org.omg.CORBA.Object)op.operate( str ) ;
return obj ; return obj ;
} }
@ -1672,6 +1684,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
{ {
StackImpl invocationInfoStack = StackImpl invocationInfoStack =
(StackImpl)clientInvocationInfoStack.get(); (StackImpl)clientInvocationInfoStack.get();
int entryCount = -1;
ClientInvocationInfo clientInvocationInfo = null; ClientInvocationInfo clientInvocationInfo = null;
if (!invocationInfoStack.empty()) { if (!invocationInfoStack.empty()) {
clientInvocationInfo = clientInvocationInfo =
@ -1680,8 +1693,12 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
throw wrapper.invocationInfoStackEmpty() ; throw wrapper.invocationInfoStackEmpty() ;
} }
clientInvocationInfo.decrementEntryCount(); clientInvocationInfo.decrementEntryCount();
entryCount = clientInvocationInfo.getEntryCount();
if (clientInvocationInfo.getEntryCount() == 0) { if (clientInvocationInfo.getEntryCount() == 0) {
invocationInfoStack.pop(); // 6763340: don't pop if this is a retry!
if (!clientInvocationInfo.isRetryInvocation()) {
invocationInfoStack.pop();
}
finishedDispatch(); finishedDispatch();
} }
} }
@ -1773,7 +1790,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/ */
public void setURLOperation( Operation stringToObject ) public void setURLOperation( Operation stringToObject )
{ {
synchronized (resolverLock) { synchronized (urlOperationLock) {
urlOperation = stringToObject ; urlOperation = stringToObject ;
} }
} }
@ -1783,7 +1800,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/ */
public Operation getURLOperation() public Operation getURLOperation()
{ {
synchronized (resolverLock) { synchronized (urlOperationLock) {
return urlOperation ; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -110,7 +110,7 @@ public class PrefixParserAction extends ParserActionBase {
throw wrapper.couldNotSetArray( thr, throw wrapper.couldNotSetArray( thr,
getPropertyName(), new Integer(ctr), getPropertyName(), new Integer(ctr),
componentType, new Integer(size), componentType, new Integer(size),
ObjectUtility.compactObjectToString( obj )) ; obj.toString() ) ;
} }
ctr++ ; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,103 +50,8 @@ import java.math.BigInteger ;
import java.math.BigDecimal ; import java.math.BigDecimal ;
public final class ObjectUtility { public final class ObjectUtility {
private boolean useToString ; private ObjectUtility() {}
private boolean isIndenting ;
private int initialLevel ;
private int increment ;
private ClassMap classToPrinter = new ClassMap() ;
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, /** If arr1 and arr2 are both arrays of the same component type,
* return an array of that component type that consists of the * return an array of that component type that consists of the
@ -179,544 +84,4 @@ public final class ObjectUtility {
return result ; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -122,9 +122,6 @@ public class CorbaClientRequestDispatcherImpl
implements implements
ClientRequestDispatcher ClientRequestDispatcher
{ {
// Used for locking
private Object lock = new Object();
public OutputObject beginRequest(Object self, String opName, public OutputObject beginRequest(Object self, String opName,
boolean isOneWay, ContactInfo contactInfo) boolean isOneWay, ContactInfo contactInfo)
{ {
@ -151,7 +148,8 @@ public class CorbaClientRequestDispatcherImpl
// This locking is done so that multiple connections are not created // This locking is done so that multiple connections are not created
// for the same endpoint // for the same endpoint
synchronized (lock) { //6929137 - Synchronized on contactInfo to avoid blocking across multiple endpoints
synchronized (contactInfo) {
if (contactInfo.isConnectionBased()) { if (contactInfo.isConnectionBased()) {
if (contactInfo.shouldCacheConnection()) { if (contactInfo.shouldCacheConnection()) {
connection = (CorbaConnection) connection = (CorbaConnection)
@ -185,6 +183,7 @@ public class CorbaClientRequestDispatcherImpl
if(getContactInfoListIterator(orb).hasNext()) { if(getContactInfoListIterator(orb).hasNext()) {
contactInfo = (ContactInfo) contactInfo = (ContactInfo)
getContactInfoListIterator(orb).next(); getContactInfoListIterator(orb).next();
unregisterWaiter(orb);
return beginRequest(self, opName, return beginRequest(self, opName,
isOneWay, contactInfo); isOneWay, contactInfo);
} else { } else {
@ -255,7 +254,7 @@ public class CorbaClientRequestDispatcherImpl
registerWaiter(messageMediator); registerWaiter(messageMediator);
// Do connection reclaim now // Do connection reclaim now
synchronized (lock) { synchronized (contactInfo) {
if (contactInfo.isConnectionBased()) { if (contactInfo.isConnectionBased()) {
if (contactInfo.shouldCacheConnection()) { if (contactInfo.shouldCacheConnection()) {
OutboundConnectionCache connectionCache = OutboundConnectionCache connectionCache =
@ -292,10 +291,22 @@ public class CorbaClientRequestDispatcherImpl
// ContactInfoList outside of subcontract. // ContactInfoList outside of subcontract.
// Want to move that update to here. // Want to move that update to here.
if (getContactInfoListIterator(orb).hasNext()) { if (getContactInfoListIterator(orb).hasNext()) {
contactInfo = (ContactInfo) contactInfo = (ContactInfo)getContactInfoListIterator(orb).next();
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); return beginRequest(self, opName, isOneWay, contactInfo);
} else { } else {
if (orb.subcontractDebugFlag) {
dprint( "RemarshalException: hasNext false" );
}
ORBUtilSystemException wrapper = ORBUtilSystemException wrapper =
ORBUtilSystemException.get(orb, ORBUtilSystemException.get(orb,
CORBALogDomains.RPC_PROTOCOL); CORBALogDomains.RPC_PROTOCOL);
@ -374,11 +385,15 @@ public class CorbaClientRequestDispatcherImpl
boolean retry = boolean retry =
getContactInfoListIterator(orb) getContactInfoListIterator(orb)
.reportException(messageMediator.getContactInfo(), e); .reportException(messageMediator.getContactInfo(), e);
if (retry) {
// Must run interceptor end point before retrying. //Bug 6382377: must not lose exception in PI
Exception newException =
// Must run interceptor end point before retrying.
Exception newException =
orb.getPIHandler().invokeClientPIEndingPoint( orb.getPIHandler().invokeClientPIEndingPoint(
ReplyMessage.SYSTEM_EXCEPTION, e); ReplyMessage.SYSTEM_EXCEPTION, e);
if (retry) {
if (newException == e) { if (newException == e) {
continueOrThrowSystemOrRemarshal(messageMediator, continueOrThrowSystemOrRemarshal(messageMediator,
new RemarshalException()); new RemarshalException());
@ -387,6 +402,14 @@ public class CorbaClientRequestDispatcherImpl
newException); newException);
} }
} else { } else {
if (newException instanceof RuntimeException){
throw (RuntimeException)newException;
}
else if (newException instanceof RemarshalException)
{
throw (RemarshalException)newException;
}
// NOTE: Interceptor ending point will run in releaseReply. // NOTE: Interceptor ending point will run in releaseReply.
throw e; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -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.logging.CORBALogDomains;
import com.sun.corba.se.spi.orb.ORB; 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.spi.transport.CorbaConnectionCache;
import com.sun.corba.se.impl.logging.ORBUtilSystemException; 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() public long numberOfIdleConnections()
{ {
long count = 0; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,6 +38,7 @@ import org.omg.CORBA.INTERNAL;
import org.omg.CORBA.CompletionStatus; import org.omg.CORBA.CompletionStatus;
import com.sun.corba.se.pept.transport.Acceptor; 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.ByteBufferPool;
import com.sun.corba.se.pept.transport.ContactInfo; import com.sun.corba.se.pept.transport.ContactInfo;
import com.sun.corba.se.pept.transport.InboundConnectionCache; 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.orb.ORB;
import com.sun.corba.se.spi.transport.CorbaAcceptor; import com.sun.corba.se.spi.transport.CorbaAcceptor;
import com.sun.corba.se.spi.transport.CorbaTransportManager; 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: // REVISIT - impl/poa specific:
import com.sun.corba.se.impl.oa.poa.Policies; import com.sun.corba.se.impl.oa.poa.Policies;
@ -182,6 +185,12 @@ public class CorbaTransportManagerImpl
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".close->"); dprint(".close->");
} }
for (Object cc : outboundConnectionCaches.values()) {
((ConnectionCache)cc).close() ;
}
for (Object cc : inboundConnectionCaches.values()) {
((ConnectionCache)cc).close() ;
}
getSelector(0).close(); getSelector(0).close();
} finally { } finally {
if (orb.transportDebugFlag) { 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,6 +32,7 @@ import java.nio.channels.SelectionKey;
import java.nio.channels.Selector; import java.nio.channels.Selector;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -66,7 +67,7 @@ public class SelectorImpl
private List deferredRegistrations; private List deferredRegistrations;
private List interestOpsList; private List interestOpsList;
private HashMap listenerThreads; private HashMap listenerThreads;
private HashMap readerThreads; private Map readerThreads;
private boolean selectorStarted; private boolean selectorStarted;
private boolean closed; private boolean closed;
private ORBUtilSystemException wrapper ; private ORBUtilSystemException wrapper ;
@ -81,7 +82,7 @@ public class SelectorImpl
deferredRegistrations = new ArrayList(); deferredRegistrations = new ArrayList();
interestOpsList = new ArrayList(); interestOpsList = new ArrayList();
listenerThreads = new HashMap(); listenerThreads = new HashMap();
readerThreads = new HashMap(); readerThreads = java.util.Collections.synchronizedMap(new HashMap());
closed = false; closed = false;
wrapper = ORBUtilSystemException.get(orb,CORBALogDomains.RPC_TRANSPORT); wrapper = ORBUtilSystemException.get(orb,CORBALogDomains.RPC_TRANSPORT);
} }
@ -178,8 +179,13 @@ public class SelectorImpl
} }
if (eventHandler.shouldUseSelectThreadToWait()) { if (eventHandler.shouldUseSelectThreadToWait()) {
SelectionKey selectionKey = eventHandler.getSelectionKey(); SelectionKey selectionKey ;
selectionKey.cancel(); synchronized(deferredRegistrations) {
selectionKey = eventHandler.getSelectionKey();
}
if (selectionKey != null) {
selectionKey.cancel();
}
selector.wakeup(); selector.wakeup();
return; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -33,14 +33,7 @@ import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey; import java.nio.channels.SelectionKey;
import java.nio.channels.ServerSocketChannel; import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel; import java.nio.channels.SocketChannel;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Collection;
import java.util.Iterator; 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.broker.Broker;
import com.sun.corba.se.pept.encoding.InputObject; 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.IIOPProfileTemplate ;
import com.sun.corba.se.spi.ior.iiop.GIOPVersion ; import com.sun.corba.se.spi.ior.iiop.GIOPVersion ;
import com.sun.corba.se.spi.ior.iiop.AlternateIIOPAddressComponent; 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.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.orb.ORB;
import com.sun.corba.se.spi.orbutil.threadpool.Work; import com.sun.corba.se.spi.orbutil.threadpool.Work;
import com.sun.corba.se.spi.protocol.CorbaMessageMediator; import com.sun.corba.se.spi.protocol.CorbaMessageMediator;
import com.sun.corba.se.spi.transport.CorbaAcceptor; import com.sun.corba.se.spi.transport.CorbaAcceptor;
import com.sun.corba.se.spi.transport.CorbaConnection; 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.SocketInfo;
import com.sun.corba.se.spi.transport.SocketOrChannelAcceptor; 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.oa.poa.Policies; // REVISIT impl/poa specific
import com.sun.corba.se.impl.orbutil.ORBConstants; import com.sun.corba.se.impl.orbutil.ORBConstants;
import com.sun.corba.se.impl.orbutil.ORBUtility; import com.sun.corba.se.impl.orbutil.ORBUtility;
import com.sun.corba.se.impl.ior.iiop.JavaSerializationComponent;
// BEGIN Legacy support. // BEGIN Legacy support.
import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo; import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo;
@ -442,12 +428,7 @@ public class SocketOrChannelAcceptorImpl
dprint(".doWork->: " + this); dprint(".doWork->: " + this);
} }
if (selectionKey.isAcceptable()) { if (selectionKey.isAcceptable()) {
AccessController.doPrivileged(new PrivilegedAction() {
public java.lang.Object run() {
accept(); accept();
return null;
}
});
} else { } else {
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".doWork: ! selectionKey.isAcceptable: " + this); 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -811,6 +811,7 @@ public class SocketOrChannelConnectionImpl
dprint(".close: " + this, e); dprint(".close: " + this, e);
} }
} }
closeConnectionResources();
} finally { } finally {
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".close<-: " + this); 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() public Acceptor getAcceptor()
{ {
return acceptor; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,6 +41,12 @@ public interface ConnectionCache
public long numberOfBusyConnections(); public long numberOfBusyConnections();
public boolean reclaim(); 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. // 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
package com.sun.corba.se.spi.orb ; package com.sun.corba.se.spi.orb ;
import java.util.StringTokenizer ; import java.util.StringTokenizer ;
import java.util.Arrays ;
import java.lang.reflect.Array ; import java.lang.reflect.Array ;
@ -446,7 +447,7 @@ public abstract class OperationFactory {
public String toString() { public String toString() {
return "sequenceAction(separator=\"" + sep + return "sequenceAction(separator=\"" + sep +
"\",actions=" + "\",actions=" +
ObjectUtility.compactObjectToString(actions) + ")" ; Arrays.toString(actions) + ")" ;
} }
} }
@ -533,7 +534,7 @@ public abstract class OperationFactory {
public String toString() { public String toString() {
return "mapSequenceAction(" + 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -125,7 +125,7 @@ public abstract class ParserImplBase {
// Since exc wraps the actual exception, use exc.getCause() // Since exc wraps the actual exception, use exc.getCause()
// instead of exc. // instead of exc.
throw wrapper.errorSettingField( exc.getCause(), name, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -141,6 +141,27 @@ public interface PIHandler {
Exception invokeClientPIEndingPoint( Exception invokeClientPIEndingPoint(
int replyStatus, Exception exception ) ; 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 * 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 * 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -23,15 +23,30 @@
* questions. * questions.
*/ */
#ifndef _JAVASOFT_SOLARIS_HPI_INIT_H_ package com.sun.corba.se.spi.protocol ;
#define _JAVASOFT_SOLARIS_HPI_INIT_H_
#ifndef NATIVE // Introduce more information about WHY we are re-trying a request
extern void InitializeSbrk(void); // so we can properly handle the two cases:
extern void InitializeAsyncIO(void); // - BEFORE_RESPONSE means that the retry is caused by
extern void InitializeHelperThreads(void); // something that happened BEFORE the message was sent: either
#endif /* NATIVE */ // 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -163,6 +163,10 @@ public interface CorbaConnection
// REVISIT - MessageMediator parameter? // REVISIT - MessageMediator parameter?
public void serverRequestProcessingBegins(); public void serverRequestProcessingBegins();
public void serverRequestProcessingEnds(); public void serverRequestProcessingEnds();
/** Clean up all connection resources. Used when shutting down an ORB.
*/
public void closeConnectionResources();
} }
// End of file. // 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -344,17 +344,27 @@ public class Stub implements AuxGen
stream.println (" String str = s.readUTF ();"); stream.println (" String str = s.readUTF ();");
stream.println (" String[] args = null;"); stream.println (" String[] args = null;");
stream.println (" java.util.Properties props = 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 (" org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();");
stream.println (" _set_delegate (delegate);"); stream.println (" _set_delegate (delegate);");
stream.println (" } finally {");
stream.println (" orb.destroy() ;");
stream.println (" }");
stream.println (" }"); stream.println (" }");
stream.println (); stream.println ();
stream.println (" private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException"); stream.println (" private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException");
stream.println (" {"); stream.println (" {");
stream.println (" String[] args = null;"); stream.println (" String[] args = null;");
stream.println (" java.util.Properties props = 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 (" s.writeUTF (str);");
stream.println (" } finally {");
stream.println (" orb.destroy() ;");
stream.println (" }");
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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +25,9 @@
# questions. # questions.
# #
SUNWprivate_1.1 { # Get clones of all nested repositories
global: sh ./make/scripts/hgforest.sh clone
DLL_Initialize;
# 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 07b042e13dde4f3479ba9ec55120fcd5e8623323 jdk7-b111
5511edd5d719f3fc9fdd04879482026a3d2c8652 jdk7-b112 5511edd5d719f3fc9fdd04879482026a3d2c8652 jdk7-b112
beef35b96b81129c375d572357fb9548d9020db1 jdk7-b113 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

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

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -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) #define ptrace_getregs(request, pid, addr, data) ptrace(request, pid, data, addr)
#endif #endif
#ifdef _LP64 #if defined(_LP64) && defined(PTRACE_GETREGS64)
#ifdef PTRACE_GETREGS64
#define PTRACE_GETREGS_REQ PTRACE_GETREGS64 #define PTRACE_GETREGS_REQ PTRACE_GETREGS64
#endif #elif defined(PTRACE_GETREGS)
#else
#if defined(PTRACE_GETREGS) || defined(PT_GETREGS)
#define PTRACE_GETREGS_REQ PTRACE_GETREGS #define PTRACE_GETREGS_REQ PTRACE_GETREGS
#elif defined(PT_GETREGS)
#define PTRACE_GETREGS_REQ PT_GETREGS
#endif #endif
#endif /* _LP64 */
#ifdef PTRACE_GETREGS_REQ #ifdef PTRACE_GETREGS_REQ
if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, user, NULL) < 0) { 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

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

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -99,15 +99,8 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
long typeEntrySizeOffset; long typeEntrySizeOffset;
long typeEntryArrayStride; long typeEntryArrayStride;
typeEntryTypeNameOffset = getLongValueFromProcess("gHotSpotVMTypeEntryTypeNameOffset"); // Fetch the address of the VMTypeEntry*. We get this symbol first
typeEntrySuperclassNameOffset = getLongValueFromProcess("gHotSpotVMTypeEntrySuperclassNameOffset"); // and try to use it to make sure that symbol lookup is working.
typeEntryIsOopTypeOffset = getLongValueFromProcess("gHotSpotVMTypeEntryIsOopTypeOffset");
typeEntryIsIntegerTypeOffset = getLongValueFromProcess("gHotSpotVMTypeEntryIsIntegerTypeOffset");
typeEntryIsUnsignedOffset = getLongValueFromProcess("gHotSpotVMTypeEntryIsUnsignedOffset");
typeEntrySizeOffset = getLongValueFromProcess("gHotSpotVMTypeEntrySizeOffset");
typeEntryArrayStride = getLongValueFromProcess("gHotSpotVMTypeEntryArrayStride");
// Fetch the address of the VMTypeEntry*
Address entryAddr = lookupInProcess("gHotSpotVMTypes"); Address entryAddr = lookupInProcess("gHotSpotVMTypes");
// System.err.println("gHotSpotVMTypes address = " + entryAddr); // System.err.println("gHotSpotVMTypes address = " + entryAddr);
// Dereference this once to get the pointer to the first VMTypeEntry // 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"); 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 // Start iterating down it until we find an entry with no name
Address typeNameAddr = null; Address typeNameAddr = null;
do { 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -122,10 +122,14 @@ public class COFFFileParser {
private MemoizedObject[] sectionHeaders; private MemoizedObject[] sectionHeaders;
private MemoizedObject[] symbols; 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() { private MemoizedObject stringTable = new MemoizedObject() {
public Object computeValue() { public Object computeValue() {
// the String Table follows the Symbol Table
int ptr = getPointerToSymbolTable(); int ptr = getPointerToSymbolTable();
if (ptr == 0) { if (ptr == 0) {
// no Symbol Table so no String Table
return new StringTable(0); return new StringTable(0);
} else { } else {
return new StringTable(ptr + SYMBOL_SIZE * getNumberOfSymbols()); return new StringTable(ptr + SYMBOL_SIZE * getNumberOfSymbols());
@ -140,6 +144,8 @@ public class COFFFileParser {
timeDateStamp = readInt(); timeDateStamp = readInt();
pointerToSymbolTable = readInt(); pointerToSymbolTable = readInt();
numberOfSymbols = readInt(); numberOfSymbols = readInt();
// String Table can be accessed at this point because
// pointerToSymbolTable and numberOfSymbols fields are set.
sizeOfOptionalHeader = readShort(); sizeOfOptionalHeader = readShort();
characteristics = readShort(); characteristics = readShort();
@ -222,6 +228,8 @@ public class COFFFileParser {
private MemoizedObject windowsSpecificFields; private MemoizedObject windowsSpecificFields;
private MemoizedObject dataDirectories; 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 STANDARD_FIELDS_OFFSET = 2;
private static final int PE32_WINDOWS_SPECIFIC_FIELDS_OFFSET = 28; private static final int PE32_WINDOWS_SPECIFIC_FIELDS_OFFSET = 28;
private static final int PE32_DATA_DIRECTORIES_OFFSET = 96; private static final int PE32_DATA_DIRECTORIES_OFFSET = 96;
@ -288,7 +296,7 @@ public class COFFFileParser {
private int sizeOfUninitializedData; private int sizeOfUninitializedData;
private int addressOfEntryPoint; private int addressOfEntryPoint;
private int baseOfCode; private int baseOfCode;
private int baseOfData; private int baseOfData; // only set in PE32
OptionalHeaderStandardFieldsImpl(int offset, OptionalHeaderStandardFieldsImpl(int offset,
boolean isPE32Plus) { boolean isPE32Plus) {
@ -301,7 +309,8 @@ public class COFFFileParser {
sizeOfUninitializedData = readInt(); sizeOfUninitializedData = readInt();
addressOfEntryPoint = readInt(); addressOfEntryPoint = readInt();
baseOfCode = readInt(); baseOfCode = readInt();
if (isPE32Plus) { if (!isPE32Plus) {
// only available in PE32
baseOfData = readInt(); baseOfData = readInt();
} }
} }
@ -433,7 +442,10 @@ public class COFFFileParser {
if (dir.getRVA() == 0 || dir.getSize() == 0) { if (dir.getRVA() == 0 || dir.getSize() == 0) {
return null; 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 { class ExportDirectoryTableImpl implements ExportDirectoryTable {
private int exportDataDirRVA;
private int offset; private int offset;
private int size; private int size;
@ -548,8 +561,9 @@ public class COFFFileParser {
private MemoizedObject exportOrdinalTable; private MemoizedObject exportOrdinalTable;
private MemoizedObject exportAddressTable; private MemoizedObject exportAddressTable;
ExportDirectoryTableImpl(int offset, int size) { ExportDirectoryTableImpl(int exportDataDirRVA, int size) {
this.offset = offset; this.exportDataDirRVA = exportDataDirRVA;
offset = rvaToFileOffset(exportDataDirRVA);
this.size = size; this.size = size;
seek(offset); seek(offset);
exportFlags = readInt(); exportFlags = readInt();
@ -595,6 +609,7 @@ public class COFFFileParser {
exportOrdinalTable = new MemoizedObject() { exportOrdinalTable = new MemoizedObject() {
public Object computeValue() { public Object computeValue() {
// number of ordinals is same as the number of name pointers
short[] ordinals = new short[getNumberOfNamePointers()]; short[] ordinals = new short[getNumberOfNamePointers()];
seek(rvaToFileOffset(getOrdinalTableRVA())); seek(rvaToFileOffset(getOrdinalTableRVA()));
for (int i = 0; i < ordinals.length; i++) { for (int i = 0; i < ordinals.length; i++) {
@ -608,14 +623,18 @@ public class COFFFileParser {
public Object computeValue() { public Object computeValue() {
int[] addresses = new int[getNumberOfAddressTableEntries()]; int[] addresses = new int[getNumberOfAddressTableEntries()];
seek(rvaToFileOffset(getExportAddressTableRVA())); seek(rvaToFileOffset(getExportAddressTableRVA()));
// Must make two passes to avoid rvaToFileOffset // The Export Address Table values are a union of two
// destroying seek() position // 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++) { for (int i = 0; i < addresses.length; i++) {
addresses[i] = readInt(); addresses[i] = readInt();
} }
for (int i = 0; i < addresses.length; i++) {
addresses[i] = rvaToFileOffset(addresses[i]);
}
return addresses; return addresses;
} }
}; };
@ -648,11 +667,12 @@ public class COFFFileParser {
public boolean isExportAddressForwarder(short ordinal) { public boolean isExportAddressForwarder(short ordinal) {
int addr = getExportAddress(ordinal); int addr = getExportAddress(ordinal);
return ((offset <= addr) && (addr < (offset + size))); return ((exportDataDirRVA <= addr) &&
(addr < (exportDataDirRVA + size)));
} }
public String getExportAddressForwarder(short ordinal) { public String getExportAddressForwarder(short ordinal) {
seek(getExportAddress(ordinal)); seek(rvaToFileOffset(getExportAddress(ordinal)));
return readCString(); return readCString();
} }
@ -3371,10 +3391,17 @@ public class COFFFileParser {
throw new COFFException(e); throw new COFFException(e);
} }
// Look up in string table // Look up in string table
// FIXME: this index value is assumed to be in the valid range
name = getStringTable().get(index); name = getStringTable().get(index);
} else { } else {
try { 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) { } catch (UnsupportedEncodingException e) {
throw new COFFException(e); throw new COFFException(e);
} }
@ -3487,6 +3514,7 @@ public class COFFFileParser {
tmpName[5] << 16 | tmpName[5] << 16 |
tmpName[6] << 8 | tmpName[6] << 8 |
tmpName[7]); tmpName[7]);
// FIXME: stringOffset is assumed to be in the valid range
name = getStringTable().getAtOffset(stringOffset); name = getStringTable().getAtOffset(stringOffset);
} }
@ -3698,12 +3726,13 @@ public class COFFFileParser {
StringTable(int offset) { StringTable(int offset) {
if (offset == 0) { if (offset == 0) {
// no String Table
strings = new COFFString[0]; strings = new COFFString[0];
return; return;
} }
seek(offset); seek(offset);
int length = readInt(); int length = readInt(); // length includes itself
byte[] data = new byte[length - 4]; byte[] data = new byte[length - 4];
int numBytesRead = readBytes(data); int numBytesRead = readBytes(data);
if (numBytesRead != data.length) { 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,35 +37,48 @@ public class DumpExports {
String filename = args[0]; String filename = args[0];
COFFFile file = COFFFileParser.getParser().parse(filename); COFFFile file = COFFFileParser.getParser().parse(filename);
ExportDirectoryTable exports =
file.getHeader(). // get common point for both things we want to dump
getOptionalHeader(). OptionalHeaderDataDirectories dataDirs = file.getHeader().getOptionalHeader().
getDataDirectories(). getDataDirectories();
getExportDirectoryTable();
// 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) { if (exports == null) {
System.out.println("No exports found."); System.out.println("No exports found.");
} else { } 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("DLL name: " + exports.getDLLName());
System.out.println("Time/date stamp 0x" + Integer.toHexString(exports.getTimeDateStamp())); 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("Major version 0x" + Integer.toHexString(exports.getMajorVersion() & 0xFFFF));
System.out.println("Minor version 0x" + Integer.toHexString(exports.getMinorVersion() & 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++) { for (int i = 0; i < exports.getNumberOfNamePointers(); i++) {
System.out.println(" 0x" + short ordinal = exports.getExportOrdinal(i);
Integer.toHexString(exports.getExportAddress(exports.getExportOrdinal(i))) + System.out.print("[" + i + "] '" + exports.getExportName(i) + "': [" +
" " + ordinal + "] = 0x" + Integer.toHexString(exports.getExportAddress(ordinal)));
(exports.isExportAddressForwarder(exports.getExportOrdinal(i)) ? System.out.println(exports.isExportAddressForwarder(ordinal)
("Forwarded to " + exports.getExportAddressForwarder(exports.getExportOrdinal(i))) : ? " Forwarded to '" + exports.getExportAddressForwarder(ordinal) + "'"
exports.getExportName(i))); : "");
} }
} }
} }

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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,8 +42,8 @@ public class TestParser {
COFFHeader header = file.getHeader(); COFFHeader header = file.getHeader();
int numSections = header.getNumberOfSections(); int numSections = header.getNumberOfSections();
System.out.println(numSections + " sections detected."); System.out.println(numSections + " sections detected.");
for (int i = 0; i < numSections; i++) { for (int i = 1; i <= numSections; i++) {
SectionHeader secHeader = header.getSectionHeader(1 + i); SectionHeader secHeader = header.getSectionHeader(i);
System.out.println(secHeader.getName()); 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -506,7 +506,6 @@ public class WindbgDebuggerLocal extends DebuggerBase implements WindbgDebugger
throw new DebuggerException("Unimplemented"); throw new DebuggerException("Unimplemented");
} }
private static String DTFWHome;
private static String imagePath; private static String imagePath;
private static String symbolPath; private static String symbolPath;
private static boolean useNativeLookup; private static boolean useNativeLookup;
@ -514,81 +513,143 @@ public class WindbgDebuggerLocal extends DebuggerBase implements WindbgDebugger
static { static {
/* /*
* sawindbg.dll depends on dbgeng.dll which * sawindbg.dll depends on dbgeng.dll which itself depends on
* itself depends on dbghelp.dll. dbgeng.dll and dbghelp.dll. * dbghelp.dll. We have to make sure that the dbgeng.dll and
* On systems newer than Windows 2000, these two .dlls are * dbghelp.dll that we load are compatible with each other. We
* in the standard system directory so we will find them there. * load both of those libraries from the same directory based
* On Windows 2000 and earlier, these files do not exist. * on the theory that co-located libraries are compatible.
* The user must download Debugging Tools For Windows (DTFW)
* and install it in order to use SA.
* *
* We have to make sure we use the two files from the same directory * On Windows 2000 and earlier, dbgeng.dll and dbghelp.dll were
* in case there are more than one copy on the system because * not included as part of the standard system directory. On
* one version of dbgeng.dll might not be compatible with a * systems newer than Windows 2000, dbgeng.dll and dbghelp.dll
* different version of dbghelp.dll. * are included in the standard system directory. However, the
* We first look for them in the directory pointed at by * versions included in the standard system directory may not
* env. var. DEBUGGINGTOOLSFORWINDOWS, next in the default * be able to handle symbol information for the newer compilers.
* installation dir for DTFW, and lastly in the standard *
* system directory. We expect that that we will find * We search for and explicitly load the libraries using the
* them in the standard system directory on all systems * following directory search order:
* newer than Windows 2000. *
* - 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) { String dbgengPath = null;
// See if we have the files in the default location. String dbghelpPath = null;
String sysRoot = System.getenv("SYSTEMROOT"); String sawindbgPath = null;
DTFWHome = sysRoot + File.separator + List searchList = new ArrayList();
".." + File.separator + "Program Files" +
File.separator + "Debugging Tools For Windows"; boolean loadLibraryDEBUG =
} System.getProperty("sun.jvm.hotspot.loadLibrary.DEBUG") != null;
{ {
String dbghelp = DTFWHome + File.separator + "dbghelp.dll"; // First place to search is co-located with sawindbg.dll in
String dbgeng = DTFWHome + File.separator + "dbgeng.dll"; // $JAVA_HOME/jre/bin (java.home property is set to $JAVA_HOME/jre):
File fhelp = new File(dbghelp); searchList.add(System.getProperty("java.home") + File.separator + "bin");
File feng = new File(dbgeng); sawindbgPath = (String) searchList.get(0) + File.separator +
if (fhelp.exists() && feng.exists()) { "sawindbg.dll";
// found both, we are happy.
// 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"); // second place to search is specified by an environment variable:
if (!feng.exists()) { String DTFWHome = System.getenv("DEBUGGINGTOOLSFORWINDOWS");
throw new UnsatisfiedLinkError("File dbgeng.dll does not exist in " + if (DTFWHome != null) {
sysDir + ". Please search microsoft.com " + searchList.add(DTFWHome);
"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.");
} }
// 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!
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 // 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? // where do I find '.exe', '.dll' files?
imagePath = System.getProperty("sun.jvm.hotspot.debugger.windbg.imagePath"); imagePath = System.getProperty("sun.jvm.hotspot.debugger.windbg.imagePath");
if (imagePath == null) { 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

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

View File

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

View File

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

View File

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

View File

@ -53,11 +53,16 @@ public class ConstantPool extends Oop implements ClassConstants {
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("constantPoolOopDesc"); Type type = db.lookupType("constantPoolOopDesc");
tags = new OopField(type.getOopField("_tags"), 0); tags = new OopField(type.getOopField("_tags"), 0);
operands = new OopField(type.getOopField("_operands"), 0);
cache = new OopField(type.getOopField("_cache"), 0); cache = new OopField(type.getOopField("_cache"), 0);
poolHolder = new OopField(type.getOopField("_pool_holder"), 0); poolHolder = new OopField(type.getOopField("_pool_holder"), 0);
length = new CIntField(type.getCIntegerField("_length"), 0); length = new CIntField(type.getCIntegerField("_length"), 0);
headerSize = type.getSize(); headerSize = type.getSize();
elementSize = 0; 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) { ConstantPool(OopHandle handle, ObjectHeap heap) {
@ -67,6 +72,7 @@ public class ConstantPool extends Oop implements ClassConstants {
public boolean isConstantPool() { return true; } public boolean isConstantPool() { return true; }
private static OopField tags; private static OopField tags;
private static OopField operands;
private static OopField cache; private static OopField cache;
private static OopField poolHolder; private static OopField poolHolder;
private static CIntField length; // number of elements in oop 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 headerSize;
private static long elementSize; 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 getTags() { return (TypeArray) tags.getValue(this); }
public TypeArray getOperands() { return (TypeArray) operands.getValue(this); }
public ConstantPoolCache getCache() { return (ConstantPoolCache) cache.getValue(this); } public ConstantPoolCache getCache() { return (ConstantPoolCache) cache.getValue(this); }
public Klass getPoolHolder() { return (Klass) poolHolder.getValue(this); } public Klass getPoolHolder() { return (Klass) poolHolder.getValue(this); }
public int getLength() { return (int)length.getValue(this); } public int getLength() { return (int)length.getValue(this); }
@ -278,6 +289,28 @@ public class ConstantPool extends Oop implements ClassConstants {
return res; 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[] { 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_MethodHandle: return "JVM_CONSTANT_MethodHandle";
case JVM_CONSTANT_MethodType: return "JVM_CONSTANT_MethodType"; case JVM_CONSTANT_MethodType: return "JVM_CONSTANT_MethodType";
case JVM_CONSTANT_InvokeDynamic: return "JVM_CONSTANT_InvokeDynamic"; 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_Invalid: return "JVM_CONSTANT_Invalid";
case JVM_CONSTANT_UnresolvedClass: return "JVM_CONSTANT_UnresolvedClass"; case JVM_CONSTANT_UnresolvedClass: return "JVM_CONSTANT_UnresolvedClass";
case JVM_CONSTANT_UnresolvedClassInError: return "JVM_CONSTANT_UnresolvedClassInError"; 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_MethodHandle:
case JVM_CONSTANT_MethodType: case JVM_CONSTANT_MethodType:
case JVM_CONSTANT_InvokeDynamic: case JVM_CONSTANT_InvokeDynamic:
case JVM_CONSTANT_InvokeDynamicTrans:
visitor.doInt(new IntField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true); visitor.doInt(new IntField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
break; break;
} }
@ -520,17 +555,19 @@ public class ConstantPool extends Oop implements ClassConstants {
break; break;
} }
case JVM_CONSTANT_InvokeDynamicTrans:
case JVM_CONSTANT_InvokeDynamic: { case JVM_CONSTANT_InvokeDynamic: {
dos.writeByte(cpConstType); dos.writeByte(cpConstType);
int value = getIntAt(ci); int value = getIntAt(ci);
short bootstrapMethodIndex = (short) extractLowShortFromInt(value); short bsmIndex = (short) extractLowShortFromInt(value);
short nameAndTypeIndex = (short) extractHighShortFromInt(value); short nameAndTypeIndex = (short) extractHighShortFromInt(value);
dos.writeShort(bootstrapMethodIndex); dos.writeShort(bsmIndex);
dos.writeShort(nameAndTypeIndex); dos.writeShort(nameAndTypeIndex);
if (DEBUG) debugMessage("CP[" + ci + "] = indy BSM = " + bootstrapMethodIndex if (DEBUG) debugMessage("CP[" + ci + "] = indy BSM = " + bsmIndex
+ ", N&T = " + nameAndTypeIndex); + ", N&T = " + nameAndTypeIndex);
break; break;
} }
default: default:
throw new InternalError("unknown tag: " + cpConstType); throw new InternalError("unknown tag: " + cpConstType);
} // switch } // 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

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

View File

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

View File

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

View File

@ -42,7 +42,8 @@ public interface ClassConstants
public static final int JVM_CONSTANT_NameAndType = 12; public static final int JVM_CONSTANT_NameAndType = 12;
public static final int JVM_CONSTANT_MethodHandle = 15; public static final int JVM_CONSTANT_MethodHandle = 15;
public static final int JVM_CONSTANT_MethodType = 16; 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 // JVM_CONSTANT_MethodHandle subtypes
public static final int JVM_REF_getField = 1; 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

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

View File

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

View File

@ -30,6 +30,7 @@ import sun.jvm.hotspot.asm.*;
import sun.jvm.hotspot.asm.sparc.*; import sun.jvm.hotspot.asm.sparc.*;
import sun.jvm.hotspot.asm.x86.*; import sun.jvm.hotspot.asm.x86.*;
import sun.jvm.hotspot.asm.ia64.*; import sun.jvm.hotspot.asm.ia64.*;
import sun.jvm.hotspot.asm.amd64.*;
import sun.jvm.hotspot.code.*; import sun.jvm.hotspot.code.*;
import sun.jvm.hotspot.compiler.*; import sun.jvm.hotspot.compiler.*;
import sun.jvm.hotspot.debugger.*; import sun.jvm.hotspot.debugger.*;
@ -198,6 +199,8 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
cpuHelper = new SPARCHelper(); cpuHelper = new SPARCHelper();
} else if (cpu.equals("x86")) { } else if (cpu.equals("x86")) {
cpuHelper = new X86Helper(); cpuHelper = new X86Helper();
} else if (cpu.equals("amd64")) {
cpuHelper = new AMD64Helper();
} else if (cpu.equals("ia64")) { } else if (cpu.equals("ia64")) {
cpuHelper = new IA64Helper(); cpuHelper = new IA64Helper();
} else { } else {
@ -460,6 +463,19 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
return buf.toString(); 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) { protected String genHTMLTableForConstantPool(ConstantPool cpool) {
Formatter buf = new Formatter(genHTML); Formatter buf = new Formatter(genHTML);
buf.beginTable(1); buf.beginTable(1);
@ -582,9 +598,11 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
buf.cell(Integer.toString(cpool.getIntAt(index))); buf.cell(Integer.toString(cpool.getIntAt(index)));
break; break;
case JVM_CONSTANT_InvokeDynamicTrans:
case JVM_CONSTANT_InvokeDynamic: case JVM_CONSTANT_InvokeDynamic:
buf.cell("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; break;
default: 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -40,7 +40,8 @@ public class ConstantTag {
private static int JVM_CONSTANT_NameAndType = 12; private static int JVM_CONSTANT_NameAndType = 12;
private static int JVM_CONSTANT_MethodHandle = 15; // JSR 292 private static int JVM_CONSTANT_MethodHandle = 15; // JSR 292
private static int JVM_CONSTANT_MethodType = 16; // 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_Invalid = 0; // For bad value initialization
private static int JVM_CONSTANT_UnresolvedClass = 100; // Temporary tag until actual use 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 private static int JVM_CONSTANT_ClassIndex = 101; // Temporary tag while constructing constant pool
@ -66,6 +67,8 @@ public class ConstantTag {
this.tag = tag; this.tag = tag;
} }
public int value() { return tag; }
public boolean isKlass() { return tag == JVM_CONSTANT_Class; } public boolean isKlass() { return tag == JVM_CONSTANT_Class; }
public boolean isField () { return tag == JVM_CONSTANT_Fieldref; } public boolean isField () { return tag == JVM_CONSTANT_Fieldref; }
public boolean isMethod() { return tag == JVM_CONSTANT_Methodref; } 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 isMethodHandle() { return tag == JVM_CONSTANT_MethodHandle; }
public boolean isMethodType() { return tag == JVM_CONSTANT_MethodType; } public boolean isMethodType() { return tag == JVM_CONSTANT_MethodType; }
public boolean isInvokeDynamic() { return tag == JVM_CONSTANT_InvokeDynamic; } public boolean isInvokeDynamic() { return tag == JVM_CONSTANT_InvokeDynamic; }
public boolean isInvokeDynamicTrans() { return tag == JVM_CONSTANT_InvokeDynamicTrans; }
public boolean isInvalid() { return tag == JVM_CONSTANT_Invalid; } 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

@ -101,15 +101,14 @@ ifndef HOTSPOT_RELEASE_VERSION
endif endif
ifdef HOTSPOT_BUILD_VERSION ifdef HOTSPOT_BUILD_VERSION
# specified in command line (PRT build) # specified in command line
else else
ifdef JPRT_BUILD_VERSION ifdef COOKED_BUILD_NUMBER
# JPR build
HOTSPOT_BUILD_VERSION=$(JPRT_BUILD_VERSION)
else
ifdef COOKED_BUILD_NUMBER
# JRE build # JRE build
HOTSPOT_BUILD_VERSION= HOTSPOT_BUILD_VERSION=
else
ifdef USER_RELEASE_SUFFIX
HOTSPOT_BUILD_VERSION=internal-$(USER_RELEASE_SUFFIX)
else else
HOTSPOT_BUILD_VERSION=internal HOTSPOT_BUILD_VERSION=internal
endif 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View File

@ -1,5 +1,5 @@
# #
# Copyright (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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -31,11 +31,11 @@
# #
# Don't put quotes (fail windows build). # Don't put quotes (fail windows build).
HOTSPOT_VM_COPYRIGHT=Copyright 2010 HOTSPOT_VM_COPYRIGHT=Copyright 2011
HS_MAJOR_VER=20 HS_MAJOR_VER=20
HS_MINOR_VER=0 HS_MINOR_VER=0
HS_BUILD_NUMBER=01 HS_BUILD_NUMBER=06
JDK_MAJOR_VER=1 JDK_MAJOR_VER=1
JDK_MINOR_VER=7 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -25,9 +25,6 @@
# JPRT rule to build this workspace # JPRT rule to build this workspace
JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
ifdef JPRT_BUILD_VERSION
MILESTONE=$(JPRT_BUILD_VERSION)
endif
ifeq ($(OSNAME),windows) ifeq ($(OSNAME),windows)
ZIPFLAGS=-q 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -150,6 +150,7 @@ jprt.build.targets= \
jprt.my.solaris.sparc.test.targets= \ jprt.my.solaris.sparc.test.targets= \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jvm98, \ ${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|fastdebug}-{c1|c2}-scimark, \
${jprt.my.solaris.sparc}-product-{c1|c2}-runThese, \ ${jprt.my.solaris.sparc}-product-{c1|c2}-runThese, \
${jprt.my.solaris.sparc}-fastdebug-c1-runThese_Xshare, \ ${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_G1, \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_ParOldGC, \ ${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}-{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_SerialGC, \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_ParallelGC, \ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_ParallelGC, \
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_CMS, \ ${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.test.targets= \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98, \ ${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|fastdebug}-c2-scimark, \
${jprt.my.solaris.sparcv9}-product-c2-runThese, \ ${jprt.my.solaris.sparcv9}-product-c2-runThese, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_default, \ ${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_G1, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_ParOldGC, \ ${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, \
${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_SerialGC, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_ParallelGC, \ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_ParallelGC, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_CMS, \ ${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.test.targets= \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98, \ ${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|fastdebug}-c2-scimark, \
${jprt.my.solaris.x64}-product-c2-runThese, \ ${jprt.my.solaris.x64}-product-c2-runThese, \
${jprt.my.solaris.x64}-product-c2-runThese_Xcomp, \ ${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_G1, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_ParOldGC, \ ${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, \
${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_SerialGC, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_ParallelGC, \ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_ParallelGC, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_CMS, \ ${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.test.targets= \
${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-jvm98, \ ${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|fastdebug}-{c1|c2}-scimark, \
${jprt.my.solaris.i586}-product-{c1|c2}-runThese_Xcomp, \ ${jprt.my.solaris.i586}-product-{c1|c2}-runThese_Xcomp, \
${jprt.my.solaris.i586}-fastdebug-c1-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_G1, \
${jprt.my.solaris.i586}-product-c1-GCOld_ParOldGC, \ ${jprt.my.solaris.i586}-product-c1-GCOld_ParOldGC, \
${jprt.my.solaris.i586}-fastdebug-c2-jbb_default, \ ${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_ParallelGC, \
${jprt.my.solaris.i586}-fastdebug-c2-jbb_CMS, \ ${jprt.my.solaris.i586}-fastdebug-c2-jbb_CMS, \
${jprt.my.solaris.i586}-fastdebug-c2-jbb_G1, \ ${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.test.targets = \
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \ ${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|fastdebug}-{c1|c2}-scimark, \
${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \ ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \ ${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_G1, \
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParOldGC, \ ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParOldGC, \
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \ ${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_ParallelGC, \
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \ ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_G1, \ ${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.test.targets = \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \ ${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-scimark, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_default, \ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_default, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \ ${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_G1, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_ParOldGC, \ ${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, \
${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_ParallelGC, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_G1, \ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_G1, \
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_ParOldGC ${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_ParOldGC
jprt.my.windows.i586.test.targets = \ jprt.my.windows.i586.test.targets = \
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jvm98, \ ${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|fastdebug}-{c1|c2}-scimark, \
${jprt.my.windows.i586}-product-{c1|c2}-runThese, \ ${jprt.my.windows.i586}-product-{c1|c2}-runThese, \
${jprt.my.windows.i586}-product-{c1|c2}-runThese_Xcomp, \ ${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_G1, \
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_ParOldGC, \ ${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}-{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_ParallelGC, \
${jprt.my.windows.i586}-product-{c1|c2}-jbb_CMS, \ ${jprt.my.windows.i586}-product-{c1|c2}-jbb_CMS, \
${jprt.my.windows.i586}-product-{c1|c2}-jbb_G1, \ ${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.test.targets = \
${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98, \ ${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|fastdebug}-c2-scimark, \
${jprt.my.windows.x64}-product-c2-runThese, \ ${jprt.my.windows.x64}-product-c2-runThese, \
${jprt.my.windows.x64}-product-c2-runThese_Xcomp, \ ${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_G1, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_ParOldGC, \ ${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, \
${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_CMS, \
${jprt.my.windows.x64}-product-c2-jbb_ParallelGC, \ ${jprt.my.windows.x64}-product-c2-jbb_ParallelGC, \
${jprt.my.windows.x64}-product-c2-jbb_G1, \ ${jprt.my.windows.x64}-product-c2-jbb_G1, \

View File

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

View File

@ -15,5 +15,6 @@ fix_lines() {
' F2=$2 ' F2=$2
mv $1+ $1 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 ) ( [ -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