diff --git a/.hgtags b/.hgtags
index a9925795d56..f0dd95d1127 100644
--- a/.hgtags
+++ b/.hgtags
@@ -2,3 +2,7 @@
bf2517e15f0c0f950e5b3143c4ca11e2df73dcc1 jdk7-b25
5ae7db536e3fcf6be78e45b240a9058095e0ed38 jdk7-b26
67052ac87fc927d048e62ec54ff42adb230d3f7c jdk7-b27
+18dc4ba4739a537fd146f77da51db16efce28da2 jdk7-b28
+bfe4572fd301a6fcd120373cdb2eff5d2da0c72c jdk7-b29
+bee4731164a06ddece1297ae58db24aca6a1c626 jdk7-b30
+cd8b8f500face60d1566d850857a7fccadbd383a jdk7-b31
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 2d38b379a00..ce58a609d1b 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -2,3 +2,7 @@ cfeea66a3fa8ca3686a7cfa2d0ce8ab0169f168d jdk7-b24
cbc8ad9dd0e085a607427ea35411990982f19a36 jdk7-b25
9410f77cc30c604d1caf7c9fe3a57fa19e1acbe8 jdk7-b26
11b4dc9f2be3523ef989a0db8459eb56b3045c3a jdk7-b27
+56652b46f328937f6b9b5130f1e4cd80f48868ef jdk7-b28
+31e08f70e88d77c2053f91c21b49a04296bdc59a jdk7-b29
+2dab2f712e1832c92acfa63ec0337048b9422c20 jdk7-b30
+3300a35a0bd56d695b92fe0b34f03ebbfc939064 jdk7-b31
diff --git a/Makefile b/Makefile
index d5b3ebac73a..24cd12282e2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/README-builds.html b/README-builds.html
index a2cf768e122..37998f9c1f6 100644
--- a/README-builds.html
+++ b/README-builds.html
@@ -5,15 +5,12 @@
-
+ +
-
-
-
+
|
@@ -54,6 +51,7 @@
Bootstrap JDK
Binary Plugs
Optional Import JDK
+ Ant
Certificate Authority File (cacert)
Compilers
@@ -424,24 +422,37 @@
you should use gmake
which will be located in either the /opt/sfw/bin or
/usr/sfw/bin directory.
+ In more recent versions of Solaris GNU make can be found
+ at /usr/bin/gmake.
Windows:
Make sure you start your build inside a bash/sh/ksh shell.
WARNING: Watch out for make version 3.81, it may
- not work due to a lack of support for drive letter paths
- like C:/. See
- section on gmake.
+ not work due to a lack of support for MS-DOS drive letter paths
+ like C:/ or C:\.
Use a 3.80 version, or find a newer
- version that has this problem fixed.
+ version that has this problem fixed, like 3.82.
The older 3.80 version of make.exe can be downloaded with this
link.
+ Use of this older 3.80 make.exe may require that you install the
+ libintl2.dll library or libintl2 cygwin package which is
+ no longer installed by default by the cygwin installer.
+
Also see the
mozilla developer center
on this topic.
+
+ It's hoped that when make 3.82 starts shipping in a future cygwin
+ release that this MS-DOS path issue will be fixed.
+ In addition to the above 3.80 make.exe you can download
+ this
+
+ www.cmake.org make.exe which will not have a libintl2.dll
+ dependency.
@@ -507,6 +518,11 @@
Install or upgrade the FreeType development
package.
+
+ Install
+ Ant, set
+ ANT_HOME.
+
@@ -567,6 +583,11 @@
CUPS Include files, set
ALT_CUPS_HEADERS_PATH.
+
+ Install
+ Ant, set
+ ANT_HOME.
+
@@ -654,6 +675,11 @@
Install
Microsoft DirectX SDK.
+
+ Install
+ Ant, set
+ ANT_HOME.
+
@@ -736,6 +762,22 @@
and the build will copy the needed files from this import area.
+
+
+ All OpenJDK builds require access to least Ant 1.6.5.
+ The Ant tool is available from the
+
+ Ant download site.
+ You should always set
+ ANT_HOME
+ to point to the location of
+ the Ant installation, this is the directory pathname
+ that contains a bin and lib.
+ It's also a good idea to also place its bin directory
+ in the PATH environment variable, although it's
+ not absolutely required.
+
+
See
@@ -915,6 +957,21 @@
and
ALT_FREETYPE_HEADERS_PATH
to refer to place where library and header files are installed.
+
+ Building the freetype 2 libraries from scratch is also possible,
+ however on Windows refer to the
+
+ Windows FreeType DLL build instructions.
+
+ Note that by default FreeType is built with byte code hinting
+ support disabled due to licensing restrictions.
+ In this case, text appearance and metrics are expected to
+ differ from Sun's official JDK build.
+ See
+
+ the SourceForge FreeType2 Home Page
+
+ for more information.
@@ -1036,7 +1093,8 @@
| make.exe |
Devel |
- make: The GNU version of the 'make' utility |
+ make: The GNU version of the 'make' utility
+ NOTE: See the GNU make section |
| m4.exe |
@@ -1050,7 +1108,7 @@
cpio: A program to manage archives of files |
- | awk.exe |
+ gawk.exe |
Utils |
awk: Pattern-directed scanning and processing language |
@@ -1061,17 +1119,17 @@
| zip.exe |
- Utils |
+ Archive |
zip: Package and compress (archive) files |
| unzip.exe |
- Utils |
+ Archive |
unzip: Extract compressed files in a ZIP archive |
| free.exe |
- Utils |
+ Procps |
free: Display amount of free and used memory in the system |
@@ -1224,46 +1282,6 @@
document) that can impact the build are:
- - PATH
- - Typically you want to set the PATH to include:
-
- - The location of the GNU make binary
- - The location of the Bootstrap JDK java
- (see Bootstrap JDK)
- - The location of the C/C++ compilers
- (see compilers)
- - The location or locations for the Unix command utilities
- (e.g. /usr/bin)
-
-
- - MILESTONE
- -
- The milestone name for the build (e.g."beta").
- The default value is "internal".
-
- - BUILD_NUMBER
- -
- The build number for the build (e.g. "b27").
- The default value is "b00".
-
- - ARCH_DATA_MODEL
- - The ARCH_DATA_MODEL variable
- is used to specify whether the build is to generate 32-bit or 64-bit
- binaries.
- The Solaris build supports either 32-bit or 64-bit builds, but
- Windows and Linux will support only one, depending on the specific
- OS being used.
- Normally, setting this variable is only necessary on Solaris.
- Set ARCH_DATA_MODEL to 32 for generating 32-bit binaries,
- or to 64 for generating 64-bit binaries.
-
- - ALT_BOOTDIR
- -
- The location of the bootstrap JDK installation.
- See Bootstrap JDK for more information.
- You should always install your own local Bootstrap JDK and
- always set ALT_BOOTDIR explicitly.
-
- ALT_BINARY_PLUGS_PATH
-
The location of the binary plugs installation.
@@ -1272,118 +1290,12 @@
recent Binary Plugs install image
and set this variable to that location.
- - ALT_JDK_IMPORT_PATH
+ - ALT_BOOTDIR
-
- The location of a previously built JDK installation.
- See Optional Import JDK for more information.
-
- - ALT_OUTPUTDIR
- -
- An override for specifying the (absolute) path of where the
- build output is to go.
- The default output directory will be build/platform.
-
- - ALT_COMPILER_PATH
- -
- The location of the C/C++ compiler.
- The default varies depending on the platform.
-
- - ALT_CACERTS_FILE
- -
- The location of the cacerts file.
- The default will refer to
- jdk/src/share/lib/security/cacerts.
-
- - ALT_CUPS_HEADERS_PATH
- -
- The location of the CUPS header files.
- See CUPS information for more information.
- If this path does not exist the fallback path is
- /usr/include.
-
- - ALT_FREETYPE_LIB_PATH
- -
- The location of the FreeType shared library.
- See FreeType information for details.
-
- - ALT_FREETYPE_HEADERS_PATH
- -
- The location of the FreeType header files.
- See FreeType information for details.
-
- - ALT_JDK_DEVTOOLS_PATH
- -
- The default root location of the devtools.
- The default value is
- $(ALT_SLASH_JAVA)/devtools.
-
- - ALT_DEVTOOLS_PATH
- -
- The location of tools like the
- zip and unzip
- binaries, but might also contain the GNU make utility
- (gmake).
- So this area is a bit of a grab bag, especially on Windows.
- The default value depends on the platform and
- Unix Commands being used.
- On Linux the default will be
- $(ALT_JDK_DEVTOOLS_PATH)/linux/bin,
- on Solaris
- $(ALT_JDK_DEVTOOLS_PATH)/{sparc,i386}/bin,
- on Windows with MKS
- %SYSTEMDRIVE%/UTILS,
- and on Windows with CYGWIN
- /usr/bin.
-
- - ALT_UNIXCOMMAND_PATH
- -
- An override for specifying where the
- Unix command set are located.
- The default location varies depending on the platform,
- "%SYSTEMDRIVE%/MKSNT" or
- $(ROOTDIR) on Windows with MKS, otherwise it's
- "/bin" or /usr/bin.
-
- - ALT_UNIXCCS_PATH
- -
- Solaris only:
- An override for specifying where the Unix CCS
- command set are located.
- The default location is /usr/ccs/bin
-
- - ALT_USRBIN_PATH
- -
- An override for specifying where the
- Unix /usr/bin commands are located. You usually do not need
- to set this variable: the default location is /usr/bin)
-
- - ALT_SLASHJAVA
- -
- The default root location for many of the ALT path locations
- of the following ALT variables.
- The default value is
- "/java" on Solaris and Linux,
- "J:" on Windows.
-
- - ALT_BUILD_JDK_IMPORT_PATH
- -
- These are useful in managing builds on multiple platforms.
- The default network location for all of the import JDK images
- for all platforms.
- If ALT_JDK_IMPORT_PATH
- is not set, this directory will be used and should contain
- the following directories:
- solaris-sparc,
- solaris-i586,
- solaris-sparcv9,
- solaris-amd64,
- linux-i586,
- linux-amd64,
- windows-i586,
- and
- windows-amd64.
- Where each of these directories contain the import JDK image
- for that platform.
+ The location of the bootstrap JDK installation.
+ See Bootstrap JDK for more information.
+ You should always install your own local Bootstrap JDK and
+ always set ALT_BOOTDIR explicitly.
- ALT_BUILD_BINARY_PLUGS_PATH
-
@@ -1405,36 +1317,186 @@
Where each of these directories contain the binary plugs image
for that platform.
- - Windows specific:
+ - ALT_BUILD_JDK_IMPORT_PATH
-
-
- - ALT_MSDEVTOOLS_PATH
- -
- The location of the Microsoft Visual Studio .NET 2003
- tools 'bin' directory.
- The default is usually derived from
- ALT_COMPILER_PATH.
-
- - ALT_DXSDK_PATH
- -
- The location of the
- Microsoft DirectX 9 SDK.
- The default will be to try and use the DirectX environment
- variable DXSDK_DIR,
- failing that, look in C:/DXSDK.
-
- - ALT_MSVCRT_DLL_PATH
- -
- The location of the
- MSVCRT.DLL.
-
- - ALT_MSVCR71_DLL_PATH
- -
- i586 only:
- The location of the
- MSVCR71.DLL.
-
-
+ These are useful in managing builds on multiple platforms.
+ The default network location for all of the import JDK images
+ for all platforms.
+ If ALT_JDK_IMPORT_PATH
+ is not set, this directory will be used and should contain
+ the following directories:
+ solaris-sparc,
+ solaris-i586,
+ solaris-sparcv9,
+ solaris-amd64,
+ linux-i586,
+ linux-amd64,
+ windows-i586,
+ and
+ windows-amd64.
+ Where each of these directories contain the import JDK image
+ for that platform.
+
+ - ALT_CACERTS_FILE
+ -
+ The location of the cacerts file.
+ The default will refer to
+ jdk/src/share/lib/security/cacerts.
+
+ - ALT_COMPILER_PATH
+ -
+ The location of the C/C++ compiler.
+ The default varies depending on the platform.
+
+ - ALT_CUPS_HEADERS_PATH
+ -
+ The location of the CUPS header files.
+ See CUPS information for more information.
+ If this path does not exist the fallback path is
+ /usr/include.
+
+ - ALT_DEVTOOLS_PATH
+ -
+ The location of tools like the
+ zip and unzip
+ binaries, but might also contain the GNU make utility
+ (gmake).
+ So this area is a bit of a grab bag, especially on Windows.
+ The default value depends on the platform and
+ Unix Commands being used.
+ On Linux the default will be
+ $(ALT_JDK_DEVTOOLS_PATH)/linux/bin,
+ on Solaris
+ $(ALT_JDK_DEVTOOLS_PATH)/{sparc,i386}/bin,
+ on Windows with MKS
+ %SYSTEMDRIVE%/UTILS,
+ and on Windows with CYGWIN
+ /usr/bin.
+
+ - ALT_DXSDK_PATH
+ -
+ Windows Only:
+ The location of the
+ Microsoft DirectX 9 SDK.
+ The default will be to try and use the DirectX environment
+ variable DXSDK_DIR,
+ failing that, look in C:/DXSDK.
+
+ - ALT_FREETYPE_HEADERS_PATH
+ -
+ The location of the FreeType header files.
+ See FreeType information for details.
+
+ - ALT_FREETYPE_LIB_PATH
+ -
+ The location of the FreeType shared library.
+ See FreeType information for details.
+
+ - ALT_JDK_DEVTOOLS_PATH
+ -
+ The default root location of the devtools.
+ The default value is
+ $(ALT_SLASH_JAVA)/devtools.
+
+ - ALT_JDK_IMPORT_PATH
+ -
+ The location of a previously built JDK installation.
+ See Optional Import JDK for more information.
+
+ - ALT_MSDEVTOOLS_PATH
+ -
+ Windows Only:
+ The location of the Microsoft Visual Studio .NET 2003
+ tools 'bin' directory.
+ The default is usually derived from
+ ALT_COMPILER_PATH.
+
+ - ALT_MSVCR71_DLL_PATH
+ -
+ Windows i586 only:
+ The location of the
+ MSVCR71.DLL.
+
+ - ALT_MSVCRT_DLL_PATH
+ -
+ Windows Only:
+ The location of the
+ MSVCRT.DLL.
+
+ - ALT_OUTPUTDIR
+ -
+ An override for specifying the (absolute) path of where the
+ build output is to go.
+ The default output directory will be build/platform.
+
+ - ALT_SLASHJAVA
+ -
+ The default root location for many of the ALT path locations
+ of the following ALT variables.
+ The default value is
+ "/java" on Solaris and Linux,
+ "J:" on Windows.
+
+ - ALT_UNIXCCS_PATH
+ -
+ Solaris only:
+ An override for specifying where the Unix CCS
+ command set are located.
+ The default location is /usr/ccs/bin
+
+ - ALT_UNIXCOMMAND_PATH
+ -
+ An override for specifying where the
+ Unix command set are located.
+ The default location varies depending on the platform,
+ "%SYSTEMDRIVE%/MKSNT" or
+ $(ROOTDIR) on Windows with MKS, otherwise it's
+ "/bin" or /usr/bin.
+
+ - ALT_USRBIN_PATH
+ -
+ An override for specifying where the
+ Unix /usr/bin commands are located. You usually do not need
+ to set this variable: the default location is /usr/bin)
+
+ - ANT_HOME
+ -
+ The location of the Ant installation.
+ See Ant for more information.
+ You should always set ANT_HOME explicitly.
+
+ - ARCH_DATA_MODEL
+ - The ARCH_DATA_MODEL variable
+ is used to specify whether the build is to generate 32-bit or 64-bit
+ binaries.
+ The Solaris build supports either 32-bit or 64-bit builds, but
+ Windows and Linux will support only one, depending on the specific
+ OS being used.
+ Normally, setting this variable is only necessary on Solaris.
+ Set ARCH_DATA_MODEL to 32 for generating 32-bit binaries,
+ or to 64 for generating 64-bit binaries.
+
+ - BUILD_NUMBER
+ -
+ The build number for the build (e.g. "b27").
+ The default value is "b00".
+
+ - MILESTONE
+ -
+ The milestone name for the build (e.g."beta").
+ The default value is "internal".
+
+ - PATH
+ - Typically you want to set the PATH to include:
+
+ - The location of the GNU make binary
+ - The location of the Bootstrap JDK java
+ (see Bootstrap JDK)
+ - The location of the C/C++ compilers
+ (see compilers)
+ - The location or locations for the Unix command utilities
+ (e.g. /usr/bin)
+
diff --git a/corba/.hgtags b/corba/.hgtags
index 1c9eb9a6072..6792e20a86a 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -2,3 +2,7 @@
5e61d5df62586474414d1058e9186441aa908f51 jdk7-b25
0043eb3d4e628f049ff80a8c223b5657136085e7 jdk7-b26
e84e9018bebbf3e5bafc5706e7882a15cb1c7d99 jdk7-b27
+27509b7d21ed783b3f6eb7b7612781c675a30c2f jdk7-b28
+8b71960f79ce0a6fb8ddfeec03f03d400a361747 jdk7-b29
+c0252adbb2abbfdd6c35595429ac6fbdd98e20ac jdk7-b30
+ef6af34d75a7b44e77083f1d4ee47631fa09d3b4 jdk7-b31
diff --git a/corba/make/common/shared/Compiler-sun.gmk b/corba/make/common/shared/Compiler-sun.gmk
index 8ce54825b7c..730310201c6 100644
--- a/corba/make/common/shared/Compiler-sun.gmk
+++ b/corba/make/common/shared/Compiler-sun.gmk
@@ -1,5 +1,5 @@
#
-# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,9 @@ COMPILER_NAME=Sun Studio
# Sun Studio Compiler settings specific to Solaris
ifeq ($(PLATFORM), solaris)
+ # FIXUP: Change to SS12 when validated
+ #COMPILER_VERSION=SS12
+ #REQUIRED_CC_VER=5.9
COMPILER_VERSION=SS11
REQUIRED_CC_VER=5.8
CC = $(COMPILER_PATH)cc
@@ -51,8 +54,8 @@ endif
# Sun Studio Compiler settings specific to Linux
ifeq ($(PLATFORM), linux)
# This has not been tested
- COMPILER_VERSION=SS11
- REQUIRED_CC_VER=5.8
+ COMPILER_VERSION=SS12
+ REQUIRED_CC_VER=5.9
CC = $(COMPILER_PATH)cc
CPP = $(COMPILER_PATH)cc -E
CXX = $(COMPILER_PATH)CC
diff --git a/corba/make/common/shared/Defs.gmk b/corba/make/common/shared/Defs.gmk
index c7832863e34..5af64523ff7 100644
--- a/corba/make/common/shared/Defs.gmk
+++ b/corba/make/common/shared/Defs.gmk
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/corba/make/jprt.config b/corba/make/jprt.config
index e511068ef88..86e6499a156 100644
--- a/corba/make/jprt.config
+++ b/corba/make/jprt.config
@@ -1,7 +1,7 @@
#!echo "This is not a shell script"
#############################################################################
#
-# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -123,9 +123,15 @@ if [ "${osname}" = SunOS ] ; then
solaris_arch=i386
fi
- # Get the SS11 compilers into path (make sure it matches ALT setting)
- compiler_path=${jdk_devtools}/${solaris_arch}/SUNWspro/SS11/bin
- compiler_name=SS11
+ # Get the compilers into path (make sure it matches ALT setting)
+ if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
+ compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
+ else
+ # FIXUP: Change to SS12 when validated
+ #compiler_name=SS12
+ compiler_name=SS11
+ fi
+ compiler_path=${jdk_devtools}/${solaris_arch}/SUNWspro/${compiler_name}/bin
ALT_COMPILER_PATH="${compiler_path}"
export ALT_COMPILER_PATH
dirMustExist "${compiler_path}" ALT_COMPILER_PATH
diff --git a/corba/src/share/classes/org/omg/CORBA/ir.idl b/corba/src/share/classes/org/omg/CORBA/ir.idl
index 5ea8a1979dd..d7312f993a1 100644
--- a/corba/src/share/classes/org/omg/CORBA/ir.idl
+++ b/corba/src/share/classes/org/omg/CORBA/ir.idl
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl b/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl
index b0149c3e256..2d21393963e 100644
--- a/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl
+++ b/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/.hgignore b/hotspot/.hgignore
index 24a19191195..2c5fe5bc135 100644
--- a/hotspot/.hgignore
+++ b/hotspot/.hgignore
@@ -2,3 +2,6 @@
^dist/
^nbproject/private/
^src/share/tools/hsdis/bin/
+^src/share/tools/IdealGraphVisualizer/[a-zA-Z0-9]*/build/
+^src/share/tools/IdealGraphVisualizer/build/
+^src/share/tools/IdealGraphVisualizer/dist/
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index 5d8c9da580d..b23c6ac9012 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -2,3 +2,7 @@ a61af66fc99eb5ec9d50c05b0c599757b1289ceb jdk7-b24
7836be3e92d0a4f9ee7566f602c91f5609534e66 jdk7-b25
ad0b851458ff9d1d490ed2d79bb84f75a9fdb753 jdk7-b26
e3d2692f8442e2d951166dc9bd9a330684754438 jdk7-b27
+c14dab40ed9bf45ad21150bd70c9c80cdf655415 jdk7-b28
+4f91c08b3e4498213a9c5a24898f7d9c38cf86fb jdk7-b29
+d1605aabd0a15ecf93787c47de63073c33fba52d jdk7-b30
+9c2ecc2ffb125f14fab3857fe7689598956348a0 jdk7-b31
diff --git a/hotspot/agent/make/Makefile b/hotspot/agent/make/Makefile
index 0cde8d5754b..ae10cb3cb97 100644
--- a/hotspot/agent/make/Makefile
+++ b/hotspot/agent/make/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -246,16 +246,16 @@ SA_PROPERTIES = $(OUTPUT_DIR)/sa.properties
all: filelist
@mkdir -p $(OUTPUT_DIR)
@echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
- @javac -source 1.4 -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
- @rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
+ @${JDK_HOME}/bin/javac -source 1.4 -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
+ @${JDK_HOME}/bin/rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
allprof: filelist
@mkdir -p $(OUTPUT_DIR)
@echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
- @javac -source 1.4 -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
- @rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
+ @${JDK_HOME}/bin/javac -source 1.4 -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
+ @${JDK_HOME}/bin/rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
diff --git a/hotspot/agent/src/os/linux/ps_core.c b/hotspot/agent/src/os/linux/ps_core.c
index 0693ffce4bb..3562f2d31f6 100644
--- a/hotspot/agent/src/os/linux/ps_core.c
+++ b/hotspot/agent/src/os/linux/ps_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/os/linux/ps_proc.c b/hotspot/agent/src/os/linux/ps_proc.c
index 9b226eaf00b..d9c297e5fa3 100644
--- a/hotspot/agent/src/os/linux/ps_proc.c
+++ b/hotspot/agent/src/os/linux/ps_proc.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java
index 50e81f34789..bb3dba9ea33 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HSDB.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HSDB.java
index fb583936574..8a2ef3c84c2 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HSDB.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HSDB.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -398,7 +398,7 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
frame.getContentPane().add(desktop);
GraphicsUtilities.reshapeToAspectRatio(frame, 4.0f/3.0f, 0.75f, Toolkit.getDefaultToolkit().getScreenSize());
GraphicsUtilities.centerInContainer(frame, Toolkit.getDefaultToolkit().getScreenSize());
- frame.show();
+ frame.setVisible(true);
Runtime.getRuntime().addShutdownHook(new java.lang.Thread() {
public void run() {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
index 21bc43d77bf..5e56a0e3f36 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/SALauncherLoader.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/SALauncherLoader.java
index 9c8dce59600..9f462c67455 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/SALauncherLoader.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/SALauncherLoader.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -148,7 +148,7 @@ public class SALauncherLoader extends URLClassLoader {
}
try {
- return file.toURL();
+ return file.toURI().toURL();
} catch (MalformedURLException mue) {
throw new InternalError(mue.getMessage());
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/Main.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/Main.java
index f86c8225f55..e34c975f775 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/Main.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -47,6 +47,6 @@ public class Main {
4.0f/3.0f, 0.85f, Toolkit.getDefaultToolkit().getScreenSize());
GraphicsUtilities.centerInContainer(frame,
Toolkit.getDefaultToolkit().getScreenSize());
- frame.show();
+ frame.setVisible(true);
}
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapSet.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapSet.java
index 3d9c6bbe5d8..aa99e9a444e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapSet.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapSet.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapValue.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapValue.java
index 3b7e66b1777..ee382979626 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapValue.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapValue.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapVisitor.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapVisitor.java
index 612223667e4..98227008c58 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapVisitor.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/OopMapVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Address.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Address.java
index 66996c4f9a7..1800dafc25c 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Address.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Address.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java
index 3e85bb7635d..acbb90d4b66 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java
index 4bef7b0daae..7b4ca75f431 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java
index c478d33d088..679036cdac0 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescription.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescription.java
index 9498c2e25fb..87641775ac5 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescription.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescription.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionAMD64.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionAMD64.java
index 3dd6e513ead..3f16b1bb5d8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionAMD64.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionAMD64.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionIA64.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionIA64.java
index 4099844799b..4f4322a1c6c 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionIA64.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionIA64.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionIntelX86.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionIntelX86.java
index e333b139fcd..25d786ab8f9 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionIntelX86.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionIntelX86.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionSPARC32Bit.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionSPARC32Bit.java
index 5e70d16d975..ab615fe7c7c 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionSPARC32Bit.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionSPARC32Bit.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionSPARC64Bit.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionSPARC64Bit.java
index 289f9ca8f2b..2eae1e0e77a 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionSPARC64Bit.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionSPARC64Bit.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxAddress.java
index d0c039e41ba..e91e9240a96 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxAddress.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxDebugger.java
index f73700c8e16..e34c1c12aa0 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxDebugger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxDebuggerLocal.java
index 1501f2b07c5..13cda991a73 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxDebuggerLocal.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/DbxDebuggerLocal.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dummy/DummyAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dummy/DummyAddress.java
index 5a3b4170859..0004b99d5d2 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dummy/DummyAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dummy/DummyAddress.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java
index 64577da7acd..34da90a4df2 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java
index b3a062e82a8..f69c582db19 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java
index 7f4159f4a47..fadd9ef1de4 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcAddress.java
index 17c75774dfe..843693a4822 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcAddress.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebugger.java
index e17d2b422be..a792e9c6bc5 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebugger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java
index 5b89e610595..662bbe35b41 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteAddress.java
index 287f7cbbc2a..6575c2faf6d 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteAddress.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java
index 6850195d4eb..179fc1e9d64 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java
index 4be718ef6e2..c1464f3d98c 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java
index 922890fb9ea..cdc5c713619 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32Address.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32Address.java
index 0afbcacfd63..d6400ebae7a 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32Address.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32Address.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32Debugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32Debugger.java
index 3c2558200bc..0b5d72c0709 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32Debugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32Debugger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32DebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32DebuggerLocal.java
index 0380eb3b529..757ad00b350 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32DebuggerLocal.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/Win32DebuggerLocal.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgAddress.java
index 4a0d7f21cdb..89be5232e2f 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgAddress.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebugger.java
index 03654377c6a..1ed40d26982 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebugger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java
index 687f45a4ebd..09a3685b382 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAJDIClassLoader.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAJDIClassLoader.java
index 4483cf1b38b..02c1cff9a0e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAJDIClassLoader.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAJDIClassLoader.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -78,7 +78,7 @@ class SAJDIClassLoader extends URLClassLoader {
this(parent);
this.classPathSet = true;
try {
- addURL(new File(classPath).toURL());
+ addURL(new File(classPath).toURI().toURL());
} catch(MalformedURLException mue) {
throw new RuntimeException(mue);
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/BinaryTreeDictionary.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/BinaryTreeDictionary.java
new file mode 100644
index 00000000000..72f3006ea67
--- /dev/null
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/BinaryTreeDictionary.java
@@ -0,0 +1,59 @@
+/*
+ * @(#)BinaryTreeDictionary.java
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package sun.jvm.hotspot.memory;
+
+import java.util.*;
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.types.*;
+import sun.jvm.hotspot.runtime.*;
+
+public class BinaryTreeDictionary extends VMObject {
+ static {
+ VM.registerVMInitializedObserver(new Observer() {
+ public void update(Observable o, Object data) {
+ initialize(VM.getVM().getTypeDataBase());
+ }
+ });
+ }
+
+ private static synchronized void initialize(TypeDataBase db) {
+ Type type = db.lookupType("BinaryTreeDictionary");
+ totalSizeField = type.getCIntegerField("_totalSize");
+ }
+
+ // Fields
+ private static CIntegerField totalSizeField;
+
+ // Accessors
+ public long size() {
+ return totalSizeField.getValue(addr);
+ }
+
+ // Constructor
+ public BinaryTreeDictionary(Address addr) {
+ super(addr);
+ }
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java
index c1c701f223f..97ec593e187 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,20 @@ import sun.jvm.hotspot.utilities.*;
public class CompactibleFreeListSpace extends CompactibleSpace {
private static AddressField collectorField;
+ // for free size, three fields
+ // FreeBlockDictionary* _dictionary; // ptr to dictionary for large size blocks
+ // FreeList _indexedFreeList[IndexSetSize]; // indexed array for small size blocks
+ // LinearAllocBlock _smallLinearAllocBlock; // small linear alloc in TLAB
+ private static AddressField indexedFreeListField;
+ private static AddressField dictionaryField;
+ private static long smallLinearAllocBlockFieldOffset;
+ private static long indexedFreeListSizeOf;
+
+ private int heapWordSize; // 4 for 32bit, 8 for 64 bits
+ private int IndexSetStart; // for small indexed list
+ private int IndexSetSize;
+ private int IndexSetStride;
+
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
@@ -51,10 +65,26 @@ public class CompactibleFreeListSpace extends CompactibleSpace {
Type type = db.lookupType("CompactibleFreeListSpace");
collectorField = type.getAddressField("_collector");
+ collectorField = type.getAddressField("_collector");
+ dictionaryField = type.getAddressField("_dictionary");
+ indexedFreeListField = type.getAddressField("_indexedFreeList[0]");
+ smallLinearAllocBlockFieldOffset = type.getField("_smallLinearAllocBlock").getOffset();
}
public CompactibleFreeListSpace(Address addr) {
super(addr);
+ if ( VM.getVM().isLP64() ) {
+ heapWordSize = 8;
+ IndexSetStart = 1;
+ IndexSetStride = 1;
+ }
+ else {
+ heapWordSize = 4;
+ IndexSetStart = 2;
+ IndexSetStride = 2;
+ }
+
+ IndexSetSize = 257;
}
// Accessing block offset table
@@ -62,9 +92,17 @@ public class CompactibleFreeListSpace extends CompactibleSpace {
return (CMSCollector) VMObjectFactory.newObject(
CMSCollector.class,
collectorField.getValue(addr));
- }
+ }
+
+ public long free0() {
+ return capacity() - used0();
+ }
public long used() {
+ return capacity() - free();
+ }
+
+ public long used0() {
List regions = getLiveRegions();
long usedSize = 0L;
for (Iterator itr = regions.iterator(); itr.hasNext();) {
@@ -75,11 +113,41 @@ public class CompactibleFreeListSpace extends CompactibleSpace {
}
public long free() {
- return capacity() - used();
- }
+ // small chunks
+ long size = 0;
+ Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() );
+ cur = cur.addOffsetTo(IndexSetStart*FreeList.sizeOf());
+ for (int i=IndexSetStart; i> cmsShift, cmsMask) & 0x1L) == 0x1L;
+ }
+ public long getSize() { return (long)(value() >> sizeShift); }
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjArray.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjArray.java
index 7ef6d8d820c..027c57ea5fe 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjArray.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjArray.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
index 0aae96fcf42..23e533348c3 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -316,6 +316,14 @@ public class ObjectHeap {
iterateLiveRegions(liveRegions, visitor, null);
}
+ public boolean isValidMethod(OopHandle handle) {
+ OopHandle klass = Oop.getKlassForOopHandle(handle);
+ if (klass != null && klass.equals(methodKlassHandle)) {
+ return true;
+ }
+ return false;
+ }
+
// Creates an instance from the Oop hierarchy based based on the handle
public Oop newOop(OopHandle handle) {
// The only known way to detect the right type of an oop is
@@ -375,8 +383,10 @@ public class ObjectHeap {
}
}
- System.err.println("Unknown oop at " + handle);
- System.err.println("Oop's klass is " + klass);
+ if (DEBUG) {
+ System.err.println("Unknown oop at " + handle);
+ System.err.println("Oop's klass is " + klass);
+ }
throw new UnknownOopException();
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHistogram.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHistogram.java
index f263d49ffc3..58312c9c58e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHistogram.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHistogram.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHistogramElement.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHistogramElement.java
index 65117314f7e..d9518a3e788 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHistogramElement.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHistogramElement.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java
index 2bdf7eab706..cfaed93567e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopPrinter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopPrinter.java
index 0574343d207..d46c4dfe75e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopPrinter.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopPrinter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java
index 1613da85bb8..276753f7067 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -274,10 +274,10 @@ public class OopUtilities implements /* imports */ JVMTIThreadState {
// hc_klass is a HotSpot magic field and hence we can't
// find it from InstanceKlass for java.lang.Class.
TypeDataBase db = VM.getVM().getTypeDataBase();
- int hcKlassOffset = (int) Oop.getHeaderSize();
+ int hcKlassOffset = (int) Instance.getHeaderSize();
try {
hcKlassOffset += (db.lookupIntConstant("java_lang_Class::hc_klass_offset").intValue() *
- db.getAddressSize());
+ VM.getVM().getHeapOopSize());
} catch (RuntimeException re) {
// ignore, currently java_lang_Class::hc_klass_offset is zero
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopVisitor.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopVisitor.java
index 9bb12a45701..7dc622b2d2b 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopVisitor.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/AddressVisitor.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/AddressVisitor.java
index f9c55318fb9..b8076837473 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/AddressVisitor.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/AddressVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java
index ad07426313b..ec3077ae02d 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java
index 43ad81d44e5..204156c3ff8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java
@@ -215,11 +215,11 @@ public class JavaThread extends Thread {
if (f == null) return null;
boolean imprecise = true;
if (f.isInterpretedFrame() && !f.isInterpretedFrameValid()) {
- if (DEBUG) {
- System.out.println("Correcting for invalid interpreter frame");
- }
- f = f.sender(regMap);
- imprecise = false;
+ if (DEBUG) {
+ System.out.println("Correcting for invalid interpreter frame");
+ }
+ f = f.sender(regMap);
+ imprecise = false;
}
VFrame vf = VFrame.newVFrame(f, regMap, this, true, imprecise);
if (vf == null) {
@@ -228,10 +228,7 @@ public class JavaThread extends Thread {
}
return null;
}
- if (vf.isJavaFrame()) {
- return (JavaVFrame) vf;
- }
- return (JavaVFrame) vf.javaSender();
+ return vf.isJavaFrame() ? (JavaVFrame)vf : vf.javaSender();
}
/** In this system, a JavaThread is the top-level factory for a
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
index c6ab99073e7..e1ed4b97f2b 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/solaris_sparc/SolarisSPARCJavaThreadPDAccess.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/solaris_sparc/SolarisSPARCJavaThreadPDAccess.java
index 7d42c211d15..93b5acf067d 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/solaris_sparc/SolarisSPARCJavaThreadPDAccess.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/solaris_sparc/SolarisSPARCJavaThreadPDAccess.java
@@ -121,6 +121,13 @@ public class SolarisSPARCJavaThreadPDAccess implements JavaThreadPDAccess {
}
public Frame getCurrentFrameGuess(JavaThread thread, Address addr) {
+
+ // If java stack is walkable then both last_Java_sp and last_Java_pc are
+ // non null and we can start stack walk from this frame.
+ if (thread.getLastJavaSP() != null && thread.getLastJavaPC() != null) {
+ return new SPARCFrame(SPARCFrame.biasSP(thread.getLastJavaSP()), thread.getLastJavaPC());
+ }
+
ThreadProxy t = getThreadProxy(addr);
SPARCThreadContext context = (SPARCThreadContext) t.getContext();
// For now, let's see what happens if we do a similar thing to
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/sparc/SPARCFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/sparc/SPARCFrame.java
index 015329117dc..b9c07b6bc4e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/sparc/SPARCFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/sparc/SPARCFrame.java
@@ -422,6 +422,13 @@ public class SPARCFrame extends Frame {
if (getFP().addOffsetTo(INTERPRETER_FRAME_VM_LOCAL_WORDS * VM.getVM().getAddressSize()).lessThan(getSP())) {
return false;
}
+
+ OopHandle methodHandle = addressOfInterpreterFrameMethod().getOopHandleAt(0);
+
+ if (VM.getVM().getObjectHeap().isValidMethod(methodHandle) == false) {
+ return false;
+ }
+
// These are hacks to keep us out of trouble.
// The problem with these is that they mask other problems
if (getFP().lessThanOrEqual(getSP())) { // this attempts to deal with unsigned comparison above
@@ -433,9 +440,18 @@ public class SPARCFrame extends Frame {
// FIXME: this is not atomic with respect to GC and is unsuitable
// for use in a non-debugging, or reflective, system. Need to
// figure out how to express this.
- if (addressOfInterpreterFrameBCX().getAddressAt(0) == null) {
- return false; // BCP not yet set up
+ Address bcx = addressOfInterpreterFrameBCX().getAddressAt(0);
+
+ Method method;
+ try {
+ method = (Method) VM.getVM().getObjectHeap().newOop(methodHandle);
+ } catch (UnknownOopException ex) {
+ return false;
}
+ int bci = bcpToBci(bcx, method);
+ //validate bci
+ if (bci < 0) return false;
+
return true;
}
@@ -471,7 +487,7 @@ public class SPARCFrame extends Frame {
// will update it accordingly
map.setIncludeArgumentOops(false);
- if (cb == null && isEntryFrame()) {
+ if (isEntryFrame()) {
return senderForEntryFrame(map);
}
@@ -539,7 +555,6 @@ public class SPARCFrame extends Frame {
int SP_OFFSET_IN_GREGSET = 17;
raw_sp = fp.getAddressAt(VM.getVM().getAddressSize() * SP_OFFSET_IN_GREGSET);
Address pc = fp.getAddressAt(VM.getVM().getAddressSize() * PC_OFFSET_IN_GREGSET);
- // System.out.println(" next frame's SP: " + sp + " PC: " + pc);
return new SPARCFrame(raw_sp, pc);
}
}
@@ -562,10 +577,8 @@ public class SPARCFrame extends Frame {
// sender's _interpreter_sp_adjustment field.
if (VM.getVM().getInterpreter().contains(pc)) {
isInterpreted = true;
- if (VM.getVM().isClientCompiler()) {
- map.makeIntegerRegsUnsaved();
- map.shiftWindow(sp, youngerSP);
- }
+ map.makeIntegerRegsUnsaved();
+ map.shiftWindow(sp, youngerSP);
} else {
// Find a CodeBlob containing this frame's pc or elide the lookup and use the
// supplied blob which is already known to be associated with this frame.
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java
index 9bab664f274..a928d56905a 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java
@@ -87,12 +87,13 @@ public class PStack extends Tool {
while (f != null) {
ClosestSymbol sym = f.closestSymbolToPC();
Address pc = f.pc();
+ out.print(pc + "\t");
if (sym != null) {
String name = sym.getName();
if (cdbgCanDemangle) {
name = cdbg.demangle(name);
}
- out.print(pc + "\t" + name);
+ out.print(name);
long diff = sym.getOffset();
if (diff != 0L) {
out.print(" + 0x" + Long.toHexString(diff));
@@ -120,7 +121,6 @@ public class PStack extends Tool {
// look for known code blobs
CodeCache c = VM.getVM().getCodeCache();
if (c.contains(pc)) {
- out.print(pc + "\t");
CodeBlob cb = c.findBlobUnsafe(pc);
if (cb.isNMethod()) {
names = getJavaNames(th, f.localVariableBase());
@@ -144,18 +144,18 @@ public class PStack extends Tool {
out.println("");
}
} else {
- printUnknown(out,pc);
+ printUnknown(out);
}
}
// print java frames, if any
if (names != null && names.length != 0) {
// print java frame(s)
for (int i = 0; i < names.length; i++) {
- out.println(pc + "\t" + names[i]);
+ out.println(names[i]);
}
}
} else {
- printUnknown(out,pc);
+ printUnknown(out);
}
}
f = f.sender();
@@ -220,8 +220,8 @@ public class PStack extends Tool {
}
}
- private void printUnknown(PrintStream out, Address pc) {
- out.println(pc + "\t????????");
+ private void printUnknown(PrintStream out) {
+ out.println("\t????????");
}
private String[] getJavaNames(ThreadProxy th, Address fp) {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Field.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Field.java
index bfda1f18640..a4b98adaae2 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Field.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Field.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Type.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Type.java
index b565d326d94..1e463987672 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Type.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Type.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicField.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicField.java
index 10e2b7aa0aa..ecc46f1d3ff 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicField.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicFieldWrapper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicFieldWrapper.java
index 77717bedcda..c4388c94297 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicFieldWrapper.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicFieldWrapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicOopField.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicOopField.java
index 1886a4c5324..3b85996b472 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicOopField.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicOopField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicType.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicType.java
index 112ff722cb2..f72bb7ba635 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicType.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicTypeDataBase.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicTypeDataBase.java
index 5db97d60177..f50fb03c16f 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicTypeDataBase.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicTypeDataBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/AnnotatedMemoryPanel.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/AnnotatedMemoryPanel.java
index 02bb9543842..c76fa142e93 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/AnnotatedMemoryPanel.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/AnnotatedMemoryPanel.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -648,6 +648,6 @@ public class AnnotatedMemoryPanel extends JPanel {
System.exit(0);
}
});
- frame.show();
+ frame.setVisible(true);
}
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/CommandProcessorPanel.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/CommandProcessorPanel.java
index e340a78a94f..26167e67f9d 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/CommandProcessorPanel.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/CommandProcessorPanel.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -220,7 +220,7 @@ public class CommandProcessorPanel extends JPanel {
}
});
frame.setSize(500, 500);
- frame.show();
+ frame.setVisible(true);
panel.requestFocus();
}
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/DebuggerConsolePanel.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/DebuggerConsolePanel.java
index 7317fa0955c..c037fc1bf38 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/DebuggerConsolePanel.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/DebuggerConsolePanel.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -226,7 +226,7 @@ public class DebuggerConsolePanel extends JPanel {
}
});
frame.setSize(500, 500);
- frame.show();
+ frame.setVisible(true);
panel.requestFocus();
}
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/FindInHeapPanel.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/FindInHeapPanel.java
index a3eae3bca8d..5dec6019ab0 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/FindInHeapPanel.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/FindInHeapPanel.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/HighPrecisionJScrollBar.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/HighPrecisionJScrollBar.java
index 073afd6e6a7..7a8cfb6876b 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/HighPrecisionJScrollBar.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/HighPrecisionJScrollBar.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -424,7 +424,7 @@ public class HighPrecisionJScrollBar extends JScrollBar {
}
});
frame.getContentPane().add(hpsb);
- frame.show();
+ frame.setVisible(true);
}
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/JFrameWrapper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/JFrameWrapper.java
index 70cece15b4f..81d02573149 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/JFrameWrapper.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/JFrameWrapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@ public class JFrameWrapper implements FrameWrapper {
public void setVisible(boolean visible) { frame.setVisible(visible); }
public void setSize(int x, int y) { frame.setSize(x, y); }
public void pack() { frame.pack(); }
- public void show() { frame.show(); }
+ public void show() { frame.setVisible(true); }
public void dispose() { frame.dispose(); }
public void setBackground(Color color) { frame.setBackground(color); }
public void setResizable(boolean resizable) { frame.setResizable(resizable); }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
index 6d66bb77d84..d9b8f5bbced 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/treetable/JTreeTable.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/treetable/JTreeTable.java
index 42b0c94da9e..1d3fff4abb2 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/treetable/JTreeTable.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/treetable/JTreeTable.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -477,9 +477,9 @@ public class JTreeTable extends JTable {
static class TreeTableTextField extends JTextField {
public int offset;
- public void reshape(int x, int y, int w, int h) {
+ public void setBounds(int x, int y, int w, int h) {
int newX = Math.max(x, offset);
- super.reshape(newX, y, w - (newX - x), h);
+ super.setBounds(newX, y, w - (newX - x), h);
}
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java
index 0da5005f604..31880e8eab7 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
index 16226721865..bcd4f42ff94 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java
index f5ca60a8e5c..3fde2fd3560 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java
index 2d6957f5812..255a98f6f08 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/Makefile b/hotspot/make/Makefile
index 2fc73534b4e..bd2744180ce 100644
--- a/hotspot/make/Makefile
+++ b/hotspot/make/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/defs.make b/hotspot/make/defs.make
index 056d90c4846..5e94726b3f3 100644
--- a/hotspot/make/defs.make
+++ b/hotspot/make/defs.make
@@ -1,5 +1,5 @@
#
-# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -228,6 +228,7 @@ endif
# Required make macro settings for all platforms
MAKE_ARGS += JAVA_HOME=$(ABS_BOOTDIR)
+MAKE_ARGS += OUTPUTDIR=$(ABS_OUTPUTDIR)
MAKE_ARGS += GAMMADIR=$(ABS_GAMMADIR)
MAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE)
MAKE_ARGS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION)
diff --git a/hotspot/make/hotspot_distro b/hotspot/make/hotspot_distro
index 9b111a2b3ec..bae47300e58 100644
--- a/hotspot/make/hotspot_distro
+++ b/hotspot/make/hotspot_distro
@@ -1,5 +1,5 @@
#
-# Copyright 2006-2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All rights reserved.
# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version
index c4478727175..b30abbb8928 100644
--- a/hotspot/make/hotspot_version
+++ b/hotspot/make/hotspot_version
@@ -1,5 +1,5 @@
#
-# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,7 @@
# Don't put quotes (fail windows build).
HOTSPOT_VM_COPYRIGHT=Copyright 2008
-HS_MAJOR_VER=13
+HS_MAJOR_VER=14
HS_MINOR_VER=0
HS_BUILD_NUMBER=01
diff --git a/hotspot/make/jprt.config b/hotspot/make/jprt.config
index 2c1f0dce2f4..dd9940763c2 100644
--- a/hotspot/make/jprt.config
+++ b/hotspot/make/jprt.config
@@ -1,6 +1,6 @@
#!echo "This is not a shell script"
#
-# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -68,8 +68,23 @@ if [ "${osname}" = SunOS ] ; then
solaris_arch=i386
fi
- # Get the SS11 compilers into path (make sure it matches ALT setting)
- compiler_path=${slashjava}/devtools/${solaris_arch}/SUNWspro/SS11/bin
+ if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
+ compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
+ else
+ if [ "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6" -o \
+ "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6u10" -o \
+ "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6perf" ] ; then
+ # All jdk6 builds use SS11
+ compiler_name=SS11
+ else
+ # FIXUP: Change to SS12 once it has been validated.
+ #compiler_name=SS12
+ compiler_name=SS11
+ fi
+ fi
+
+ # Get into path (make sure it matches ALT setting)
+ compiler_path=${slashjava}/devtools/${solaris_arch}/SUNWspro/${compiler_name}/bin
dirMustExist "${compiler_path}" COMPILER_PATH
path4sdk=${compiler_path}
diff --git a/hotspot/make/jprt.properties b/hotspot/make/jprt.properties
index fd5a75de042..459867eae08 100644
--- a/hotspot/make/jprt.properties
+++ b/hotspot/make/jprt.properties
@@ -1,5 +1,5 @@
#
-# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -24,209 +24,274 @@
# Properties for jprt
-JPRT.tools.default.release=jdk1.7.0
+# All build result bundles are full jdks, so the 64bit testing does not
+# need the 32bit sibling bundle installed.
+# Note: If the hotspot/make/Makefile changed to only bundle the 64bit files
+# when bundling 64bit, and stripped out the 64bit files from any 32bit
+# bundles, then this setting would be need to be "true".
-# Build result bundles are not partial builds| but include everything
-JPRT.need.sibling.build=false
+jprt.need.sibling.build=false
-# Directories needed to build
-JPRT.bundle.src.dirs=make src agent
-JPRT.bundle.exclude.src.dirs=build
+# At submit time, the release supplied will be in jprt.submit.release
+# and will be one of the official release names defined in jprt.
+# jprt supports property value expansion using ${property.name} syntax.
+# This tells jprt what default release we want to build
-# Standard list of JPRT build targets for this workspace
-JPRT.build.targets= \
- solaris_sparc_5.10-{product|fastdebug|debug}, \
- solaris_sparcv9_5.10-{product|fastdebug|debug}, \
- solaris_i586_5.10-{product|fastdebug|debug}, \
- solaris_x64_5.10-{product|fastdebug|debug}, \
- linux_i586-{product|fastdebug|debug}, \
- linux_x64-{product|fastdebug}, \
- windows_i586-{product|fastdebug|debug}, \
- windows_x64-{product|fastdebug|debug}
+jprt.tools.default.release=${jprt.submit.release}
-# Standard list of JPRT test targets for this workspace
-JPRT.test.targets = \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-jvm98, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-scimark, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-jvm98, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-scimark, \
- solaris_i586_5.10-{product|fastdebug}-{c1|c2}-jvm98, \
- solaris_i586_5.10-{product|fastdebug}-{c1|c2}-scimark, \
- solaris_x64_5.10-{product|fastdebug}-c2-jvm98, \
- solaris_x64_5.10-{product|fastdebug}-c2-scimark, \
- linux_i586-{product|fastdebug}-{c1|c2}-jvm98, \
- linux_i586-{product|fastdebug}-{c1|c2}-scimark, \
- linux_x64-{product|fastdebug}-c2-jvm98, \
- linux_x64-{product|fastdebug}-c2-scimark, \
- windows_i586-{product|fastdebug}-{c1|c2}-jvm98, \
- windows_i586-{product|fastdebug}-{c1|c2}-scimark, \
- windows_x64-{product|fastdebug}-c2-jvm98, \
- windows_x64-{product|fastdebug}-c2-scimark, \
- solaris_sparc_5.10-product-{c1|c2}-runThese, \
- solaris_sparc_5.10-product-{c1|c2}-runThese_Xcomp, \
- solaris_sparc_5.10-product-{c1|c2}-runThese_Xcomp_2, \
- solaris_sparc_5.10-product-{c1|c2}-runThese_Xcomp_3, \
- solaris_sparc_5.10-fastdebug-c1-runThese_Xshare, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_default, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_default_2, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC_2, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC_2, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC_2, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCBasher_CMS_2, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCOld_default, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCOld_SerialGC, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCOld_ParallelGC, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCOld_ParNewGC, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-GCOld_CMS, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-jbb_default, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-jbb_SerialGC, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-jbb_ParallelGC, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-jbb_CMS, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-scimark_2, \
- solaris_sparc_5.10-{product|fastdebug}-{c1|c2}-scimark_3, \
- solaris_sparcv9_5.10-product-c2-runThese, \
- solaris_sparcv9_5.10-product-c2-runThese_Xcomp, \
- solaris_sparcv9_5.10-product-c2-runThese_Xcomp_2, \
- solaris_sparcv9_5.10-product-c2-runThese_Xcomp_3, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_default, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_SerialGC, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_ParallelGC, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_ParNewGC, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_CMS, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_default_2, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_SerialGC_2, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_ParallelGC_2, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_ParNewGC_2, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCBasher_CMS_2, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCOld_default, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCOld_SerialGC, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCOld_ParallelGC, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCOld_ParNewGC, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-GCOld_CMS, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-jbb_default, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-jbb_SerialGC, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-jbb_ParallelGC, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-jbb_CMS, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-scimark_2, \
- solaris_sparcv9_5.10-{product|fastdebug}-c2-scimark_3, \
- solaris_x64-product-c2-runThese, \
- solaris_x64-product-c2-runThese_Xcomp, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_default, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_SerialGC, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_ParallelGC, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_ParNewGC, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_CMS, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_default_2, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_SerialGC_2, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_ParallelGC_2, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_ParNewGC_2, \
- solaris_x64-{product|fastdebug}-c2-GCBasher_CMS_2, \
- solaris_x64-{product|fastdebug}-c2-GCOld_default, \
- solaris_x64-{product|fastdebug}-c2-GCOld_SerialGC, \
- solaris_x64-{product|fastdebug}-c2-GCOld_ParallelGC, \
- solaris_x64-{product|fastdebug}-c2-GCOld_ParNewGC, \
- solaris_x64-{product|fastdebug}-c2-GCOld_CMS, \
- solaris_x64-{product|fastdebug}-c2-jbb_default, \
- solaris_x64-{product|fastdebug}-c2-jbb_SerialGC, \
- solaris_x64-{product|fastdebug}-c2-jbb_ParallelGC, \
- solaris_x64-{product|fastdebug}-c2-jbb_CMS, \
- solaris_i586_5.10-product-{c1|c2}-runThese_Xcomp, \
- solaris_i586_5.10-product-c2-runThese_Xcomp_2, \
- solaris_i586_5.10-fastdebug-c1-runThese_Xcomp_2, \
- solaris_i586_5.10-fastdebug-c1-runThese_Xshare, \
- solaris_i586_5.10-product-c1-GCBasher_default, \
- solaris_i586_5.10-product-c1-GCBasher_SerialGC, \
- solaris_i586_5.10-product-c1-GCBasher_ParallelGC, \
- solaris_i586_5.10-product-c1-GCBasher_ParNewGC, \
- solaris_i586_5.10-product-c1-GCBasher_CMS, \
- solaris_i586_5.10-fastdebug-c2-GCBasher_default, \
- solaris_i586_5.10-fastdebug-c2-GCBasher_SerialGC, \
- solaris_i586_5.10-fastdebug-c2-GCBasher_ParallelGC, \
- solaris_i586_5.10-fastdebug-c2-GCBasher_ParNewGC, \
- solaris_i586_5.10-fastdebug-c2-GCBasher_CMS, \
- solaris_i586_5.10-product-c1-GCOld_default, \
- solaris_i586_5.10-product-c1-GCOld_SerialGC, \
- solaris_i586_5.10-product-c1-GCOld_ParallelGC, \
- solaris_i586_5.10-product-c1-GCOld_ParNewGC, \
- solaris_i586_5.10-product-c1-GCOld_CMS, \
- solaris_i586_5.10-fastdebug-c2-jbb_default, \
- solaris_i586_5.10-fastdebug-c2-jbb_ParallelGC, \
- solaris_i586_5.10-fastdebug-c2-jbb_CMS, \
- solaris_i586_5.10-{product|fastdebug}-{c1|c2}-scimark_2, \
- solaris_i586_5.10-{product|fastdebug}-{c1|c2}-scimark_3, \
- linux_i586-product-c1-runThese_Xcomp, \
- linux_i586-product-c1-runThese_Xcomp_2, \
- linux_i586-product-c1-runThese_Xcomp_3, \
- linux_i586-fastdebug-c1-runThese_Xshare, \
- linux_i586-fastdebug-c2-runThese_Xcomp, \
- linux_i586-fastdebug-c2-runThese_Xcomp_2, \
- linux_i586-{product|fastdebug}-{c1|c2}-GCBasher_default, \
- linux_i586-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
- linux_i586-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
- linux_i586-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
- linux_i586-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
- linux_i586-product-{c1|c2}-GCOld_default, \
- linux_i586-product-{c1|c2}-GCOld_SerialGC, \
- linux_i586-product-{c1|c2}-GCOld_ParallelGC, \
- linux_i586-product-{c1|c2}-GCOld_ParNewGC, \
- linux_i586-product-{c1|c2}-GCOld_CMS, \
- linux_i586-{product|fastdebug}-c1-jbb_default, \
- linux_i586-{product|fastdebug}-c1-jbb_ParallelGC, \
- linux_i586-{product|fastdebug}-c1-jbb_CMS, \
- linux_i586-{product|fastdebug}-c2-scimark_2, \
- linux_i586-{product|fastdebug}-c2-scimark_3, \
- linux_x64-{product|fastdebug}-c2-GCBasher_default, \
- linux_x64-{product|fastdebug}-c2-GCBasher_SerialGC, \
- linux_x64-{product|fastdebug}-c2-GCBasher_ParallelGC, \
- linux_x64-{product|fastdebug}-c2-GCBasher_ParNewGC, \
- linux_x64-{product|fastdebug}-c2-GCBasher_CMS, \
- linux_x64-{product|fastdebug}-c2-GCOld_default, \
- linux_x64-{product|fastdebug}-c2-GCOld_SerialGC, \
- linux_x64-{product|fastdebug}-c2-GCOld_ParallelGC, \
- linux_x64-{product|fastdebug}-c2-GCOld_ParNewGC, \
- linux_x64-{product|fastdebug}-c2-GCOld_CMS, \
- linux_x64-{product|fastdebug}-c2-jbb_default, \
- linux_x64-{product|fastdebug}-c2-jbb_ParallelGC, \
- linux_x64-{product|fastdebug}-c2-scimark_2, \
- linux_x64-{product|fastdebug}-c2-scimark_3, \
- windows_i586-product-{c1|c2}-runThese, \
- windows_i586-product-{c1|c2}-runThese_Xcomp, \
- windows_i586-fastdebug-c1-runThese_Xshare, \
- windows_i586-{product|fastdebug}-{c1|c2}-GCBasher_default, \
- windows_i586-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
- windows_i586-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
- windows_i586-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
- windows_i586-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
- windows_i586-product-{c1|c2}-GCOld_default, \
- windows_i586-product-{c1|c2}-GCOld_SerialGC, \
- windows_i586-product-{c1|c2}-GCOld_ParallelGC, \
- windows_i586-product-{c1|c2}-GCOld_ParNewGC, \
- windows_i586-product-{c1|c2}-GCOld_CMS, \
- windows_i586-{product|fastdebug}-{c1|c2}-jbb_default, \
- windows_i586-product-{c1|c2}-jbb_ParallelGC, \
- windows_i586-product-{c1|c2}-jbb_CMS, \
- windows_i586-product-{c1|c2}-scimark_2, \
- windows_i586-product-{c1|c2}-scimark_3, \
- windows_x64-product-c2-runThese, \
- windows_x64-product-c2-runThese_Xcomp, \
- windows_x64-{product|fastdebug}-c2-GCBasher_default, \
- windows_x64-{product|fastdebug}-c2-GCBasher_SerialGC, \
- windows_x64-{product|fastdebug}-c2-GCBasher_ParallelGC, \
- windows_x64-{product|fastdebug}-c2-GCBasher_ParNewGC, \
- windows_x64-{product|fastdebug}-c2-GCBasher_CMS, \
- windows_x64-{product|fastdebug}-c2-GCOld_default, \
- windows_x64-{product|fastdebug}-c2-GCOld_SerialGC, \
- windows_x64-{product|fastdebug}-c2-GCOld_ParallelGC, \
- windows_x64-{product|fastdebug}-c2-GCOld_ParNewGC, \
- windows_x64-{product|fastdebug}-c2-GCOld_CMS, \
- windows_x64-{product|fastdebug}-c2-jbb_default, \
- windows_x64-product-c2-jbb_CMS, \
- windows_x64-product-c2-jbb_ParallelGC, \
- windows_x64-{product|fastdebug}-c2-scimark_2, \
- windows_x64-{product|fastdebug}-c2-scimark_3
+# Define the Solaris platforms we want for the various releases
+
+jprt.my.solaris.sparc.jdk7=solaris_sparc_5.10
+jprt.my.solaris.sparc.jdk6=solaris_sparc_5.8
+jprt.my.solaris.sparc.jdk6perf=solaris_sparc_5.8
+jprt.my.solaris.sparc.jdk6u10=solaris_sparc_5.8
+jprt.my.solaris.sparc=${jprt.my.solaris.sparc.${jprt.tools.default.release}}
+
+jprt.my.solaris.sparcv9.jdk7=solaris_sparcv9_5.10
+jprt.my.solaris.sparcv9.jdk6=solaris_sparcv9_5.8
+jprt.my.solaris.sparcv9.jdk6perf=solaris_sparcv9_5.8
+jprt.my.solaris.sparcv9.jdk6u10=solaris_sparcv9_5.8
+jprt.my.solaris.sparcv9=${jprt.my.solaris.sparcv9.${jprt.tools.default.release}}
+
+jprt.my.solaris.i586.jdk7=solaris_i586_5.10
+jprt.my.solaris.i586.jdk6=solaris_i586_5.8
+jprt.my.solaris.i586.jdk6perf=solaris_i586_5.8
+jprt.my.solaris.i586.jdk6u10=solaris_i586_5.8
+jprt.my.solaris.i586=${jprt.my.solaris.i586.${jprt.tools.default.release}}
+
+jprt.my.solaris.x64.jdk7=solaris_x64_5.10
+jprt.my.solaris.x64.jdk6=solaris_x64_5.10
+jprt.my.solaris.x64.jdk6perf=solaris_x64_5.10
+jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
+jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
+
+jprt.my.linux.i586=linux_i586
+jprt.my.linux.x64=linux_x64
+jprt.my.windows.i586=windows_i586
+jprt.my.windows.x64=windows_x64
+
+# Standard list of jprt build targets for this source tree
+
+jprt.build.targets= \
+ ${jprt.my.solaris.sparc}-{product|fastdebug|debug}, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug|debug}, \
+ ${jprt.my.solaris.i586}-{product|fastdebug|debug}, \
+ ${jprt.my.solaris.x64}-{product|fastdebug|debug}, \
+ ${jprt.my.linux.i586}-{product|fastdebug|debug}, \
+ ${jprt.my.linux.x64}-{product|fastdebug}, \
+ ${jprt.my.windows.i586}-{product|fastdebug|debug}, \
+ ${jprt.my.windows.x64}-{product|fastdebug|debug}
+
+# Subset lists of test targets for this source tree
+
+jprt.my.solaris.sparc.test.targets= \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jvm98, \
+ ${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_Xcomp, \
+ ${jprt.my.solaris.sparc}-product-{c1|c2}-runThese_Xcomp_2, \
+ ${jprt.my.solaris.sparc}-product-{c1|c2}-runThese_Xcomp_3, \
+ ${jprt.my.solaris.sparc}-fastdebug-c1-runThese_Xshare, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_default_2, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC_2, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC_2, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC_2, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_CMS_2, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_default, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_SerialGC, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_ParallelGC, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_ParNewGC, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_CMS, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_default, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_SerialGC, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_ParallelGC, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_CMS, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-scimark_3
+
+jprt.my.solaris.sparcv9.test.targets= \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark, \
+ ${jprt.my.solaris.sparcv9}-product-c2-runThese, \
+ ${jprt.my.solaris.sparcv9}-product-c2-runThese_Xcomp, \
+ ${jprt.my.solaris.sparcv9}-product-c2-runThese_Xcomp_2, \
+ ${jprt.my.solaris.sparcv9}-product-c2-runThese_Xcomp_3, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_default, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_SerialGC, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_CMS, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_default_2, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_SerialGC_2, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParallelGC_2, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParNewGC_2, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_CMS_2, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_default, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_SerialGC, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_ParallelGC, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_ParNewGC, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_CMS, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_default, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_SerialGC, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_ParallelGC, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_CMS, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark_2, \
+ ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark_3
+
+jprt.my.solaris.x64.test.targets= \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-scimark, \
+ ${jprt.my.solaris.x64}-product-c2-runThese, \
+ ${jprt.my.solaris.x64}-product-c2-runThese_Xcomp, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_default, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_CMS, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_default_2, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_SerialGC_2, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC_2, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC_2, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_CMS_2, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_default, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_SerialGC, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_ParallelGC, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_ParNewGC, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_CMS, \
+ ${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_default, \
+ ${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_CMS
+
+jprt.my.solaris.i586.test.targets= \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+ ${jprt.my.solaris.i586}-product-{c1|c2}-runThese_Xcomp, \
+ ${jprt.my.solaris.i586}-product-c2-runThese_Xcomp_2, \
+ ${jprt.my.solaris.i586}-fastdebug-c1-runThese_Xcomp_2, \
+ ${jprt.my.solaris.i586}-fastdebug-c1-runThese_Xshare, \
+ ${jprt.my.solaris.i586}-product-c1-GCBasher_default, \
+ ${jprt.my.solaris.i586}-product-c1-GCBasher_SerialGC, \
+ ${jprt.my.solaris.i586}-product-c1-GCBasher_ParallelGC, \
+ ${jprt.my.solaris.i586}-product-c1-GCBasher_ParNewGC, \
+ ${jprt.my.solaris.i586}-product-c1-GCBasher_CMS, \
+ ${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_default, \
+ ${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_SerialGC, \
+ ${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_ParallelGC, \
+ ${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_ParNewGC, \
+ ${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_CMS, \
+ ${jprt.my.solaris.i586}-product-c1-GCOld_default, \
+ ${jprt.my.solaris.i586}-product-c1-GCOld_SerialGC, \
+ ${jprt.my.solaris.i586}-product-c1-GCOld_ParallelGC, \
+ ${jprt.my.solaris.i586}-product-c1-GCOld_ParNewGC, \
+ ${jprt.my.solaris.i586}-product-c1-GCOld_CMS, \
+ ${jprt.my.solaris.i586}-fastdebug-c2-jbb_default, \
+ ${jprt.my.solaris.i586}-fastdebug-c2-jbb_ParallelGC, \
+ ${jprt.my.solaris.i586}-fastdebug-c2-jbb_CMS, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
+
+jprt.my.linux.i586.test.targets = \
+ ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+ ${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_2, \
+ ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
+ ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
+ ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+ ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+ ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
+ ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
+ ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+ ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+ ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
+ ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
+
+jprt.my.linux.x64.test.targets = \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-scimark, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_default, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_CMS, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_default, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_SerialGC, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_ParallelGC, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_ParNewGC, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_CMS, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_default, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_ParallelGC, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-scimark_2, \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-scimark_3
+
+jprt.my.windows.i586.test.targets = \
+ ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+ ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-runThese, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-runThese_Xcomp, \
+ ${jprt.my.windows.i586}-fastdebug-c1-runThese_Xshare, \
+ ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+ ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+ ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+ ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+ ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-GCOld_default, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-GCOld_SerialGC, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-GCOld_CMS, \
+ ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jbb_default, \
+ ${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}-scimark_2, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-scimark_3
+
+jprt.my.windows.x64.test.targets = \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-scimark, \
+ ${jprt.my.windows.x64}-product-c2-runThese, \
+ ${jprt.my.windows.x64}-product-c2-runThese_Xcomp, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_default, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_CMS, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_default, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_SerialGC, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_ParallelGC, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_ParNewGC, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_CMS, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-jbb_default, \
+ ${jprt.my.windows.x64}-product-c2-jbb_CMS, \
+ ${jprt.my.windows.x64}-product-c2-jbb_ParallelGC, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-scimark_2, \
+ ${jprt.my.windows.x64}-{product|fastdebug}-c2-scimark_3
+
+# The complete list of test targets for jprt
+
+jprt.test.targets = \
+ ${jprt.my.solaris.sparc.test.targets}, \
+ ${jprt.my.solaris.sparcv9.test.targets}, \
+ ${jprt.my.solaris.i586.test.targets}, \
+ ${jprt.my.solaris.x64.test.targets}, \
+ ${jprt.my.linux.i586.test.targets}, \
+ ${jprt.my.linux.x64.test.targets}, \
+ ${jprt.my.windows.i586.test.targets}, \
+ ${jprt.my.windows.x64.test.targets}
diff --git a/hotspot/make/linux/Makefile b/hotspot/make/linux/Makefile
index 0e1ee65277a..21f2b3d7f5a 100644
--- a/hotspot/make/linux/Makefile
+++ b/hotspot/make/linux/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/Queens.class b/hotspot/make/linux/Queens.class
deleted file mode 100644
index d4582a04411..00000000000
Binary files a/hotspot/make/linux/Queens.class and /dev/null differ
diff --git a/hotspot/make/linux/build.sh b/hotspot/make/linux/build.sh
index 4239c6dcbe9..e317fddd4ae 100644
--- a/hotspot/make/linux/build.sh
+++ b/hotspot/make/linux/build.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/adjust-mflags.sh b/hotspot/make/linux/makefiles/adjust-mflags.sh
index 325e02d4fb1..169f86b6695 100644
--- a/hotspot/make/linux/makefiles/adjust-mflags.sh
+++ b/hotspot/make/linux/makefiles/adjust-mflags.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/adlc.make b/hotspot/make/linux/makefiles/adlc.make
index 16e48c84ed5..5349f5bd323 100644
--- a/hotspot/make/linux/makefiles/adlc.make
+++ b/hotspot/make/linux/makefiles/adlc.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/amd64.make b/hotspot/make/linux/makefiles/amd64.make
index d69cce70b9a..fec7787ec64 100644
--- a/hotspot/make/linux/makefiles/amd64.make
+++ b/hotspot/make/linux/makefiles/amd64.make
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/buildtree.make b/hotspot/make/linux/makefiles/buildtree.make
index 54a30d2ad0a..005ef37cd42 100644
--- a/hotspot/make/linux/makefiles/buildtree.make
+++ b/hotspot/make/linux/makefiles/buildtree.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -328,18 +328,19 @@ JAVA_FLAG/64 = -d64
WRONG_DATA_MODE_MSG = \
echo "JAVA_HOME must point to $(DATA_MODE)bit JDK."
-test_gamma: $(BUILDTREE_MAKE)
+test_gamma: $(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java
@echo Creating $@ ...
$(QUIETLY) ( \
echo '#!/bin/sh'; \
$(BUILDTREE_COMMENT); \
echo '. ./env.sh'; \
echo "if [ -z \$$JAVA_HOME ]; then { $(NO_JAVA_HOME_MSG); exit 0; }; fi"; \
- echo "if ! \$${JAVA_HOME}/bin/java $(JAVA_FLAG) -fullversion 2>1 > /dev/null"; \
+ echo "if ! \$${JAVA_HOME}/bin/java $(JAVA_FLAG) -fullversion 2>&1 > /dev/null"; \
echo "then"; \
echo " $(WRONG_DATA_MODE_MSG); exit 0;"; \
echo "fi"; \
- echo 'CLASSPATH="$(GAMMADIR)/make/$(OS_FAMILY):$$CLASSPATH"'; \
+ echo "rm -f Queens.class"; \
+ echo "\$${JAVA_HOME}/bin/javac -d . $(GAMMADIR)/make/test/Queens.java"; \
echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \
echo './$${gamma:-gamma} $(TESTFLAGS) Queens < /dev/null'; \
) > $@
diff --git a/hotspot/make/linux/makefiles/compiler1.make b/hotspot/make/linux/makefiles/compiler1.make
index 3573eccfac4..2fc8eb8a8e1 100644
--- a/hotspot/make/linux/makefiles/compiler1.make
+++ b/hotspot/make/linux/makefiles/compiler1.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/compiler2.make b/hotspot/make/linux/makefiles/compiler2.make
index 5ef2129ae5a..af1ec8476ca 100644
--- a/hotspot/make/linux/makefiles/compiler2.make
+++ b/hotspot/make/linux/makefiles/compiler2.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/core.make b/hotspot/make/linux/makefiles/core.make
index dbe2ee3a8e3..27b1aa7c36f 100644
--- a/hotspot/make/linux/makefiles/core.make
+++ b/hotspot/make/linux/makefiles/core.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/cscope.make b/hotspot/make/linux/makefiles/cscope.make
index 13ee5b65d0e..113d4f831af 100644
--- a/hotspot/make/linux/makefiles/cscope.make
+++ b/hotspot/make/linux/makefiles/cscope.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/debug.make b/hotspot/make/linux/makefiles/debug.make
index 75bb950891d..4743745228d 100644
--- a/hotspot/make/linux/makefiles/debug.make
+++ b/hotspot/make/linux/makefiles/debug.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/defs.make b/hotspot/make/linux/makefiles/defs.make
index 7a06eb51276..2925654e677 100644
--- a/hotspot/make/linux/makefiles/defs.make
+++ b/hotspot/make/linux/makefiles/defs.make
@@ -1,5 +1,5 @@
#
-# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/dtrace.make b/hotspot/make/linux/makefiles/dtrace.make
index ee02f7a7d7c..a46a6758598 100644
--- a/hotspot/make/linux/makefiles/dtrace.make
+++ b/hotspot/make/linux/makefiles/dtrace.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/fastdebug.make b/hotspot/make/linux/makefiles/fastdebug.make
index c7ae47ac966..740b7584364 100644
--- a/hotspot/make/linux/makefiles/fastdebug.make
+++ b/hotspot/make/linux/makefiles/fastdebug.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/gcc.make b/hotspot/make/linux/makefiles/gcc.make
index 66173061293..4a01c29c50e 100644
--- a/hotspot/make/linux/makefiles/gcc.make
+++ b/hotspot/make/linux/makefiles/gcc.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -50,14 +50,7 @@ PICFLAG = -fPIC
VM_PICFLAG/LIBJVM = $(PICFLAG)
VM_PICFLAG/AOUT =
-
-ifneq ($(BUILDARCH), i486)
VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
-else
-# PIC has significant overhead on x86, build nonpic VM for now.
-# Link JVM at a "good" base location to avoid unnecessary .text patching.
-JVM_BASE_ADDR = 0x06000000
-endif
CFLAGS += $(VM_PICFLAG)
CFLAGS += -fno-rtti
@@ -91,8 +84,17 @@ endif
# Compiler warnings are treated as errors
WARNINGS_ARE_ERRORS = -Werror
+
# Except for a few acceptable ones
+# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
+# conversions which might affect the values. To avoid that, we need to turn
+# it off explicitly.
+ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
+ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare
+else
ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare
+endif
+
CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
# Special cases
CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
diff --git a/hotspot/make/linux/makefiles/hp.make b/hotspot/make/linux/makefiles/hp.make
index 5ead8272c16..c616d1a8dc8 100644
--- a/hotspot/make/linux/makefiles/hp.make
+++ b/hotspot/make/linux/makefiles/hp.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/hp1.make b/hotspot/make/linux/makefiles/hp1.make
index 7d62469a7f9..36e0d322f0d 100644
--- a/hotspot/make/linux/makefiles/hp1.make
+++ b/hotspot/make/linux/makefiles/hp1.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/i486.make b/hotspot/make/linux/makefiles/i486.make
index 63b67762f34..9dd0b4443fa 100644
--- a/hotspot/make/linux/makefiles/i486.make
+++ b/hotspot/make/linux/makefiles/i486.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/ia64.make b/hotspot/make/linux/makefiles/ia64.make
index b7c3aa27777..a647bc27e3a 100644
--- a/hotspot/make/linux/makefiles/ia64.make
+++ b/hotspot/make/linux/makefiles/ia64.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/jsig.make b/hotspot/make/linux/makefiles/jsig.make
index 32d3c2a18d6..0d254bfe8f3 100644
--- a/hotspot/make/linux/makefiles/jsig.make
+++ b/hotspot/make/linux/makefiles/jsig.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/jvmg.make b/hotspot/make/linux/makefiles/jvmg.make
index 9bf70b45e1b..4b09db64d21 100644
--- a/hotspot/make/linux/makefiles/jvmg.make
+++ b/hotspot/make/linux/makefiles/jvmg.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/jvmti.make b/hotspot/make/linux/makefiles/jvmti.make
index a73624857f8..70b33efef11 100644
--- a/hotspot/make/linux/makefiles/jvmti.make
+++ b/hotspot/make/linux/makefiles/jvmti.make
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/launcher.make b/hotspot/make/linux/makefiles/launcher.make
index 7284ce3a09e..e367409f00e 100644
--- a/hotspot/make/linux/makefiles/launcher.make
+++ b/hotspot/make/linux/makefiles/launcher.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/makedeps.make b/hotspot/make/linux/makefiles/makedeps.make
index 7bb452ace33..ae1fa179078 100644
--- a/hotspot/make/linux/makefiles/makedeps.make
+++ b/hotspot/make/linux/makefiles/makedeps.make
@@ -1,5 +1,5 @@
#
-# Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/mapfile-vers-debug b/hotspot/make/linux/makefiles/mapfile-vers-debug
index da8e6798f28..63cce8b1535 100644
--- a/hotspot/make/linux/makefiles/mapfile-vers-debug
+++ b/hotspot/make/linux/makefiles/mapfile-vers-debug
@@ -3,7 +3,7 @@
#
#
-# Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -89,6 +89,7 @@ SUNWprivate_1.1 {
JVM_FillInStackTrace;
JVM_FindClassFromClass;
JVM_FindClassFromClassLoader;
+ JVM_FindClassFromBootLoader;
JVM_FindLibraryEntry;
JVM_FindLoadedClass;
JVM_FindPrimitiveClass;
diff --git a/hotspot/make/linux/makefiles/mapfile-vers-jsig b/hotspot/make/linux/makefiles/mapfile-vers-jsig
index f7ae7fb22b9..1880c82273d 100644
--- a/hotspot/make/linux/makefiles/mapfile-vers-jsig
+++ b/hotspot/make/linux/makefiles/mapfile-vers-jsig
@@ -1,7 +1,7 @@
#
#
-# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/mapfile-vers-product b/hotspot/make/linux/makefiles/mapfile-vers-product
index 7f5407c1309..6a76dd9e97b 100644
--- a/hotspot/make/linux/makefiles/mapfile-vers-product
+++ b/hotspot/make/linux/makefiles/mapfile-vers-product
@@ -3,7 +3,7 @@
#
#
-# Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -89,6 +89,7 @@ SUNWprivate_1.1 {
JVM_FillInStackTrace;
JVM_FindClassFromClass;
JVM_FindClassFromClassLoader;
+ JVM_FindClassFromBootLoader;
JVM_FindLibraryEntry;
JVM_FindLoadedClass;
JVM_FindPrimitiveClass;
diff --git a/hotspot/make/linux/makefiles/optimized.make b/hotspot/make/linux/makefiles/optimized.make
index 0d6aff8e91d..c391e29ef59 100644
--- a/hotspot/make/linux/makefiles/optimized.make
+++ b/hotspot/make/linux/makefiles/optimized.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/product.make b/hotspot/make/linux/makefiles/product.make
index a128c1101fa..43281abea99 100644
--- a/hotspot/make/linux/makefiles/product.make
+++ b/hotspot/make/linux/makefiles/product.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/profiled.make b/hotspot/make/linux/makefiles/profiled.make
index c73acc848f8..c5acf86329c 100644
--- a/hotspot/make/linux/makefiles/profiled.make
+++ b/hotspot/make/linux/makefiles/profiled.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/rules.make b/hotspot/make/linux/makefiles/rules.make
index a81633de34a..6559388141c 100644
--- a/hotspot/make/linux/makefiles/rules.make
+++ b/hotspot/make/linux/makefiles/rules.make
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -133,10 +133,25 @@ ifeq ($(findstring j,$(MFLAGS)),j)
COMPILE_DONE = && { echo Done with $<; }
endif
+# Include $(NONPIC_OBJ_FILES) definition
+ifndef LP64
+include $(GAMMADIR)/make/pic.make
+endif
+
+# The non-PIC object files are only generated for 32 bit platforms.
+ifdef LP64
%.o: %.cpp
@echo Compiling $<
$(QUIETLY) $(REMOVE_TARGET)
$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+else
+%.o: %.cpp
+ @echo Compiling $<
+ $(QUIETLY) $(REMOVE_TARGET)
+ $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
+ $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
+ $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
+endif
%.o: %.s
@echo Assembling $<
diff --git a/hotspot/make/linux/makefiles/sa.make b/hotspot/make/linux/makefiles/sa.make
index 41843c5887d..94463d6a049 100644
--- a/hotspot/make/linux/makefiles/sa.make
+++ b/hotspot/make/linux/makefiles/sa.make
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/saproc.make b/hotspot/make/linux/makefiles/saproc.make
index f0e5d90f382..052adb13413 100644
--- a/hotspot/make/linux/makefiles/saproc.make
+++ b/hotspot/make/linux/makefiles/saproc.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/sparc.make b/hotspot/make/linux/makefiles/sparc.make
index a86f9f7b6f5..6601c373347 100644
--- a/hotspot/make/linux/makefiles/sparc.make
+++ b/hotspot/make/linux/makefiles/sparc.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/sparcWorks.make b/hotspot/make/linux/makefiles/sparcWorks.make
index 53819743beb..0a9f75b349a 100644
--- a/hotspot/make/linux/makefiles/sparcWorks.make
+++ b/hotspot/make/linux/makefiles/sparcWorks.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/sparcv9.make b/hotspot/make/linux/makefiles/sparcv9.make
index 7aad864e51c..d18e73bd2da 100644
--- a/hotspot/make/linux/makefiles/sparcv9.make
+++ b/hotspot/make/linux/makefiles/sparcv9.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/tiered.make b/hotspot/make/linux/makefiles/tiered.make
index 220124e50e1..5ad7f223c1a 100644
--- a/hotspot/make/linux/makefiles/tiered.make
+++ b/hotspot/make/linux/makefiles/tiered.make
@@ -1,5 +1,5 @@
#
-# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/top.make b/hotspot/make/linux/makefiles/top.make
index f0aa13576d0..2a7579febd7 100644
--- a/hotspot/make/linux/makefiles/top.make
+++ b/hotspot/make/linux/makefiles/top.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/vm.make b/hotspot/make/linux/makefiles/vm.make
index 65b18ef9e87..73caaf9a534 100644
--- a/hotspot/make/linux/makefiles/vm.make
+++ b/hotspot/make/linux/makefiles/vm.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/openjdk_distro b/hotspot/make/openjdk_distro
index 5eb900d9fcb..b0301aab466 100644
--- a/hotspot/make/openjdk_distro
+++ b/hotspot/make/openjdk_distro
@@ -1,5 +1,5 @@
#
-# Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/pic.make b/hotspot/make/pic.make
new file mode 100644
index 00000000000..b20f77c130b
--- /dev/null
+++ b/hotspot/make/pic.make
@@ -0,0 +1,41 @@
+#
+# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+#
+
+# A list of object files built without the platform specific PIC flags, e.g.
+# -fPIC on linux. Performance measurements show that by compiling GC related
+# code, we could significantly reduce the GC pause time on 32 bit Linux/Unix
+# platforms. See 6454213 for more details.
+include $(GAMMADIR)/make/scm.make
+
+ifneq ($(OSNAME), windows)
+ ifndef LP64
+ NONPIC_DIRS = memory oops gc_implementation gc_interface
+ NONPIC_DIRS := $(foreach dir,$(NONPIC_DIRS), $(GAMMADIR)/src/share/vm/$(dir))
+ # Look for source files under NONPIC_DIRS
+ NONPIC_FILES := $(foreach dir,$(NONPIC_DIRS),\
+ $(shell find $(dir) \( $(SCM_DIRS) \) -prune -o \
+ -name '*.cpp' -print))
+ NONPIC_OBJ_FILES := $(notdir $(subst .cpp,.o,$(NONPIC_FILES)))
+ endif
+endif
diff --git a/hotspot/make/sa.files b/hotspot/make/sa.files
index 9b524940f3b..6f76f9d8faa 100644
--- a/hotspot/make/sa.files
+++ b/hotspot/make/sa.files
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/Makefile b/hotspot/make/solaris/Makefile
index 0751fe9eb53..2e0882303bf 100644
--- a/hotspot/make/solaris/Makefile
+++ b/hotspot/make/solaris/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/Queens.class b/hotspot/make/solaris/Queens.class
deleted file mode 100644
index d4582a04411..00000000000
Binary files a/hotspot/make/solaris/Queens.class and /dev/null differ
diff --git a/hotspot/make/solaris/build.sh b/hotspot/make/solaris/build.sh
index bb8d175758c..29bff2d4b8f 100644
--- a/hotspot/make/solaris/build.sh
+++ b/hotspot/make/solaris/build.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright 1998-2000 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/adjust-mflags.sh b/hotspot/make/solaris/makefiles/adjust-mflags.sh
index 325e02d4fb1..169f86b6695 100644
--- a/hotspot/make/solaris/makefiles/adjust-mflags.sh
+++ b/hotspot/make/solaris/makefiles/adjust-mflags.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/adlc.make b/hotspot/make/solaris/makefiles/adlc.make
index b67ae554da0..f746d77494d 100644
--- a/hotspot/make/solaris/makefiles/adlc.make
+++ b/hotspot/make/solaris/makefiles/adlc.make
@@ -1,5 +1,5 @@
#
-# Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/amd64.make b/hotspot/make/solaris/makefiles/amd64.make
index 9b229e83b79..7ce14eae1db 100644
--- a/hotspot/make/solaris/makefiles/amd64.make
+++ b/hotspot/make/solaris/makefiles/amd64.make
@@ -1,5 +1,5 @@
#
-# Copyright 2004-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -45,10 +45,6 @@ OPT_CFLAGS/os_solaris_x86_64.o = -xO1
OPT_CFLAGS/generateOptoStub.o = -xO2
OPT_CFLAGS/thread.o = -xO2
-# Work around for 6624782
-OPT_CFLAGS/instanceKlass.o = -Qoption ube -no_a2lf
-OPT_CFLAGS/objArrayKlass.o = -Qoption ube -no_a2lf
-
else
ifeq ("${Platform_compiler}", "gcc")
diff --git a/hotspot/make/solaris/makefiles/buildtree.make b/hotspot/make/solaris/makefiles/buildtree.make
index 1fb22360dca..47aced3fc59 100644
--- a/hotspot/make/solaris/makefiles/buildtree.make
+++ b/hotspot/make/solaris/makefiles/buildtree.make
@@ -1,5 +1,5 @@
#
-# Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -340,7 +340,7 @@ JAVA_FLAG/64 = -d64
WRONG_DATA_MODE_MSG = \
echo "JAVA_HOME must point to $(DATA_MODE)bit JDK."
-test_gamma: $(BUILDTREE_MAKE)
+test_gamma: $(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java
@echo Creating $@ ...
$(QUIETLY) ( \
echo '#!/bin/ksh'; \
@@ -351,7 +351,8 @@ test_gamma: $(BUILDTREE_MAKE)
echo "then"; \
echo " $(WRONG_DATA_MODE_MSG); exit 0;"; \
echo "fi"; \
- echo 'CLASSPATH="$(GAMMADIR)/make/$(OS_FAMILY):$$CLASSPATH"'; \
+ echo "rm -f Queens.class"; \
+ echo "\$${JAVA_HOME}/bin/javac -d . $(GAMMADIR)/make/test/Queens.java"; \
echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \
echo './$${gamma:-gamma} $(TESTFLAGS) Queens < /dev/null'; \
) > $@
diff --git a/hotspot/make/solaris/makefiles/compiler1.make b/hotspot/make/solaris/makefiles/compiler1.make
index 3573eccfac4..2fc8eb8a8e1 100644
--- a/hotspot/make/solaris/makefiles/compiler1.make
+++ b/hotspot/make/solaris/makefiles/compiler1.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/compiler2.make b/hotspot/make/solaris/makefiles/compiler2.make
index 5ef2129ae5a..af1ec8476ca 100644
--- a/hotspot/make/solaris/makefiles/compiler2.make
+++ b/hotspot/make/solaris/makefiles/compiler2.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/core.make b/hotspot/make/solaris/makefiles/core.make
index e52d5b1ecca..e803bdb4ed0 100644
--- a/hotspot/make/solaris/makefiles/core.make
+++ b/hotspot/make/solaris/makefiles/core.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/cscope.make b/hotspot/make/solaris/makefiles/cscope.make
index 6fa197a56af..b5518555a50 100644
--- a/hotspot/make/solaris/makefiles/cscope.make
+++ b/hotspot/make/solaris/makefiles/cscope.make
@@ -1,5 +1,5 @@
#
-# Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/debug.make b/hotspot/make/solaris/makefiles/debug.make
index d759910be9e..69eb236ada1 100644
--- a/hotspot/make/solaris/makefiles/debug.make
+++ b/hotspot/make/solaris/makefiles/debug.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,8 @@ DEBUG_CFLAGS/DEFAULT= $(DEBUG_CFLAGS)
DEBUG_CFLAGS/BYFILE = $(DEBUG_CFLAGS/$@)$(DEBUG_CFLAGS/DEFAULT$(DEBUG_CFLAGS/$@))
ifeq ("${Platform_compiler}", "sparcWorks")
-ifeq ($(shell expr $(COMPILER_REV) \>= 5.8), 1)
+
+ifeq ($(COMPILER_REV),5.8)
# SS11 SEGV when compiling with -g and -xarch=v8, using different backend
DEBUG_CFLAGS/compileBroker.o = $(DEBUG_CFLAGS) -xO0
DEBUG_CFLAGS/jvmtiTagMap.o = $(DEBUG_CFLAGS) -xO0
diff --git a/hotspot/make/solaris/makefiles/defs.make b/hotspot/make/solaris/makefiles/defs.make
index a56e01b65d4..625399a72b3 100644
--- a/hotspot/make/solaris/makefiles/defs.make
+++ b/hotspot/make/solaris/makefiles/defs.make
@@ -1,5 +1,5 @@
#
-# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/dtrace.make b/hotspot/make/solaris/makefiles/dtrace.make
index f4f7edf934d..bcc7819aa43 100644
--- a/hotspot/make/solaris/makefiles/dtrace.make
+++ b/hotspot/make/solaris/makefiles/dtrace.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -92,12 +92,12 @@ XARCH = $(subst sparcv9,v9,$(shell echo $(ISA)))
$(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
@echo Making $@
$(QUIETLY) mkdir -p 64/ ; \
- $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. -I$(GENERATED) \
+ $(CC) $(SYMFLAG) $(ARCHFLAG/$(XARCH)) -D$(TYPE) -I. -I$(GENERATED) \
$(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc
$(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
@echo Making $@
$(QUIETLY) mkdir -p 64/ ; \
- $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. \
+ $(CC) $(SYMFLAG) $(ARCHFLAG/$(XARCH)) -D$(TYPE) -I. \
$(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor
endif # ifneq ("${ISA}","${BUILDARCH}")
diff --git a/hotspot/make/solaris/makefiles/fastdebug.make b/hotspot/make/solaris/makefiles/fastdebug.make
index 0329b4c3678..62eaeb8f968 100644
--- a/hotspot/make/solaris/makefiles/fastdebug.make
+++ b/hotspot/make/solaris/makefiles/fastdebug.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
# Sets make macros for making debug version of VM
# Compiler specific DEBUG_CFLAGS are passed in from gcc.make, sparcWorks.make
-# They may also specify FASTDEBUG_CFLAGS, but it defaults to DEBUG_FLAGS.
+# They may also specify FASTDEBUG_CFLAGS, but it defaults to DEBUG_CFLAGS.
FASTDEBUG_CFLAGS$(FASTDEBUG_CFLAGS) = $(DEBUG_CFLAGS)
@@ -35,15 +35,26 @@ OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
ifeq ("${Platform_compiler}", "sparcWorks")
OPT_CFLAGS/SLOWER = -xO2
-ifeq ($(shell expr $(COMPILER_REV) \>= 5.5), 1)
-# CC 5.5 has bug 4908364 with -xO4
+
+# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876)
+ifeq ($(COMPILER_REV), 5.9)
+ # Not clear this workaround could be skipped in some cases.
+ OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER)
+ OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER)
+ OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER)
+endif
+
+ifeq ($(COMPILER_REV), 5.5)
+# CC 5.5 has bug 4908364 with -xO4 (Fixed in 5.6)
OPT_CFLAGS/library_call.o = $(OPT_CFLAGS/SLOWER)
-else # COMPILER_REV >= 5.5
+endif # COMPILER_REV == 5.5
+
+ifeq ($(shell expr $(COMPILER_REV) \<= 5.4), 1)
# Compilation of *_.cpp can take an hour or more at O3. Use O2
# See comments at top of sparc.make.
OPT_CFLAGS/ad_$(Platform_arch).o = $(OPT_CFLAGS/SLOWER)
OPT_CFLAGS/dfa_$(Platform_arch).o = $(OPT_CFLAGS/SLOWER)
-endif # COMPILER_REV >= 5.5
+endif # COMPILER_REV <= 5.4
ifeq (${COMPILER_REV}, 5.0)
# Avoid a compiler bug caused by using -xO -g
diff --git a/hotspot/make/solaris/makefiles/gcc.make b/hotspot/make/solaris/makefiles/gcc.make
index d7314b97a85..8a88995f6de 100644
--- a/hotspot/make/solaris/makefiles/gcc.make
+++ b/hotspot/make/solaris/makefiles/gcc.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/hp.make b/hotspot/make/solaris/makefiles/hp.make
index ddf659bfe19..e2fc3a88b52 100644
--- a/hotspot/make/solaris/makefiles/hp.make
+++ b/hotspot/make/solaris/makefiles/hp.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/hp1.make b/hotspot/make/solaris/makefiles/hp1.make
index 7d62469a7f9..36e0d322f0d 100644
--- a/hotspot/make/solaris/makefiles/hp1.make
+++ b/hotspot/make/solaris/makefiles/hp1.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/i486.make b/hotspot/make/solaris/makefiles/i486.make
index 10b5949bacd..a8f92a361bb 100644
--- a/hotspot/make/solaris/makefiles/i486.make
+++ b/hotspot/make/solaris/makefiles/i486.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/jsig.make b/hotspot/make/solaris/makefiles/jsig.make
index 29e4c238a9a..e4a4aef771a 100644
--- a/hotspot/make/solaris/makefiles/jsig.make
+++ b/hotspot/make/solaris/makefiles/jsig.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/jvmg.make b/hotspot/make/solaris/makefiles/jvmg.make
index 24a3510d4a5..ada307af855 100644
--- a/hotspot/make/solaris/makefiles/jvmg.make
+++ b/hotspot/make/solaris/makefiles/jvmg.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,8 @@ DEBUG_CFLAGS/DEFAULT= $(DEBUG_CFLAGS)
DEBUG_CFLAGS/BYFILE = $(DEBUG_CFLAGS/$@)$(DEBUG_CFLAGS/DEFAULT$(DEBUG_CFLAGS/$@))
ifeq ("${Platform_compiler}", "sparcWorks")
-ifeq ($(shell expr $(COMPILER_REV) \>= 5.8), 1)
+
+ifeq ($(COMPILER_REV),5.8)
# SS11 SEGV when compiling with -g and -xarch=v8, using different backend
DEBUG_CFLAGS/compileBroker.o = $(DEBUG_CFLAGS) -xO0
DEBUG_CFLAGS/jvmtiTagMap.o = $(DEBUG_CFLAGS) -xO0
diff --git a/hotspot/make/solaris/makefiles/jvmti.make b/hotspot/make/solaris/makefiles/jvmti.make
index 876714eb55d..dc4efa1e9fc 100644
--- a/hotspot/make/solaris/makefiles/jvmti.make
+++ b/hotspot/make/solaris/makefiles/jvmti.make
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/launcher.make b/hotspot/make/solaris/makefiles/launcher.make
index 67693bb90b3..2224d58017d 100644
--- a/hotspot/make/solaris/makefiles/launcher.make
+++ b/hotspot/make/solaris/makefiles/launcher.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/makedeps.make b/hotspot/make/solaris/makefiles/makedeps.make
index 12b01a7da96..751d6ff3417 100644
--- a/hotspot/make/solaris/makefiles/makedeps.make
+++ b/hotspot/make/solaris/makefiles/makedeps.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers b/hotspot/make/solaris/makefiles/mapfile-vers
index f7ed56e5f10..8c9d6883067 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers
+++ b/hotspot/make/solaris/makefiles/mapfile-vers
@@ -3,7 +3,7 @@
#
#
-# Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -89,6 +89,7 @@ SUNWprivate_1.1 {
JVM_FillInStackTrace;
JVM_FindClassFromClass;
JVM_FindClassFromClassLoader;
+ JVM_FindClassFromBootLoader;
JVM_FindLibraryEntry;
JVM_FindLoadedClass;
JVM_FindPrimitiveClass;
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers-COMPILER1 b/hotspot/make/solaris/makefiles/mapfile-vers-COMPILER1
index b4b420867be..c77bda4d223 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers-COMPILER1
+++ b/hotspot/make/solaris/makefiles/mapfile-vers-COMPILER1
@@ -1,7 +1,7 @@
#
#
-# Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers-COMPILER2 b/hotspot/make/solaris/makefiles/mapfile-vers-COMPILER2
index 9e2e5356f55..ee44bf266a9 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers-COMPILER2
+++ b/hotspot/make/solaris/makefiles/mapfile-vers-COMPILER2
@@ -1,7 +1,7 @@
#
#
-# Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers-CORE b/hotspot/make/solaris/makefiles/mapfile-vers-CORE
index 25069d55c96..b62ad89fcb1 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers-CORE
+++ b/hotspot/make/solaris/makefiles/mapfile-vers-CORE
@@ -1,7 +1,7 @@
#
#
-# Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers-TIERED b/hotspot/make/solaris/makefiles/mapfile-vers-TIERED
index 5149a01b598..ee62be5cd96 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers-TIERED
+++ b/hotspot/make/solaris/makefiles/mapfile-vers-TIERED
@@ -1,7 +1,7 @@
#
#
-# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers-debug b/hotspot/make/solaris/makefiles/mapfile-vers-debug
index 98ce4887aa0..0a7c28078c2 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers-debug
+++ b/hotspot/make/solaris/makefiles/mapfile-vers-debug
@@ -1,7 +1,7 @@
#
#
-# Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers-jsig b/hotspot/make/solaris/makefiles/mapfile-vers-jsig
index f7ae7fb22b9..1880c82273d 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers-jsig
+++ b/hotspot/make/solaris/makefiles/mapfile-vers-jsig
@@ -1,7 +1,7 @@
#
#
-# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers-jvm_db b/hotspot/make/solaris/makefiles/mapfile-vers-jvm_db
index 11ac2157b93..95ac685a4b6 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers-jvm_db
+++ b/hotspot/make/solaris/makefiles/mapfile-vers-jvm_db
@@ -1,7 +1,7 @@
#
#
-# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers-jvm_dtrace b/hotspot/make/solaris/makefiles/mapfile-vers-jvm_dtrace
index e10f098330a..2bde56933c2 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers-jvm_dtrace
+++ b/hotspot/make/solaris/makefiles/mapfile-vers-jvm_dtrace
@@ -1,7 +1,7 @@
#
#
-# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/mapfile-vers-nonproduct b/hotspot/make/solaris/makefiles/mapfile-vers-nonproduct
index b1544b8b6e1..911a3b7fc55 100644
--- a/hotspot/make/solaris/makefiles/mapfile-vers-nonproduct
+++ b/hotspot/make/solaris/makefiles/mapfile-vers-nonproduct
@@ -1,7 +1,7 @@
#
#
-# Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/optimized.make b/hotspot/make/solaris/makefiles/optimized.make
index 4e8f6484790..1f91c3124f2 100644
--- a/hotspot/make/solaris/makefiles/optimized.make
+++ b/hotspot/make/solaris/makefiles/optimized.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -30,12 +30,21 @@ OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
-
-# Workaround SS11 bug 6345274 (all platforms)
ifeq ("${Platform_compiler}", "sparcWorks")
-ifeq ($(shell expr $(COMPILER_REV) \>= 5.8), 1)
+
+# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876)
+ifeq ($(COMPILER_REV),5.9)
+ # Not clear this workaround could be skipped in some cases.
+ OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER) -g
+ OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER) -g
+ OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER) -g
+endif
+
+# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
+ifeq ($(COMPILER_REV),5.8))
OPT_CFLAGS/ciTypeFlow.o = $(OPT_CFLAGS/O2)
-endif # COMPILER_REV >= 5.8
+endif # COMPILER_REV == 5.8
+
endif # Platform_compiler == sparcWorks
# If you set HOTSPARC_GENERIC=yes, you disable all OPT_CFLAGS settings
diff --git a/hotspot/make/solaris/makefiles/product.make b/hotspot/make/solaris/makefiles/product.make
index d2e78c6646a..66e53536723 100644
--- a/hotspot/make/solaris/makefiles/product.make
+++ b/hotspot/make/solaris/makefiles/product.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -38,12 +38,21 @@ OPT_CFLAGS/ciEnv.o = $(OPT_CFLAGS) -xinline=no%__1cFciEnvbFpost_compiled_method_
endif
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
-
-# Workaround SS11 bug 6345274 (all platforms)
ifeq ("${Platform_compiler}", "sparcWorks")
-ifeq ($(shell expr $(COMPILER_REV) \>= 5.8), 1)
+
+# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876)
+ifeq ($(COMPILER_REV),5.9)
+ # Not clear this workaround could be skipped in some cases.
+ OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER) -g
+ OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER) -g
+ OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER) -g
+endif
+
+# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
+ifeq ($(COMPILER_REV),5.8)
OPT_CFLAGS/ciTypeFlow.o = $(OPT_CFLAGS/O2)
-endif # COMPILER_REV >= 5.8
+endif # COMPILER_REV == 5.8
+
endif # Platform_compiler == sparcWorks
# If you set HOTSPARC_GENERIC=yes, you disable all OPT_CFLAGS settings
diff --git a/hotspot/make/solaris/makefiles/profiled.make b/hotspot/make/solaris/makefiles/profiled.make
index 297e6285183..5213aaad43b 100644
--- a/hotspot/make/solaris/makefiles/profiled.make
+++ b/hotspot/make/solaris/makefiles/profiled.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/reorder_COMPILER1_i486 b/hotspot/make/solaris/makefiles/reorder_COMPILER1_i486
index cee930fd1ec..bab5b288d70 100644
--- a/hotspot/make/solaris/makefiles/reorder_COMPILER1_i486
+++ b/hotspot/make/solaris/makefiles/reorder_COMPILER1_i486
@@ -2175,6 +2175,7 @@ text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_;
text: .text%jni_GetStringUTFRegion: jni.o;
text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc_ii_pc_;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%JVM_IsInterface;
text: .text%JVM_GetClassDeclaredConstructors;
text: .text%__1cNmethodOopDescOis_initializer6kM_i_;
diff --git a/hotspot/make/solaris/makefiles/reorder_COMPILER1_sparc b/hotspot/make/solaris/makefiles/reorder_COMPILER1_sparc
index d135e73cfac..0dc59edddac 100644
--- a/hotspot/make/solaris/makefiles/reorder_COMPILER1_sparc
+++ b/hotspot/make/solaris/makefiles/reorder_COMPILER1_sparc
@@ -1500,6 +1500,7 @@ text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_;
text: .text%jni_GetStringUTFRegion: jni.o;
text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc_ii_pc_;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%JVM_IsInterface;
text: .text%JVM_GetClassDeclaredConstructors;
text: .text%__1cNmethodOopDescOis_initializer6kM_i_;
diff --git a/hotspot/make/solaris/makefiles/reorder_COMPILER2_amd64 b/hotspot/make/solaris/makefiles/reorder_COMPILER2_amd64
index b4bc7db5b72..4531671c613 100644
--- a/hotspot/make/solaris/makefiles/reorder_COMPILER2_amd64
+++ b/hotspot/make/solaris/makefiles/reorder_COMPILER2_amd64
@@ -4339,6 +4339,7 @@ text: .text%__1cSComputeAdapterInfoIdo_float6M_v_;
text: .text%__1cFParseLarray_store6MnJBasicType__v_;
text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc_ii_v_: nativeLookup.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cZCallInterpreterDirectNodeSalignment_required6kM_i_;
text: .text%__1cZCallInterpreterDirectNodePoper_input_base6kM_I_;
text: .text%__1cZCallInterpreterDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_;
diff --git a/hotspot/make/solaris/makefiles/reorder_COMPILER2_i486 b/hotspot/make/solaris/makefiles/reorder_COMPILER2_i486
index 4113159bf8d..14a1fc2e3fc 100644
--- a/hotspot/make/solaris/makefiles/reorder_COMPILER2_i486
+++ b/hotspot/make/solaris/makefiles/reorder_COMPILER2_i486
@@ -4755,6 +4755,7 @@ text: .text%__1cbCAbstractInterpreterGeneratorVgenerate_and_dispatch6MpnITemplat
text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFi_vi_v_;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cPshrI_eReg_1NodeEsize6kMpnNPhaseRegAlloc__I_;
text: .text%__1cHi2bNodeMideal_Opcode6kM_i_: ad_i486_misc.o;
text: .text%__1cMmatch_option6FpknMJavaVMOption_pkcp4_i_: arguments.o;
diff --git a/hotspot/make/solaris/makefiles/reorder_COMPILER2_sparc b/hotspot/make/solaris/makefiles/reorder_COMPILER2_sparc
index 4eadf379ca5..26ef9b2cd0b 100644
--- a/hotspot/make/solaris/makefiles/reorder_COMPILER2_sparc
+++ b/hotspot/make/solaris/makefiles/reorder_COMPILER2_sparc
@@ -3713,6 +3713,7 @@ text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cITemplateIgenerate6MpnZInterpreterMacroAssembler__v_;
text: .text%__1cQregI_to_stkINodeHis_Copy6kM_I_: ad_sparc_misc.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%signalHandler;
text: .text%__1cTtypeArrayKlassKlassIoop_size6kMpnHoopDesc__i_: typeArrayKlassKlass.o;
text: .text%JVM_handle_solaris_signal;
diff --git a/hotspot/make/solaris/makefiles/reorder_COMPILER2_sparcv9 b/hotspot/make/solaris/makefiles/reorder_COMPILER2_sparcv9
index 3cc6b8b510a..5f4949f02be 100644
--- a/hotspot/make/solaris/makefiles/reorder_COMPILER2_sparcv9
+++ b/hotspot/make/solaris/makefiles/reorder_COMPILER2_sparcv9
@@ -3735,6 +3735,7 @@ text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cQjava_lang_ThreadRget_thread_status6FpnHoopDesc__n0AMThreadStatus__;
text: .text%__1cIMulINodeGadd_id6kM_pknEType__: classes.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cHTypePtrFempty6kM_i_;
text: .text%__1cQaddP_reg_regNodeEsize6kMpnNPhaseRegAlloc__I_;
text: .text%__1cbFunnecessary_membar_volatileNodePoper_input_base6kM_I_: ad_sparc_misc.o;
diff --git a/hotspot/make/solaris/makefiles/reorder_TIERED_amd64 b/hotspot/make/solaris/makefiles/reorder_TIERED_amd64
index b4bc7db5b72..4531671c613 100644
--- a/hotspot/make/solaris/makefiles/reorder_TIERED_amd64
+++ b/hotspot/make/solaris/makefiles/reorder_TIERED_amd64
@@ -4339,6 +4339,7 @@ text: .text%__1cSComputeAdapterInfoIdo_float6M_v_;
text: .text%__1cFParseLarray_store6MnJBasicType__v_;
text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc_ii_v_: nativeLookup.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cZCallInterpreterDirectNodeSalignment_required6kM_i_;
text: .text%__1cZCallInterpreterDirectNodePoper_input_base6kM_I_;
text: .text%__1cZCallInterpreterDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_;
diff --git a/hotspot/make/solaris/makefiles/reorder_TIERED_i486 b/hotspot/make/solaris/makefiles/reorder_TIERED_i486
index 4113159bf8d..14a1fc2e3fc 100644
--- a/hotspot/make/solaris/makefiles/reorder_TIERED_i486
+++ b/hotspot/make/solaris/makefiles/reorder_TIERED_i486
@@ -4755,6 +4755,7 @@ text: .text%__1cbCAbstractInterpreterGeneratorVgenerate_and_dispatch6MpnITemplat
text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFi_vi_v_;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cPshrI_eReg_1NodeEsize6kMpnNPhaseRegAlloc__I_;
text: .text%__1cHi2bNodeMideal_Opcode6kM_i_: ad_i486_misc.o;
text: .text%__1cMmatch_option6FpknMJavaVMOption_pkcp4_i_: arguments.o;
diff --git a/hotspot/make/solaris/makefiles/reorder_TIERED_sparc b/hotspot/make/solaris/makefiles/reorder_TIERED_sparc
index 4eadf379ca5..26ef9b2cd0b 100644
--- a/hotspot/make/solaris/makefiles/reorder_TIERED_sparc
+++ b/hotspot/make/solaris/makefiles/reorder_TIERED_sparc
@@ -3713,6 +3713,7 @@ text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cITemplateIgenerate6MpnZInterpreterMacroAssembler__v_;
text: .text%__1cQregI_to_stkINodeHis_Copy6kM_I_: ad_sparc_misc.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%signalHandler;
text: .text%__1cTtypeArrayKlassKlassIoop_size6kMpnHoopDesc__i_: typeArrayKlassKlass.o;
text: .text%JVM_handle_solaris_signal;
diff --git a/hotspot/make/solaris/makefiles/rules.make b/hotspot/make/solaris/makefiles/rules.make
index 1329d2b1c42..56ff0e7d6b7 100644
--- a/hotspot/make/solaris/makefiles/rules.make
+++ b/hotspot/make/solaris/makefiles/rules.make
@@ -1,5 +1,5 @@
#
-# Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -133,19 +133,10 @@ ifeq ($(findstring j,$(MFLAGS)),j)
COMPILE_DONE = && { echo Done with $<; }
endif
-# A list of directories under which all source code are built without -KPIC/-Kpic
-# flag. Performance measurements show that compiling GC related code will
-# dramatically reduce the gc pause time. See bug 6454213 for more details.
-
-include $(GAMMADIR)/make/scm.make
-
-NONPIC_DIRS = memory oops gc_implementation gc_interface
-NONPIC_DIRS := $(foreach dir,$(NONPIC_DIRS), $(GAMMADIR)/src/share/vm/$(dir))
-# Look for source code under NONPIC_DIRS
-NONPIC_FILES := $(foreach dir,$(NONPIC_DIRS),\
- $(shell find $(dir) \( $(SCM_DIRS) \) -prune -o \
- -name '*.cpp' -print))
-NONPIC_OBJ_FILES := $(notdir $(subst .cpp,.o,$(NONPIC_FILES)))
+# Include NONPIC_OBJ_FILES definition
+ifndef LP64
+include $(GAMMADIR)/make/pic.make
+endif
# Sun compiler for 64 bit Solaris does not support building non-PIC object files.
ifdef LP64
diff --git a/hotspot/make/solaris/makefiles/sa.make b/hotspot/make/solaris/makefiles/sa.make
index 1143688394e..6d700b23437 100644
--- a/hotspot/make/solaris/makefiles/sa.make
+++ b/hotspot/make/solaris/makefiles/sa.make
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/saproc.make b/hotspot/make/solaris/makefiles/saproc.make
index 83d9fce0e73..906cd9d998e 100644
--- a/hotspot/make/solaris/makefiles/saproc.make
+++ b/hotspot/make/solaris/makefiles/saproc.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/sparc.make b/hotspot/make/solaris/makefiles/sparc.make
index b3a0e2682bb..6f332cf63bd 100644
--- a/hotspot/make/solaris/makefiles/sparc.make
+++ b/hotspot/make/solaris/makefiles/sparc.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
#
Obj_Files += solaris_sparc.o
-ASFLAGS += $(ARCHFLAG)
+ASFLAGS += $(AS_ARCHFLAG)
ifeq ("${Platform_compiler}", "sparcWorks")
ifeq ($(shell expr $(COMPILER_REV) \< 5.5), 1)
diff --git a/hotspot/make/solaris/makefiles/sparcWorks.make b/hotspot/make/solaris/makefiles/sparcWorks.make
index a20546e6528..83ef29612ee 100644
--- a/hotspot/make/solaris/makefiles/sparcWorks.make
+++ b/hotspot/make/solaris/makefiles/sparcWorks.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
CC = cc
CPP = CC
+# Note that this 'as' is an older version of the Sun Studio 'fbe', and will
+# use the older style options. The 'fbe' options will match 'cc' and 'CC'.
AS = /usr/ccs/bin/as
NM = /usr/ccs/bin/nm
@@ -43,25 +45,33 @@ $(shell $(CPP) -V 2>&1 | sed -e 's/^.*\([1-9]\.[0-9][0-9]*\).*/\1/')
C_COMPILER_REV := \
$(shell $(CC) -V 2>&1 | grep -i "cc:" | sed -e 's/^.*\([1-9]\.[0-9][0-9]*\).*/\1/')
-VALIDATED_COMPILER_REV := 5.8
-VALIDATED_C_COMPILER_REV := 5.8
+# Pick which compiler is validated
+ifeq ($(JDK_MINOR_VERSION),6)
+ # Validated compiler for JDK6 is SS11 (5.8)
+ VALIDATED_COMPILER_REV := 5.8
+ VALIDATED_C_COMPILER_REV := 5.8
+else
+ # FIXUP: Change to SS12 (5.9) once it has been validated.
+ # Validated compiler for JDK7 is SS12 (5.9)
+ #VALIDATED_COMPILER_REV := 5.9
+ #VALIDATED_C_COMPILER_REV := 5.9
+ VALIDATED_COMPILER_REV := 5.8
+ VALIDATED_C_COMPILER_REV := 5.8
+endif
+# Warning messages about not using the above validated version
ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := ${VALIDATED_COMPILER_REV}
ifneq (${COMPILER_REV},${ENFORCE_COMPILER_REV})
-dummy_target_to_enforce_compiler_rev:
- @echo "Wrong ${CPP} version: ${COMPILER_REV}. " \
- "Use version ${ENFORCE_COMPILER_REV}, or set" \
- "ENFORCE_COMPILER_REV=${COMPILER_REV}."
- @exit 1
+dummy_target_to_enforce_compiler_rev:=\
+$(info WARNING: You are using CC version ${COMPILER_REV} \
+and should be using version ${ENFORCE_COMPILER_REV})
endif
ENFORCE_C_COMPILER_REV${ENFORCE_C_COMPILER_REV} := ${VALIDATED_C_COMPILER_REV}
ifneq (${C_COMPILER_REV},${ENFORCE_C_COMPILER_REV})
-dummy_target_to_enforce_c_compiler_rev:
- @echo "Wrong ${CC} version: ${C_COMPILER_REV}. " \
- "Use version ${ENFORCE_C_COMPILER_REV}, or set" \
- "ENFORCE_C_COMPILER_REV=${C_COMPILER_REV}."
- @exit 1
+dummy_target_to_enforce_c_compiler_rev:=\
+$(info WARNING: You are using cc version ${C_COMPILER_REV} \
+and should be using version ${ENFORCE_C_COMPILER_REV})
endif
# Fail the build if __fabsf is used. __fabsf exists only in Solaris 8 2/04
@@ -90,20 +100,44 @@ SOLARIS_7_OR_LATER := \
$(shell uname -r | awk -F. '{ if ($$2 >= 7) print "-DSOLARIS_7_OR_LATER"; }')
CFLAGS += ${SOLARIS_7_OR_LATER}
-ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
-# set ARCHFLAG/BUILDARCH which will ultimately be ARCHFLAG
+# New architecture options started in SS12 (5.9), we need both styles to build.
+# The older arch options for SS11 (5.8) or older and also for /usr/ccs/bin/as.
+# Note: SS12 default for 32bit sparc is now the same as v8plus, so the
+# settings below have changed all SS12 32bit sparc builds to be v8plus.
+# The older SS11 (5.8) settings have remained as they always have been.
ifeq ($(TYPE),COMPILER2)
-ARCHFLAG/sparc = -xarch=v8plus
+ ARCHFLAG_OLD/sparc = -xarch=v8plus
else
-ifeq ($(TYPE),TIERED)
-ARCHFLAG/sparc = -xarch=v8plus
+ ifeq ($(TYPE),TIERED)
+ ARCHFLAG_OLD/sparc = -xarch=v8plus
+ else
+ ARCHFLAG_OLD/sparc = -xarch=v8
+ endif
+endif
+ARCHFLAG_NEW/sparc = -m32 -xarch=sparc
+ARCHFLAG_OLD/sparcv9 = -xarch=v9
+ARCHFLAG_NEW/sparcv9 = -m64 -xarch=sparc
+ARCHFLAG_OLD/i486 =
+ARCHFLAG_NEW/i486 = -m32
+ARCHFLAG_OLD/amd64 = -xarch=amd64
+ARCHFLAG_NEW/amd64 = -m64
+
+# Select the ARCHFLAGs and other SS12 (5.9) options
+ifeq ($(shell expr $(COMPILER_REV) \>= 5.9), 1)
+ ARCHFLAG/sparc = $(ARCHFLAG_NEW/sparc)
+ ARCHFLAG/sparcv9 = $(ARCHFLAG_NEW/sparcv9)
+ ARCHFLAG/i486 = $(ARCHFLAG_NEW/i486)
+ ARCHFLAG/amd64 = $(ARCHFLAG_NEW/amd64)
else
-ARCHFLAG/sparc = -xarch=v8
+ ARCHFLAG/sparc = $(ARCHFLAG_OLD/sparc)
+ ARCHFLAG/sparcv9 = $(ARCHFLAG_OLD/sparcv9)
+ ARCHFLAG/i486 = $(ARCHFLAG_OLD/i486)
+ ARCHFLAG/amd64 = $(ARCHFLAG_OLD/amd64)
endif
-endif
-ARCHFLAG/sparcv9 = -xarch=v9
-ARCHFLAG/i486 =
-ARCHFLAG/amd64 = -xarch=amd64
+
+# ARCHFLAGS for the current build arch
+ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+AS_ARCHFLAG = $(ARCHFLAG_OLD/$(BUILDARCH))
# Optional sub-directory in /usr/lib where BUILDARCH libraries are kept.
ISA_DIR=$(ISA_DIR/$(BUILDARCH))
@@ -166,13 +200,13 @@ endif # 32bit x86
ifeq ("${Platform_arch_model}", "x86_64")
-ASFLAGS += -xarch=amd64
-CFLAGS += -xarch=amd64
+ASFLAGS += $(AS_ARCHFLAG)
+CFLAGS += $(ARCHFLAG/amd64)
# this one seemed useless
-LFLAGS_VM += -xarch=amd64
+LFLAGS_VM += $(ARCHFLAG/amd64)
# this one worked
-LFLAGS += -xarch=amd64
-AOUT_FLAGS += -xarch=amd64
+LFLAGS += $(ARCHFLAG/amd64)
+AOUT_FLAGS += $(ARCHFLAG/amd64)
# -xO3 is faster than -xO4 on specjbb with SS10 compiler
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
@@ -224,7 +258,7 @@ LFLAGS += -library=%none
LFLAGS += -mt
-endif # COMPILER_REV >= VALIDATED_COMPILER_REV
+endif # COMPILER_REV >= 5.5
######################################
# End 5.5 Forte compiler options #
@@ -293,7 +327,7 @@ PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@))
LFLAGS += -library=Crun
LIBS += -library=Crun -lCrun
-endif # COMPILER_REV >= VALIDATED_COMPILER_REV
+endif # COMPILER_REV == 5.2
##################################
# End 5.2 Forte compiler options #
@@ -320,6 +354,7 @@ ifeq (${COMPILER_REV}, 5.0)
# Had to hoist this higher apparently because of other changes. Must
# come before -xarch specification.
+# NOTE: native says optimize for the machine doing the compile, bad news.
CFLAGS += -xtarget=native
CFLAGS += $(ARCHFLAG)
@@ -359,7 +394,7 @@ CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_x86/vm/solaris_x86_32.il
endif # 32bit x86
# The following options run into misaligned ldd problem (raj)
-#OPT_CFLAGS = -fast -O4 -xarch=v8 -xchip=ultra
+#OPT_CFLAGS = -fast -O4 $(ARCHFLAG/sparc) -xchip=ultra
# no more exceptions
CFLAGS/NOEX=-noex
@@ -427,6 +462,15 @@ DEBUG_CFLAGS = -g
FASTDEBUG_CFLAGS = -g0
# The -g0 setting allows the C++ frontend to inline, which is a big win.
+# Special global options for SS12
+ifeq ($(COMPILER_REV),5.9)
+ # There appears to be multiple issues with the new Dwarf2 debug format, so
+ # we tell the compiler to use the older 'stabs' debug format all the time.
+ # Note that this needs to be used in optimized compiles too to be 100%.
+ # This is a workaround for SS12 (5.9) bug 6694600
+ CFLAGS += -xdebugformat=stabs
+endif
+
# Enable the following CFLAGS additions if you need to compare the
# built ELF objects.
#
diff --git a/hotspot/make/solaris/makefiles/sparcv9.make b/hotspot/make/solaris/makefiles/sparcv9.make
index 985b7b47135..c05d04bc18c 100644
--- a/hotspot/make/solaris/makefiles/sparcv9.make
+++ b/hotspot/make/solaris/makefiles/sparcv9.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
#
Obj_Files += solaris_sparc.o
-ASFLAGS += $(ARCHFLAG)
+ASFLAGS += $(AS_ARCHFLAG)
ifeq ("${Platform_compiler}", "sparcWorks")
ifeq ($(shell expr $(COMPILER_REV) \< 5.5), 1)
diff --git a/hotspot/make/solaris/makefiles/tiered.make b/hotspot/make/solaris/makefiles/tiered.make
index 220124e50e1..5ad7f223c1a 100644
--- a/hotspot/make/solaris/makefiles/tiered.make
+++ b/hotspot/make/solaris/makefiles/tiered.make
@@ -1,5 +1,5 @@
#
-# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/top.make b/hotspot/make/solaris/makefiles/top.make
index 5a883565ada..bd8a42238d1 100644
--- a/hotspot/make/solaris/makefiles/top.make
+++ b/hotspot/make/solaris/makefiles/top.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/vm.make b/hotspot/make/solaris/makefiles/vm.make
index 43d31878e54..70a11975fbc 100644
--- a/hotspot/make/solaris/makefiles/vm.make
+++ b/hotspot/make/solaris/makefiles/vm.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/reorder.sh b/hotspot/make/solaris/reorder.sh
index 925b0a2407c..851140fed20 100644
--- a/hotspot/make/solaris/reorder.sh
+++ b/hotspot/make/solaris/reorder.sh
@@ -1,6 +1,6 @@
#!/bin/sh -x
#
-# Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/test/Queens.java b/hotspot/make/test/Queens.java
index 075ca9b93ad..06064f7cc35 100644
--- a/hotspot/make/test/Queens.java
+++ b/hotspot/make/test/Queens.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/build.bat b/hotspot/make/windows/build.bat
index 36d4ec6b480..444f88a26d4 100644
--- a/hotspot/make/windows/build.bat
+++ b/hotspot/make/windows/build.bat
@@ -1,6 +1,6 @@
@echo off
REM
-REM Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+REM Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
REM
REM This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/build.make b/hotspot/make/windows/build.make
index a871a849eb1..66ad19289e2 100644
--- a/hotspot/make/windows/build.make
+++ b/hotspot/make/windows/build.make
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/build_vm_def.sh b/hotspot/make/windows/build_vm_def.sh
index 98e65150a65..6cc931963b2 100644
--- a/hotspot/make/windows/build_vm_def.sh
+++ b/hotspot/make/windows/build_vm_def.sh
@@ -1,5 +1,5 @@
#
-# Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/create.bat b/hotspot/make/windows/create.bat
index a5a481ff7bd..21f97033669 100644
--- a/hotspot/make/windows/create.bat
+++ b/hotspot/make/windows/create.bat
@@ -1,6 +1,6 @@
@echo off
REM
-REM Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
+REM Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
REM
REM This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/cross_build.bat b/hotspot/make/windows/cross_build.bat
index 42e0fb147d7..7359061c54e 100644
--- a/hotspot/make/windows/cross_build.bat
+++ b/hotspot/make/windows/cross_build.bat
@@ -1,6 +1,6 @@
@echo off
REM
-REM Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+REM Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
REM
REM This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/get_msc_ver.sh b/hotspot/make/windows/get_msc_ver.sh
index 1e4f6a02489..6bbbbef7859 100644
--- a/hotspot/make/windows/get_msc_ver.sh
+++ b/hotspot/make/windows/get_msc_ver.sh
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/adlc.make b/hotspot/make/windows/makefiles/adlc.make
index f7665667fb1..b2f8132c64d 100644
--- a/hotspot/make/windows/makefiles/adlc.make
+++ b/hotspot/make/windows/makefiles/adlc.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/compile.make b/hotspot/make/windows/makefiles/compile.make
index 7292774e1b5..bf6f3be9b2e 100644
--- a/hotspot/make/windows/makefiles/compile.make
+++ b/hotspot/make/windows/makefiles/compile.make
@@ -1,5 +1,5 @@
#
-# Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/debug.make b/hotspot/make/windows/makefiles/debug.make
index 7ea4aae9486..afd987d9cd0 100644
--- a/hotspot/make/windows/makefiles/debug.make
+++ b/hotspot/make/windows/makefiles/debug.make
@@ -1,5 +1,5 @@
#
-# Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/defs.make b/hotspot/make/windows/makefiles/defs.make
index 19d49f17af6..bfabddff58e 100644
--- a/hotspot/make/windows/makefiles/defs.make
+++ b/hotspot/make/windows/makefiles/defs.make
@@ -1,5 +1,5 @@
#
-# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/fastdebug.make b/hotspot/make/windows/makefiles/fastdebug.make
index cb6901bce2f..064592bffe4 100644
--- a/hotspot/make/windows/makefiles/fastdebug.make
+++ b/hotspot/make/windows/makefiles/fastdebug.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/generated.make b/hotspot/make/windows/makefiles/generated.make
index 7eff90d1681..3d2a0001d00 100644
--- a/hotspot/make/windows/makefiles/generated.make
+++ b/hotspot/make/windows/makefiles/generated.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/jvmti.make b/hotspot/make/windows/makefiles/jvmti.make
index 74600a11f77..e0b22c04d3a 100644
--- a/hotspot/make/windows/makefiles/jvmti.make
+++ b/hotspot/make/windows/makefiles/jvmti.make
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/makedeps.make b/hotspot/make/windows/makefiles/makedeps.make
index e3164313d7e..a64407bfa5f 100644
--- a/hotspot/make/windows/makefiles/makedeps.make
+++ b/hotspot/make/windows/makefiles/makedeps.make
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/product.make b/hotspot/make/windows/makefiles/product.make
index a2887cfcef3..a143d6c99b5 100644
--- a/hotspot/make/windows/makefiles/product.make
+++ b/hotspot/make/windows/makefiles/product.make
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/rules.make b/hotspot/make/windows/makefiles/rules.make
index 04ee8e399c5..f07f84aee1d 100644
--- a/hotspot/make/windows/makefiles/rules.make
+++ b/hotspot/make/windows/makefiles/rules.make
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/sa.make b/hotspot/make/windows/makefiles/sa.make
index 216c44fc870..481b5149d03 100644
--- a/hotspot/make/windows/makefiles/sa.make
+++ b/hotspot/make/windows/makefiles/sa.make
@@ -1,5 +1,5 @@
#
-# Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/sanity.make b/hotspot/make/windows/makefiles/sanity.make
index 9b7aa13ab69..5b4293d27f8 100644
--- a/hotspot/make/windows/makefiles/sanity.make
+++ b/hotspot/make/windows/makefiles/sanity.make
@@ -1,5 +1,5 @@
#
-# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/shared.make b/hotspot/make/windows/makefiles/shared.make
index a5055045e82..173450c83b9 100644
--- a/hotspot/make/windows/makefiles/shared.make
+++ b/hotspot/make/windows/makefiles/shared.make
@@ -1,5 +1,5 @@
#
-# Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/top.make b/hotspot/make/windows/makefiles/top.make
index 679e5692efc..0caabcdfd3f 100644
--- a/hotspot/make/windows/makefiles/top.make
+++ b/hotspot/make/windows/makefiles/top.make
@@ -1,5 +1,5 @@
#
-# Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/vm.make b/hotspot/make/windows/makefiles/vm.make
index c911ab261f0..e7321de1332 100644
--- a/hotspot/make/windows/makefiles/vm.make
+++ b/hotspot/make/windows/makefiles/vm.make
@@ -1,5 +1,5 @@
#
-# Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -88,13 +88,20 @@ AGCT_EXPORT=/export:AsyncGetCallTrace
!endif
!endif
-LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
- /export:JNI_GetDefaultJavaVMInitArgs /export:JNI_CreateJavaVM \
- /export:JNI_GetCreatedJavaVMs /export:jio_snprintf \
- /export:jio_printf /export:jio_fprintf \
- /export:jio_vfprintf /export:jio_vsnprintf $(AGCT_EXPORT) \
- /export:JVM_GetVersionInfo \
- /export:JVM_GetThreadStateNames /export:JVM_GetThreadStateValues \
+LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
+ /export:JNI_GetDefaultJavaVMInitArgs \
+ /export:JNI_CreateJavaVM \
+ /export:JVM_FindClassFromBootLoader \
+ /export:JNI_GetCreatedJavaVMs \
+ /export:jio_snprintf \
+ /export:jio_printf \
+ /export:jio_fprintf \
+ /export:jio_vfprintf \
+ /export:jio_vsnprintf \
+ $(AGCT_EXPORT) \
+ /export:JVM_GetVersionInfo \
+ /export:JVM_GetThreadStateNames \
+ /export:JVM_GetThreadStateValues \
/export:JVM_InitAgentProperties
CPP_INCLUDE_DIRS=\
diff --git a/hotspot/make/windows/projectfiles/common/Makefile b/hotspot/make/windows/projectfiles/common/Makefile
index 1b4a5bf7343..c6793f96b31 100644
--- a/hotspot/make/windows/projectfiles/common/Makefile
+++ b/hotspot/make/windows/projectfiles/common/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/projectfiles/compiler1/Makefile b/hotspot/make/windows/projectfiles/compiler1/Makefile
index e189845fd58..f96091f39ec 100644
--- a/hotspot/make/windows/projectfiles/compiler1/Makefile
+++ b/hotspot/make/windows/projectfiles/compiler1/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/projectfiles/compiler2/Makefile b/hotspot/make/windows/projectfiles/compiler2/Makefile
index 567f02030ee..7c26e15d1cc 100644
--- a/hotspot/make/windows/projectfiles/compiler2/Makefile
+++ b/hotspot/make/windows/projectfiles/compiler2/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/projectfiles/core/Makefile b/hotspot/make/windows/projectfiles/core/Makefile
index e42986de410..fa8c3a12d20 100644
--- a/hotspot/make/windows/projectfiles/core/Makefile
+++ b/hotspot/make/windows/projectfiles/core/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/projectfiles/tiered/Makefile b/hotspot/make/windows/projectfiles/tiered/Makefile
index 1aaae59680d..2c24068c2b9 100644
--- a/hotspot/make/windows/projectfiles/tiered/Makefile
+++ b/hotspot/make/windows/projectfiles/tiered/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp
index a4963c65078..c7dce335619 100644
--- a/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1523,6 +1523,21 @@ Address MacroAssembler::constant_oop_address(jobject obj, Register d) {
return Address(d, address(obj), oop_Relocation::spec(oop_index));
}
+void MacroAssembler::set_narrow_oop(jobject obj, Register d) {
+ assert(oop_recorder() != NULL, "this assembler needs an OopRecorder");
+ int oop_index = oop_recorder()->find_index(obj);
+ RelocationHolder rspec = oop_Relocation::spec(oop_index);
+
+ assert_not_delayed();
+ // Relocation with special format (see relocInfo_sparc.hpp).
+ relocate(rspec, 1);
+ // Assembler::sethi(0x3fffff, d);
+ emit_long( op(branch_op) | rd(d) | op2(sethi_op2) | hi22(0x3fffff) );
+ // Don't add relocation for 'add'. Do patching during 'sethi' processing.
+ add(d, 0x3ff, d);
+
+}
+
void MacroAssembler::align(int modulus) {
while (offset() % modulus != 0) nop();
@@ -3406,13 +3421,15 @@ void MacroAssembler::tlab_refill(Label& retry, Label& try_eden, Label& slow_case
set((intptr_t)markOopDesc::prototype()->copy_set_hash(0x2), t2);
st_ptr(t2, top, oopDesc::mark_offset_in_bytes()); // set up the mark word
// set klass to intArrayKlass
- set((intptr_t)Universe::intArrayKlassObj_addr(), t2);
- ld_ptr(t2, 0, t2);
- store_klass(t2, top);
sub(t1, typeArrayOopDesc::header_size(T_INT), t1);
add(t1, ThreadLocalAllocBuffer::alignment_reserve(), t1);
sll_ptr(t1, log2_intptr(HeapWordSize/sizeof(jint)), t1);
st(t1, top, arrayOopDesc::length_offset_in_bytes());
+ set((intptr_t)Universe::intArrayKlassObj_addr(), t2);
+ ld_ptr(t2, 0, t2);
+ // store klass last. concurrent gcs assumes klass length is valid if
+ // klass field is not null.
+ store_klass(t2, top);
verify_oop(top);
// refill the tlab with an eden allocation
@@ -3537,28 +3554,32 @@ void MacroAssembler::bang_stack_size(Register Rsize, Register Rtsp,
}
}
-void MacroAssembler::load_klass(Register s, Register d) {
+void MacroAssembler::load_klass(Register src_oop, Register klass) {
// The number of bytes in this code is used by
// MachCallDynamicJavaNode::ret_addr_offset()
// if this changes, change that.
if (UseCompressedOops) {
- lduw(s, oopDesc::klass_offset_in_bytes(), d);
- decode_heap_oop_not_null(d);
+ lduw(src_oop, oopDesc::klass_offset_in_bytes(), klass);
+ decode_heap_oop_not_null(klass);
} else {
- ld_ptr(s, oopDesc::klass_offset_in_bytes(), d);
+ ld_ptr(src_oop, oopDesc::klass_offset_in_bytes(), klass);
}
}
-// ??? figure out src vs. dst!
-void MacroAssembler::store_klass(Register d, Register s1) {
+void MacroAssembler::store_klass(Register klass, Register dst_oop) {
if (UseCompressedOops) {
- assert(s1 != d, "not enough registers");
- encode_heap_oop_not_null(d);
- // Zero out entire klass field first.
- st_ptr(G0, s1, oopDesc::klass_offset_in_bytes());
- st(d, s1, oopDesc::klass_offset_in_bytes());
+ assert(dst_oop != klass, "not enough registers");
+ encode_heap_oop_not_null(klass);
+ st(klass, dst_oop, oopDesc::klass_offset_in_bytes());
} else {
- st_ptr(d, s1, oopDesc::klass_offset_in_bytes());
+ st_ptr(klass, dst_oop, oopDesc::klass_offset_in_bytes());
+ }
+}
+
+void MacroAssembler::store_klass_gap(Register s, Register d) {
+ if (UseCompressedOops) {
+ assert(s != d, "not enough registers");
+ st(s, d, oopDesc::klass_gap_offset_in_bytes());
}
}
@@ -3622,6 +3643,7 @@ void MacroAssembler::store_heap_oop(Register d, const Address& a, int offset) {
void MacroAssembler::encode_heap_oop(Register src, Register dst) {
assert (UseCompressedOops, "must be compressed");
+ verify_oop(src);
Label done;
if (src == dst) {
// optimize for frequent case src == dst
@@ -3643,12 +3665,14 @@ void MacroAssembler::encode_heap_oop(Register src, Register dst) {
void MacroAssembler::encode_heap_oop_not_null(Register r) {
assert (UseCompressedOops, "must be compressed");
+ verify_oop(r);
sub(r, G6_heapbase, r);
srlx(r, LogMinObjAlignmentInBytes, r);
}
void MacroAssembler::encode_heap_oop_not_null(Register src, Register dst) {
assert (UseCompressedOops, "must be compressed");
+ verify_oop(src);
sub(src, G6_heapbase, dst);
srlx(dst, LogMinObjAlignmentInBytes, dst);
}
@@ -3661,11 +3685,13 @@ void MacroAssembler::decode_heap_oop(Register src, Register dst) {
bpr(rc_nz, true, Assembler::pt, dst, done);
delayed() -> add(dst, G6_heapbase, dst); // annuled if not taken
bind(done);
+ verify_oop(dst);
}
void MacroAssembler::decode_heap_oop_not_null(Register r) {
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
// pd_code_size_limit.
+ // Also do not verify_oop as this is called by verify_oop.
assert (UseCompressedOops, "must be compressed");
sllx(r, LogMinObjAlignmentInBytes, r);
add(r, G6_heapbase, r);
@@ -3674,6 +3700,7 @@ void MacroAssembler::decode_heap_oop_not_null(Register r) {
void MacroAssembler::decode_heap_oop_not_null(Register src, Register dst) {
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
// pd_code_size_limit.
+ // Also do not verify_oop as this is called by verify_oop.
assert (UseCompressedOops, "must be compressed");
sllx(src, LogMinObjAlignmentInBytes, dst);
add(dst, G6_heapbase, dst);
diff --git a/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp b/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp
index c1aae2e6620..e1f7e0636b8 100644
--- a/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1977,8 +1977,9 @@ class MacroAssembler: public Assembler {
inline void movbool( bool boolconst, Register d) { mov( (int) boolconst, d); }
// klass oop manipulations if compressed
- void load_klass(Register src_oop, Register dst);
- void store_klass(Register dst_oop, Register s1);
+ void load_klass(Register src_oop, Register klass);
+ void store_klass(Register klass, Register dst_oop);
+ void store_klass_gap(Register s, Register dst_oop);
// oop manipulations
void load_heap_oop(const Address& s, Register d, int offset = 0);
@@ -2103,6 +2104,8 @@ class MacroAssembler: public Assembler {
inline void set_oop_constant( jobject obj, Register d ); // uses constant_oop_address
inline void set_oop ( Address obj_addr ); // same as load_address
+ void set_narrow_oop( jobject obj, Register d );
+
// nop padding
void align(int modulus);
diff --git a/hotspot/src/cpu/sparc/vm/bytecodeInterpreter_sparc.hpp b/hotspot/src/cpu/sparc/vm/bytecodeInterpreter_sparc.hpp
index dafab4bdcfd..28321303b08 100644
--- a/hotspot/src/cpu/sparc/vm/bytecodeInterpreter_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/bytecodeInterpreter_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
index 8436fb8561b..f1dc75f1ef4 100644
--- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
index 74bc5ecf3b4..d5696d442f4 100644
--- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
index 523b0042a21..a002e2474aa 100644
--- a/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/copy_sparc.hpp b/hotspot/src/cpu/sparc/vm/copy_sparc.hpp
index fc180cb43d3..9ddae97ef12 100644
--- a/hotspot/src/cpu/sparc/vm/copy_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/copy_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/cppInterpreter_sparc.cpp b/hotspot/src/cpu/sparc/vm/cppInterpreter_sparc.cpp
index 8bd53e47a51..f2d6486f856 100644
--- a/hotspot/src/cpu/sparc/vm/cppInterpreter_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/cppInterpreter_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/frame_sparc.cpp b/hotspot/src/cpu/sparc/vm/frame_sparc.cpp
index 1e8077d55d9..13626f0700e 100644
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
index aff31ce6c2f..5881dd69be4 100644
--- a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/nativeInst_sparc.cpp b/hotspot/src/cpu/sparc/vm/nativeInst_sparc.cpp
index 3deee97da75..16e3c6746fb 100644
--- a/hotspot/src/cpu/sparc/vm/nativeInst_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/nativeInst_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp b/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp
index 1e7263b41ef..2527e35b3e9 100644
--- a/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/register_definitions_sparc.cpp b/hotspot/src/cpu/sparc/vm/register_definitions_sparc.cpp
index 4001805226b..d3e80557098 100644
--- a/hotspot/src/cpu/sparc/vm/register_definitions_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/register_definitions_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp b/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp
index af1450c7440..795e1831e52 100644
--- a/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -87,6 +87,17 @@ void Relocation::pd_set_data_value(address x, intptr_t o) {
#ifdef _LP64
jint inst2;
guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi");
+ if (format() != 0) {
+ assert(type() == relocInfo::oop_type, "only narrow oops case");
+ jint np = oopDesc::encode_heap_oop((oop)x);
+ inst &= ~Assembler::hi22(-1);
+ inst |= Assembler::hi22((intptr_t)np);
+ ip->set_long_at(0, inst);
+ inst2 = ip->long_at( NativeInstruction::nop_instruction_size );
+ guarantee(Assembler::inv_op(inst2)==Assembler::arith_op, "arith op");
+ ip->set_long_at(NativeInstruction::nop_instruction_size, ip->set_data32_simm13( inst2, (intptr_t)np));
+ break;
+ }
ip->set_data64_sethi( ip->addr_at(0), (intptr_t)x );
#ifdef COMPILER2
// [RGV] Someone must have missed putting in a reloc entry for the
diff --git a/hotspot/src/cpu/sparc/vm/relocInfo_sparc.hpp b/hotspot/src/cpu/sparc/vm/relocInfo_sparc.hpp
index ed38e6e50cb..69c6c889b7b 100644
--- a/hotspot/src/cpu/sparc/vm/relocInfo_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/relocInfo_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,12 @@
// There is no need for format bits; the instructions are
// sufficiently self-identifying.
+#ifndef _LP64
format_width = 0
+#else
+ // Except narrow oops in 64-bits VM.
+ format_width = 1
+#endif
};
diff --git a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
index 7f5c4f81407..3812e2eaed9 100644
--- a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2556,7 +2556,6 @@ nmethod *SharedRuntime::generate_dtrace_nmethod(
int total_strings = 0;
int first_arg_to_pass = 0;
int total_c_args = 0;
- int box_offset = java_lang_boxing_object::value_offset_in_bytes();
// Skip the receiver as dtrace doesn't want to see it
if( !method->is_static() ) {
@@ -2721,7 +2720,8 @@ nmethod *SharedRuntime::generate_dtrace_nmethod(
#endif /* ASSERT */
VMRegPair zero;
- zero.set2(G0->as_VMReg());
+ const Register g0 = G0; // without this we get a compiler warning (why??)
+ zero.set2(g0->as_VMReg());
int c_arg, j_arg;
@@ -2778,7 +2778,9 @@ nmethod *SharedRuntime::generate_dtrace_nmethod(
__ br_null(in_reg, true, Assembler::pn, skipUnbox);
__ delayed()->mov(G0, tmp);
- switch (out_sig_bt[c_arg]) {
+ BasicType bt = out_sig_bt[c_arg];
+ int box_offset = java_lang_boxing_object::value_offset_in_bytes(bt);
+ switch (bt) {
case T_BYTE:
__ ldub(in_reg, box_offset, tmp); break;
case T_SHORT:
diff --git a/hotspot/src/cpu/sparc/vm/sparc.ad b/hotspot/src/cpu/sparc/vm/sparc.ad
index 73458015efe..c02673b3efc 100644
--- a/hotspot/src/cpu/sparc/vm/sparc.ad
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad
@@ -1,5 +1,5 @@
//
-// Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+// Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// This code is free software; you can redistribute it and/or modify it
@@ -5471,7 +5471,6 @@ instruct loadN(iRegN dst, memory mem) %{
// Load Klass Pointer
instruct loadKlass(iRegP dst, memory mem) %{
match(Set dst (LoadKlass mem));
- predicate(!n->in(MemNode::Address)->bottom_type()->is_narrow());
ins_cost(MEMORY_REF_COST);
size(4);
@@ -5486,11 +5485,11 @@ instruct loadKlass(iRegP dst, memory mem) %{
ins_pipe(iload_mem);
%}
-// Load Klass Pointer
-instruct loadKlassComp(iRegP dst, memory mem) %{
- match(Set dst (LoadKlass mem));
- predicate(n->in(MemNode::Address)->bottom_type()->is_narrow());
+// Load narrow Klass Pointer
+instruct loadNKlass(iRegN dst, memory mem) %{
+ match(Set dst (LoadNKlass mem));
ins_cost(MEMORY_REF_COST);
+ size(4);
format %{ "LDUW $mem,$dst\t! compressed klass ptr" %}
@@ -5503,9 +5502,6 @@ instruct loadKlassComp(iRegP dst, memory mem) %{
} else {
__ lduw(base, $mem$$disp, dst);
}
- // klass oop never null but this is generated for nonheader klass loads
- // too which can be null.
- __ decode_heap_oop(dst);
%}
ins_pipe(iload_mem);
%}
@@ -5609,22 +5605,24 @@ instruct loadConP_poll(iRegP dst, immP_poll src) %{
ins_pipe(loadConP_poll);
%}
+instruct loadConN0(iRegN dst, immN0 src) %{
+ match(Set dst src);
+
+ size(4);
+ format %{ "CLR $dst\t! compressed NULL ptr" %}
+ ins_encode( SetNull( dst ) );
+ ins_pipe(ialu_imm);
+%}
+
instruct loadConN(iRegN dst, immN src) %{
match(Set dst src);
- ins_cost(DEFAULT_COST * 2);
- format %{ "SET $src,$dst\t!ptr" %}
+ ins_cost(DEFAULT_COST * 3/2);
+ format %{ "SET $src,$dst\t! compressed ptr" %}
ins_encode %{
- address con = (address)$src$$constant;
Register dst = $dst$$Register;
- if (con == NULL) {
- __ mov(G0, dst);
- } else {
- __ set_oop((jobject)$src$$constant, dst);
- __ encode_heap_oop(dst);
- }
+ __ set_narrow_oop((jobject)$src$$constant, dst);
%}
- ins_pipe(loadConP);
-
+ ins_pipe(ialu_hi_lo_reg);
%}
instruct loadConL(iRegL dst, immL src, o7RegL tmp) %{
@@ -5957,7 +5955,7 @@ instruct storeA8B(memory mem, regD src) %{
// Convert oop pointer into compressed form
instruct encodeHeapOop(iRegN dst, iRegP src) %{
- predicate(n->bottom_type()->is_narrowoop()->make_oopptr()->ptr() != TypePtr::NotNull);
+ predicate(n->bottom_type()->make_ptr()->ptr() != TypePtr::NotNull);
match(Set dst (EncodeP src));
format %{ "encode_heap_oop $src, $dst" %}
ins_encode %{
@@ -5967,7 +5965,7 @@ instruct encodeHeapOop(iRegN dst, iRegP src) %{
%}
instruct encodeHeapOop_not_null(iRegN dst, iRegP src) %{
- predicate(n->bottom_type()->is_narrowoop()->make_oopptr()->ptr() == TypePtr::NotNull);
+ predicate(n->bottom_type()->make_ptr()->ptr() == TypePtr::NotNull);
match(Set dst (EncodeP src));
format %{ "encode_heap_oop_not_null $src, $dst" %}
ins_encode %{
@@ -5977,7 +5975,8 @@ instruct encodeHeapOop_not_null(iRegN dst, iRegP src) %{
%}
instruct decodeHeapOop(iRegP dst, iRegN src) %{
- predicate(n->bottom_type()->is_oopptr()->ptr() != TypePtr::NotNull);
+ predicate(n->bottom_type()->is_oopptr()->ptr() != TypePtr::NotNull &&
+ n->bottom_type()->is_oopptr()->ptr() != TypePtr::Constant);
match(Set dst (DecodeN src));
format %{ "decode_heap_oop $src, $dst" %}
ins_encode %{
@@ -5987,7 +5986,8 @@ instruct decodeHeapOop(iRegP dst, iRegN src) %{
%}
instruct decodeHeapOop_not_null(iRegP dst, iRegN src) %{
- predicate(n->bottom_type()->is_oopptr()->ptr() == TypePtr::NotNull);
+ predicate(n->bottom_type()->is_oopptr()->ptr() == TypePtr::NotNull ||
+ n->bottom_type()->is_oopptr()->ptr() == TypePtr::Constant);
match(Set dst (DecodeN src));
format %{ "decode_heap_oop_not_null $src, $dst" %}
ins_encode %{
@@ -6258,6 +6258,34 @@ instruct cmovIF_imm(cmpOpF cmp, flagsRegF fcc, iRegI dst, immI11 src) %{
ins_pipe(ialu_imm);
%}
+// Conditional move for RegN. Only cmov(reg,reg).
+instruct cmovNP_reg(cmpOpP cmp, flagsRegP pcc, iRegN dst, iRegN src) %{
+ match(Set dst (CMoveN (Binary cmp pcc) (Binary dst src)));
+ ins_cost(150);
+ format %{ "MOV$cmp $pcc,$src,$dst" %}
+ ins_encode( enc_cmov_reg(cmp,dst,src, (Assembler::ptr_cc)) );
+ ins_pipe(ialu_reg);
+%}
+
+// This instruction also works with CmpN so we don't need cmovNN_reg.
+instruct cmovNI_reg(cmpOp cmp, flagsReg icc, iRegN dst, iRegN src) %{
+ match(Set dst (CMoveN (Binary cmp icc) (Binary dst src)));
+ ins_cost(150);
+ size(4);
+ format %{ "MOV$cmp $icc,$src,$dst" %}
+ ins_encode( enc_cmov_reg(cmp,dst,src, (Assembler::icc)) );
+ ins_pipe(ialu_reg);
+%}
+
+instruct cmovNF_reg(cmpOpF cmp, flagsRegF fcc, iRegN dst, iRegN src) %{
+ match(Set dst (CMoveN (Binary cmp fcc) (Binary dst src)));
+ ins_cost(150);
+ size(4);
+ format %{ "MOV$cmp $fcc,$src,$dst" %}
+ ins_encode( enc_cmov_reg_f(cmp,dst,src, fcc) );
+ ins_pipe(ialu_reg);
+%}
+
// Conditional move
instruct cmovPP_reg(cmpOpP cmp, flagsRegP pcc, iRegP dst, iRegP src) %{
match(Set dst (CMoveP (Binary cmp pcc) (Binary dst src)));
@@ -6275,6 +6303,7 @@ instruct cmovPP_imm(cmpOpP cmp, flagsRegP pcc, iRegP dst, immP0 src) %{
ins_pipe(ialu_imm);
%}
+// This instruction also works with CmpN so we don't need cmovPN_reg.
instruct cmovPI_reg(cmpOp cmp, flagsReg icc, iRegP dst, iRegP src) %{
match(Set dst (CMoveP (Binary cmp icc) (Binary dst src)));
ins_cost(150);
@@ -6650,10 +6679,9 @@ instruct compareAndSwapP_bool(iRegP mem_ptr, iRegP oldval, iRegP newval, iRegI r
ins_pipe( long_memory_op );
%}
-instruct compareAndSwapN_bool_comp(iRegP mem_ptr, iRegN oldval, iRegN newval, iRegI res, o7RegI tmp, flagsReg ccr ) %{
+instruct compareAndSwapN_bool(iRegP mem_ptr, iRegN oldval, iRegN newval, iRegI res, o7RegI tmp1, flagsReg ccr ) %{
match(Set res (CompareAndSwapN mem_ptr (Binary oldval newval)));
- effect( USE mem_ptr, KILL ccr, KILL tmp);
-
+ effect( USE mem_ptr, KILL ccr, KILL tmp1);
format %{
"MOV $newval,O7\n\t"
"CASA [$mem_ptr],$oldval,O7\t! If $oldval==[$mem_ptr] Then store O7 into [$mem_ptr], set O7=[$mem_ptr] in any case\n\t"
@@ -6661,18 +6689,8 @@ instruct compareAndSwapN_bool_comp(iRegP mem_ptr, iRegN oldval, iRegN newval, iR
"MOV 1,$res\n\t"
"MOVne icc,R_G0,$res"
%}
- ins_encode %{
- Register Rmem = reg_to_register_object($mem_ptr$$reg);
- Register Rold = reg_to_register_object($oldval$$reg);
- Register Rnew = reg_to_register_object($newval$$reg);
- Register Rres = reg_to_register_object($res$$reg);
-
- __ cas(Rmem, Rold, Rnew);
- __ cmp( Rold, Rnew );
- __ mov(1, Rres);
- __ movcc( Assembler::notEqual, false, Assembler::icc, G0, Rres );
- %}
-
+ ins_encode( enc_casi(mem_ptr, oldval, newval),
+ enc_iflags_ne_to_boolean(res) );
ins_pipe( long_memory_op );
%}
@@ -8265,6 +8283,27 @@ instruct compP_iRegP_imm13(flagsRegP pcc, iRegP op1, immP13 op2 ) %{
ins_pipe(ialu_cconly_reg_imm);
%}
+// Compare Narrow oops
+instruct compN_iRegN(flagsReg icc, iRegN op1, iRegN op2 ) %{
+ match(Set icc (CmpN op1 op2));
+
+ size(4);
+ format %{ "CMP $op1,$op2\t! compressed ptr" %}
+ opcode(Assembler::subcc_op3, Assembler::arith_op);
+ ins_encode( form3_rs1_rs2_rd( op1, op2, R_G0 ) );
+ ins_pipe(ialu_cconly_reg_reg);
+%}
+
+instruct compN_iRegN_immN0(flagsReg icc, iRegN op1, immN0 op2 ) %{
+ match(Set icc (CmpN op1 op2));
+
+ size(4);
+ format %{ "CMP $op1,$op2\t! compressed ptr" %}
+ opcode(Assembler::subcc_op3, Assembler::arith_op);
+ ins_encode( form3_rs1_simm13_rd( op1, op2, R_G0 ) );
+ ins_pipe(ialu_cconly_reg_imm);
+%}
+
//----------Max and Min--------------------------------------------------------
// Min Instructions
// Conditional move for min
@@ -8595,6 +8634,14 @@ instruct cmovIL_imm(cmpOp cmp, flagsRegL xcc, iRegI dst, immI11 src) %{
ins_pipe(ialu_imm);
%}
+instruct cmovNL_reg(cmpOp cmp, flagsRegL xcc, iRegN dst, iRegN src) %{
+ match(Set dst (CMoveN (Binary cmp xcc) (Binary dst src)));
+ ins_cost(150);
+ format %{ "MOV$cmp $xcc,$src,$dst" %}
+ ins_encode( enc_cmov_reg(cmp,dst,src, (Assembler::xcc)) );
+ ins_pipe(ialu_reg);
+%}
+
instruct cmovPL_reg(cmpOp cmp, flagsRegL xcc, iRegP dst, iRegP src) %{
match(Set dst (CMoveP (Binary cmp xcc) (Binary dst src)));
ins_cost(150);
@@ -8826,16 +8873,6 @@ instruct partialSubtypeCheck_vs_zero( flagsRegP pcc, o1RegP sub, o2RegP super, i
%}
-instruct compP_iRegN_immN0(flagsRegP pcc, iRegN op1, immN0 op2 ) %{
- match(Set pcc (CmpN op1 op2));
-
- size(4);
- format %{ "CMP $op1,$op2\t! ptr" %}
- opcode(Assembler::subcc_op3, Assembler::arith_op);
- ins_encode( form3_rs1_simm13_rd( op1, op2, R_G0 ) );
- ins_pipe(ialu_cconly_reg_imm);
-%}
-
// ============================================================================
// inlined locking and unlocking
diff --git a/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp
index 73e092d620c..f21ed2f80ba 100644
--- a/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp b/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp
index 63e2bdc3e59..090242c17e6 100644
--- a/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp
index a9bc2b9eff3..bd852da5636 100644
--- a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -3222,7 +3222,8 @@ void TemplateTable::_new() {
__ set((intptr_t)markOopDesc::prototype(), G4_scratch);
}
__ st_ptr(G4_scratch, RallocatedObject, oopDesc::mark_offset_in_bytes()); // mark
- __ store_klass(RinstanceKlass, RallocatedObject); // klass
+ __ store_klass_gap(G0, RallocatedObject); // klass gap if compressed
+ __ store_klass(RinstanceKlass, RallocatedObject); // klass (last for cms)
{
SkipIfEqual skip_if(
diff --git a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
index 46b9e34e6a6..a870c7dc15b 100644
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp b/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp
index d10845d0659..050e7e68fcc 100644
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp b/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp
index 299ce53e31e..af2536b7c48 100644
--- a/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/assembler_x86_32.cpp b/hotspot/src/cpu/x86/vm/assembler_x86_32.cpp
index e68bf489309..91c2e9ab193 100644
--- a/hotspot/src/cpu/x86/vm/assembler_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/assembler_x86_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/assembler_x86_32.hpp b/hotspot/src/cpu/x86/vm/assembler_x86_32.hpp
index 02fb38d4056..9588449955c 100644
--- a/hotspot/src/cpu/x86/vm/assembler_x86_32.hpp
+++ b/hotspot/src/cpu/x86/vm/assembler_x86_32.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1054,7 +1054,7 @@ class MacroAssembler: public Assembler {
// range (0 <= offset <= page_size).
void null_check(Register reg, int offset = -1);
- static bool needs_explicit_null_check(int offset);
+ static bool needs_explicit_null_check(intptr_t offset);
// Required platform-specific helpers for Label::patch_instructions.
// They _shadow_ the declarations in AbstractAssembler, which are undefined.
diff --git a/hotspot/src/cpu/x86/vm/assembler_x86_64.cpp b/hotspot/src/cpu/x86/vm/assembler_x86_64.cpp
index f700fd71b5e..431c233df73 100644
--- a/hotspot/src/cpu/x86/vm/assembler_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/assembler_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -683,7 +683,8 @@ address Assembler::locate_operand(address inst, WhichOperand which) {
case REP8(0xB8): // movl/q r, #32/#64(oop?)
if (which == end_pc_operand) return ip + (is_64bit ? 8 : 4);
- assert((which == call32_operand || which == imm64_operand) && is_64bit, "");
+ assert((which == call32_operand || which == imm64_operand) && is_64bit ||
+ which == narrow_oop_operand && !is_64bit, "");
return ip;
case 0x69: // imul r, a, #32
@@ -909,7 +910,8 @@ void Assembler::check_relocation(RelocationHolder const& rspec, int format) {
} else if (r->is_call() || format == call32_operand) {
opnd = locate_operand(inst, call32_operand);
} else if (r->is_data()) {
- assert(format == imm64_operand || format == disp32_operand, "format ok");
+ assert(format == imm64_operand || format == disp32_operand ||
+ format == narrow_oop_operand, "format ok");
opnd = locate_operand(inst, (WhichOperand) format);
} else {
assert(format == 0, "cannot specify a format");
@@ -4933,6 +4935,8 @@ void MacroAssembler::tlab_refill(Label& retry,
movq(Address(top, arrayOopDesc::length_offset_in_bytes()), t1);
// set klass to intArrayKlass
movptr(t1, ExternalAddress((address) Universe::intArrayKlassObj_addr()));
+ // store klass last. concurrent gcs assumes klass length is valid if
+ // klass field is not null.
store_klass(top, t1);
// refill the tlab with an eden allocation
@@ -5003,8 +5007,7 @@ int MacroAssembler::biased_locking_enter(Register lock_reg, Register obj_reg, Re
jcc(Assembler::notEqual, cas_label);
// The bias pattern is present in the object's header. Need to check
// whether the bias owner and the epoch are both still current.
- load_klass(tmp_reg, obj_reg);
- movq(tmp_reg, Address(tmp_reg, Klass::prototype_header_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes()));
+ load_prototype_header(tmp_reg, obj_reg);
orq(tmp_reg, r15_thread);
xorq(tmp_reg, swap_reg);
andq(tmp_reg, ~((int) markOopDesc::age_mask_in_place));
@@ -5078,8 +5081,7 @@ int MacroAssembler::biased_locking_enter(Register lock_reg, Register obj_reg, Re
//
// FIXME: due to a lack of registers we currently blow away the age
// bits in this situation. Should attempt to preserve them.
- load_klass(tmp_reg, obj_reg);
- movq(tmp_reg, Address(tmp_reg, Klass::prototype_header_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes()));
+ load_prototype_header(tmp_reg, obj_reg);
orq(tmp_reg, r15_thread);
if (os::is_MP()) {
lock();
@@ -5109,8 +5111,7 @@ int MacroAssembler::biased_locking_enter(Register lock_reg, Register obj_reg, Re
//
// FIXME: due to a lack of registers we currently blow away the age
// bits in this situation. Should attempt to preserve them.
- load_klass(tmp_reg, obj_reg);
- movq(tmp_reg, Address(tmp_reg, Klass::prototype_header_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes()));
+ load_prototype_header(tmp_reg, obj_reg);
if (os::is_MP()) {
lock();
}
@@ -5154,17 +5155,32 @@ void MacroAssembler::load_klass(Register dst, Register src) {
}
}
+void MacroAssembler::load_prototype_header(Register dst, Register src) {
+ if (UseCompressedOops) {
+ movl(dst, Address(src, oopDesc::klass_offset_in_bytes()));
+ movq(dst, Address(r12_heapbase, dst, Address::times_8, Klass::prototype_header_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes()));
+ } else {
+ movq(dst, Address(src, oopDesc::klass_offset_in_bytes()));
+ movq(dst, Address(dst, Klass::prototype_header_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes()));
+ }
+}
+
void MacroAssembler::store_klass(Register dst, Register src) {
if (UseCompressedOops) {
encode_heap_oop_not_null(src);
- // zero the entire klass field first as the gap needs to be zeroed too.
- movptr(Address(dst, oopDesc::klass_offset_in_bytes()), NULL_WORD);
movl(Address(dst, oopDesc::klass_offset_in_bytes()), src);
} else {
movq(Address(dst, oopDesc::klass_offset_in_bytes()), src);
}
}
+void MacroAssembler::store_klass_gap(Register dst, Register src) {
+ if (UseCompressedOops) {
+ // Store to klass gap in destination
+ movl(Address(dst, oopDesc::klass_gap_offset_in_bytes()), src);
+ }
+}
+
void MacroAssembler::load_heap_oop(Register dst, Address src) {
if (UseCompressedOops) {
movl(dst, src);
@@ -5188,13 +5204,15 @@ void MacroAssembler::store_heap_oop(Address dst, Register src) {
void MacroAssembler::encode_heap_oop(Register r) {
assert (UseCompressedOops, "should be compressed");
#ifdef ASSERT
- Label ok;
- pushq(rscratch1); // cmpptr trashes rscratch1
- cmpptr(r12_heapbase, ExternalAddress((address)Universe::heap_base_addr()));
- jcc(Assembler::equal, ok);
- stop("MacroAssembler::encode_heap_oop: heap base corrupted?");
- bind(ok);
- popq(rscratch1);
+ if (CheckCompressedOops) {
+ Label ok;
+ pushq(rscratch1); // cmpptr trashes rscratch1
+ cmpptr(r12_heapbase, ExternalAddress((address)Universe::heap_base_addr()));
+ jcc(Assembler::equal, ok);
+ stop("MacroAssembler::encode_heap_oop: heap base corrupted?");
+ bind(ok);
+ popq(rscratch1);
+ }
#endif
verify_oop(r, "broken oop in encode_heap_oop");
testq(r, r);
@@ -5206,11 +5224,13 @@ void MacroAssembler::encode_heap_oop(Register r) {
void MacroAssembler::encode_heap_oop_not_null(Register r) {
assert (UseCompressedOops, "should be compressed");
#ifdef ASSERT
- Label ok;
- testq(r, r);
- jcc(Assembler::notEqual, ok);
- stop("null oop passed to encode_heap_oop_not_null");
- bind(ok);
+ if (CheckCompressedOops) {
+ Label ok;
+ testq(r, r);
+ jcc(Assembler::notEqual, ok);
+ stop("null oop passed to encode_heap_oop_not_null");
+ bind(ok);
+ }
#endif
verify_oop(r, "broken oop in encode_heap_oop_not_null");
subq(r, r12_heapbase);
@@ -5220,11 +5240,13 @@ void MacroAssembler::encode_heap_oop_not_null(Register r) {
void MacroAssembler::encode_heap_oop_not_null(Register dst, Register src) {
assert (UseCompressedOops, "should be compressed");
#ifdef ASSERT
- Label ok;
- testq(src, src);
- jcc(Assembler::notEqual, ok);
- stop("null oop passed to encode_heap_oop_not_null2");
- bind(ok);
+ if (CheckCompressedOops) {
+ Label ok;
+ testq(src, src);
+ jcc(Assembler::notEqual, ok);
+ stop("null oop passed to encode_heap_oop_not_null2");
+ bind(ok);
+ }
#endif
verify_oop(src, "broken oop in encode_heap_oop_not_null2");
if (dst != src) {
@@ -5237,14 +5259,16 @@ void MacroAssembler::encode_heap_oop_not_null(Register dst, Register src) {
void MacroAssembler::decode_heap_oop(Register r) {
assert (UseCompressedOops, "should be compressed");
#ifdef ASSERT
- Label ok;
- pushq(rscratch1);
- cmpptr(r12_heapbase,
- ExternalAddress((address)Universe::heap_base_addr()));
- jcc(Assembler::equal, ok);
- stop("MacroAssembler::decode_heap_oop: heap base corrupted?");
- bind(ok);
- popq(rscratch1);
+ if (CheckCompressedOops) {
+ Label ok;
+ pushq(rscratch1);
+ cmpptr(r12_heapbase,
+ ExternalAddress((address)Universe::heap_base_addr()));
+ jcc(Assembler::equal, ok);
+ stop("MacroAssembler::decode_heap_oop: heap base corrupted?");
+ bind(ok);
+ popq(rscratch1);
+ }
#endif
Label done;
@@ -5265,6 +5289,7 @@ void MacroAssembler::decode_heap_oop_not_null(Register r) {
assert (UseCompressedOops, "should only be used for compressed headers");
// Cannot assert, unverified entry point counts instructions (see .ad file)
// vtableStubs also counts instructions in pd_code_size_limit.
+ // Also do not verify_oop as this is called by verify_oop.
assert(Address::times_8 == LogMinObjAlignmentInBytes, "decode alg wrong");
leaq(r, Address(r12_heapbase, r, Address::times_8, 0));
}
@@ -5273,10 +5298,24 @@ void MacroAssembler::decode_heap_oop_not_null(Register dst, Register src) {
assert (UseCompressedOops, "should only be used for compressed headers");
// Cannot assert, unverified entry point counts instructions (see .ad file)
// vtableStubs also counts instructions in pd_code_size_limit.
+ // Also do not verify_oop as this is called by verify_oop.
assert(Address::times_8 == LogMinObjAlignmentInBytes, "decode alg wrong");
leaq(dst, Address(r12_heapbase, src, Address::times_8, 0));
}
+void MacroAssembler::set_narrow_oop(Register dst, jobject obj) {
+ assert(oop_recorder() != NULL, "this assembler needs an OopRecorder");
+ int oop_index = oop_recorder()->find_index(obj);
+ RelocationHolder rspec = oop_Relocation::spec(oop_index);
+
+ // movl dst,obj
+ InstructionMark im(this);
+ int encode = prefix_and_encode(dst->encoding());
+ emit_byte(0xB8 | encode);
+ emit_data(oop_index, rspec, narrow_oop_operand);
+}
+
+
Assembler::Condition MacroAssembler::negate_condition(Assembler::Condition cond) {
switch (cond) {
// Note some conditions are synonyms for others
diff --git a/hotspot/src/cpu/x86/vm/assembler_x86_64.hpp b/hotspot/src/cpu/x86/vm/assembler_x86_64.hpp
index 9e1ccbfe59d..bf509e02b22 100644
--- a/hotspot/src/cpu/x86/vm/assembler_x86_64.hpp
+++ b/hotspot/src/cpu/x86/vm/assembler_x86_64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -490,7 +490,12 @@ class Assembler : public AbstractAssembler {
imm64_operand = 0, // embedded 64-bit immediate operand
disp32_operand = 1, // embedded 32-bit displacement
call32_operand = 2, // embedded 32-bit self-relative displacement
+#ifndef AMD64
_WhichOperand_limit = 3
+#else
+ narrow_oop_operand = 3, // embedded 32-bit immediate narrow oop
+ _WhichOperand_limit = 4
+#endif
};
public:
@@ -1023,7 +1028,7 @@ class MacroAssembler : public Assembler {
// is needed if the offset is within a certain range (0 <= offset <=
// page_size).
void null_check(Register reg, int offset = -1);
- static bool needs_explicit_null_check(int offset);
+ static bool needs_explicit_null_check(intptr_t offset);
// Required platform-specific helpers for Label::patch_instructions.
// They _shadow_ the declarations in AbstractAssembler, which are undefined.
@@ -1104,6 +1109,9 @@ class MacroAssembler : public Assembler {
// oop manipulations
void load_klass(Register dst, Register src);
void store_klass(Register dst, Register src);
+ void store_klass_gap(Register dst, Register src);
+
+ void load_prototype_header(Register dst, Register src);
void load_heap_oop(Register dst, Address src);
void store_heap_oop(Address dst, Register src);
@@ -1114,6 +1122,8 @@ class MacroAssembler : public Assembler {
void encode_heap_oop_not_null(Register dst, Register src);
void decode_heap_oop_not_null(Register dst, Register src);
+ void set_narrow_oop(Register dst, jobject obj);
+
// Stack frame creation/removal
void enter();
void leave();
diff --git a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
index 7c632cbabcd..081f38c3bac 100644
--- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
index 7c4861d614e..d2f9e2d35b7 100644
--- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
index b80a66ed87c..27024aa8a4b 100644
--- a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/frame_x86.cpp b/hotspot/src/cpu/x86/vm/frame_x86.cpp
index 5019d16c367..9fe370e85de 100644
--- a/hotspot/src/cpu/x86/vm/frame_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
index 153b1002bff..85a1944bd44 100644
--- a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
+++ b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp
index 25611881bbc..4756a2587be 100644
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -233,7 +233,7 @@ void InterpreterMacroAssembler::gen_subtype_check(Register Rsub_klass,
assert(Rsub_klass != rcx, "rcx holds 2ndary super array length");
assert(Rsub_klass != rdi, "rdi holds 2ndary super array scan ptr");
- Label not_subtype, loop;
+ Label not_subtype, not_subtype_pop, loop;
// Profile the not-null value's klass.
profile_typecheck(rcx, Rsub_klass, rdi); // blows rcx, rdi
@@ -272,12 +272,13 @@ void InterpreterMacroAssembler::gen_subtype_check(Register Rsub_klass,
// and we store values in objArrays always encoded, thus we need to encode value
// before repne
if (UseCompressedOops) {
+ pushq(rax);
encode_heap_oop(rax);
repne_scanl();
// Not equal?
- jcc(Assembler::notEqual, not_subtype);
- // decode heap oop here for movq
- decode_heap_oop(rax);
+ jcc(Assembler::notEqual, not_subtype_pop);
+ // restore heap oop here for movq
+ popq(rax);
} else {
repne_scanq();
jcc(Assembler::notEqual, not_subtype);
@@ -287,9 +288,10 @@ void InterpreterMacroAssembler::gen_subtype_check(Register Rsub_klass,
Klass::secondary_super_cache_offset_in_bytes()), rax);
jmp(ok_is_subtype);
+ bind(not_subtype_pop);
+ // restore heap oop here for miss
+ if (UseCompressedOops) popq(rax);
bind(not_subtype);
- // decode heap oop here for miss
- if (UseCompressedOops) decode_heap_oop(rax);
profile_typecheck_failed(rcx); // blows rcx
}
diff --git a/hotspot/src/cpu/x86/vm/interpreter_x86_64.cpp b/hotspot/src/cpu/x86/vm/interpreter_x86_64.cpp
index 251c32065a0..9636c5739e5 100644
--- a/hotspot/src/cpu/x86/vm/interpreter_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/interpreter_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/nativeInst_x86.cpp b/hotspot/src/cpu/x86/vm/nativeInst_x86.cpp
index 9133af54123..f8147a4cc64 100644
--- a/hotspot/src/cpu/x86/vm/nativeInst_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/nativeInst_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp b/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp
index f4115bcf985..255e8210f99 100644
--- a/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/register_definitions_x86.cpp b/hotspot/src/cpu/x86/vm/register_definitions_x86.cpp
index c5fee6815da..1be2c138211 100644
--- a/hotspot/src/cpu/x86/vm/register_definitions_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/register_definitions_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/relocInfo_x86.cpp b/hotspot/src/cpu/x86/vm/relocInfo_x86.cpp
index 2c547c64518..055c237149b 100644
--- a/hotspot/src/cpu/x86/vm/relocInfo_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/relocInfo_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,11 +30,15 @@ void Relocation::pd_set_data_value(address x, intptr_t o) {
#ifdef AMD64
x += o;
typedef Assembler::WhichOperand WhichOperand;
- WhichOperand which = (WhichOperand) format(); // that is, disp32 or imm64, call32
+ WhichOperand which = (WhichOperand) format(); // that is, disp32 or imm64, call32, narrow oop
assert(which == Assembler::disp32_operand ||
+ which == Assembler::narrow_oop_operand ||
which == Assembler::imm64_operand, "format unpacks ok");
if (which == Assembler::imm64_operand) {
*pd_address_in_code() = x;
+ } else if (which == Assembler::narrow_oop_operand) {
+ address disp = Assembler::locate_operand(addr(), which);
+ *(int32_t*) disp = oopDesc::encode_heap_oop((oop)x);
} else {
// Note: Use runtime_call_type relocations for call32_operand.
address ip = addr();
diff --git a/hotspot/src/cpu/x86/vm/relocInfo_x86.hpp b/hotspot/src/cpu/x86/vm/relocInfo_x86.hpp
index 964cd1ff307..da2fe93dacc 100644
--- a/hotspot/src/cpu/x86/vm/relocInfo_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/relocInfo_x86.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-1999 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,5 +29,10 @@
offset_unit = 1,
// Encodes Assembler::disp32_operand vs. Assembler::imm32_operand.
+#ifndef AMD64
format_width = 1
+#else
+ // vs Assembler::narrow_oop_operand.
+ format_width = 2
+#endif
};
diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
index 7dc635d0c34..85befcf4e78 100644
--- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1920,7 +1920,6 @@ nmethod *SharedRuntime::generate_dtrace_nmethod(
int total_strings = 0;
int first_arg_to_pass = 0;
int total_c_args = 0;
- int box_offset = java_lang_boxing_object::value_offset_in_bytes();
if( !method->is_static() ) { // Pass in receiver first
in_sig_bt[i++] = T_OBJECT;
@@ -2131,7 +2130,10 @@ nmethod *SharedRuntime::generate_dtrace_nmethod(
assert(dst.first()->is_stack() &&
(!dst.second()->is_valid() || dst.second()->is_stack()),
"value(s) must go into stack slots");
- if ( out_sig_bt[c_arg] == T_LONG ) {
+
+ BasicType bt = out_sig_bt[c_arg];
+ int box_offset = java_lang_boxing_object::value_offset_in_bytes(bt);
+ if ( bt == T_LONG ) {
__ movl(rbx, Address(in_reg,
box_offset + VMRegImpl::stack_slot_size));
__ movl(Address(rsp, reg2offset_out(dst.second())), rbx);
diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
index 8fa458680d3..b2d4a6513ac 100644
--- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1950,7 +1950,6 @@ nmethod *SharedRuntime::generate_dtrace_nmethod(MacroAssembler *masm,
int total_strings = 0;
int first_arg_to_pass = 0;
int total_c_args = 0;
- int box_offset = java_lang_boxing_object::value_offset_in_bytes();
// Skip the receiver as dtrace doesn't want to see it
if( !method->is_static() ) {
@@ -2197,8 +2196,10 @@ nmethod *SharedRuntime::generate_dtrace_nmethod(MacroAssembler *masm,
__ testq(in_reg, in_reg);
__ jcc(Assembler::zero, skipUnbox);
+ BasicType bt = out_sig_bt[c_arg];
+ int box_offset = java_lang_boxing_object::value_offset_in_bytes(bt);
Address src1(in_reg, box_offset);
- if ( out_sig_bt[c_arg] == T_LONG ) {
+ if ( bt == T_LONG ) {
__ movq(in_reg, src1);
__ movq(stack_dst, in_reg);
assert(out_sig_bt[c_arg+1] == T_VOID, "must be");
@@ -2460,8 +2461,10 @@ nmethod *SharedRuntime::generate_dtrace_nmethod(MacroAssembler *masm,
Label skip;
__ testq(r, r);
__ jcc(Assembler::equal, skip);
+ BasicType bt = out_sig_bt[c_arg];
+ int box_offset = java_lang_boxing_object::value_offset_in_bytes(bt);
Address src1(r, box_offset);
- if ( out_sig_bt[c_arg] == T_LONG ) {
+ if ( bt == T_LONG ) {
__ movq(r, src1);
} else {
__ movl(r, src1);
diff --git a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
index 5cfbc09fe74..68188361b50 100644
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp
index 6134af3071a..3f7d4719b5f 100644
--- a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp
index 79bcd92f2e4..24e7e12fc85 100644
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
index f84c8f8cc05..c831b0cdc38 100644
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -3163,7 +3163,9 @@ void TemplateTable::_new() {
__ movptr(Address(rax, oopDesc::mark_offset_in_bytes()),
(intptr_t) markOopDesc::prototype()); // header (address 0x1)
}
- __ store_klass(rax, rsi); // klass
+ __ xorl(rcx, rcx); // use zero reg to clear memory (shorter code)
+ __ store_klass_gap(rax, rcx); // zero klass gap for compressed oops
+ __ store_klass(rax, rsi); // store klass last
__ jmp(done);
}
diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86_32.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86_32.cpp
index ba4e3481cb7..d65cc0cc3e6 100644
--- a/hotspot/src/cpu/x86/vm/vm_version_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -307,6 +307,10 @@ void VM_Version::get_processor_features() {
// Use it on new AMD cpus starting from Opteron.
UseAddressNop = true;
}
+ if( supports_sse2() && FLAG_IS_DEFAULT(UseNewLongLShift) ) {
+ // Use it on new AMD cpus starting from Opteron.
+ UseNewLongLShift = true;
+ }
if( FLAG_IS_DEFAULT(UseXmmLoadAndClearUpper) ) {
if( supports_sse4a() ) {
UseXmmLoadAndClearUpper = true; // use movsd only on '10h' Opteron
diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86_64.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86_64.cpp
index ee8e2c69018..71be1f8a20e 100644
--- a/hotspot/src/cpu/x86/vm/vm_version_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp
index 3a934d8d7f1..931b3aa900a 100644
--- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/x86_32.ad b/hotspot/src/cpu/x86/vm/x86_32.ad
index 90607dc2508..35db833e9ef 100644
--- a/hotspot/src/cpu/x86/vm/x86_32.ad
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad
@@ -1,5 +1,5 @@
//
-// Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+// Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// This code is free software; you can redistribute it and/or modify it
@@ -3806,6 +3806,78 @@ encode %{
masm.bind(DONE_LABEL);
%}
+ enc_class enc_Array_Equals(eDIRegP ary1, eSIRegP ary2, eAXRegI tmp1, eBXRegI tmp2, eCXRegI result) %{
+ Label TRUE_LABEL, FALSE_LABEL, DONE_LABEL, COMPARE_LOOP_HDR, COMPARE_LOOP;
+ MacroAssembler masm(&cbuf);
+
+ Register ary1Reg = as_Register($ary1$$reg);
+ Register ary2Reg = as_Register($ary2$$reg);
+ Register tmp1Reg = as_Register($tmp1$$reg);
+ Register tmp2Reg = as_Register($tmp2$$reg);
+ Register resultReg = as_Register($result$$reg);
+
+ int length_offset = arrayOopDesc::length_offset_in_bytes();
+ int base_offset = arrayOopDesc::base_offset_in_bytes(T_CHAR);
+
+ // Check the input args
+ masm.cmpl(ary1Reg, ary2Reg);
+ masm.jcc(Assembler::equal, TRUE_LABEL);
+ masm.testl(ary1Reg, ary1Reg);
+ masm.jcc(Assembler::zero, FALSE_LABEL);
+ masm.testl(ary2Reg, ary2Reg);
+ masm.jcc(Assembler::zero, FALSE_LABEL);
+
+ // Check the lengths
+ masm.movl(tmp2Reg, Address(ary1Reg, length_offset));
+ masm.movl(resultReg, Address(ary2Reg, length_offset));
+ masm.cmpl(tmp2Reg, resultReg);
+ masm.jcc(Assembler::notEqual, FALSE_LABEL);
+ masm.testl(resultReg, resultReg);
+ masm.jcc(Assembler::zero, TRUE_LABEL);
+
+ // Get the number of 4 byte vectors to compare
+ masm.shrl(resultReg, 1);
+
+ // Check for odd-length arrays
+ masm.andl(tmp2Reg, 1);
+ masm.testl(tmp2Reg, tmp2Reg);
+ masm.jcc(Assembler::zero, COMPARE_LOOP_HDR);
+
+ // Compare 2-byte "tail" at end of arrays
+ masm.load_unsigned_word(tmp1Reg, Address(ary1Reg, resultReg, Address::times_4, base_offset));
+ masm.load_unsigned_word(tmp2Reg, Address(ary2Reg, resultReg, Address::times_4, base_offset));
+ masm.cmpl(tmp1Reg, tmp2Reg);
+ masm.jcc(Assembler::notEqual, FALSE_LABEL);
+ masm.testl(resultReg, resultReg);
+ masm.jcc(Assembler::zero, TRUE_LABEL);
+
+ // Setup compare loop
+ masm.bind(COMPARE_LOOP_HDR);
+ // Shift tmp1Reg and tmp2Reg to the last 4-byte boundary of the arrays
+ masm.leal(tmp1Reg, Address(ary1Reg, resultReg, Address::times_4, base_offset));
+ masm.leal(tmp2Reg, Address(ary2Reg, resultReg, Address::times_4, base_offset));
+ masm.negl(resultReg);
+
+ // 4-byte-wide compare loop
+ masm.bind(COMPARE_LOOP);
+ masm.movl(ary1Reg, Address(tmp1Reg, resultReg, Address::times_4, 0));
+ masm.movl(ary2Reg, Address(tmp2Reg, resultReg, Address::times_4, 0));
+ masm.cmpl(ary1Reg, ary2Reg);
+ masm.jcc(Assembler::notEqual, FALSE_LABEL);
+ masm.increment(resultReg);
+ masm.jcc(Assembler::notZero, COMPARE_LOOP);
+
+ masm.bind(TRUE_LABEL);
+ masm.movl(resultReg, 1); // return true
+ masm.jmp(DONE_LABEL);
+
+ masm.bind(FALSE_LABEL);
+ masm.xorl(resultReg, resultReg); // return false
+
+ // That's it
+ masm.bind(DONE_LABEL);
+ %}
+
enc_class enc_pop_rdx() %{
emit_opcode(cbuf,0x5A);
%}
@@ -4682,6 +4754,33 @@ operand immI_32_63() %{
interface(CONST_INTER);
%}
+operand immI_1() %{
+ predicate( n->get_int() == 1 );
+ match(ConI);
+
+ op_cost(0);
+ format %{ %}
+ interface(CONST_INTER);
+%}
+
+operand immI_2() %{
+ predicate( n->get_int() == 2 );
+ match(ConI);
+
+ op_cost(0);
+ format %{ %}
+ interface(CONST_INTER);
+%}
+
+operand immI_3() %{
+ predicate( n->get_int() == 3 );
+ match(ConI);
+
+ op_cost(0);
+ format %{ %}
+ interface(CONST_INTER);
+%}
+
// Pointer Immediate
operand immP() %{
match(ConP);
@@ -8871,6 +8970,63 @@ instruct xorl_eReg_mem(eRegL dst, load_long_memory mem, eFlagsReg cr) %{
ins_pipe( ialu_reg_long_mem );
%}
+// Shift Left Long by 1
+instruct shlL_eReg_1(eRegL dst, immI_1 cnt, eFlagsReg cr) %{
+ predicate(UseNewLongLShift);
+ match(Set dst (LShiftL dst cnt));
+ effect(KILL cr);
+ ins_cost(100);
+ format %{ "ADD $dst.lo,$dst.lo\n\t"
+ "ADC $dst.hi,$dst.hi" %}
+ ins_encode %{
+ __ addl($dst$$Register,$dst$$Register);
+ __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
+ %}
+ ins_pipe( ialu_reg_long );
+%}
+
+// Shift Left Long by 2
+instruct shlL_eReg_2(eRegL dst, immI_2 cnt, eFlagsReg cr) %{
+ predicate(UseNewLongLShift);
+ match(Set dst (LShiftL dst cnt));
+ effect(KILL cr);
+ ins_cost(100);
+ format %{ "ADD $dst.lo,$dst.lo\n\t"
+ "ADC $dst.hi,$dst.hi\n\t"
+ "ADD $dst.lo,$dst.lo\n\t"
+ "ADC $dst.hi,$dst.hi" %}
+ ins_encode %{
+ __ addl($dst$$Register,$dst$$Register);
+ __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
+ __ addl($dst$$Register,$dst$$Register);
+ __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
+ %}
+ ins_pipe( ialu_reg_long );
+%}
+
+// Shift Left Long by 3
+instruct shlL_eReg_3(eRegL dst, immI_3 cnt, eFlagsReg cr) %{
+ predicate(UseNewLongLShift);
+ match(Set dst (LShiftL dst cnt));
+ effect(KILL cr);
+ ins_cost(100);
+ format %{ "ADD $dst.lo,$dst.lo\n\t"
+ "ADC $dst.hi,$dst.hi\n\t"
+ "ADD $dst.lo,$dst.lo\n\t"
+ "ADC $dst.hi,$dst.hi\n\t"
+ "ADD $dst.lo,$dst.lo\n\t"
+ "ADC $dst.hi,$dst.hi" %}
+ ins_encode %{
+ __ addl($dst$$Register,$dst$$Register);
+ __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
+ __ addl($dst$$Register,$dst$$Register);
+ __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
+ __ addl($dst$$Register,$dst$$Register);
+ __ adcl(HIGH_FROM_LOW($dst$$Register),HIGH_FROM_LOW($dst$$Register));
+ %}
+ ins_pipe( ialu_reg_long );
+%}
+
// Shift Left Long by 1-31
instruct shlL_eReg_1_31(eRegL dst, immI_1_31 cnt, eFlagsReg cr) %{
match(Set dst (LShiftL dst cnt));
@@ -11565,6 +11721,17 @@ instruct string_compare(eDIRegP str1, eSIRegP str2, eAXRegI tmp1, eBXRegI tmp2,
ins_pipe( pipe_slow );
%}
+// fast array equals
+instruct array_equals(eDIRegP ary1, eSIRegP ary2, eAXRegI tmp1, eBXRegI tmp2, eCXRegI result, eFlagsReg cr) %{
+ match(Set result (AryEq ary1 ary2));
+ effect(USE_KILL ary1, USE_KILL ary2, KILL tmp1, KILL tmp2, KILL cr);
+ //ins_cost(300);
+
+ format %{ "Array Equals $ary1,$ary2 -> $result // KILL EAX, EBX" %}
+ ins_encode( enc_Array_Equals(ary1, ary2, tmp1, tmp2, result) );
+ ins_pipe( pipe_slow );
+%}
+
//----------Control Flow Instructions------------------------------------------
// Signed compare Instructions
instruct compI_eReg(eFlagsReg cr, eRegI op1, eRegI op2) %{
diff --git a/hotspot/src/cpu/x86/vm/x86_64.ad b/hotspot/src/cpu/x86/vm/x86_64.ad
index 2c79821c238..302994148c0 100644
--- a/hotspot/src/cpu/x86/vm/x86_64.ad
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad
@@ -1,5 +1,5 @@
//
-// Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+// Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// This code is free software; you can redistribute it and/or modify it
@@ -3808,6 +3808,78 @@ encode %{
masm.bind(DONE_LABEL);
%}
+ enc_class enc_Array_Equals(rdi_RegP ary1, rsi_RegP ary2, rax_RegI tmp1, rbx_RegI tmp2, rcx_RegI result) %{
+ Label TRUE_LABEL, FALSE_LABEL, DONE_LABEL, COMPARE_LOOP_HDR, COMPARE_LOOP;
+ MacroAssembler masm(&cbuf);
+
+ Register ary1Reg = as_Register($ary1$$reg);
+ Register ary2Reg = as_Register($ary2$$reg);
+ Register tmp1Reg = as_Register($tmp1$$reg);
+ Register tmp2Reg = as_Register($tmp2$$reg);
+ Register resultReg = as_Register($result$$reg);
+
+ int length_offset = arrayOopDesc::length_offset_in_bytes();
+ int base_offset = arrayOopDesc::base_offset_in_bytes(T_CHAR);
+
+ // Check the input args
+ masm.cmpq(ary1Reg, ary2Reg);
+ masm.jcc(Assembler::equal, TRUE_LABEL);
+ masm.testq(ary1Reg, ary1Reg);
+ masm.jcc(Assembler::zero, FALSE_LABEL);
+ masm.testq(ary2Reg, ary2Reg);
+ masm.jcc(Assembler::zero, FALSE_LABEL);
+
+ // Check the lengths
+ masm.movl(tmp2Reg, Address(ary1Reg, length_offset));
+ masm.movl(resultReg, Address(ary2Reg, length_offset));
+ masm.cmpl(tmp2Reg, resultReg);
+ masm.jcc(Assembler::notEqual, FALSE_LABEL);
+ masm.testl(resultReg, resultReg);
+ masm.jcc(Assembler::zero, TRUE_LABEL);
+
+ // Get the number of 4 byte vectors to compare
+ masm.shrl(resultReg, 1);
+
+ // Check for odd-length arrays
+ masm.andl(tmp2Reg, 1);
+ masm.testl(tmp2Reg, tmp2Reg);
+ masm.jcc(Assembler::zero, COMPARE_LOOP_HDR);
+
+ // Compare 2-byte "tail" at end of arrays
+ masm.load_unsigned_word(tmp1Reg, Address(ary1Reg, resultReg, Address::times_4, base_offset));
+ masm.load_unsigned_word(tmp2Reg, Address(ary2Reg, resultReg, Address::times_4, base_offset));
+ masm.cmpl(tmp1Reg, tmp2Reg);
+ masm.jcc(Assembler::notEqual, FALSE_LABEL);
+ masm.testl(resultReg, resultReg);
+ masm.jcc(Assembler::zero, TRUE_LABEL);
+
+ // Setup compare loop
+ masm.bind(COMPARE_LOOP_HDR);
+ // Shift tmp1Reg and tmp2Reg to the last 4-byte boundary of the arrays
+ masm.leaq(tmp1Reg, Address(ary1Reg, resultReg, Address::times_4, base_offset));
+ masm.leaq(tmp2Reg, Address(ary2Reg, resultReg, Address::times_4, base_offset));
+ masm.negq(resultReg);
+
+ // 4-byte-wide compare loop
+ masm.bind(COMPARE_LOOP);
+ masm.movl(ary1Reg, Address(tmp1Reg, resultReg, Address::times_4, 0));
+ masm.movl(ary2Reg, Address(tmp2Reg, resultReg, Address::times_4, 0));
+ masm.cmpl(ary1Reg, ary2Reg);
+ masm.jcc(Assembler::notEqual, FALSE_LABEL);
+ masm.incrementq(resultReg);
+ masm.jcc(Assembler::notZero, COMPARE_LOOP);
+
+ masm.bind(TRUE_LABEL);
+ masm.movl(resultReg, 1); // return true
+ masm.jmp(DONE_LABEL);
+
+ masm.bind(FALSE_LABEL);
+ masm.xorl(resultReg, resultReg); // return false
+
+ // That's it
+ masm.bind(DONE_LABEL);
+ %}
+
enc_class enc_rethrow()
%{
cbuf.set_inst_mark();
@@ -5202,15 +5274,15 @@ operand indIndexScaleOffset(any_RegP reg, immL32 off, rRegL lreg, immI2 scale)
%}
%}
-// Indirect Memory Times Scale Plus Index Register Plus Offset Operand
-operand indIndexScaleOffsetComp(rRegN src, immL32 off, r12RegL base) %{
+// Indirect Narrow Oop Plus Offset Operand
+operand indNarrowOopOffset(rRegN src, immL32 off) %{
constraint(ALLOC_IN_RC(ptr_reg));
- match(AddP (DecodeN src base) off);
+ match(AddP (DecodeN src) off);
op_cost(10);
- format %{"[$base + $src << 3 + $off] (compressed)" %}
+ format %{"[R12 + $src << 3 + $off] (compressed oop addressing)" %}
interface(MEMORY_INTER) %{
- base($base);
+ base(0xc); // R12
index($src);
scale(0x3);
disp($off);
@@ -5365,7 +5437,7 @@ operand cmpOpU()
opclass memory(indirect, indOffset8, indOffset32, indIndexOffset, indIndex,
indIndexScale, indIndexScaleOffset, indPosIndexScaleOffset,
- indIndexScaleOffsetComp);
+ indNarrowOopOffset);
//----------PIPELINE-----------------------------------------------------------
// Rules which define the behavior of the target architectures pipeline.
@@ -6044,10 +6116,9 @@ instruct loadP(rRegP dst, memory mem)
%}
// Load Compressed Pointer
-instruct loadN(rRegN dst, memory mem, rFlagsReg cr)
+instruct loadN(rRegN dst, memory mem)
%{
match(Set dst (LoadN mem));
- effect(KILL cr);
ins_cost(125); // XXX
format %{ "movl $dst, $mem\t# compressed ptr" %}
@@ -6064,7 +6135,6 @@ instruct loadN(rRegN dst, memory mem, rFlagsReg cr)
instruct loadKlass(rRegP dst, memory mem)
%{
match(Set dst (LoadKlass mem));
- predicate(!n->in(MemNode::Address)->bottom_type()->is_narrow());
ins_cost(125); // XXX
format %{ "movq $dst, $mem\t# class" %}
@@ -6073,22 +6143,17 @@ instruct loadKlass(rRegP dst, memory mem)
ins_pipe(ialu_reg_mem); // XXX
%}
-// Load Klass Pointer
-instruct loadKlassComp(rRegP dst, memory mem)
+// Load narrow Klass Pointer
+instruct loadNKlass(rRegN dst, memory mem)
%{
- match(Set dst (LoadKlass mem));
- predicate(n->in(MemNode::Address)->bottom_type()->is_narrow());
+ match(Set dst (LoadNKlass mem));
ins_cost(125); // XXX
- format %{ "movl $dst, $mem\t# compressed class\n\t"
- "decode_heap_oop $dst,$dst" %}
+ format %{ "movl $dst, $mem\t# compressed klass ptr" %}
ins_encode %{
Address addr = build_address($mem$$base, $mem$$index, $mem$$scale, $mem$$disp);
Register dst = as_Register($dst$$reg);
__ movl(dst, addr);
- // klass is never null in the header but this is generated for all
- // klass loads not just the _klass field in the header.
- __ decode_heap_oop(dst);
%}
ins_pipe(ialu_reg_mem); // XXX
%}
@@ -6362,16 +6427,14 @@ instruct loadConN(rRegN dst, immN src) %{
match(Set dst src);
ins_cost(125);
- format %{ "movq $dst, $src\t# compressed ptr\n\t"
- "encode_heap_oop_not_null $dst,$dst" %}
+ format %{ "movl $dst, $src\t# compressed ptr" %}
ins_encode %{
address con = (address)$src$$constant;
Register dst = $dst$$Register;
if (con == NULL) {
ShouldNotReachHere();
} else {
- __ movoop(dst, (jobject)$src$$constant);
- __ encode_heap_oop_not_null(dst);
+ __ set_narrow_oop(dst, (jobject)$src$$constant);
}
%}
ins_pipe(ialu_reg_fat); // XXX
@@ -6633,13 +6696,12 @@ instruct storeImmP(memory mem, immP31 src)
%}
// Store Compressed Pointer
-instruct storeN(memory mem, rRegN src, rFlagsReg cr)
+instruct storeN(memory mem, rRegN src)
%{
match(Set mem (StoreN mem src));
- effect(KILL cr);
ins_cost(125); // XXX
- format %{ "movl $mem, $src\t# ptr" %}
+ format %{ "movl $mem, $src\t# compressed ptr" %}
ins_encode %{
Address addr = build_address($mem$$base, $mem$$index, $mem$$scale, $mem$$disp);
Register src = as_Register($src$$reg);
@@ -6998,7 +7060,7 @@ instruct castP2X(rRegL dst, rRegP src)
// Convert oop pointer into compressed form
instruct encodeHeapOop(rRegN dst, rRegP src, rFlagsReg cr) %{
- predicate(n->bottom_type()->is_narrowoop()->make_oopptr()->ptr() != TypePtr::NotNull);
+ predicate(n->bottom_type()->make_ptr()->ptr() != TypePtr::NotNull);
match(Set dst (EncodeP src));
effect(KILL cr);
format %{ "encode_heap_oop $dst,$src" %}
@@ -7014,7 +7076,7 @@ instruct encodeHeapOop(rRegN dst, rRegP src, rFlagsReg cr) %{
%}
instruct encodeHeapOop_not_null(rRegN dst, rRegP src, rFlagsReg cr) %{
- predicate(n->bottom_type()->is_narrowoop()->make_oopptr()->ptr() == TypePtr::NotNull);
+ predicate(n->bottom_type()->make_ptr()->ptr() == TypePtr::NotNull);
match(Set dst (EncodeP src));
effect(KILL cr);
format %{ "encode_heap_oop_not_null $dst,$src" %}
@@ -7027,7 +7089,8 @@ instruct encodeHeapOop_not_null(rRegN dst, rRegP src, rFlagsReg cr) %{
%}
instruct decodeHeapOop(rRegP dst, rRegN src, rFlagsReg cr) %{
- predicate(n->bottom_type()->is_oopptr()->ptr() != TypePtr::NotNull);
+ predicate(n->bottom_type()->is_oopptr()->ptr() != TypePtr::NotNull &&
+ n->bottom_type()->is_oopptr()->ptr() != TypePtr::Constant);
match(Set dst (DecodeN src));
effect(KILL cr);
format %{ "decode_heap_oop $dst,$src" %}
@@ -7043,7 +7106,8 @@ instruct decodeHeapOop(rRegP dst, rRegN src, rFlagsReg cr) %{
%}
instruct decodeHeapOop_not_null(rRegP dst, rRegN src) %{
- predicate(n->bottom_type()->is_oopptr()->ptr() == TypePtr::NotNull);
+ predicate(n->bottom_type()->is_oopptr()->ptr() == TypePtr::NotNull ||
+ n->bottom_type()->is_oopptr()->ptr() == TypePtr::Constant);
match(Set dst (DecodeN src));
format %{ "decode_heap_oop_not_null $dst,$src" %}
ins_encode %{
@@ -7142,6 +7206,30 @@ instruct cmovI_memU(cmpOpU cop, rFlagsRegU cr, rRegI dst, memory src)
ins_pipe(pipe_cmov_mem);
%}
+// Conditional move
+instruct cmovN_reg(rRegN dst, rRegN src, rFlagsReg cr, cmpOp cop)
+%{
+ match(Set dst (CMoveN (Binary cop cr) (Binary dst src)));
+
+ ins_cost(200); // XXX
+ format %{ "cmovl$cop $dst, $src\t# signed, compressed ptr" %}
+ opcode(0x0F, 0x40);
+ ins_encode(REX_reg_reg(dst, src), enc_cmov(cop), reg_reg(dst, src));
+ ins_pipe(pipe_cmov_reg);
+%}
+
+// Conditional move
+instruct cmovN_regU(rRegN dst, rRegN src, rFlagsRegU cr, cmpOpU cop)
+%{
+ match(Set dst (CMoveN (Binary cop cr) (Binary dst src)));
+
+ ins_cost(200); // XXX
+ format %{ "cmovl$cop $dst, $src\t# unsigned, compressed ptr" %}
+ opcode(0x0F, 0x40);
+ ins_encode(REX_reg_reg(dst, src), enc_cmov(cop), reg_reg(dst, src));
+ ins_pipe(pipe_cmov_reg);
+%}
+
// Conditional move
instruct cmovP_reg(rRegP dst, rRegP src, rFlagsReg cr, cmpOp cop)
%{
@@ -10862,6 +10950,18 @@ instruct string_compare(rdi_RegP str1, rsi_RegP str2, rax_RegI tmp1,
ins_pipe( pipe_slow );
%}
+// fast array equals
+instruct array_equals(rdi_RegP ary1, rsi_RegP ary2, rax_RegI tmp1,
+ rbx_RegI tmp2, rcx_RegI result, rFlagsReg cr) %{
+ match(Set result (AryEq ary1 ary2));
+ effect(USE_KILL ary1, USE_KILL ary2, KILL tmp1, KILL tmp2, KILL cr);
+ //ins_cost(300);
+
+ format %{ "Array Equals $ary1,$ary2 -> $result // KILL RAX, RBX" %}
+ ins_encode( enc_Array_Equals(ary1, ary2, tmp1, tmp2, result) );
+ ins_pipe( pipe_slow );
+%}
+
//----------Control Flow Instructions------------------------------------------
// Signed compare Instructions
@@ -11055,14 +11155,50 @@ instruct testP_reg_mem(rFlagsReg cr, memory op, immP0 zero)
ins_pipe(ialu_cr_reg_imm);
%}
+
+instruct compN_rReg(rFlagsRegU cr, rRegN op1, rRegN op2)
+%{
+ match(Set cr (CmpN op1 op2));
+
+ format %{ "cmpl $op1, $op2\t# compressed ptr" %}
+ ins_encode %{ __ cmpl(as_Register($op1$$reg), as_Register($op2$$reg)); %}
+ ins_pipe(ialu_cr_reg_reg);
+%}
+
+instruct compN_rReg_mem(rFlagsRegU cr, rRegN src, memory mem)
+%{
+ match(Set cr (CmpN src (LoadN mem)));
+
+ ins_cost(500); // XXX
+ format %{ "cmpl $src, mem\t# compressed ptr" %}
+ ins_encode %{
+ Address adr = build_address($mem$$base, $mem$$index, $mem$$scale, $mem$$disp);
+ __ cmpl(as_Register($src$$reg), adr);
+ %}
+ ins_pipe(ialu_cr_reg_mem);
+%}
+
instruct testN_reg(rFlagsReg cr, rRegN src, immN0 zero) %{
match(Set cr (CmpN src zero));
- format %{ "testl $src, $src" %}
+ format %{ "testl $src, $src\t# compressed ptr" %}
ins_encode %{ __ testl($src$$Register, $src$$Register); %}
ins_pipe(ialu_cr_reg_imm);
%}
+instruct testN_reg_mem(rFlagsReg cr, memory mem, immN0 zero)
+%{
+ match(Set cr (CmpN (LoadN mem) zero));
+
+ ins_cost(500); // XXX
+ format %{ "testl $mem, 0xffffffff\t# compressed ptr" %}
+ ins_encode %{
+ Address addr = build_address($mem$$base, $mem$$index, $mem$$scale, $mem$$disp);
+ __ cmpl(addr, (int)0xFFFFFFFF);
+ %}
+ ins_pipe(ialu_cr_reg_mem);
+%}
+
// Yanked all unsigned pointer compare operations.
// Pointer compares are done with CmpP which is already unsigned.
diff --git a/hotspot/src/os/linux/vm/attachListener_linux.cpp b/hotspot/src/os/linux/vm/attachListener_linux.cpp
index 81ce1cc976b..f40ac8e8491 100644
--- a/hotspot/src/os/linux/vm/attachListener_linux.cpp
+++ b/hotspot/src/os/linux/vm/attachListener_linux.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/linux/vm/dtraceJSDT_linux.cpp b/hotspot/src/os/linux/vm/dtraceJSDT_linux.cpp
index ea0eab9b975..b7951d881b4 100644
--- a/hotspot/src/os/linux/vm/dtraceJSDT_linux.cpp
+++ b/hotspot/src/os/linux/vm/dtraceJSDT_linux.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/linux/vm/hpi_linux.hpp b/hotspot/src/os/linux/vm/hpi_linux.hpp
index d14ca94347c..b671a4e7315 100644
--- a/hotspot/src/os/linux/vm/hpi_linux.hpp
+++ b/hotspot/src/os/linux/vm/hpi_linux.hpp
@@ -70,6 +70,10 @@ inline int hpi::send(int fd, char *buf, int nBytes, int flags) {
RESTARTABLE_RETURN_INT(::send(fd, buf, nBytes, (unsigned int) flags));
}
+inline int hpi::raw_send(int fd, char *buf, int nBytes, int flags) {
+ return send(fd, buf, nBytes, flags);
+}
+
inline int hpi::timeout(int fd, long timeout) {
julong prevtime,newtime;
struct timeval t;
diff --git a/hotspot/src/os/linux/vm/jvm_linux.cpp b/hotspot/src/os/linux/vm/jvm_linux.cpp
index dc4d2859c6a..b38ff5c327f 100644
--- a/hotspot/src/os/linux/vm/jvm_linux.cpp
+++ b/hotspot/src/os/linux/vm/jvm_linux.cpp
@@ -132,7 +132,7 @@ JVM_END
*/
struct siglabel {
- char *name;
+ const char *name;
int number;
};
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index d28700aab88..bc5d9ebc69e 100644
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -75,8 +75,8 @@ int os::Linux::_page_size = -1;
bool os::Linux::_is_floating_stack = false;
bool os::Linux::_is_NPTL = false;
bool os::Linux::_supports_fast_thread_cpu_time = false;
-char * os::Linux::_glibc_version = NULL;
-char * os::Linux::_libpthread_version = NULL;
+const char * os::Linux::_glibc_version = NULL;
+const char * os::Linux::_libpthread_version = NULL;
static jlong initial_time_count=0;
@@ -213,9 +213,9 @@ pid_t os::Linux::gettid() {
// the system call returns 1. This causes the VM to act as if it is
// a single processor and elide locking (see is_MP() call).
static bool unsafe_chroot_detected = false;
-static char *unstable_chroot_error = "/proc file system not found.\n"
- "Java may be unstable running multithreaded in a chroot "
- "environment on Linux when /proc filesystem is not mounted.";
+static const char *unstable_chroot_error = "/proc file system not found.\n"
+ "Java may be unstable running multithreaded in a chroot "
+ "environment on Linux when /proc filesystem is not mounted.";
void os::Linux::initialize_system_info() {
_processor_count = sysconf(_SC_NPROCESSORS_CONF);
@@ -544,26 +544,23 @@ void os::Linux::libpthread_init() {
if (n > 0) {
char *str = (char *)malloc(n);
confstr(_CS_GNU_LIBPTHREAD_VERSION, str, n);
-
// Vanilla RH-9 (glibc 2.3.2) has a bug that confstr() always tells
// us "NPTL-0.29" even we are running with LinuxThreads. Check if this
- // is the case:
+ // is the case. LinuxThreads has a hard limit on max number of threads.
+ // So sysconf(_SC_THREAD_THREADS_MAX) will return a positive value.
+ // On the other hand, NPTL does not have such a limit, sysconf()
+ // will return -1 and errno is not changed. Check if it is really NPTL.
if (strcmp(os::Linux::glibc_version(), "glibc 2.3.2") == 0 &&
- strstr(str, "NPTL")) {
- // LinuxThreads has a hard limit on max number of threads. So
- // sysconf(_SC_THREAD_THREADS_MAX) will return a positive value.
- // On the other hand, NPTL does not have such a limit, sysconf()
- // will return -1 and errno is not changed. Check if it is really
- // NPTL:
- if (sysconf(_SC_THREAD_THREADS_MAX) > 0) {
- free(str);
- str = "linuxthreads";
- }
+ strstr(str, "NPTL") &&
+ sysconf(_SC_THREAD_THREADS_MAX) > 0) {
+ free(str);
+ os::Linux::set_libpthread_version("linuxthreads");
+ } else {
+ os::Linux::set_libpthread_version(str);
}
- os::Linux::set_libpthread_version(str);
} else {
- // glibc before 2.3.2 only has LinuxThreads.
- os::Linux::set_libpthread_version("linuxthreads");
+ // glibc before 2.3.2 only has LinuxThreads.
+ os::Linux::set_libpthread_version("linuxthreads");
}
if (strstr(libpthread_version(), "NPTL")) {
@@ -2417,8 +2414,20 @@ static bool linux_mprotect(char* addr, size_t size, int prot) {
return ::mprotect(bottom, size, prot) == 0;
}
-bool os::protect_memory(char* addr, size_t size) {
- return linux_mprotect(addr, size, PROT_READ);
+// Set protections specified
+bool os::protect_memory(char* addr, size_t bytes, ProtType prot,
+ bool is_committed) {
+ unsigned int p = 0;
+ switch (prot) {
+ case MEM_PROT_NONE: p = PROT_NONE; break;
+ case MEM_PROT_READ: p = PROT_READ; break;
+ case MEM_PROT_RW: p = PROT_READ|PROT_WRITE; break;
+ case MEM_PROT_RWX: p = PROT_READ|PROT_WRITE|PROT_EXEC; break;
+ default:
+ ShouldNotReachHere();
+ }
+ // is_committed is unused.
+ return linux_mprotect(addr, bytes, p);
}
bool os::guard_memory(char* addr, size_t size) {
@@ -3707,8 +3716,9 @@ void os::make_polling_page_unreadable(void) {
// Mark the polling page as readable
void os::make_polling_page_readable(void) {
- if( !protect_memory((char *)_polling_page, Linux::page_size()) )
+ if( !linux_mprotect((char *)_polling_page, Linux::page_size(), PROT_READ)) {
fatal("Could not enable polling page");
+ }
};
int os::active_processor_count() {
@@ -4632,11 +4642,7 @@ extern char** environ;
// Unlike system(), this function can be called from signal handler. It
// doesn't block SIGINT et al.
int os::fork_and_exec(char* cmd) {
- char * argv[4];
- argv[0] = "sh";
- argv[1] = "-c";
- argv[2] = cmd;
- argv[3] = NULL;
+ const char * argv[4] = {"sh", "-c", cmd, NULL};
// fork() in LinuxThreads/NPTL is not async-safe. It needs to run
// pthread_atfork handlers and reset pthread library. All we need is a
@@ -4661,7 +4667,7 @@ int os::fork_and_exec(char* cmd) {
// IA64 should use normal execve() from glibc to match the glibc fork()
// above.
NOT_IA64(syscall(__NR_execve, "/bin/sh", argv, environ);)
- IA64_ONLY(execve("/bin/sh", argv, environ);)
+ IA64_ONLY(execve("/bin/sh", (char* const*)argv, environ);)
// execve failed
_exit(-1);
diff --git a/hotspot/src/os/linux/vm/os_linux.hpp b/hotspot/src/os/linux/vm/os_linux.hpp
index 54fc117311f..baa412501f3 100644
--- a/hotspot/src/os/linux/vm/os_linux.hpp
+++ b/hotspot/src/os/linux/vm/os_linux.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -52,8 +52,8 @@ class Linux {
static address _initial_thread_stack_bottom;
static uintptr_t _initial_thread_stack_size;
- static char *_glibc_version;
- static char *_libpthread_version;
+ static const char *_glibc_version;
+ static const char *_libpthread_version;
static bool _is_floating_stack;
static bool _is_NPTL;
@@ -72,8 +72,8 @@ class Linux {
static julong physical_memory() { return _physical_memory; }
static void initialize_system_info();
- static void set_glibc_version(char *s) { _glibc_version = s; }
- static void set_libpthread_version(char *s) { _libpthread_version = s; }
+ static void set_glibc_version(const char *s) { _glibc_version = s; }
+ static void set_libpthread_version(const char *s) { _libpthread_version = s; }
static bool supports_variable_stack_size();
@@ -134,8 +134,8 @@ class Linux {
static bool chained_handler(int sig, siginfo_t* siginfo, void* context);
// GNU libc and libpthread version strings
- static char *glibc_version() { return _glibc_version; }
- static char *libpthread_version() { return _libpthread_version; }
+ static const char *glibc_version() { return _glibc_version; }
+ static const char *libpthread_version() { return _libpthread_version; }
// NPTL or LinuxThreads?
static bool is_LinuxThreads() { return !_is_NPTL; }
diff --git a/hotspot/src/os/linux/vm/os_linux.inline.hpp b/hotspot/src/os/linux/vm/os_linux.inline.hpp
index 399fa0c4474..6f6d608ae2d 100644
--- a/hotspot/src/os/linux/vm/os_linux.inline.hpp
+++ b/hotspot/src/os/linux/vm/os_linux.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp
index 8e9be682488..feedb287ada 100644
--- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp
+++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/dtrace/jhelper.d b/hotspot/src/os/solaris/dtrace/jhelper.d
index 19b4c08c2d3..6f2f6165c35 100644
--- a/hotspot/src/os/solaris/dtrace/jhelper.d
+++ b/hotspot/src/os/solaris/dtrace/jhelper.d
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/dtrace/libjvm_db.c b/hotspot/src/os/solaris/dtrace/libjvm_db.c
index 5c133663d4b..ad0031e4b92 100644
--- a/hotspot/src/os/solaris/dtrace/libjvm_db.c
+++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp b/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp
index 49f74216f16..5f05d7c1cd1 100644
--- a/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/vm/hpi_solaris.hpp b/hotspot/src/os/solaris/vm/hpi_solaris.hpp
index cd5f2eab6ac..8164a8eca9f 100644
--- a/hotspot/src/os/solaris/vm/hpi_solaris.hpp
+++ b/hotspot/src/os/solaris/vm/hpi_solaris.hpp
@@ -71,6 +71,10 @@ inline int hpi::send(int fd, char *buf, int nBytes, int flags) {
INTERRUPTIBLE_RETURN_INT(::send(fd, buf, nBytes, flags), os::Solaris::clear_interrupted);
}
+inline int hpi::raw_send(int fd, char *buf, int nBytes, int flags) {
+ RESTARTABLE_RETURN_INT(::send(fd, buf, nBytes, flags));
+}
+
// As both poll and select can be interrupted by signals, we have to be
// prepared to restart the system call after updating the timeout, unless
// a poll() is done with timeout == -1, in which case we repeat with this
diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp
index ce6765e8d50..b6ca2a6db90 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2965,10 +2965,21 @@ static bool solaris_mprotect(char* addr, size_t bytes, int prot) {
return retVal == 0;
}
-// Protect memory (make it read-only. (Used to pass readonly pages through
+// Protect memory (Used to pass readonly pages through
// JNI GetArrayElements with empty arrays.)
-bool os::protect_memory(char* addr, size_t bytes) {
- return solaris_mprotect(addr, bytes, PROT_READ);
+bool os::protect_memory(char* addr, size_t bytes, ProtType prot,
+ bool is_committed) {
+ unsigned int p = 0;
+ switch (prot) {
+ case MEM_PROT_NONE: p = PROT_NONE; break;
+ case MEM_PROT_READ: p = PROT_READ; break;
+ case MEM_PROT_RW: p = PROT_READ|PROT_WRITE; break;
+ case MEM_PROT_RWX: p = PROT_READ|PROT_WRITE|PROT_EXEC; break;
+ default:
+ ShouldNotReachHere();
+ }
+ // is_committed is unused.
+ return solaris_mprotect(addr, bytes, p);
}
// guard_memory and unguard_memory only happens within stack guard pages.
diff --git a/hotspot/src/os/solaris/vm/os_solaris.hpp b/hotspot/src/os/solaris/vm/os_solaris.hpp
index 545802ae158..cffe4ee80ac 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.hpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/vm/os_solaris.inline.hpp b/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
index 3fe038dd6ce..0c640973e61 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/windows/vm/dtraceJSDT_windows.cpp b/hotspot/src/os/windows/vm/dtraceJSDT_windows.cpp
index 8f8986a98a2..9ef18dfdb59 100644
--- a/hotspot/src/os/windows/vm/dtraceJSDT_windows.cpp
+++ b/hotspot/src/os/windows/vm/dtraceJSDT_windows.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/windows/vm/hpi_windows.hpp b/hotspot/src/os/windows/vm/hpi_windows.hpp
index 1398950c85b..663654f0774 100644
--- a/hotspot/src/os/windows/vm/hpi_windows.hpp
+++ b/hotspot/src/os/windows/vm/hpi_windows.hpp
@@ -102,6 +102,10 @@ HPIDECL(send, "send", _socket, Send, int, "%d",
fd, buf, nBytes, flags),
(fd, buf, nBytes, flags));
+inline int hpi::raw_send(int fd, char *buf, int nBytes, int flags) {
+ return send(fd, buf, nBytes, flags);
+}
+
HPIDECL(timeout, "timeout", _socket, Timeout, int, "%d",
(int fd, long timeout),
("fd = %d, timeout = %ld", fd, timeout),
diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp
index a114b894690..14b3141d27e 100644
--- a/hotspot/src/os/windows/vm/os_windows.cpp
+++ b/hotspot/src/os/windows/vm/os_windows.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2170,6 +2170,7 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
// Windows 98 reports faulting addresses incorrectly
if (!MacroAssembler::needs_explicit_null_check((intptr_t)addr) ||
!os::win32::is_nt()) {
+
return Handle_Exception(exceptionInfo,
SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL));
}
@@ -2563,9 +2564,33 @@ bool os::release_memory(char* addr, size_t bytes) {
return VirtualFree(addr, 0, MEM_RELEASE) != 0;
}
-bool os::protect_memory(char* addr, size_t bytes) {
+// Set protections specified
+bool os::protect_memory(char* addr, size_t bytes, ProtType prot,
+ bool is_committed) {
+ unsigned int p = 0;
+ switch (prot) {
+ case MEM_PROT_NONE: p = PAGE_NOACCESS; break;
+ case MEM_PROT_READ: p = PAGE_READONLY; break;
+ case MEM_PROT_RW: p = PAGE_READWRITE; break;
+ case MEM_PROT_RWX: p = PAGE_EXECUTE_READWRITE; break;
+ default:
+ ShouldNotReachHere();
+ }
+
DWORD old_status;
- return VirtualProtect(addr, bytes, PAGE_READONLY, &old_status) != 0;
+
+ // Strange enough, but on Win32 one can change protection only for committed
+ // memory, not a big deal anyway, as bytes less or equal than 64K
+ if (!is_committed && !commit_memory(addr, bytes)) {
+ fatal("cannot commit protection page");
+ }
+ // One cannot use os::guard_memory() here, as on Win32 guard page
+ // have different (one-shot) semantics, from MSDN on PAGE_GUARD:
+ //
+ // Pages in the region become guard pages. Any attempt to access a guard page
+ // causes the system to raise a STATUS_GUARD_PAGE exception and turn off
+ // the guard page status. Guard pages thus act as a one-time access alarm.
+ return VirtualProtect(addr, bytes, p, &old_status) != 0;
}
bool os::guard_memory(char* addr, size_t bytes) {
diff --git a/hotspot/src/os/windows/vm/os_windows.inline.hpp b/hotspot/src/os/windows/vm/os_windows.inline.hpp
index 26be952c03f..49dc4e75d5c 100644
--- a/hotspot/src/os/windows/vm/os_windows.inline.hpp
+++ b/hotspot/src/os/windows/vm/os_windows.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp b/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp
index 7ffae8d17ea..0fcd3b0d6d8 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,12 +27,6 @@
#include
-bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
- // Since the linux kernel resides at the low end of
- // user address space, no null pointer check is needed.
- return offset < 0 || offset >= 0x100000;
-}
-
void MacroAssembler::read_ccr_trap(Register ccr_save) {
// No implementation
breakpoint_trap();
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp b/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp
index a932a1079bc..3dc9842c623 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp b/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp
index 4f2693db8ed..ccc884e8329 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/linux_sparc.ad b/hotspot/src/os_cpu/linux_sparc/vm/linux_sparc.ad
index 33288c5df2c..1f768790289 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/linux_sparc.ad
+++ b/hotspot/src/os_cpu/linux_sparc/vm/linux_sparc.ad
@@ -1,5 +1,5 @@
//
-// Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+// Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/linux_sparc.s b/hotspot/src/os_cpu/linux_sparc/vm/linux_sparc.s
index dda3d05563e..ec5e2cd7139 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/linux_sparc.s
+++ b/hotspot/src/os_cpu/linux_sparc/vm/linux_sparc.s
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp b/hotspot/src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp
index 9b39f98fb22..44b0d2c83f2 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp
index cc209852554..2226285c0e7 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp
index 0a88fef95e2..4c74a6af6ab 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/prefetch_linux_sparc.inline.hpp b/hotspot/src/os_cpu/linux_sparc/vm/prefetch_linux_sparc.inline.hpp
index 250704ff5d9..8a14e013c53 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/prefetch_linux_sparc.inline.hpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/prefetch_linux_sparc.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.cpp b/hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.cpp
index a2c536cfc53..a3cfcb09666 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.cpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.hpp b/hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.hpp
index 5cfa7ee8647..a301a243106 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.hpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/thread_linux_sparc.cpp b/hotspot/src/os_cpu/linux_sparc/vm/thread_linux_sparc.cpp
index 1c8a030d0d7..bcb8442b4d4 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/thread_linux_sparc.cpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/thread_linux_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/thread_linux_sparc.hpp b/hotspot/src/os_cpu/linux_sparc/vm/thread_linux_sparc.hpp
index 14ece634631..38779d09f0f 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/thread_linux_sparc.hpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/thread_linux_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/vmStructs_linux_sparc.hpp b/hotspot/src/os_cpu/linux_sparc/vm/vmStructs_linux_sparc.hpp
index 5358d213c65..30036c490a4 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/vmStructs_linux_sparc.hpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/vmStructs_linux_sparc.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp b/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp
index 34bd7c82c99..9a15150502e 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_x86/vm/assembler_linux_x86_32.cpp b/hotspot/src/os_cpu/linux_x86/vm/assembler_linux_x86_32.cpp
index e35442d61b5..1854b007516 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/assembler_linux_x86_32.cpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/assembler_linux_x86_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -39,10 +39,3 @@ void MacroAssembler::get_thread(Register thread) {
movptr(thread, tls);
}
-
-bool MacroAssembler::needs_explicit_null_check(int offset) {
- // Linux kernel guarantees that the first page is always unmapped. Don't
- // assume anything more than that.
- bool offset_in_first_page = 0 <= offset && offset < os::vm_page_size();
- return !offset_in_first_page;
-}
diff --git a/hotspot/src/os_cpu/linux_x86/vm/assembler_linux_x86_64.cpp b/hotspot/src/os_cpu/linux_x86/vm/assembler_linux_x86_64.cpp
index 02ad9e4bdd8..24a4dce09e4 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/assembler_linux_x86_64.cpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/assembler_linux_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -65,9 +65,3 @@ void MacroAssembler::get_thread(Register thread) {
popq(rax);
}
}
-
-// NOTE: since the linux kernel resides at the low end of
-// user address space, no null pointer check is needed.
-bool MacroAssembler::needs_explicit_null_check(int offset) {
- return offset < 0 || offset >= 0x100000;
-}
diff --git a/hotspot/src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp b/hotspot/src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp
index f0e0d5c4775..fb36b9379f1 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
index d598333157e..174c1df492e 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/assembler_solaris_sparc.cpp b/hotspot/src/os_cpu/solaris_sparc/vm/assembler_solaris_sparc.cpp
index 8e18dde9c31..caab18f5dcd 100644
--- a/hotspot/src/os_cpu/solaris_sparc/vm/assembler_solaris_sparc.cpp
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/assembler_solaris_sparc.cpp
@@ -28,18 +28,6 @@
#include // For trap numbers
#include // For V8 compatibility
-bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
- // The first page of virtual addresses is unmapped on SPARC.
- // Thus, any access the VM makes through a null pointer with an offset of
- // less than 4K will get a recognizable SIGSEGV, which the signal handler
- // will transform into a NullPointerException.
- // (Actually, the first 64K or so is unmapped, but it's simpler
- // to depend only on the first 4K or so.)
-
- bool offset_in_first_page = 0 <= offset && offset < os::vm_page_size();
- return !offset_in_first_page;
-}
-
void MacroAssembler::read_ccr_trap(Register ccr_save) {
// Execute a trap to get the PSR, mask and shift
// to get the condition codes.
diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/solaris_sparc.s b/hotspot/src/os_cpu/solaris_sparc/vm/solaris_sparc.s
index 411fdcdabf0..4762af983f4 100644
--- a/hotspot/src/os_cpu/solaris_sparc/vm/solaris_sparc.s
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/solaris_sparc.s
@@ -1,5 +1,5 @@
!!
-!! Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+!! Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
!! DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
!!
!! This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/thread_solaris_sparc.cpp b/hotspot/src/os_cpu/solaris_sparc/vm/thread_solaris_sparc.cpp
index 1896130226f..2b6c743dc12 100644
--- a/hotspot/src/os_cpu/solaris_sparc/vm/thread_solaris_sparc.cpp
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/thread_solaris_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/assembler_solaris_x86_32.cpp b/hotspot/src/os_cpu/solaris_x86/vm/assembler_solaris_x86_32.cpp
index 2f877bfce47..bce611c1125 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/assembler_solaris_x86_32.cpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/assembler_solaris_x86_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -79,9 +79,3 @@ void MacroAssembler::get_thread(Register thread) {
if (thread != rax) popl(rax);
popl(thread);
}
-
-bool MacroAssembler::needs_explicit_null_check(int offset) {
- // Identical to Sparc/Solaris code
- bool offset_in_first_page = 0 <= offset && offset < os::vm_page_size();
- return !offset_in_first_page;
-}
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/assembler_solaris_x86_64.cpp b/hotspot/src/os_cpu/solaris_x86/vm/assembler_solaris_x86_64.cpp
index b6c210f93b8..2ccae8a683d 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/assembler_solaris_x86_64.cpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/assembler_solaris_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -85,9 +85,3 @@ void MacroAssembler::get_thread(Register thread) {
popq(rax);
}
}
-
-bool MacroAssembler::needs_explicit_null_check(int offset) {
- // Identical to Sparc/Solaris code
- bool offset_in_first_page = 0 <= offset && offset < os::vm_page_size();
- return !offset_in_first_page;
-}
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
index 34365dfaee9..b21206dd227 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp b/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp
index 06c9aed2e85..bc4b56b2d89 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/windows_x86/vm/assembler_windows_x86_32.cpp b/hotspot/src/os_cpu/windows_x86/vm/assembler_windows_x86_32.cpp
index dd90d704fea..5e91ce654f8 100644
--- a/hotspot/src/os_cpu/windows_x86/vm/assembler_windows_x86_32.cpp
+++ b/hotspot/src/os_cpu/windows_x86/vm/assembler_windows_x86_32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,3 @@ void MacroAssembler::get_thread(Register thread) {
"Thread Pointer Offset has not been initialized");
movl(thread, Address(thread, ThreadLocalStorage::get_thread_ptr_offset()));
}
-
-bool MacroAssembler::needs_explicit_null_check(int offset) {
- return offset < 0 || (int)os::vm_page_size() <= offset;
-}
diff --git a/hotspot/src/os_cpu/windows_x86/vm/assembler_windows_x86_64.cpp b/hotspot/src/os_cpu/windows_x86/vm/assembler_windows_x86_64.cpp
index c0211d0afd8..7ff190fb21b 100644
--- a/hotspot/src/os_cpu/windows_x86/vm/assembler_windows_x86_64.cpp
+++ b/hotspot/src/os_cpu/windows_x86/vm/assembler_windows_x86_64.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -65,7 +65,3 @@ void MacroAssembler::get_thread(Register thread) {
popq(rax);
}
}
-
-bool MacroAssembler::needs_explicit_null_check(int offset) {
- return offset < 0 || (int)os::vm_page_size() <= offset;
-}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/build.xml b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/build.xml
new file mode 100644
index 00000000000..2c8642cfb1a
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds, tests, and runs the project com.sun.hotspot.igv.svg.
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/manifest.mf b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/manifest.mf
new file mode 100644
index 00000000000..689e17a01e8
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.sun.hotspot.igv.svg
+OpenIDE-Module-Layer: com/sun/hotspot/igv/svg/layer.xml
+OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/svg/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/build-impl.xml b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/build-impl.xml
new file mode 100644
index 00000000000..5fe569eec79
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/build-impl.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ You must set 'suite.dir' to point to your containing module suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/genfiles.properties b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/genfiles.properties
new file mode 100644
index 00000000000..5018df1e656
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=ebcf0422
+build.xml.script.CRC32=d7a2678d
+build.xml.stylesheet.CRC32=79c3b980
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=ebcf0422
+nbproject/build-impl.xml.script.CRC32=57997f94
+nbproject/build-impl.xml.stylesheet.CRC32=deb65f65
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/project.properties b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/project.properties
new file mode 100644
index 00000000000..152f44eca60
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/project.properties
@@ -0,0 +1,2 @@
+javac.source=1.5
+javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/project.xml b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/project.xml
new file mode 100644
index 00000000000..3939a84a094
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/project.xml
@@ -0,0 +1,14 @@
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ com.sun.hotspot.igv.svg
+
+
+
+ com.sun.hotspot.igv.svg
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/suite.properties b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/suite.properties
new file mode 100644
index 00000000000..29d7cc9bd6f
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/nbproject/suite.properties
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/src/com/sun/hotspot/igv/svg/BatikSVG.java b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/src/com/sun/hotspot/igv/svg/BatikSVG.java
new file mode 100644
index 00000000000..8326ff11009
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/src/com/sun/hotspot/igv/svg/BatikSVG.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.svg;
+
+import java.awt.Graphics2D;
+import java.io.Writer;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import org.w3c.dom.DOMImplementation;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class BatikSVG {
+
+ private static Constructor SVGGraphics2DConstructor;
+ private static Method Method_stream;
+ private static Method Method_createDefault;
+ private static Method Method_getDOMImplementation;
+ private static Method Method_setEmbeddedFontsOn;
+
+ public static Graphics2D createGraphicsObject() {
+ try {
+ if (SVGGraphics2DConstructor == null) {
+ ClassLoader cl = BatikSVG.class.getClassLoader();
+ Class Class_GenericDOMImplementation = cl.loadClass("org.apache.batik.dom.GenericDOMImplementation");
+ Class Class_SVGGeneratorContext = cl.loadClass("org.apache.batik.svggen.SVGGeneratorContext");
+ Class Class_SVGGraphics2D = cl.loadClass("org.apache.batik.svggen.SVGGraphics2D");
+ Method_getDOMImplementation = Class_GenericDOMImplementation.getDeclaredMethod("getDOMImplementation", new Class[0]);
+ Method_createDefault = Class_SVGGeneratorContext.getDeclaredMethod("createDefault", new Class[]{org.w3c.dom.Document.class});
+ Method_setEmbeddedFontsOn = Class_SVGGeneratorContext.getDeclaredMethod("setEmbeddedFontsOn", new Class[]{boolean.class});
+ Method_stream = Class_SVGGraphics2D.getDeclaredMethod("stream", Writer.class, boolean.class);
+ SVGGraphics2DConstructor = Class_SVGGraphics2D.getConstructor(Class_SVGGeneratorContext, boolean.class);
+ }
+ DOMImplementation dom = (DOMImplementation) Method_getDOMImplementation.invoke(null);
+ org.w3c.dom.Document document = dom.createDocument("http://www.w3.org/2000/svg", "svg", null);
+ Object ctx = Method_createDefault.invoke(null, document);
+ Method_setEmbeddedFontsOn.invoke(ctx, true);
+ Graphics2D svgGenerator = (Graphics2D) SVGGraphics2DConstructor.newInstance(ctx, true);
+ return svgGenerator;
+ } catch (ClassNotFoundException e) {
+ return null;
+ } catch (NoSuchMethodException e) {
+ return null;
+ } catch (IllegalAccessException e) {
+ return null;
+ } catch (InvocationTargetException e) {
+ return null;
+ } catch (InstantiationException e) {
+ return null;
+ }
+ }
+
+ public static void printToStream(Graphics2D svgGenerator, Writer stream, boolean useCSS) {
+ try {
+ Method_stream.invoke(svgGenerator, stream, useCSS);
+ } catch (IllegalAccessException e) {
+ assert false;
+ } catch (InvocationTargetException e) {
+ assert false;
+ }
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/src/com/sun/hotspot/igv/svg/Bundle.properties b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/src/com/sun/hotspot/igv/svg/Bundle.properties
new file mode 100644
index 00000000000..e579912925b
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/src/com/sun/hotspot/igv/svg/Bundle.properties
@@ -0,0 +1 @@
+OpenIDE-Module-Name=BatikSVGProxy
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/src/com/sun/hotspot/igv/svg/layer.xml b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/src/com/sun/hotspot/igv/svg/layer.xml
new file mode 100644
index 00000000000..c16a8a0fed6
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/BatikSVGProxy/src/com/sun/hotspot/igv/svg/layer.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/build.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/build.xml
new file mode 100644
index 00000000000..1466d8606bc
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds, tests, and runs the project com.sun.hotspot.igv.bytecodes.
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/manifest.mf b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/manifest.mf
new file mode 100644
index 00000000000..a04660a02f9
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.sun.hotspot.igv.bytecodes
+OpenIDE-Module-Layer: com/sun/hotspot/igv/bytecodes/layer.xml
+OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/bytecodes/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/build-impl.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/build-impl.xml
new file mode 100644
index 00000000000..4991499c388
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/build-impl.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ You must set 'suite.dir' to point to your containing module suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/genfiles.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/genfiles.properties
new file mode 100644
index 00000000000..a60cd07cac9
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=1dee290d
+build.xml.script.CRC32=d594034f
+build.xml.stylesheet.CRC32=79c3b980
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=1dee290d
+nbproject/build-impl.xml.script.CRC32=b4dab126
+nbproject/build-impl.xml.stylesheet.CRC32=deb65f65
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/platform.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/platform.properties
new file mode 100644
index 00000000000..68ad75e5766
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/platform.properties
@@ -0,0 +1,29 @@
+# Deprecated since 5.0u1; for compatibility with 5.0:
+disabled.clusters=\
+ apisupport1,\
+ harness,\
+ ide8,\
+ java1,\
+ nb6.0,\
+ profiler2
+disabled.modules=\
+ org.netbeans.core.execution,\
+ org.netbeans.core.multiview,\
+ org.netbeans.core.output2,\
+ org.netbeans.modules.applemenu,\
+ org.netbeans.modules.autoupdate.services,\
+ org.netbeans.modules.autoupdate.ui,\
+ org.netbeans.modules.core.kit,\
+ org.netbeans.modules.favorites,\
+ org.netbeans.modules.javahelp,\
+ org.netbeans.modules.masterfs,\
+ org.netbeans.modules.options.keymap,\
+ org.netbeans.modules.sendopts,\
+ org.netbeans.modules.templates,\
+ org.openide.compat,\
+ org.openide.execution,\
+ org.openide.util.enumerations
+enabled.clusters=\
+ platform7
+nbjdk.active=JDK_1.6
+nbplatform.active=default
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/project.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/project.properties
new file mode 100644
index 00000000000..152f44eca60
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/project.properties
@@ -0,0 +1,2 @@
+javac.source=1.5
+javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/project.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/project.xml
new file mode 100644
index 00000000000..91bd8120565
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/project.xml
@@ -0,0 +1,62 @@
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ com.sun.hotspot.igv.bytecodes
+
+
+
+ com.sun.hotspot.igv.data
+
+
+
+ 1.0
+
+
+
+ org.jdesktop.layout
+
+
+
+ 1
+ 1.4
+
+
+
+ org.openide.explorer
+
+
+
+ 6.11
+
+
+
+ org.openide.nodes
+
+
+
+ 7.2.0.1
+
+
+
+ org.openide.util
+
+
+
+ 7.9.0.1
+
+
+
+ org.openide.windows
+
+
+
+ 6.16
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/suite.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/suite.properties
new file mode 100644
index 00000000000..29d7cc9bd6f
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/nbproject/suite.properties
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/Bundle.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/Bundle.properties
new file mode 100644
index 00000000000..cd6852f9dd9
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/Bundle.properties
@@ -0,0 +1,5 @@
+CTL_BytecodeViewAction=Open BytecodeView Window
+CTL_BytecodeViewTopComponent=BytecodeView Window
+CTL_SelectBytecodesAction=Select nodes
+HINT_BytecodeViewTopComponent=This is a BytecodeView window
+OpenIDE-Module-Name=Bytecodes
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeNode.java b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeNode.java
new file mode 100644
index 00000000000..f9d1aa0ec72
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeNode.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.bytecodes;
+
+import com.sun.hotspot.igv.data.InputBytecode;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.InputNode;
+import com.sun.hotspot.igv.data.Properties;
+import com.sun.hotspot.igv.data.Properties.StringPropertyMatcher;
+import java.awt.Image;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.swing.Action;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.util.Utilities;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class BytecodeNode extends AbstractNode {
+
+ private Set nodes;
+
+ public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {
+
+ super(Children.LEAF);
+ this.setDisplayName(bytecode.getBci() + " " + bytecode.getName());
+
+ bciValue = bytecode.getBci() + " " + bciValue;
+ bciValue = bciValue.trim();
+
+ Properties.PropertySelector selector = new Properties.PropertySelector(graph.getNodes());
+ StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
+ List nodeList = selector.selectMultiple(matcher);
+ if (nodeList.size() > 0) {
+ nodes = new HashSet();
+ for (InputNode n : nodeList) {
+ nodes.add(n);
+ }
+ this.setDisplayName(this.getDisplayName() + " (" + nodes.size() + " nodes)");
+ }
+ }
+
+ @Override
+ public Image getIcon(int i) {
+ if (nodes != null) {
+ return Utilities.loadImage("com/sun/hotspot/igv/bytecodes/images/link.gif");
+ } else {
+ return Utilities.loadImage("com/sun/hotspot/igv/bytecodes/images/bytecode.gif");
+ }
+ }
+
+ @Override
+ public Image getOpenedIcon(int i) {
+ return getIcon(i);
+ }
+
+ @Override
+ public Action[] getActions(boolean b) {
+ return new Action[]{(Action) SelectBytecodesAction.findObject(SelectBytecodesAction.class, true)};
+ }
+
+ @Override
+ public Action getPreferredAction() {
+ return (Action) SelectBytecodesAction.findObject(SelectBytecodesAction.class, true);
+ }
+
+ @Override
+ public T getCookie(Class aClass) {
+ if (aClass == SelectBytecodesCookie.class && nodes != null) {
+ return (T) (new SelectBytecodesCookie(nodes));
+ }
+ return super.getCookie(aClass);
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewAction.java
new file mode 100644
index 00000000000..df7b398e54d
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewAction.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.bytecodes;
+
+import java.awt.event.ActionEvent;
+import javax.swing.AbstractAction;
+import org.openide.util.NbBundle;
+import org.openide.windows.TopComponent;
+
+/**
+ * @author Thomas Wuerthinger
+ */
+public class BytecodeViewAction extends AbstractAction {
+
+ public BytecodeViewAction() {
+ super(NbBundle.getMessage(BytecodeViewAction.class, "CTL_BytecodeViewAction"));
+ }
+
+ public void actionPerformed(ActionEvent evt) {
+ TopComponent win = BytecodeViewTopComponent.findInstance();
+ win.open();
+ win.requestActive();
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.form b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.form
new file mode 100644
index 00000000000..c2549ecaf63
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.form
@@ -0,0 +1,26 @@
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.java b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.java
new file mode 100644
index 00000000000..6fbbe90e912
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.bytecodes;
+
+import com.sun.hotspot.igv.data.Group;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.services.InputGraphProvider;
+import java.awt.BorderLayout;
+import java.io.Serializable;
+import org.openide.ErrorManager;
+import org.openide.explorer.ExplorerManager;
+import org.openide.explorer.ExplorerUtils;
+import org.openide.explorer.view.BeanTreeView;
+import org.openide.util.Lookup;
+import org.openide.util.LookupEvent;
+import org.openide.util.LookupListener;
+import org.openide.util.NbBundle;
+import org.openide.util.Utilities;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+/**
+ * @author Thomas Wuerthinger
+ */
+final class BytecodeViewTopComponent extends TopComponent implements ExplorerManager.Provider, LookupListener {
+
+ private static BytecodeViewTopComponent instance;
+ private static final String PREFERRED_ID = "BytecodeViewTopComponent";
+ private ExplorerManager manager;
+ private BeanTreeView treeView;
+ private Lookup.Result result = null;
+ private MethodNode rootNode;
+
+ private BytecodeViewTopComponent() {
+ initComponents();
+ setName(NbBundle.getMessage(BytecodeViewTopComponent.class, "CTL_BytecodeViewTopComponent"));
+ setToolTipText(NbBundle.getMessage(BytecodeViewTopComponent.class, "HINT_BytecodeViewTopComponent"));
+
+ manager = new ExplorerManager();
+ rootNode = new MethodNode(null, null, "");
+ manager.setRootContext(rootNode);
+
+ setLayout(new BorderLayout());
+
+ treeView = new BeanTreeView();
+ treeView.setRootVisible(false);
+ this.add(BorderLayout.CENTER, treeView);
+ associateLookup(ExplorerUtils.createLookup(manager, getActionMap()));
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 400, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 300, Short.MAX_VALUE)
+ );
+ }// //GEN-END:initComponents
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ // End of variables declaration//GEN-END:variables
+ /**
+ * Gets default instance. Do not use directly: reserved for *.settings files only,
+ * i.e. deserialization routines; otherwise you could get a non-deserialized instance.
+ * To obtain the singleton instance, use {@link findInstance}.
+ */
+ public static synchronized BytecodeViewTopComponent getDefault() {
+ if (instance == null) {
+ instance = new BytecodeViewTopComponent();
+ }
+ return instance;
+ }
+
+ /**
+ * Obtain the BytecodeViewTopComponent instance. Never call {@link #getDefault} directly!
+ */
+ public static synchronized BytecodeViewTopComponent findInstance() {
+ TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
+ if (win == null) {
+ ErrorManager.getDefault().log(ErrorManager.WARNING, "Cannot find BytecodeView component. It will not be located properly in the window system.");
+ return getDefault();
+ }
+ if (win instanceof BytecodeViewTopComponent) {
+ return (BytecodeViewTopComponent) win;
+ }
+ ErrorManager.getDefault().log(ErrorManager.WARNING, "There seem to be multiple components with the '" + PREFERRED_ID + "' ID. That is a potential source of errors and unexpected behavior.");
+ return getDefault();
+ }
+
+ @Override
+ public int getPersistenceType() {
+ return TopComponent.PERSISTENCE_ALWAYS;
+ }
+
+ @Override
+ public void componentOpened() {
+ Lookup.Template tpl = new Lookup.Template(Object.class);
+ result = Utilities.actionsGlobalContext().lookup(tpl);
+ result.addLookupListener(this);
+ }
+
+ @Override
+ public void componentClosed() {
+ result.removeLookupListener(this);
+ result = null;
+ }
+
+ @Override
+ public Object writeReplace() {
+ return new ResolvableHelper();
+ }
+
+ @Override
+ protected String preferredID() {
+ return PREFERRED_ID;
+ }
+
+ public ExplorerManager getExplorerManager() {
+ return manager;
+ }
+
+ public void resultChanged(LookupEvent lookupEvent) {
+ InputGraphProvider p = Lookup.getDefault().lookup(InputGraphProvider.class);
+ if (p != null) {
+ InputGraph graph = p.getGraph();
+ if (graph != null) {
+ Group g = graph.getGroup();
+ rootNode.update(graph, g.getMethod());
+ }
+ }
+ }
+
+ final static class ResolvableHelper implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public Object readResolve() {
+ return BytecodeViewTopComponent.getDefault();
+ }
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponentSettings.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponentSettings.xml
new file mode 100644
index 00000000000..d9469aba6b1
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponentSettings.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponentWstcref.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponentWstcref.xml
new file mode 100644
index 00000000000..a680c8f02fe
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponentWstcref.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/MethodNode.java b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/MethodNode.java
new file mode 100644
index 00000000000..b8f777e851e
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/MethodNode.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.bytecodes;
+
+import com.sun.hotspot.igv.data.InputBytecode;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.InputMethod;
+import java.awt.Image;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.util.Utilities;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class MethodNode extends AbstractNode {
+
+ private static class MethodNodeChildren extends Children.Keys {
+
+ private InputMethod method;
+ private InputGraph graph;
+ private String bciString;
+
+ public MethodNodeChildren(InputMethod method, InputGraph graph, String bciString) {
+ this.method = method;
+ this.bciString = bciString;
+ this.graph = graph;
+ }
+
+ protected Node[] createNodes(Object object) {
+ assert object instanceof InputBytecode;
+ InputBytecode bc = (InputBytecode) object;
+ if (bc.getInlined() == null) {
+ return new Node[]{new BytecodeNode(bc, graph, bciString)};
+ } else {
+ return new Node[]{new BytecodeNode(bc, graph, bciString), new MethodNode(bc.getInlined(), graph, bc.getBci() + " " + bciString)};
+ }
+ }
+
+ @Override
+ public void addNotify() {
+ if (method != null) {
+ setKeys(method.getBytecodes());
+ }
+ }
+
+ public void setMethod(InputMethod method, InputGraph graph) {
+ this.method = method;
+ this.graph = graph;
+ addNotify();
+ }
+ }
+
+ /** Creates a new instance of MethodNode */
+ public MethodNode(InputMethod method, InputGraph graph, String bciString) {
+ super((method != null && method.getBytecodes().size() == 0) ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
+ if (method != null) {
+ this.setDisplayName(method.getName());
+ }
+ }
+
+ @Override
+ public Image getIcon(int i) {
+ return Utilities.loadImage("com/sun/hotspot/igv/bytecodes/images/method.gif");
+ }
+
+ @Override
+ public Image getOpenedIcon(int i) {
+ return getIcon(i);
+ }
+
+ public void update(InputGraph graph, InputMethod method) {
+ ((MethodNodeChildren) this.getChildren()).setMethod(method, graph);
+ if (method != null) {
+ this.setDisplayName(method.getName());
+ }
+
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/SelectBytecodesAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/SelectBytecodesAction.java
new file mode 100644
index 00000000000..317e3a0fbfe
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/SelectBytecodesAction.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.bytecodes;
+
+import com.sun.hotspot.igv.data.services.InputGraphProvider;
+import org.openide.nodes.Node;
+import org.openide.util.HelpCtx;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.CookieAction;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public final class SelectBytecodesAction extends CookieAction {
+
+ protected void performAction(Node[] activatedNodes) {
+ SelectBytecodesCookie c = activatedNodes[0].getCookie(SelectBytecodesCookie.class);
+ InputGraphProvider p = Lookup.getDefault().lookup(InputGraphProvider.class);
+ if (p != null) {
+ p.setSelectedNodes(c.getNodes());
+ }
+ }
+
+ protected int mode() {
+ return CookieAction.MODE_EXACTLY_ONE;
+ }
+
+ public String getName() {
+ return NbBundle.getMessage(SelectBytecodesAction.class, "CTL_SelectBytecodesAction");
+ }
+
+ protected Class[] cookieClasses() {
+ return new Class[]{
+ SelectBytecodesCookie.class
+ };
+ }
+
+ @Override
+ protected void initialize() {
+ super.initialize();
+ putValue("noIconInMenu", Boolean.TRUE);
+ }
+
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ @Override
+ protected boolean asynchronous() {
+ return false;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/SelectBytecodesCookie.java b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/SelectBytecodesCookie.java
new file mode 100644
index 00000000000..ff48bbb49ac
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/SelectBytecodesCookie.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.bytecodes;
+
+import com.sun.hotspot.igv.data.InputNode;
+import java.util.Collections;
+import java.util.Set;
+import org.openide.nodes.Node;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class SelectBytecodesCookie implements Node.Cookie {
+
+ private Set nodes;
+
+ /** Creates a new instance of SelectBytecodesCookie */
+ public SelectBytecodesCookie(Set nodes) {
+ this.nodes = nodes;
+ }
+
+ public Set getNodes() {
+ return Collections.unmodifiableSet(nodes);
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/images/bytecode.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/images/bytecode.gif
new file mode 100644
index 00000000000..5a2a355e391
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/images/bytecode.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/images/link.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/images/link.gif
new file mode 100644
index 00000000000..fc6595b2c98
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/images/link.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/images/method.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/images/method.gif
new file mode 100644
index 00000000000..dc90fd03877
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/images/method.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/layer.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/layer.xml
new file mode 100644
index 00000000000..de53ae1da33
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/layer.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/build.xml b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/build.xml
new file mode 100644
index 00000000000..b90d3b8b143
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds, tests, and runs the project com.sun.hotspot.igv.controlflow.
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/manifest.mf b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/manifest.mf
new file mode 100644
index 00000000000..3ed19068d76
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.sun.hotspot.igv.controlflow
+OpenIDE-Module-Layer: com/sun/hotspot/igv/controlflow/layer.xml
+OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/controlflow/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/build-impl.xml b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/build-impl.xml
new file mode 100644
index 00000000000..1664c75b0dc
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/build-impl.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ You must set 'suite.dir' to point to your containing module suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/genfiles.properties b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/genfiles.properties
new file mode 100644
index 00000000000..ba61dc52aba
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=b524efb3
+build.xml.script.CRC32=79a27be9
+build.xml.stylesheet.CRC32=79c3b980
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=b524efb3
+nbproject/build-impl.xml.script.CRC32=582bdab7
+nbproject/build-impl.xml.stylesheet.CRC32=deb65f65
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/platform.properties b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/platform.properties
new file mode 100644
index 00000000000..68ad75e5766
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/platform.properties
@@ -0,0 +1,29 @@
+# Deprecated since 5.0u1; for compatibility with 5.0:
+disabled.clusters=\
+ apisupport1,\
+ harness,\
+ ide8,\
+ java1,\
+ nb6.0,\
+ profiler2
+disabled.modules=\
+ org.netbeans.core.execution,\
+ org.netbeans.core.multiview,\
+ org.netbeans.core.output2,\
+ org.netbeans.modules.applemenu,\
+ org.netbeans.modules.autoupdate.services,\
+ org.netbeans.modules.autoupdate.ui,\
+ org.netbeans.modules.core.kit,\
+ org.netbeans.modules.favorites,\
+ org.netbeans.modules.javahelp,\
+ org.netbeans.modules.masterfs,\
+ org.netbeans.modules.options.keymap,\
+ org.netbeans.modules.sendopts,\
+ org.netbeans.modules.templates,\
+ org.openide.compat,\
+ org.openide.execution,\
+ org.openide.util.enumerations
+enabled.clusters=\
+ platform7
+nbjdk.active=JDK_1.6
+nbplatform.active=default
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.properties b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.properties
new file mode 100644
index 00000000000..152f44eca60
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.properties
@@ -0,0 +1,2 @@
+javac.source=1.5
+javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.xml b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.xml
new file mode 100644
index 00000000000..212cf234593
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.xml
@@ -0,0 +1,70 @@
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ com.sun.hotspot.igv.controlflow
+
+
+
+ com.sun.hotspot.igv.data
+
+
+
+ 1.0
+
+
+
+ com.sun.hotspot.igv.hierarchicallayout
+
+
+
+ 1.0
+
+
+
+ com.sun.hotspot.igv.layout
+
+
+
+ 1.0
+
+
+
+ org.jdesktop.layout
+
+
+
+ 1
+ 1.4
+
+
+
+ org.netbeans.api.visual
+
+
+
+ 2.9
+
+
+
+ org.openide.util
+
+
+
+ 7.9.0.1
+
+
+
+ org.openide.windows
+
+
+
+ 6.16
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/suite.properties b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/suite.properties
new file mode 100644
index 00000000000..29d7cc9bd6f
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/suite.properties
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/BlockConnectionWidget.java b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/BlockConnectionWidget.java
new file mode 100644
index 00000000000..d1e9b9b9c60
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/BlockConnectionWidget.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.controlflow;
+
+import com.sun.hotspot.igv.data.InputBlockEdge;
+import com.sun.hotspot.igv.layout.Link;
+import com.sun.hotspot.igv.layout.Port;
+import java.awt.Point;
+import java.util.ArrayList;
+import java.util.List;
+import org.netbeans.api.visual.widget.ConnectionWidget;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class BlockConnectionWidget extends ConnectionWidget implements Link {
+
+ private BlockWidget from;
+ private BlockWidget to;
+ private Port inputSlot;
+ private Port outputSlot;
+ private List points;
+ private InputBlockEdge edge;
+
+ public BlockConnectionWidget(ControlFlowScene scene, InputBlockEdge edge) {
+ super(scene);
+
+ this.edge = edge;
+ this.from = (BlockWidget) scene.findWidget(edge.getFrom());
+ this.to = (BlockWidget) scene.findWidget(edge.getTo());
+ inputSlot = to.getInputSlot();
+ outputSlot = from.getOutputSlot();
+ points = new ArrayList();
+ }
+
+ public InputBlockEdge getEdge() {
+ return edge;
+ }
+
+ public Port getTo() {
+ return inputSlot;
+ }
+
+ public Port getFrom() {
+ return outputSlot;
+ }
+
+ public void setControlPoints(List p) {
+ this.points = p;
+ }
+
+ @Override
+ public List getControlPoints() {
+ return points;
+ }
+
+ @Override
+ public String toString() {
+ return "Connection[ " + from.toString() + " - " + to.toString() + "]";
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/BlockWidget.java b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/BlockWidget.java
new file mode 100644
index 00000000000..c56e93e7313
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/BlockWidget.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.controlflow;
+
+import com.sun.hotspot.igv.data.InputBlock;
+import com.sun.hotspot.igv.layout.Cluster;
+import com.sun.hotspot.igv.layout.Port;
+import com.sun.hotspot.igv.layout.Vertex;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Point;
+import org.netbeans.api.visual.border.BorderFactory;
+import org.netbeans.api.visual.model.ObjectState;
+import org.netbeans.api.visual.widget.LabelWidget;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class BlockWidget extends LabelWidget implements Vertex {
+
+ public static final Dimension SIZE = new Dimension(20, 20);
+ private InputBlock block;
+ private Port inputSlot;
+ private Port outputSlot;
+ private Cluster cluster;
+ private boolean root;
+ private static final Font font = new Font(Font.SERIF, Font.PLAIN, 12);
+ private static final Font boldFont = font.deriveFont(Font.BOLD);
+ public static final Color NORMAL_FOREGROUND_COLOR = Color.BLACK;
+ public static final Color HOVER_FOREGROUND_COLOR = Color.BLUE;
+
+ /** Creates a new instance of BlockWidget */
+ public BlockWidget(ControlFlowScene scene, InputBlock block) {
+ super(scene);
+ this.block = block;
+ this.setLabel(block.getName());
+ this.setForeground(NORMAL_FOREGROUND_COLOR);
+ this.setBorder(BorderFactory.createLineBorder(1, NORMAL_FOREGROUND_COLOR));
+ this.setMinimumSize(SIZE);
+ this.setMaximumSize(SIZE);
+
+ this.setFont(font);
+
+ final BlockWidget widget = this;
+ inputSlot = new Port() {
+
+ public Point getRelativePosition() {
+ return new Point((int) (SIZE.getWidth() / 2), (int) (SIZE.getHeight() / 2));
+ }
+
+ public Vertex getVertex() {
+ return widget;
+ }
+ };
+
+ outputSlot = new Port() {
+
+ public Point getRelativePosition() {
+ return new Point((int) (SIZE.getWidth() / 2), (int) (SIZE.getHeight() / 2));
+ }
+
+ public Vertex getVertex() {
+ return widget;
+ }
+ };
+ }
+
+ public Port getInputSlot() {
+ return inputSlot;
+ }
+
+ public Port getOutputSlot() {
+ return outputSlot;
+ }
+
+ public InputBlock getBlock() {
+ return block;
+ }
+
+ public Dimension getSize() {
+ return SIZE;
+ }
+
+ public void setPosition(Point p) {
+ this.setPreferredLocation(p);
+ }
+
+ @Override
+ public String toString() {
+ return block.getName();
+ }
+
+ public Point getPosition() {
+ return this.getPreferredLocation();
+ }
+
+ public Cluster getCluster() {
+ return cluster;
+ }
+
+ public boolean isRoot() {
+ return root;
+ }
+
+ public void setCluster(Cluster c) {
+ cluster = c;
+ }
+
+ public void setRoot(boolean b) {
+ root = b;
+ }
+
+ public int compareTo(Vertex o) {
+ return toString().compareTo(o.toString());
+ }
+
+ @Override
+ protected void notifyStateChanged(ObjectState previousState, ObjectState state) {
+ super.notifyStateChanged(previousState, state);
+
+ if (previousState.isHovered() != state.isHovered()) {
+ if (state.isHovered()) {
+ this.setBorder(BorderFactory.createLineBorder(1, HOVER_FOREGROUND_COLOR));
+ } else {
+ this.setBorder(BorderFactory.createLineBorder(1, NORMAL_FOREGROUND_COLOR));
+ }
+ }
+
+ if (previousState.isSelected() != state.isSelected()) {
+ if (state.isSelected()) {
+ this.setFont(boldFont);
+ } else {
+ this.setFont(font);
+ }
+ }
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/Bundle.properties b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/Bundle.properties
new file mode 100644
index 00000000000..31865f13af1
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/Bundle.properties
@@ -0,0 +1,4 @@
+CTL_ControlFlowAction=Open ControlFlow Window
+CTL_ControlFlowTopComponent=ControlFlow Window
+HINT_ControlFlowTopComponent=This is a ControlFlow window
+OpenIDE-Module-Name=ControlFlow
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowAction.java
new file mode 100644
index 00000000000..bafde102313
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowAction.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.controlflow;
+
+import java.awt.event.ActionEvent;
+import javax.swing.AbstractAction;
+import org.openide.util.NbBundle;
+import org.openide.windows.TopComponent;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class ControlFlowAction extends AbstractAction {
+
+ public ControlFlowAction() {
+ super(NbBundle.getMessage(ControlFlowAction.class, "CTL_ControlFlowAction"));
+ }
+
+ public void actionPerformed(ActionEvent evt) {
+ TopComponent win = ControlFlowTopComponent.findInstance();
+ win.open();
+ win.requestActive();
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowScene.java b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowScene.java
new file mode 100644
index 00000000000..8b794b11aa5
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowScene.java
@@ -0,0 +1,296 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.controlflow;
+
+import com.sun.hotspot.igv.data.InputBlock;
+import com.sun.hotspot.igv.data.InputBlockEdge;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.services.InputGraphProvider;
+import com.sun.hotspot.igv.data.InputNode;
+import java.awt.Color;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Set;
+import javax.swing.BorderFactory;
+import org.netbeans.api.visual.action.ActionFactory;
+import org.netbeans.api.visual.action.MoveProvider;
+import org.netbeans.api.visual.action.RectangularSelectDecorator;
+import org.netbeans.api.visual.action.RectangularSelectProvider;
+import org.netbeans.api.visual.action.SelectProvider;
+import org.netbeans.api.visual.action.WidgetAction;
+import org.netbeans.api.visual.anchor.AnchorFactory;
+import org.netbeans.api.visual.anchor.AnchorShape;
+import com.sun.hotspot.igv.controlflow.HierarchicalGraphLayout;
+import org.netbeans.api.visual.layout.LayoutFactory;
+import org.netbeans.api.visual.router.RouterFactory;
+import org.netbeans.api.visual.widget.LayerWidget;
+import org.netbeans.api.visual.widget.Widget;
+import org.netbeans.api.visual.graph.GraphScene;
+import org.netbeans.api.visual.graph.layout.GraphLayout;
+import org.netbeans.api.visual.layout.SceneLayout;
+import org.netbeans.api.visual.widget.ConnectionWidget;
+import org.openide.util.Lookup;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class ControlFlowScene extends GraphScene implements SelectProvider, MoveProvider, RectangularSelectDecorator, RectangularSelectProvider {
+
+ private Set selection;
+ private Hashtable blockMap;
+ private InputGraph oldGraph;
+ private LayerWidget edgeLayer;
+ private LayerWidget mainLayer;
+ private LayerWidget selectLayer;
+ private WidgetAction hoverAction = this.createWidgetHoverAction();
+ private WidgetAction selectAction = ActionFactory.createSelectAction(this);
+ private WidgetAction moveAction = ActionFactory.createMoveAction(null, this);
+
+ public ControlFlowScene() {
+ selection = new HashSet();
+
+ this.getInputBindings().setZoomActionModifiers(0);
+ this.setLayout(LayoutFactory.createAbsoluteLayout());
+
+ mainLayer = new LayerWidget(this);
+ this.addChild(mainLayer);
+
+ edgeLayer = new LayerWidget(this);
+ this.addChild(edgeLayer);
+
+ selectLayer = new LayerWidget(this);
+ this.addChild(selectLayer);
+
+ this.getActions().addAction(hoverAction);
+ this.getActions().addAction(selectAction);
+ this.getActions().addAction(ActionFactory.createRectangularSelectAction(this, selectLayer, this));
+ this.getActions().addAction(ActionFactory.createMouseCenteredZoomAction(1.1));
+ }
+
+ public void setGraph(InputGraph g) {
+ if (g == oldGraph) {
+ return;
+ }
+ oldGraph = g;
+
+ ArrayList blocks = new ArrayList(this.getNodes());
+ for (InputBlock b : blocks) {
+ removeNode(b);
+ }
+
+ ArrayList edges = new ArrayList(this.getEdges());
+ for (InputBlockEdge e : edges) {
+ removeEdge(e);
+ }
+
+ for (InputBlock b : g.getBlocks()) {
+ addNode(b);
+ }
+
+ for (InputBlock b : g.getBlocks()) {
+ for (InputBlockEdge e : b.getOutputs()) {
+ addEdge(e);
+ assert g.getBlocks().contains(e.getFrom());
+ assert g.getBlocks().contains(e.getTo());
+ this.setEdgeSource(e, e.getFrom());
+ this.setEdgeTarget(e, e.getTo());
+ }
+ }
+
+ GraphLayout layout = new HierarchicalGraphLayout();//GridGraphLayout();
+ SceneLayout sceneLayout = LayoutFactory.createSceneGraphLayout(this, layout);
+ sceneLayout.invokeLayout();
+
+ this.validate();
+ }
+
+ public BlockWidget getBlockWidget(InputBlock b) {
+ return blockMap.get(b);
+ }
+
+ public void clearSelection() {
+ for (BlockWidget w : selection) {
+ w.setState(w.getState().deriveSelected(false));
+ }
+ selection.clear();
+ selectionChanged();
+ }
+
+ public void selectionChanged() {
+ InputGraphProvider p = Lookup.getDefault().lookup(InputGraphProvider.class);
+ if (p != null) {
+ Set inputNodes = new HashSet();
+ for (BlockWidget w : selection) {
+ inputNodes.addAll(w.getBlock().getNodes());
+ }
+ p.setSelectedNodes(inputNodes);
+ }
+ }
+
+ public void addToSelection(BlockWidget widget) {
+ widget.setState(widget.getState().deriveSelected(true));
+ selection.add(widget);
+ selectionChanged();
+ }
+
+ public void removeFromSelection(BlockWidget widget) {
+ widget.setState(widget.getState().deriveSelected(false));
+ selection.remove(widget);
+ selectionChanged();
+ }
+
+ public boolean isAimingAllowed(Widget widget, Point point, boolean b) {
+ return false;
+ }
+
+ public boolean isSelectionAllowed(Widget widget, Point point, boolean b) {
+ return true;
+ }
+
+ public void select(Widget widget, Point point, boolean change) {
+ if (widget == this) {
+ clearSelection();
+ } else {
+
+ assert widget instanceof BlockWidget;
+ BlockWidget bw = (BlockWidget) widget;
+ if (change) {
+ if (selection.contains(bw)) {
+ removeFromSelection(bw);
+ } else {
+ addToSelection(bw);
+ }
+ } else {
+ if (!selection.contains(bw)) {
+ clearSelection();
+ addToSelection(bw);
+ }
+ }
+ }
+ }
+
+ public void movementStarted(Widget widget) {
+ }
+
+ public void movementFinished(Widget widget) {
+ }
+
+ public Point getOriginalLocation(Widget widget) {
+ return widget.getPreferredLocation();
+ }
+
+ public void setNewLocation(Widget widget, Point location) {
+ Point originalLocation = getOriginalLocation(widget);
+ int xOffset = location.x - originalLocation.x;
+ int yOffset = location.y - originalLocation.y;
+ for (Widget w : this.selection) {
+ Point p = new Point(w.getPreferredLocation());
+ p.translate(xOffset, yOffset);
+ w.setPreferredLocation(p);
+ }
+
+ }
+
+ public Widget createSelectionWidget() {
+ Widget widget = new Widget(this);
+ widget.setOpaque(false);
+ widget.setBorder(BorderFactory.createLineBorder(Color.black, 2));
+ widget.setForeground(Color.red);
+ return widget;
+ }
+
+ public void performSelection(Rectangle rectangle) {
+
+ if (rectangle.width < 0) {
+ rectangle.x += rectangle.width;
+ rectangle.width *= -1;
+ }
+
+ if (rectangle.height < 0) {
+ rectangle.y += rectangle.height;
+ rectangle.height *= -1;
+ }
+
+ boolean changed = false;
+ for (InputBlock b : this.getNodes()) {
+ BlockWidget w = (BlockWidget) findWidget(b);
+ Rectangle r = new Rectangle(w.getBounds());
+ r.setLocation(w.getLocation());
+ if (r.intersects(rectangle)) {
+ if (!selection.contains(w)) {
+ changed = true;
+ selection.add(w);
+ w.setState(w.getState().deriveSelected(true));
+ }
+ } else {
+ if (selection.contains(w)) {
+ changed = true;
+ selection.remove(w);
+ w.setState(w.getState().deriveSelected(false));
+ }
+ }
+ }
+
+ if (changed) {
+ selectionChanged();
+ }
+
+ }
+
+ protected Widget attachNodeWidget(InputBlock node) {
+ BlockWidget w = new BlockWidget(this, node);
+ mainLayer.addChild(w);
+ w.getActions().addAction(hoverAction);
+ w.getActions().addAction(selectAction);
+ w.getActions().addAction(moveAction);
+ return w;
+ }
+
+ protected Widget attachEdgeWidget(InputBlockEdge edge) {
+ ConnectionWidget w = new BlockConnectionWidget(this, edge);
+ w.setRouter(RouterFactory.createDirectRouter());
+ w.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
+ edgeLayer.addChild(w);
+ return w;
+ }
+
+ protected void attachEdgeSourceAnchor(InputBlockEdge edge, InputBlock oldSourceNode, InputBlock sourceNode) {
+ Widget w = this.findWidget(edge);
+ assert w instanceof ConnectionWidget;
+ ConnectionWidget cw = (ConnectionWidget) w;
+ cw.setSourceAnchor(AnchorFactory.createRectangularAnchor(findWidget(sourceNode)));
+
+ }
+
+ protected void attachEdgeTargetAnchor(InputBlockEdge edge, InputBlock oldTargetNode, InputBlock targetNode) {
+ Widget w = this.findWidget(edge);
+ assert w instanceof ConnectionWidget;
+ ConnectionWidget cw = (ConnectionWidget) w;
+ cw.setTargetAnchor(AnchorFactory.createRectangularAnchor(findWidget(targetNode)));
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.form b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.form
new file mode 100644
index 00000000000..c2549ecaf63
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.form
@@ -0,0 +1,26 @@
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.java b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.java
new file mode 100644
index 00000000000..968cdd531b7
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.java
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.controlflow;
+
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.services.InputGraphProvider;
+import java.awt.BorderLayout;
+import java.io.Serializable;
+import javax.swing.JScrollPane;
+import org.openide.ErrorManager;
+import org.openide.util.Lookup;
+import org.openide.util.LookupEvent;
+import org.openide.util.LookupListener;
+import org.openide.util.NbBundle;
+import org.openide.util.Utilities;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+final class ControlFlowTopComponent extends TopComponent implements LookupListener {
+
+ private static ControlFlowTopComponent instance;
+ private Lookup.Result result = null;
+ private static final String PREFERRED_ID = "ControlFlowTopComponent";
+ private ControlFlowScene scene;
+
+ private ControlFlowTopComponent() {
+ initComponents();
+ setName(NbBundle.getMessage(ControlFlowTopComponent.class, "CTL_ControlFlowTopComponent"));
+ setToolTipText(NbBundle.getMessage(ControlFlowTopComponent.class, "HINT_ControlFlowTopComponent"));
+
+ scene = new ControlFlowScene();
+ this.setLayout(new BorderLayout());
+ this.associateLookup(scene.getLookup());
+
+
+ JScrollPane panel = new JScrollPane(scene.createView());
+ this.add(panel, BorderLayout.CENTER);
+ }
+
+ @Override
+ public void requestFocus() {
+ super.requestFocus();
+ scene.getView().requestFocus();
+ }
+
+ @Override
+ public boolean requestFocusInWindow() {
+ super.requestFocusInWindow();
+ return scene.getView().requestFocusInWindow();
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 400, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 300, Short.MAX_VALUE)
+ );
+ }// //GEN-END:initComponents
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ // End of variables declaration//GEN-END:variables
+ /**
+ * Gets default instance. Do not use directly: reserved for *.settings files only,
+ * i.e. deserialization routines; otherwise you could get a non-deserialized instance.
+ * To obtain the singleton instance, use {@link findInstance}.
+ */
+ public static synchronized ControlFlowTopComponent getDefault() {
+ if (instance == null) {
+ instance = new ControlFlowTopComponent();
+ }
+ return instance;
+ }
+
+ /**
+ * Obtain the ControlFlowTopComponent instance. Never call {@link #getDefault} directly!
+ */
+ public static synchronized ControlFlowTopComponent findInstance() {
+ TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
+ if (win == null) {
+ ErrorManager.getDefault().log(ErrorManager.WARNING, "Cannot find ControlFlow component. It will not be located properly in the window system.");
+ return getDefault();
+ }
+ if (win instanceof ControlFlowTopComponent) {
+ return (ControlFlowTopComponent) win;
+ }
+ ErrorManager.getDefault().log(ErrorManager.WARNING, "There seem to be multiple components with the '" + PREFERRED_ID + "' ID. That is a potential source of errors and unexpected behavior.");
+ return getDefault();
+ }
+
+ @Override
+ public int getPersistenceType() {
+ return TopComponent.PERSISTENCE_ALWAYS;
+ }
+
+ @Override
+ public void componentOpened() {
+ Lookup.Template tpl = new Lookup.Template(Object.class);
+ result = Utilities.actionsGlobalContext().lookup(tpl);
+ result.addLookupListener(this);
+ }
+
+ @Override
+ public void componentClosed() {
+ result.removeLookupListener(this);
+ result = null;
+ }
+
+ public void resultChanged(LookupEvent lookupEvent) {
+
+ InputGraphProvider p = Lookup.getDefault().lookup(InputGraphProvider.class);
+ if (p != null) {
+ InputGraph g = p.getGraph();
+ if (g != null) {
+ scene.setGraph(g);
+ }
+ }
+ }
+
+ @Override
+ public Object writeReplace() {
+ return new ResolvableHelper();
+ }
+
+ @Override
+ protected String preferredID() {
+ return PREFERRED_ID;
+ }
+
+ @Override
+ public void requestActive() {
+ scene.getView().requestFocusInWindow();
+ super.requestActive();
+ }
+
+ final static class ResolvableHelper implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public Object readResolve() {
+ return ControlFlowTopComponent.getDefault();
+ }
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentSettings.xml b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentSettings.xml
new file mode 100644
index 00000000000..e226cd5ece9
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentSettings.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentWstcref.xml b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentWstcref.xml
new file mode 100644
index 00000000000..07bbb1f52fb
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentWstcref.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/HierarchicalGraphLayout.java b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/HierarchicalGraphLayout.java
new file mode 100644
index 00000000000..2a0c9ee4896
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/HierarchicalGraphLayout.java
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.controlflow;
+
+import com.sun.hotspot.igv.hierarchicallayout.HierarchicalLayoutManager;
+import com.sun.hotspot.igv.layout.Cluster;
+import com.sun.hotspot.igv.layout.LayoutGraph;
+import com.sun.hotspot.igv.layout.Link;
+import com.sun.hotspot.igv.layout.Port;
+import com.sun.hotspot.igv.layout.Vertex;
+import java.awt.Dimension;
+import java.awt.Point;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.netbeans.api.visual.graph.layout.GraphLayout;
+import org.netbeans.api.visual.graph.layout.UniversalGraph;
+import org.netbeans.api.visual.widget.Widget;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class HierarchicalGraphLayout extends GraphLayout {
+
+ public HierarchicalGraphLayout() {
+ }
+
+ private class LinkWrapper implements Link {
+
+ private VertexWrapper from;
+ private VertexWrapper to;
+
+ public LinkWrapper(VertexWrapper from, VertexWrapper to) {
+ this.from = from;
+ this.to = to;
+ }
+
+ public Port getFrom() {
+ return from.getSlot();
+ }
+
+ public Port getTo() {
+ return to.getSlot();
+ }
+
+ public List getControlPoints() {
+ return new ArrayList();
+ }
+
+ public void setControlPoints(List list) {
+ // Do nothing for now
+ }
+ }
+
+ private class VertexWrapper implements Vertex {
+
+ private N node;
+ private UniversalGraph graph;
+ private Port slot;
+ private Point position;
+
+ public VertexWrapper(N node, UniversalGraph graph) {
+ this.node = node;
+ this.graph = graph;
+ final VertexWrapper vertex = this;
+ this.slot = new Port() {
+
+ public Vertex getVertex() {
+ return vertex;
+ }
+
+ public Point getRelativePosition() {
+ return new Point((int) (vertex.getSize().getWidth() / 2), (int) (vertex.getSize().getHeight() / 2));
+ }
+ };
+
+ Widget w = graph.getScene().findWidget(node);
+ this.position = w.getPreferredLocation();
+ }
+
+ public Cluster getCluster() {
+ return null;
+ }
+
+ public Dimension getSize() {
+ Widget w = graph.getScene().findWidget(node);
+ return w.getBounds().getSize();
+ }
+
+ public Point getPosition() {
+ return position;
+ }
+
+ public void setPosition(Point p) {
+ HierarchicalGraphLayout.this.setResolvedNodeLocation(graph, node, p);
+ position = p;
+ }
+
+ public boolean isRoot() {
+ return false;
+ }
+
+ public int compareTo(Vertex o) {
+ VertexWrapper vw = (VertexWrapper) o;
+ return node.toString().compareTo(vw.node.toString());
+ }
+
+ public Port getSlot() {
+ return slot;
+ }
+ }
+
+ protected void performGraphLayout(UniversalGraph graph) {
+
+ Set links = new HashSet();
+ Set vertices = new HashSet();
+ Map vertexMap = new HashMap();
+
+ for (N node : graph.getNodes()) {
+ VertexWrapper v = new VertexWrapper(node, graph);
+ vertexMap.put(node, v);
+ vertices.add(v);
+ }
+
+ for (E edge : graph.getEdges()) {
+ N source = graph.getEdgeSource(edge);
+ N target = graph.getEdgeTarget(edge);
+ LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target));
+ links.add(l);
+ }
+
+ HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE);
+
+ LayoutGraph layoutGraph = new LayoutGraph(links, vertices);
+ m.doLayout(layoutGraph);
+ }
+
+ protected void performNodesLayout(UniversalGraph graph, Collection nodes) {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/layer.xml b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/layer.xml
new file mode 100644
index 00000000000..36b0e8ce903
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/layer.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/build.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/build.xml
new file mode 100644
index 00000000000..a70f0080267
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds, tests, and runs the project com.sun.hotspot.igv.coordinator.
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/manifest.mf b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/manifest.mf
new file mode 100644
index 00000000000..073c1e8040b
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.sun.hotspot.igv.coordinator
+OpenIDE-Module-Layer: com/sun/hotspot/igv/coordinator/layer.xml
+OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/coordinator/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/build-impl.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/build-impl.xml
new file mode 100644
index 00000000000..4deca64beea
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/build-impl.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ You must set 'suite.dir' to point to your containing module suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/genfiles.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/genfiles.properties
new file mode 100644
index 00000000000..71781f95c87
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=077de97c
+build.xml.script.CRC32=d29d586c
+build.xml.stylesheet.CRC32=79c3b980
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=077de97c
+nbproject/build-impl.xml.script.CRC32=03daa42d
+nbproject/build-impl.xml.stylesheet.CRC32=deb65f65
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/platform.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/platform.properties
new file mode 100644
index 00000000000..68ad75e5766
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/platform.properties
@@ -0,0 +1,29 @@
+# Deprecated since 5.0u1; for compatibility with 5.0:
+disabled.clusters=\
+ apisupport1,\
+ harness,\
+ ide8,\
+ java1,\
+ nb6.0,\
+ profiler2
+disabled.modules=\
+ org.netbeans.core.execution,\
+ org.netbeans.core.multiview,\
+ org.netbeans.core.output2,\
+ org.netbeans.modules.applemenu,\
+ org.netbeans.modules.autoupdate.services,\
+ org.netbeans.modules.autoupdate.ui,\
+ org.netbeans.modules.core.kit,\
+ org.netbeans.modules.favorites,\
+ org.netbeans.modules.javahelp,\
+ org.netbeans.modules.masterfs,\
+ org.netbeans.modules.options.keymap,\
+ org.netbeans.modules.sendopts,\
+ org.netbeans.modules.templates,\
+ org.openide.compat,\
+ org.openide.execution,\
+ org.openide.util.enumerations
+enabled.clusters=\
+ platform7
+nbjdk.active=JDK_1.6
+nbplatform.active=default
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/project.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/project.properties
new file mode 100644
index 00000000000..152f44eca60
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/project.properties
@@ -0,0 +1,2 @@
+javac.source=1.5
+javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/project.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/project.xml
new file mode 100644
index 00000000000..ad5afed1591
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/project.xml
@@ -0,0 +1,126 @@
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ com.sun.hotspot.igv.coordinator
+
+
+
+ com.sun.hotspot.igv.data
+
+
+
+ 1.0
+
+
+
+ com.sun.hotspot.igv.difference
+
+
+
+ 1.0
+
+
+
+ com.sun.hotspot.igv.settings
+
+
+
+ 1.0
+
+
+
+ com.sun.hotspot.igv.util
+
+
+
+ 1.0
+
+
+
+ org.netbeans.api.progress
+
+
+
+ 1
+ 1.10.0.1
+
+
+
+ org.openide.actions
+
+
+
+ 6.6.1.1
+
+
+
+ org.openide.awt
+
+
+
+ 6.11.0.1
+
+
+
+ org.openide.dialogs
+
+
+
+ 7.5.1
+
+
+
+ org.openide.explorer
+
+
+
+ 6.11
+
+
+
+ org.openide.filesystems
+
+
+
+ 7.3
+
+
+
+ org.openide.loaders
+
+
+
+ 6.7
+
+
+
+ org.openide.nodes
+
+
+
+ 7.2.0.1
+
+
+
+ org.openide.util
+
+
+
+ 7.9.0.1
+
+
+
+ org.openide.windows
+
+
+
+ 6.16
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/suite.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/suite.properties
new file mode 100644
index 00000000000..29d7cc9bd6f
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/suite.properties
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/META-INF/services/com.sun.hotspot.igv.data.services.GroupOrganizer b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/META-INF/services/com.sun.hotspot.igv.data.services.GroupOrganizer
new file mode 100644
index 00000000000..bf7aace9e7d
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/META-INF/services/com.sun.hotspot.igv.data.services.GroupOrganizer
@@ -0,0 +1,2 @@
+com.sun.hotspot.igv.coordinator.StandardGroupOrganizer
+com.sun.hotspot.igv.coordinator.GraphCountGroupOrganizer
\ No newline at end of file
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/Bundle.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/Bundle.properties
new file mode 100644
index 00000000000..455f648095d
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/Bundle.properties
@@ -0,0 +1,7 @@
+
+AdvancedOption_DisplayName_Coordinator=Settings
+AdvancedOption_Tooltip_Coordinator=Visualization Tool Settings
+CTL_OutlineTopComponent=Outline Window
+CTL_SomeAction=test
+HINT_OutlineTopComponent=This is a Outline window
+OpenIDE-Module-Name=Coordinator
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/FolderNode.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/FolderNode.java
new file mode 100644
index 00000000000..b5398edaeea
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/FolderNode.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.coordinator;
+
+import com.sun.hotspot.igv.coordinator.actions.RemoveCookie;
+import com.sun.hotspot.igv.data.Group;
+import com.sun.hotspot.igv.data.services.GroupOrganizer;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.Pair;
+import java.awt.Image;
+import java.util.ArrayList;
+import java.util.List;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.util.Utilities;
+import org.openide.util.lookup.AbstractLookup;
+import org.openide.util.lookup.InstanceContent;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class FolderNode extends AbstractNode {
+
+ private GroupOrganizer organizer;
+ private InstanceContent content;
+ private List>> structure;
+ private List subFolders;
+ private FolderChildren children;
+
+ private static class FolderChildren extends Children.Keys {
+
+ private FolderNode parent;
+
+ public void setParent(FolderNode parent) {
+ this.parent = parent;
+ }
+
+ @Override
+ protected Node[] createNodes(Object arg0) {
+
+ Pair> p = (Pair>) arg0;
+ if (p.getLeft().length() == 0) {
+
+ List curNodes = new ArrayList();
+ for (Group g : p.getRight()) {
+ for (InputGraph graph : g.getGraphs()) {
+ curNodes.add(new GraphNode(graph));
+ }
+ }
+
+ Node[] result = new Node[curNodes.size()];
+ for (int i = 0; i < curNodes.size(); i++) {
+ result[i] = curNodes.get(i);
+ }
+ return result;
+
+ } else {
+ return new Node[]{new FolderNode(p.getLeft(), parent.organizer, parent.subFolders, p.getRight())};
+ }
+ }
+
+ @Override
+ public void addNotify() {
+ this.setKeys(parent.structure);
+
+ }
+ }
+
+ protected InstanceContent getContent() {
+ return content;
+ }
+
+ @Override
+ public Image getIcon(int i) {
+ return Utilities.loadImage("com/sun/hotspot/igv/coordinator/images/folder.gif");
+ }
+
+ protected FolderNode(String name, GroupOrganizer organizer, List subFolders, List groups) {
+ this(name, organizer, subFolders, groups, new FolderChildren(), new InstanceContent());
+ }
+
+ private FolderNode(String name, GroupOrganizer organizer, List oldSubFolders, final List groups, FolderChildren children, InstanceContent content) {
+ super(children, new AbstractLookup(content));
+ children.setParent(this);
+ this.content = content;
+ this.children = children;
+ content.add(new RemoveCookie() {
+
+ public void remove() {
+ for (Group g : groups) {
+ if (g.getDocument() != null) {
+ g.getDocument().removeGroup(g);
+ }
+ }
+ }
+ });
+ init(name, organizer, oldSubFolders, groups);
+ }
+
+ public void init(String name, GroupOrganizer organizer, List oldSubFolders, List groups) {
+ this.setDisplayName(name);
+ this.organizer = organizer;
+ this.subFolders = new ArrayList(oldSubFolders);
+ if (name.length() > 0) {
+ this.subFolders.add(name);
+ }
+ structure = organizer.organize(subFolders, groups);
+ assert structure != null;
+ children.addNotify();
+ }
+
+ @Override
+ public Image getOpenedIcon(int i) {
+ return getIcon(i);
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/GraphCountGroupOrganizer.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/GraphCountGroupOrganizer.java
new file mode 100644
index 00000000000..42648d0f082
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/GraphCountGroupOrganizer.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.hotspot.igv.coordinator;
+
+import com.sun.hotspot.igv.data.Group;
+import com.sun.hotspot.igv.data.Pair;
+import com.sun.hotspot.igv.data.services.GroupOrganizer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class GraphCountGroupOrganizer implements GroupOrganizer {
+
+ public String getName() {
+ return "Graph count structure";
+ }
+
+ public List>> organize(List subFolders, List groups) {
+
+ List>> result = new ArrayList>>();
+
+ if (subFolders.size() == 0) {
+ Map> map = new HashMap>();
+ for (Group g : groups) {
+ Integer cur = g.getGraphs().size();
+ if (!map.containsKey(cur)) {
+ map.put(cur, new ArrayList());
+ }
+ map.get(cur).add(g);
+ }
+
+ SortedSet keys = new TreeSet(map.keySet());
+ for (Integer i : keys) {
+ result.add(new Pair>("Graph count " + i, map.get(i)));
+ }
+
+ } else if (subFolders.size() == 1) {
+ for (Group g : groups) {
+ List children = new ArrayList();
+ children.add(g);
+ Pair> p = new Pair>();
+ p.setLeft(g.getName());
+ p.setRight(children);
+ result.add(p);
+ }
+ } else if (subFolders.size() == 2) {
+ result.add(new Pair>("", groups));
+ }
+
+ return result;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/GraphNode.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/GraphNode.java
new file mode 100644
index 00000000000..0fd780cf679
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/GraphNode.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.coordinator;
+
+import com.sun.hotspot.igv.coordinator.actions.DiffGraphAction;
+import com.sun.hotspot.igv.coordinator.actions.DiffGraphCookie;
+import com.sun.hotspot.igv.coordinator.actions.RemoveCookie;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.services.GraphViewer;
+import com.sun.hotspot.igv.data.services.InputGraphProvider;
+import com.sun.hotspot.igv.util.PropertiesSheet;
+import java.awt.Image;
+import javax.swing.Action;
+import org.openide.actions.OpenAction;
+import org.openide.cookies.OpenCookie;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.nodes.Sheet;
+import org.openide.util.Lookup;
+import org.openide.util.Utilities;
+import org.openide.util.lookup.AbstractLookup;
+import org.openide.util.lookup.InstanceContent;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class GraphNode extends AbstractNode {
+
+ private InputGraph graph;
+
+ /** Creates a new instance of GraphNode */
+ public GraphNode(InputGraph graph) {
+ this(graph, new InstanceContent());
+ }
+
+ private GraphNode(final InputGraph graph, InstanceContent content) {
+ super(Children.LEAF, new AbstractLookup(content));
+ this.graph = graph;
+ this.setDisplayName(graph.getName());
+ content.add(graph);
+
+ final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);
+
+ if (viewer != null) {
+ // Action for opening the graph
+ content.add(new OpenCookie() {
+
+ public void open() {
+ viewer.view(graph);
+ }
+ });
+ }
+
+ // Action for removing a graph
+ content.add(new RemoveCookie() {
+
+ public void remove() {
+ graph.getGroup().removeGraph(graph);
+ }
+ });
+ }
+
+ @Override
+ protected Sheet createSheet() {
+ Sheet s = super.createSheet();
+ PropertiesSheet.initializeSheet(graph.getProperties(), s);
+ return s;
+ }
+
+ @Override
+ public Image getIcon(int i) {
+ return Utilities.loadImage("com/sun/hotspot/igv/coordinator/images/graph.gif");
+ }
+
+ @Override
+ public Image getOpenedIcon(int i) {
+ return getIcon(i);
+ }
+
+ @Override
+ public T getCookie(Class aClass) {
+ if (aClass == DiffGraphCookie.class) {
+ InputGraphProvider graphProvider = Utilities.actionsGlobalContext().lookup(InputGraphProvider.class);
+
+ InputGraph graphA = null;
+ if (graphProvider != null) {
+ graphA = graphProvider.getGraph();
+ }
+
+ if (graphA != null && !graphA.isDifferenceGraph()) {
+ return (T) new DiffGraphCookie(graphA, graph);
+ }
+ }
+
+ return super.getCookie(aClass);
+ }
+
+ @Override
+ public Action[] getActions(boolean b) {
+ return new Action[]{(Action) DiffGraphAction.findObject(DiffGraphAction.class, true), (Action) OpenAction.findObject(OpenAction.class, true)};
+ }
+
+ @Override
+ public Action getPreferredAction() {
+ return (Action) OpenAction.findObject(OpenAction.class, true);
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponent.form b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponent.form
new file mode 100644
index 00000000000..37e033f1989
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponent.form
@@ -0,0 +1,41 @@
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponent.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponent.java
new file mode 100644
index 00000000000..9e6177b1782
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponent.java
@@ -0,0 +1,271 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.coordinator;
+
+import com.sun.hotspot.igv.coordinator.actions.ImportAction;
+import com.sun.hotspot.igv.coordinator.actions.RemoveAction;
+import com.sun.hotspot.igv.coordinator.actions.RemoveAllAction;
+import com.sun.hotspot.igv.coordinator.actions.SaveAllAction;
+import com.sun.hotspot.igv.coordinator.actions.SaveAsAction;
+import com.sun.hotspot.igv.coordinator.actions.StructuredViewAction;
+import com.sun.hotspot.igv.data.GraphDocument;
+import com.sun.hotspot.igv.data.ChangedListener;
+import com.sun.hotspot.igv.data.Group;
+import com.sun.hotspot.igv.data.services.GroupCallback;
+import com.sun.hotspot.igv.data.services.GroupOrganizer;
+import com.sun.hotspot.igv.data.services.GroupReceiver;
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import javax.swing.BoxLayout;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+import javax.swing.border.Border;
+import org.openide.ErrorManager;
+import org.openide.awt.Toolbar;
+import org.openide.awt.ToolbarPool;
+import org.openide.explorer.ExplorerManager;
+import org.openide.explorer.ExplorerUtils;
+import org.openide.explorer.view.BeanTreeView;
+import org.openide.util.Lookup;
+import org.openide.util.LookupEvent;
+import org.openide.util.LookupListener;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.NodeAction;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public final class OutlineTopComponent extends TopComponent implements ExplorerManager.Provider, LookupListener {
+
+ public static OutlineTopComponent instance;
+ public static final String PREFERRED_ID = "OutlineTopComponent";
+ private ExplorerManager manager;
+ private GraphDocument document;
+ private FolderNode root;
+ private GroupOrganizer organizer;
+
+ private OutlineTopComponent() {
+ initComponents();
+
+ setName(NbBundle.getMessage(OutlineTopComponent.class, "CTL_OutlineTopComponent"));
+ setToolTipText(NbBundle.getMessage(OutlineTopComponent.class, "HINT_OutlineTopComponent"));
+
+ document = new GraphDocument();
+ initListView();
+ initToolbar();
+ initReceivers();
+ }
+
+ private void initListView() {
+ manager = new ExplorerManager();
+ organizer = new StandardGroupOrganizer();
+ root = new FolderNode("", organizer, new ArrayList(), document.getGroups());
+ manager.setRootContext(root);
+ ((BeanTreeView) this.jScrollPane1).setRootVisible(false);
+
+ document.getChangedEvent().addListener(new ChangedListener() {
+
+ public void changed(GraphDocument document) {
+ updateStructure();
+ }
+ });
+
+ associateLookup(ExplorerUtils.createLookup(manager, getActionMap()));
+ }
+
+ private void initToolbar() {
+
+ Toolbar toolbar = new Toolbar();
+ Border b = (Border) UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N
+ toolbar.setBorder(b);
+ this.add(toolbar, BorderLayout.NORTH);
+
+ toolbar.add(ImportAction.get(ImportAction.class));
+ toolbar.add(((NodeAction) RemoveAction.get(RemoveAction.class)).createContextAwareInstance(this.getLookup()));
+ toolbar.add(RemoveAllAction.get(RemoveAllAction.class));
+
+ toolbar.add(((NodeAction) SaveAsAction.get(SaveAsAction.class)).createContextAwareInstance(this.getLookup()));
+ toolbar.add(SaveAllAction.get(SaveAllAction.class));
+
+ toolbar.add(StructuredViewAction.get(StructuredViewAction.class).getToolbarPresenter());
+
+ for (Toolbar tb : ToolbarPool.getDefault().getToolbars()) {
+ tb.setVisible(false);
+ }
+
+ initOrganizers();
+ }
+
+ public void setOrganizer(GroupOrganizer organizer) {
+ this.organizer = organizer;
+ updateStructure();
+ }
+
+ private void initOrganizers() {
+
+ }
+
+ private void initReceivers() {
+
+ final GroupCallback callback = new GroupCallback() {
+
+ public void started(Group g) {
+ getDocument().addGroup(g);
+ }
+ };
+
+ Collection extends GroupReceiver> receivers = Lookup.getDefault().lookupAll(GroupReceiver.class);
+ if (receivers.size() > 0) {
+ JPanel panel = new JPanel();
+ panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+ for (GroupReceiver r : receivers) {
+ Component c = r.init(callback);
+ panel.add(c);
+ }
+
+ jPanel2.add(panel, BorderLayout.PAGE_START);
+ }
+ }
+
+ private void updateStructure() {
+ root.init("", organizer, new ArrayList(), document.getGroups());
+ }
+
+ public void clear() {
+ document.clear();
+ }
+
+ public ExplorerManager getExplorerManager() {
+ return manager;
+ }
+
+ public GraphDocument getDocument() {
+ return document;
+ }
+
+ /**
+ * Gets default instance. Do not use directly: reserved for *.settings files only,
+ * i.e. deserialization routines; otherwise you could get a non-deserialized instance.
+ * To obtain the singleton instance, use {@link findInstance}.
+ */
+ public static synchronized OutlineTopComponent getDefault() {
+ if (instance == null) {
+ instance = new OutlineTopComponent();
+ }
+ return instance;
+ }
+
+ /**
+ * Obtain the OutlineTopComponent instance. Never call {@link #getDefault} directly!
+ */
+ public static synchronized OutlineTopComponent findInstance() {
+ TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
+ if (win == null) {
+ ErrorManager.getDefault().log(ErrorManager.WARNING, "Cannot find Outline component. It will not be located properly in the window system.");
+ return getDefault();
+ }
+ if (win instanceof OutlineTopComponent) {
+ return (OutlineTopComponent) win;
+ }
+ ErrorManager.getDefault().log(ErrorManager.WARNING, "There seem to be multiple components with the '" + PREFERRED_ID + "' ID. That is a potential source of errors and unexpected behavior.");
+ return getDefault();
+ }
+
+ @Override
+ public int getPersistenceType() {
+ return TopComponent.PERSISTENCE_ALWAYS;
+ }
+
+ @Override
+ public void componentOpened() {
+ this.requestActive();
+ }
+
+ @Override
+ public void componentClosed() {
+ }
+
+ @Override
+ protected String preferredID() {
+ return PREFERRED_ID;
+ }
+
+ public void resultChanged(LookupEvent lookupEvent) {
+ }
+
+ @Override
+ public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException {
+ // Not called when user starts application for the first time
+ super.readExternal(objectInput);
+ ((BeanTreeView) this.jScrollPane1).setRootVisible(false);
+ }
+
+ @Override
+ public void writeExternal(ObjectOutput objectOutput) throws IOException {
+ super.writeExternal(objectOutput);
+ }
+
+ static final class ResolvableHelper implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public Object readResolve() {
+ return OutlineTopComponent.getDefault();
+ }
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jPanel2 = new javax.swing.JPanel();
+ jScrollPane1 = new BeanTreeView();
+
+ setLayout(new java.awt.BorderLayout());
+
+ jPanel2.setLayout(new java.awt.BorderLayout());
+ jPanel2.add(jScrollPane1, java.awt.BorderLayout.CENTER);
+
+ add(jPanel2, java.awt.BorderLayout.CENTER);
+ }// //GEN-END:initComponents
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JPanel jPanel2;
+ private javax.swing.JScrollPane jScrollPane1;
+ // End of variables declaration//GEN-END:variables
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponentSettings.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponentSettings.xml
new file mode 100644
index 00000000000..1acdbcbe986
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponentSettings.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponentWstcref.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponentWstcref.xml
new file mode 100644
index 00000000000..329140ea6bd
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponentWstcref.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/StandardConfiguration.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/StandardConfiguration.xml
new file mode 100644
index 00000000000..1e05bc21edb
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/StandardConfiguration.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/StandardGroupOrganizer.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/StandardGroupOrganizer.java
new file mode 100644
index 00000000000..d907ba80c62
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/StandardGroupOrganizer.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.hotspot.igv.coordinator;
+
+import com.sun.hotspot.igv.data.Group;
+import com.sun.hotspot.igv.data.services.GroupOrganizer;
+import com.sun.hotspot.igv.data.Pair;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class StandardGroupOrganizer implements GroupOrganizer {
+
+ public String getName() {
+ return "-- None --";
+ }
+
+ public List>> organize(List subFolders, List groups) {
+
+ List>> result = new ArrayList>>();
+
+ if (groups.size() == 1 && subFolders.size() > 0) {
+ result.add(new Pair>("", groups));
+ } else {
+ for (Group g : groups) {
+ List children = new ArrayList();
+ children.add(g);
+ Pair> p = new Pair>();
+ p.setLeft(g.getName());
+ p.setRight(children);
+ result.add(p);
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/Bundle.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/Bundle.properties
new file mode 100644
index 00000000000..5b5b93f4773
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/Bundle.properties
@@ -0,0 +1,18 @@
+CTL_EditFilterAction=Edit...
+CTL_ImportAction=Open...
+CTL_OpenGraphAction=View graph
+CTL_DiffGraphAction=Difference to current graph
+CTL_RemoveAction=Remove methods
+CTL_ApplyFilterAction=Apply
+CTL_FilterAction=Open Filter Window
+CTL_AppliedFilterAction=Open AppliedFilter Window
+CTL_OutlineAction=Open Outline Window
+CTL_MoveFilterUpAction=Move upwards
+CTL_MoveFilterDownAction=Move downwards
+CTL_RemoveFilterAction=Remove
+CTL_RemoveFilterSettingsAction=Remove filter setting
+CTL_SaveAsAction=Save selected methods...
+CTL_SaveAllAction=Save all...
+CTL_SaveFilterSettingsAction=Save filter settings...
+CTL_PropertiesAction=Open Properties Window
+CTL_NewFilterAction=New filter...
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/DiffGraphAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/DiffGraphAction.java
new file mode 100644
index 00000000000..3e7737e7f7f
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/DiffGraphAction.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package com.sun.hotspot.igv.coordinator.actions;
+
+import org.openide.nodes.Node;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.CookieAction;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public final class DiffGraphAction extends CookieAction {
+
+ protected void performAction(Node[] activatedNodes) {
+ DiffGraphCookie c = activatedNodes[0].getCookie(DiffGraphCookie.class);
+ c.openDiff();
+ }
+
+ protected int mode() {
+ return CookieAction.MODE_EXACTLY_ONE;
+ }
+
+ public String getName() {
+ return NbBundle.getMessage(DiffGraphAction.class, "CTL_DiffGraphAction");
+ }
+
+ protected Class[] cookieClasses() {
+ return new Class[]{
+ DiffGraphCookie.class
+ };
+ }
+
+ @Override
+ protected String iconResource() {
+ return "com/sun/hotspot/igv/coordinator/images/diff.gif";
+ }
+
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ @Override
+ protected boolean asynchronous() {
+ return false;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/DiffGraphCookie.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/DiffGraphCookie.java
new file mode 100644
index 00000000000..b95ecf032eb
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/DiffGraphCookie.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package com.sun.hotspot.igv.coordinator.actions;
+
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.services.GraphViewer;
+import com.sun.hotspot.igv.difference.Difference;
+import org.openide.nodes.Node;
+import org.openide.util.Lookup;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class DiffGraphCookie implements Node.Cookie {
+
+ private InputGraph a;
+ private InputGraph b;
+
+ public DiffGraphCookie(InputGraph a, InputGraph b) {
+ this.a = a;
+ this.b = b;
+ }
+
+ public void openDiff() {
+
+ final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);
+
+ if(viewer != null) {
+ InputGraph diffGraph = Difference.createDiffGraph(a, b);
+ viewer.view(diffGraph);
+ }
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/ImportAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/ImportAction.java
new file mode 100644
index 00000000000..cc1e4b15e1d
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/ImportAction.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package com.sun.hotspot.igv.coordinator.actions;
+
+import com.sun.hotspot.igv.coordinator.OutlineTopComponent;
+import com.sun.hotspot.igv.data.GraphDocument;
+import com.sun.hotspot.igv.data.serialization.Parser;
+import com.sun.hotspot.igv.settings.Settings;
+import com.sun.hotspot.igv.data.serialization.XMLParser;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import javax.swing.Action;
+import javax.swing.JFileChooser;
+import javax.swing.KeyStroke;
+import javax.swing.filechooser.FileFilter;
+import org.netbeans.api.progress.ProgressHandle;
+import org.netbeans.api.progress.ProgressHandleFactory;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.RequestProcessor;
+import org.openide.util.actions.CallableSystemAction;
+import org.openide.xml.XMLUtil;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public final class ImportAction extends CallableSystemAction {
+
+ public static FileFilter getFileFilter() {
+ return new FileFilter() {
+
+ public boolean accept(File f) {
+ return f.getName().toLowerCase().endsWith(".xml") || f.isDirectory();
+ }
+
+ public String getDescription() {
+ return "XML files (*.xml)";
+ }
+ };
+ }
+
+ public void performAction() {
+
+ JFileChooser fc = new JFileChooser();
+ fc.setFileFilter(ImportAction.getFileFilter());
+ fc.setCurrentDirectory(new File(Settings.get().get(Settings.DIRECTORY, Settings.DIRECTORY_DEFAULT)));
+
+ if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
+ File file = fc.getSelectedFile();
+
+ File dir = file;
+ if (!dir.isDirectory()) {
+ dir = dir.getParentFile();
+ }
+
+ Settings.get().put(Settings.DIRECTORY, dir.getAbsolutePath());
+
+ try {
+ final XMLReader reader = XMLUtil.createXMLReader();
+ final FileInputStream inputStream = new FileInputStream(file);
+ final InputSource is = new InputSource(inputStream);
+
+ final ProgressHandle handle = ProgressHandleFactory.createHandle("Opening file " + file.getName());
+ final int basis = 1000;
+ handle.start(basis);
+ final int start = inputStream.available();
+
+ final XMLParser.ParseMonitor parseMonitor = new XMLParser.ParseMonitor() {
+
+ public void setProgress(double d) {
+ try {
+ int curAvailable = inputStream.available();
+ int prog = (int) (basis * (double) (start - curAvailable) / (double) start);
+ handle.progress(prog);
+ } catch (IOException ex) {
+ }
+ }
+
+ public void setState(String state) {
+ setProgress(0.0);
+ handle.progress(state);
+ }
+ };
+ final Parser parser = new Parser();
+ final OutlineTopComponent component = OutlineTopComponent.findInstance();
+
+ component.requestActive();
+
+ RequestProcessor.getDefault().post(new Runnable() {
+
+ public void run() {
+ GraphDocument document = null;
+ try {
+ document = parser.parse(reader, is, parseMonitor);
+ parseMonitor.setState("Finishing");
+ component.getDocument().addGraphDocument(document);
+ } catch (SAXException ex) {
+ String s = "Exception during parsing the XML file, could not load document!";
+ if (ex instanceof XMLParser.MissingAttributeException) {
+ XMLParser.MissingAttributeException e = (XMLParser.MissingAttributeException) ex;
+ s += "\nMissing attribute \"" + e.getAttributeName() + "\"";
+ }
+ ex.printStackTrace();
+ NotifyDescriptor d = new NotifyDescriptor.Message(s, NotifyDescriptor.ERROR_MESSAGE);
+ DialogDisplayer.getDefault().notify(d);
+ }
+ handle.finish();
+ }
+ });
+
+ } catch (SAXException ex) {
+ ex.printStackTrace();
+ } catch (FileNotFoundException ex) {
+ ex.printStackTrace();
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ public String getName() {
+ return NbBundle.getMessage(ImportAction.class, "CTL_ImportAction");
+ }
+
+ public ImportAction() {
+ putValue(Action.SHORT_DESCRIPTION, "Open an XML graph document");
+ putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_MASK));
+ }
+
+ @Override
+ protected String iconResource() {
+ return "com/sun/hotspot/igv/coordinator/images/import.gif";
+ }
+
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ @Override
+ protected boolean asynchronous() {
+ return false;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/OutlineAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/OutlineAction.java
new file mode 100644
index 00000000000..580d1fa4566
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/OutlineAction.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package com.sun.hotspot.igv.coordinator.actions;
+
+import com.sun.hotspot.igv.coordinator.*;
+import java.awt.event.ActionEvent;
+import javax.swing.AbstractAction;
+import org.openide.util.NbBundle;
+import org.openide.windows.TopComponent;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class OutlineAction extends AbstractAction {
+
+ public OutlineAction() {
+ super(NbBundle.getMessage(OutlineAction.class, "CTL_OutlineAction"));
+ }
+
+ public void actionPerformed(ActionEvent evt) {
+ TopComponent win = OutlineTopComponent.findInstance();
+ win.open();
+ win.requestActive();
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAction.java
new file mode 100644
index 00000000000..180cb84c2ca
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAction.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package com.sun.hotspot.igv.coordinator.actions;
+
+import javax.swing.Action;
+import org.openide.nodes.Node;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.NodeAction;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public final class RemoveAction extends NodeAction {
+
+ protected void performAction(Node[] activatedNodes) {
+ for (Node n : activatedNodes) {
+ RemoveCookie removeCookie = n.getCookie(RemoveCookie.class);
+ if (removeCookie != null) {
+ removeCookie.remove();
+ }
+ }
+ }
+
+ public RemoveAction() {
+ putValue(Action.SHORT_DESCRIPTION, "Remove");
+ }
+
+ public String getName() {
+ return NbBundle.getMessage(RemoveAction.class, "CTL_RemoveAction");
+ }
+
+ @Override
+ protected String iconResource() {
+ return "com/sun/hotspot/igv/coordinator/images/remove.gif";
+ }
+
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ @Override
+ protected boolean asynchronous() {
+ return false;
+ }
+
+ protected boolean enable(Node[] nodes) {
+ return nodes.length > 0;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAllAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAllAction.java
new file mode 100644
index 00000000000..68372525a1a
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAllAction.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.hotspot.igv.coordinator.actions;
+
+import com.sun.hotspot.igv.coordinator.OutlineTopComponent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import javax.swing.Action;
+import javax.swing.KeyStroke;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.CallableSystemAction;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public final class RemoveAllAction extends CallableSystemAction {
+
+
+ public String getName() {
+ return NbBundle.getMessage(RemoveAllAction.class, "CTL_ImportAction");
+ }
+
+ public RemoveAllAction() {
+ putValue(Action.SHORT_DESCRIPTION, "Remove all methods");
+ putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_SHIFT, InputEvent.CTRL_MASK));
+ }
+
+ @Override
+ protected String iconResource() {
+ return "com/sun/hotspot/igv/coordinator/images/removeall.gif";
+ }
+
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ @Override
+ protected boolean asynchronous() {
+ return false;
+ }
+
+ @Override
+ public void performAction() {
+ OutlineTopComponent.findInstance().clear();
+ }
+}
diff --git a/jdk/make/tools/winver/src/StdAfx.cpp b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveCookie.java
similarity index 76%
rename from jdk/make/tools/winver/src/StdAfx.cpp
rename to hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveCookie.java
index a7169bc689b..7fc2989bc56 100644
--- a/jdk/make/tools/winver/src/StdAfx.cpp
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveCookie.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,14 @@
* have any questions.
*/
-// stdafx.cpp : source file that includes just the standard includes
-// getver.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
+package com.sun.hotspot.igv.coordinator.actions;
-#include "stdafx.h"
+import org.openide.nodes.Node;
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public interface RemoveCookie extends Node.Cookie {
+ void remove();
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAllAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAllAction.java
new file mode 100644
index 00000000000..af56a00936c
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAllAction.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.hotspot.igv.coordinator.actions;
+
+import com.sun.hotspot.igv.coordinator.OutlineTopComponent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import javax.swing.Action;
+import javax.swing.KeyStroke;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.CallableSystemAction;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public final class SaveAllAction extends CallableSystemAction {
+
+ public void performAction() {
+ final OutlineTopComponent component = OutlineTopComponent.findInstance();
+ SaveAsAction.save(component.getDocument());
+ }
+
+ public String getName() {
+ return NbBundle.getMessage(SaveAllAction.class, "CTL_SaveAllAction");
+ }
+
+ public SaveAllAction() {
+ putValue(Action.SHORT_DESCRIPTION, "Save all methods to XML file");
+ putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.CTRL_MASK));
+ }
+
+ @Override
+ protected String iconResource() {
+ return "com/sun/hotspot/igv/coordinator/images/saveall.gif";
+ }
+
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ @Override
+ protected boolean asynchronous() {
+ return false;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAsAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAsAction.java
new file mode 100644
index 00000000000..d8565b09b8c
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAsAction.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package com.sun.hotspot.igv.coordinator.actions;
+
+import com.sun.hotspot.igv.data.GraphDocument;
+import com.sun.hotspot.igv.data.Group;
+import com.sun.hotspot.igv.data.serialization.Printer;
+import com.sun.hotspot.igv.settings.Settings;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import javax.swing.JFileChooser;
+import org.openide.nodes.Node;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.CookieAction;
+import org.openide.util.actions.NodeAction;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public final class SaveAsAction extends NodeAction {
+
+ protected void performAction(Node[] activatedNodes) {
+
+ GraphDocument doc = new GraphDocument();
+ for (Node n : activatedNodes) {
+ Group group = n.getLookup().lookup(Group.class);
+ doc.addGroup(group);
+ }
+
+ save(doc);
+ }
+
+ public static void save(GraphDocument doc) {
+ JFileChooser fc = new JFileChooser();
+ fc.setFileFilter(ImportAction.getFileFilter());
+ fc.setCurrentDirectory(new File(Settings.get().get(Settings.DIRECTORY, Settings.DIRECTORY_DEFAULT)));
+
+ if (fc.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {
+ File file = fc.getSelectedFile();
+ if (!file.getName().contains(".")) {
+ file = new File(file.getAbsolutePath() + ".xml");
+ }
+
+ File dir = file;
+ if (!dir.isDirectory()) {
+ dir = dir.getParentFile();
+ }
+ Settings.get().put(Settings.DIRECTORY, dir.getAbsolutePath());
+ try {
+ Writer writer = new OutputStreamWriter(new FileOutputStream(file));
+ Printer p = new Printer();
+ p.export(writer, doc);
+ writer.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+
+ }
+ }
+ }
+
+ protected int mode() {
+ return CookieAction.MODE_SOME;
+ }
+
+ public String getName() {
+ return NbBundle.getMessage(SaveAsAction.class, "CTL_SaveAsAction");
+ }
+
+ @Override
+ protected String iconResource() {
+ return "com/sun/hotspot/igv/coordinator/images/save.gif";
+ }
+
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ @Override
+ protected boolean asynchronous() {
+ return false;
+ }
+
+ protected boolean enable(Node[] nodes) {
+
+ int cnt = 0;
+ for (Node n : nodes) {
+ cnt += n.getLookup().lookupAll(Group.class).size();
+ }
+
+ return cnt > 0;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/StructuredViewAction.java b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/StructuredViewAction.java
new file mode 100644
index 00000000000..1486c2e8e02
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/StructuredViewAction.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.hotspot.igv.coordinator.actions;
+
+import com.sun.hotspot.igv.coordinator.OutlineTopComponent;
+import com.sun.hotspot.igv.data.services.GroupOrganizer;
+import java.awt.Component;
+import java.awt.Image;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.image.BufferedImage;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.swing.Action;
+import javax.swing.ButtonGroup;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+import javax.swing.event.PopupMenuEvent;
+import javax.swing.event.PopupMenuListener;
+import org.openide.awt.DropDownButtonFactory;
+import org.openide.util.HelpCtx;
+import org.openide.util.Lookup;
+import org.openide.util.Utilities;
+import org.openide.util.actions.CallableSystemAction;
+
+public class StructuredViewAction extends CallableSystemAction {
+
+ private static JButton dropDownButton;
+ private static ButtonGroup buttonGroup;
+ private static JPopupMenu popup;
+ private MyMenuItemListener menuItemListener;
+ private Map map;
+
+ public StructuredViewAction() {
+
+ putValue(Action.SHORT_DESCRIPTION, "Cluster nodes into blocks");
+ }
+
+ @Override
+ public Component getToolbarPresenter() {
+
+ Image iconImage = Utilities.loadImage("com/sun/hotspot/igv/coordinator/images/structure.gif");
+ ImageIcon icon = new ImageIcon(iconImage);
+
+ popup = new JPopupMenu();
+
+ menuItemListener = new MyMenuItemListener();
+
+ buttonGroup = new ButtonGroup();
+
+ Collection extends GroupOrganizer> organizersCollection = Lookup.getDefault().lookupAll(GroupOrganizer.class);
+
+ List organizers = new ArrayList(organizersCollection);
+ Collections.sort(organizers, new Comparator() {
+ public int compare(GroupOrganizer a, GroupOrganizer b) {
+ return a.getName().compareTo(b.getName());
+ }
+ });
+
+ map = new HashMap();
+
+ boolean first = true;
+ for(GroupOrganizer organizer : organizers) {
+ JCheckBoxMenuItem item = new JCheckBoxMenuItem(organizer.getName());
+ map.put(item, organizer);
+ item.addActionListener(menuItemListener);
+ buttonGroup.add(item);
+ popup.add(item);
+ if(first) {
+ item.setSelected(true);
+ first = false;
+ }
+ }
+
+ dropDownButton = DropDownButtonFactory.createDropDownButton(
+ new ImageIcon(
+ new BufferedImage(32, 32, BufferedImage.TYPE_BYTE_GRAY)),
+ popup);
+
+ dropDownButton.setIcon(icon);
+
+ dropDownButton.setToolTipText("Insert Layer Registration");
+
+ dropDownButton.addItemListener(new ItemListener() {
+
+ public void itemStateChanged(ItemEvent e) {
+ int state = e.getStateChange();
+ if (state == ItemEvent.SELECTED) {
+ performAction();
+ }
+ }
+ });
+
+ dropDownButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ performAction();
+ }
+ });
+
+ popup.addPopupMenuListener(new PopupMenuListener() {
+
+ public void popupMenuCanceled(PopupMenuEvent e) {
+ dropDownButton.setSelected(false);
+ }
+
+ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+ dropDownButton.setSelected(false);
+ }
+
+ public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+ dropDownButton.setSelected(true);
+ }
+ });
+
+ return dropDownButton;
+
+ }
+
+ private class MyMenuItemListener implements ActionListener {
+
+ public void actionPerformed(ActionEvent ev) {
+ JMenuItem item = (JMenuItem) ev.getSource();
+ GroupOrganizer organizer = map.get(item);
+ assert organizer != null : "Organizer must exist!";
+ OutlineTopComponent.findInstance().setOrganizer(organizer);
+ }
+ }
+
+
+ @Override
+ public void performAction() {
+ popup.show(dropDownButton, 0, dropDownButton.getHeight());
+ }
+
+ public String getName() {
+ return "Structured View";
+ }
+
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ @Override
+ protected boolean asynchronous() {
+ return false;
+ }
+
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/customLeftWsmode.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/customLeftWsmode.xml
new file mode 100644
index 00000000000..2655e46a14b
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/customLeftWsmode.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/diff.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/diff.gif
new file mode 100644
index 00000000000..6e49c314adf
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/diff.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/folder.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/folder.gif
new file mode 100644
index 00000000000..2d3ca05fb33
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/folder.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/graph.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/graph.gif
new file mode 100644
index 00000000000..7a4e5fc8cd7
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/graph.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/import.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/import.gif
new file mode 100644
index 00000000000..c0b2ca24af5
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/import.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/remove.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/remove.gif
new file mode 100644
index 00000000000..9dc08247b8f
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/remove.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/removeall.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/removeall.gif
new file mode 100644
index 00000000000..9eeab3cad6d
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/removeall.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/save.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/save.gif
new file mode 100644
index 00000000000..954f1accde6
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/save.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/saveall.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/saveall.gif
new file mode 100644
index 00000000000..2d31c8b2ccd
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/saveall.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/structure.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/structure.gif
new file mode 100644
index 00000000000..2be84874874
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/structure.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/structured.gif b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/structured.gif
new file mode 100644
index 00000000000..71aa946d539
Binary files /dev/null and b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/images/structured.gif differ
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/layer.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/layer.xml
new file mode 100644
index 00000000000..999997db9f6
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/layer.xml
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/build.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Data/build.xml
new file mode 100644
index 00000000000..dd626066c85
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds, tests, and runs the project com.sun.hotspot.igv.data.
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/manifest.mf b/hotspot/src/share/tools/IdealGraphVisualizer/Data/manifest.mf
new file mode 100644
index 00000000000..702ae8764a2
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/manifest.mf
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.sun.hotspot.igv.data
+OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/data/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/build-impl.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/build-impl.xml
new file mode 100644
index 00000000000..942d7a628fc
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/build-impl.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ You must set 'suite.dir' to point to your containing module suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/genfiles.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/genfiles.properties
new file mode 100644
index 00000000000..621e413c962
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=a403efd8
+build.xml.script.CRC32=b87f73ba
+build.xml.stylesheet.CRC32=79c3b980
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=a403efd8
+nbproject/build-impl.xml.script.CRC32=cc649146
+nbproject/build-impl.xml.stylesheet.CRC32=deb65f65
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/platform.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/platform.properties
new file mode 100644
index 00000000000..68ad75e5766
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/platform.properties
@@ -0,0 +1,29 @@
+# Deprecated since 5.0u1; for compatibility with 5.0:
+disabled.clusters=\
+ apisupport1,\
+ harness,\
+ ide8,\
+ java1,\
+ nb6.0,\
+ profiler2
+disabled.modules=\
+ org.netbeans.core.execution,\
+ org.netbeans.core.multiview,\
+ org.netbeans.core.output2,\
+ org.netbeans.modules.applemenu,\
+ org.netbeans.modules.autoupdate.services,\
+ org.netbeans.modules.autoupdate.ui,\
+ org.netbeans.modules.core.kit,\
+ org.netbeans.modules.favorites,\
+ org.netbeans.modules.javahelp,\
+ org.netbeans.modules.masterfs,\
+ org.netbeans.modules.options.keymap,\
+ org.netbeans.modules.sendopts,\
+ org.netbeans.modules.templates,\
+ org.openide.compat,\
+ org.openide.execution,\
+ org.openide.util.enumerations
+enabled.clusters=\
+ platform7
+nbjdk.active=JDK_1.6
+nbplatform.active=default
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/project.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/project.properties
new file mode 100644
index 00000000000..152f44eca60
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/project.properties
@@ -0,0 +1,2 @@
+javac.source=1.5
+javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/project.xml b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/project.xml
new file mode 100644
index 00000000000..dce4d28a7c3
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/project.xml
@@ -0,0 +1,16 @@
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ com.sun.hotspot.igv.data
+
+
+
+ com.sun.hotspot.igv.data
+ com.sun.hotspot.igv.data.serialization
+ com.sun.hotspot.igv.data.services
+
+
+
+
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/suite.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/suite.properties
new file mode 100644
index 00000000000..29d7cc9bd6f
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/nbproject/suite.properties
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Bundle.properties b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Bundle.properties
new file mode 100644
index 00000000000..f17788c7ff4
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Bundle.properties
@@ -0,0 +1 @@
+OpenIDE-Module-Name=Data
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/ChangedEvent.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/ChangedEvent.java
new file mode 100644
index 00000000000..18a8cedbabf
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/ChangedEvent.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class ChangedEvent extends Event> {
+
+ private T object;
+
+ public ChangedEvent() {
+ }
+
+ public ChangedEvent(T object) {
+ this.object = object;
+ }
+
+ protected void fire(ChangedListener l) {
+ l.changed(object);
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/ChangedEventProvider.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/ChangedEventProvider.java
new file mode 100644
index 00000000000..5e2978e8260
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/ChangedEventProvider.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.hotspot.igv.data;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public interface ChangedEventProvider {
+
+ public ChangedEvent getChangedEvent();
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/ChangedListener.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/ChangedListener.java
new file mode 100644
index 00000000000..806b339be17
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/ChangedListener.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public interface ChangedListener {
+
+ public void changed(T source);
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Event.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Event.java
new file mode 100644
index 00000000000..c31e5935a12
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Event.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public abstract class Event {
+
+ private List listener;
+
+ public Event() {
+ listener = new ArrayList();
+ }
+
+ public void addListener(L l) {
+ listener.add(l);
+ }
+
+ public void removeListener(L l) {
+ listener.remove(l);
+ }
+
+ public void fire() {
+ List tmpList = new ArrayList(listener);
+ for (L l : tmpList) {
+ fire(l);
+ }
+ }
+
+ protected abstract void fire(L l);
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/GraphDocument.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/GraphDocument.java
new file mode 100644
index 00000000000..27d09c38f71
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/GraphDocument.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class GraphDocument extends Properties.Object implements ChangedEventProvider {
+
+ private List groups;
+ private ChangedEvent changedEvent;
+
+ public GraphDocument() {
+ groups = new ArrayList();
+ changedEvent = new ChangedEvent(this);
+ }
+
+ public void clear() {
+ groups.clear();
+ getChangedEvent().fire();
+ }
+
+ public ChangedEvent getChangedEvent() {
+ return changedEvent;
+ }
+
+ public List getGroups() {
+ return Collections.unmodifiableList(groups);
+ }
+
+ public void addGroup(Group group) {
+ group.setDocument(this);
+ groups.add(group);
+ getChangedEvent().fire();
+ }
+
+ public void removeGroup(Group group) {
+ if (groups.contains(group)) {
+ group.setDocument(null);
+ groups.remove(group);
+ getChangedEvent().fire();
+ }
+ }
+
+ public void addGraphDocument(GraphDocument document) {
+ for (Group g : document.groups) {
+ this.addGroup(g);
+ }
+ document.clear();
+ getChangedEvent().fire();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("GraphDocument: " + getProperties().toString() + " \n\n");
+ for (Group g : getGroups()) {
+ sb.append(g.toString());
+ sb.append("\n\n");
+ }
+
+ return sb.toString();
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Group.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Group.java
new file mode 100644
index 00000000000..8f0aa15e992
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Group.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+import com.sun.hotspot.igv.data.ChangedEvent;
+import com.sun.hotspot.igv.data.ChangedEventProvider;
+import com.sun.hotspot.igv.data.Properties;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class Group extends Properties.Object implements ChangedEventProvider {
+
+ private List graphs;
+ private transient ChangedEvent changedEvent;
+ private GraphDocument document;
+ private InputMethod method;
+ private String assembly;
+
+ public Group() {
+ graphs = new ArrayList();
+ init();
+ }
+
+ private void init() {
+ changedEvent = new ChangedEvent(this);
+ }
+
+ public void fireChangedEvent() {
+ changedEvent.fire();
+ }
+
+ public void setAssembly(String s) {
+ this.assembly = s;
+ }
+
+ public String getAssembly() {
+ return assembly;
+ }
+
+ public void setMethod(InputMethod method) {
+ this.method = method;
+ }
+
+ public InputMethod getMethod() {
+ return method;
+ }
+
+ void setDocument(GraphDocument document) {
+ this.document = document;
+ }
+
+ public GraphDocument getDocument() {
+ return document;
+ }
+
+ public ChangedEvent getChangedEvent() {
+ return changedEvent;
+ }
+
+ public List getGraphs() {
+ return Collections.unmodifiableList(graphs);
+ }
+
+ public void addGraph(InputGraph g) {
+ assert g != null;
+ assert !graphs.contains(g);
+ graphs.add(g);
+ changedEvent.fire();
+ }
+
+ public void removeGraph(InputGraph g) {
+ int index = graphs.indexOf(g);
+ if (index != -1) {
+ graphs.remove(g);
+ changedEvent.fire();
+ }
+ }
+
+ public Set getAllNodes() {
+ Set result = new HashSet();
+ for (InputGraph g : graphs) {
+ Set ids = g.getNodesAsSet();
+ result.addAll(g.getNodesAsSet());
+ for (Integer i : ids) {
+ result.add(-i);
+ }
+ }
+ return result;
+ }
+
+ public InputGraph getLastAdded() {
+ if (graphs.size() == 0) {
+ return null;
+ }
+ return graphs.get(graphs.size() - 1);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Group " + getProperties().toString() + "\n");
+ for (InputGraph g : graphs) {
+ sb.append(g.toString());
+ sb.append("\n");
+ }
+ return sb.toString();
+ }
+
+ public String getName() {
+ return getProperties().get("name");
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputBlock.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputBlock.java
new file mode 100644
index 00000000000..1c1367738af
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputBlock.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class InputBlock {
+
+ private List nodes;
+ private List successorNames;
+ private String name;
+ private InputGraph graph;
+ private Rectangle bounds;
+ private Set successors;
+ private Set predecessors;
+ private Set inputs;
+ private Set outputs;
+
+ public InputBlock(InputGraph graph, String name) {
+ this.graph = graph;
+ this.name = name;
+ nodes = new ArrayList();
+ successorNames = new ArrayList();
+ successors = new HashSet();
+ predecessors = new HashSet();
+ inputs = new HashSet();
+ outputs = new HashSet();
+ }
+
+ public void removeSuccessor(InputBlock b) {
+ if (successors.contains(b)) {
+ successors.remove(b);
+ b.predecessors.remove(this);
+ InputBlockEdge e = new InputBlockEdge(this, b);
+ assert outputs.contains(e);
+ outputs.remove(e);
+ assert b.inputs.contains(e);
+ b.inputs.remove(e);
+ }
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String s) {
+ name = s;
+ }
+
+ public List getNodes() {
+ return Collections.unmodifiableList(nodes);
+ }
+
+ public void addNode(int id) {
+ InputNode n = graph.getNode(id);
+ assert n != null;
+ graph.setBlock(n, this);
+ addNode(graph.getNode(id));
+ }
+
+ public void addNode(InputNode node) {
+ assert !nodes.contains(node);
+ nodes.add(node);
+ }
+
+ public Set getPredecessors() {
+ return Collections.unmodifiableSet(predecessors);
+ }
+
+ public Set getSuccessors() {
+ return Collections.unmodifiableSet(successors);
+ }
+
+ public Set getInputs() {
+ return Collections.unmodifiableSet(inputs);
+ }
+
+ public Set getOutputs() {
+ return Collections.unmodifiableSet(outputs);
+ }
+
+ // resolveBlockLinks must be called afterwards
+ public void addSuccessor(String name) {
+ successorNames.add(name);
+ }
+
+ public void resolveBlockLinks() {
+ for (String s : successorNames) {
+ InputBlock b = graph.getBlock(s);
+ addSuccessor(b);
+ }
+
+ successorNames.clear();
+ }
+
+ public void addSuccessor(InputBlock b) {
+ if (!successors.contains(b)) {
+ successors.add(b);
+ b.predecessors.add(this);
+ InputBlockEdge e = new InputBlockEdge(this, b);
+ outputs.add(e);
+ b.inputs.add(e);
+ }
+ }
+
+ @Override
+ public String toString() {
+ return this.getName();
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputBlockEdge.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputBlockEdge.java
new file mode 100644
index 00000000000..10cac158a4a
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputBlockEdge.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class InputBlockEdge {
+
+ private InputBlock from;
+ private InputBlock to;
+
+ public InputBlockEdge(InputBlock from, InputBlock to) {
+ assert from != null;
+ assert to != null;
+ this.from = from;
+ this.to = to;
+ }
+
+ public InputBlock getFrom() {
+ return from;
+ }
+
+ public InputBlock getTo() {
+ return to;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof InputBlockEdge && obj != null) {
+ InputBlockEdge e = (InputBlockEdge) obj;
+ return e.from.equals(from) && e.to.equals(to);
+ }
+ return super.equals(obj);
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = from.hashCode();
+ hash = 59 * hash + to.hashCode();
+ return hash;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputBytecode.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputBytecode.java
new file mode 100644
index 00000000000..14ab1f34059
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputBytecode.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class InputBytecode {
+
+ private int bci;
+ private String name;
+ private InputMethod inlined;
+
+ public InputBytecode(int bci, String name) {
+ this.bci = bci;
+ this.name = name;
+ }
+
+ public InputMethod getInlined() {
+ return inlined;
+ }
+
+ public void setInlined(InputMethod inlined) {
+ this.inlined = inlined;
+ }
+
+ public int getBci() {
+ return bci;
+ }
+
+ public String getName() {
+ return name;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputEdge.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputEdge.java
new file mode 100644
index 00000000000..d1c440ec09a
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputEdge.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class InputEdge {
+
+ public enum State {
+
+ SAME,
+ NEW,
+ DELETED
+ }
+ private char toIndex;
+ private int from;
+ private int to;
+ private State state;
+
+ public InputEdge(char toIndex, int from, int to) {
+ this.toIndex = toIndex;
+ this.from = from;
+ this.to = to;
+ this.state = State.SAME;
+ }
+
+ public State getState() {
+ return state;
+ }
+
+ public void setState(State x) {
+ this.state = x;
+ }
+
+ public char getToIndex() {
+ return toIndex;
+ }
+
+ public String getName() {
+ return "in" + toIndex;
+ }
+
+ public int getFrom() {
+ return from;
+ }
+
+ public int getTo() {
+ return to;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || !(o instanceof InputEdge)) {
+ return false;
+ }
+ InputEdge conn2 = (InputEdge) o;
+ return conn2.toIndex == toIndex && conn2.from == from && conn2.to == to;
+ }
+
+ @Override
+ public String toString() {
+ return "Edge from " + from + " to " + to + "(" + (int) toIndex + ") ";
+ }
+
+ @Override
+ public int hashCode() {
+ return (from << 20 | to << 8 | toIndex);
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputGraph.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputGraph.java
new file mode 100644
index 00000000000..b929fd627c6
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputGraph.java
@@ -0,0 +1,249 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+import com.sun.hotspot.igv.data.Properties;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class InputGraph extends Properties.Object {
+
+ private Map nodes;
+ private Set edges;
+ private Group parent;
+ private Map blocks;
+ private Map nodeToBlock;
+ private boolean isDifferenceGraph;
+
+ public InputGraph(Group parent) {
+ this(parent, null);
+ }
+
+ public InputGraph(Group parent, InputGraph last) {
+ this(parent, last, "");
+ }
+
+ private void clearBlocks() {
+ blocks.clear();
+ nodeToBlock.clear();
+ }
+
+ public InputGraph(Group parent, InputGraph last, String name) {
+ this.parent = parent;
+ setName(name);
+ nodes = new Hashtable();
+ edges = new HashSet();
+ blocks = new Hashtable();
+ nodeToBlock = new Hashtable();
+ if (last != null) {
+
+ for (InputNode n : last.getNodes()) {
+ addNode(n);
+ }
+
+ for (InputEdge c : last.getEdges()) {
+ addEdge(c);
+ }
+ }
+ }
+
+ public void schedule(Collection newBlocks) {
+ clearBlocks();
+ InputBlock noBlock = new InputBlock(this, "no block");
+ Set scheduledNodes = new HashSet();
+
+ for (InputBlock b : newBlocks) {
+ for (InputNode n : b.getNodes()) {
+ assert !scheduledNodes.contains(n);
+ scheduledNodes.add(n);
+ }
+ }
+
+ for (InputNode n : this.getNodes()) {
+ assert nodes.get(n.getId()) == n;
+ if (!scheduledNodes.contains(n)) {
+ noBlock.addNode(n.getId());
+ }
+ }
+
+ if (noBlock.getNodes().size() != 0) {
+ newBlocks.add(noBlock);
+ }
+ for (InputBlock b : newBlocks) {
+ addBlock(b);
+ }
+
+ for (InputNode n : this.getNodes()) {
+ assert this.getBlock(n) != null;
+ }
+ }
+
+ public void setBlock(InputNode node, InputBlock block) {
+ nodeToBlock.put(node.getId(), block);
+ }
+
+ public InputBlock getBlock(int nodeId) {
+ return nodeToBlock.get(nodeId);
+ }
+
+ public InputBlock getBlock(InputNode node) {
+ return getBlock(node.getId());
+ }
+
+ public InputGraph getNext() {
+ List list = parent.getGraphs();
+ if (!list.contains(this)) {
+ return null;
+ }
+ int index = list.indexOf(this);
+ if (index == list.size() - 1) {
+ return null;
+ } else {
+ return list.get(index + 1);
+ }
+ }
+
+ public InputGraph getPrev() {
+ List list = parent.getGraphs();
+ if (!list.contains(this)) {
+ return null;
+ }
+ int index = list.indexOf(this);
+ if (index == 0) {
+ return null;
+ } else {
+ return list.get(index - 1);
+ }
+ }
+
+ public String getName() {
+ return getProperties().get("name");
+ }
+
+ public String getAbsoluteName() {
+ String result = getName();
+ if (this.parent != null) {
+ result = parent.getName() + ": " + result;
+ }
+ return result;
+ }
+
+ public Collection getNodes() {
+ return Collections.unmodifiableCollection(nodes.values());
+ }
+
+ public Set getNodesAsSet() {
+ return Collections.unmodifiableSet(nodes.keySet());
+ }
+
+ public Collection getBlocks() {
+ return Collections.unmodifiableCollection(blocks.values());
+ }
+
+ public void addNode(InputNode node) {
+ nodes.put(node.getId(), node);
+ }
+
+ public InputNode getNode(int id) {
+ return nodes.get(id);
+ }
+
+ public InputNode removeNode(int index) {
+ return nodes.remove(index);
+ }
+
+ public Set getEdges() {
+ return Collections.unmodifiableSet(edges);
+ }
+
+ public void removeEdge(InputEdge c) {
+ assert edges.contains(c);
+ edges.remove(c);
+ assert !edges.contains(c);
+ }
+
+ public void addEdge(InputEdge c) {
+ assert !edges.contains(c);
+ edges.add(c);
+ assert edges.contains(c);
+ }
+
+ public Group getGroup() {
+ return parent;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Graph " + getName() + " " + getProperties().toString() + "\n");
+ for (InputNode n : nodes.values()) {
+ sb.append(n.toString());
+ sb.append("\n");
+ }
+
+ for (InputEdge c : edges) {
+ sb.append(c.toString());
+ sb.append("\n");
+ }
+ return sb.toString();
+ }
+
+ public void addBlock(InputBlock b) {
+ blocks.put(b.getName(), b);
+ for (InputNode n : b.getNodes()) {
+ this.nodeToBlock.put(n.getId(), b);
+ }
+ }
+
+ public void resolveBlockLinks() {
+ for (InputBlock b : blocks.values()) {
+ b.resolveBlockLinks();
+ }
+ }
+
+ public void setName(String s) {
+ getProperties().setProperty("name", s);
+ }
+
+ public InputBlock getBlock(String s) {
+ return blocks.get(s);
+ }
+
+ public boolean isDifferenceGraph() {
+ return this.isDifferenceGraph;
+ }
+
+ public void setIsDifferenceGraph(boolean b) {
+ isDifferenceGraph = b;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputMethod.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputMethod.java
new file mode 100644
index 00000000000..eac6b1a0308
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputMethod.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+import com.sun.hotspot.igv.data.Properties;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class InputMethod extends Properties.Object {
+
+ private String name;
+ private int bci;
+ private String shortName;
+ private List inlined;
+ private InputMethod parentMethod;
+ private Group group;
+ private List bytecodes;
+
+ /** Creates a new instance of InputMethod */
+ public InputMethod(Group parent, String name, String shortName, int bci) {
+ this.group = parent;
+ this.name = name;
+ this.bci = bci;
+ this.shortName = shortName;
+ inlined = new ArrayList();
+ bytecodes = new ArrayList();
+ }
+
+ public List getBytecodes() {
+ return Collections.unmodifiableList(bytecodes);
+ }
+
+ public List getInlined() {
+ return Collections.unmodifiableList(inlined);
+ }
+
+ public void addInlined(InputMethod m) {
+
+ // assert bci unique
+ for (InputMethod m2 : inlined) {
+ assert m2.getBci() != m.getBci();
+ }
+
+ inlined.add(m);
+ assert m.parentMethod == null;
+ m.parentMethod = this;
+
+ for (InputBytecode bc : bytecodes) {
+ if (bc.getBci() == m.getBci()) {
+ bc.setInlined(m);
+ }
+ }
+ }
+
+ public Group getGroup() {
+ return group;
+ }
+
+ public String getShortName() {
+ return shortName;
+ }
+
+ public void setBytecodes(String text) {
+
+ String[] strings = text.split("\n");
+ int oldNumber = -1;
+ for (String s : strings) {
+
+ if (s.length() > 0 && Character.isDigit(s.charAt(0))) {
+ s = s.trim();
+ int spaceIndex = s.indexOf(' ');
+ String numberString = s.substring(0, spaceIndex);
+ String tmpName = s.substring(spaceIndex + 1, s.length());
+
+ int number = -1;
+ number = Integer.parseInt(numberString);
+
+ // assert correct order of bytecodes
+ assert number > oldNumber;
+
+ InputBytecode bc = new InputBytecode(number, tmpName);
+ bytecodes.add(bc);
+
+ for (InputMethod m : inlined) {
+ if (m.getBci() == number) {
+ bc.setInlined(m);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public int getBci() {
+ return bci;
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputNode.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputNode.java
new file mode 100644
index 00000000000..ad15d141ac9
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputNode.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class InputNode extends Properties.Object {
+
+ private int id;
+
+ public InputNode(InputNode n) {
+ super(n);
+ setId(n.id);
+ }
+
+ public InputNode(int id) {
+ setId(id);
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ getProperties().setProperty("id", "" + id);
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (!(o instanceof InputNode)) {
+ return false;
+ }
+ InputNode n = (InputNode) o;
+ if (n.id != id) {
+ return false;
+ }
+ return getProperties().equals(n.getProperties());
+ }
+
+ @Override
+ public int hashCode() {
+ return id;
+ }
+
+ @Override
+ public String toString() {
+ return "Node " + id + " " + getProperties().toString();
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Pair.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Pair.java
new file mode 100644
index 00000000000..3becd18cbc5
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Pair.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class Pair {
+
+ private L l;
+ private R r;
+
+ public Pair() {
+ }
+
+ public Pair(L l, R r) {
+ this.l = l;
+ this.r = r;
+ }
+
+ public L getLeft() {
+ return l;
+ }
+
+ public void setLeft(L l) {
+ this.l = l;
+ }
+
+ public R getRight() {
+ return r;
+ }
+
+ public void setRight(R r) {
+ this.r = r;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (!(o instanceof Pair)) {
+ return false;
+ }
+ Pair obj = (Pair) o;
+ return l.equals(obj.l) && r.equals(obj.r);
+ }
+
+ @Override
+ public int hashCode() {
+ return l.hashCode() * 71 + r.hashCode();
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Properties.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Properties.java
new file mode 100644
index 00000000000..07a29962f9f
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Properties.java
@@ -0,0 +1,288 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class Properties implements Serializable {
+
+ public static final long serialVersionUID = 1L;
+ private Map map;
+
+ public Properties() {
+ map = new HashMap(5);
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (!(o instanceof Properties)) {
+ return false;
+ }
+
+ Properties p = (Properties) o;
+
+ if (getProperties().size() != p.getProperties().size()) {
+ return false;
+ }
+ for (Property prop : getProperties()) {
+ String value = p.get(prop.getName());
+ if (value == null || !value.equals(prop.getValue())) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 5;
+ hash = 83 * hash + (this.map != null ? this.map.hashCode() : 0);
+ return hash;
+ }
+
+ public Properties(String name, String value) {
+ this();
+ this.add(new Property(name, value));
+ }
+
+ public Properties(String name, String value, String name1, String value1) {
+ this(name, value);
+ this.add(new Property(name1, value1));
+ }
+
+ public Properties(String name, String value, String name1, String value1, String name2, String value2) {
+ this(name, value, name1, value1);
+ this.add(new Property(name2, value2));
+ }
+
+ public Properties(Properties p) {
+ map = new HashMap(p.map);
+ }
+
+ public static class Object implements Provider {
+
+ private Properties properties;
+
+ public Object() {
+ properties = new Properties();
+ }
+
+ public Object(Properties.Object object) {
+ properties = new Properties(object.getProperties());
+ }
+
+ public Properties getProperties() {
+ return properties;
+ }
+ }
+
+ public interface PropertyMatcher {
+
+ String getName();
+
+ boolean match(String value);
+ }
+
+ public static class InvertPropertyMatcher implements PropertyMatcher {
+
+ private PropertyMatcher matcher;
+
+ public InvertPropertyMatcher(PropertyMatcher matcher) {
+ this.matcher = matcher;
+ }
+
+ public String getName() {
+ return matcher.getName();
+ }
+
+ public boolean match(String p) {
+ return !matcher.match(p);
+ }
+ }
+
+ public static class StringPropertyMatcher implements PropertyMatcher {
+
+ private String name;
+ private String value;
+
+ public StringPropertyMatcher(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean match(String p) {
+ return p.equals(value);
+ }
+ }
+
+ public static class RegexpPropertyMatcher implements PropertyMatcher {
+
+ private String name;
+ private Pattern valuePattern;
+
+ public RegexpPropertyMatcher(String name, String value) {
+ this.name = name;
+ valuePattern = Pattern.compile(value);
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean match(String p) {
+ Matcher m = valuePattern.matcher(p);
+ return m.matches();
+ }
+ }
+
+ public Property selectSingle(PropertyMatcher matcher) {
+
+ Property p = this.map.get(matcher.getName());
+ if (p == null) {
+ return null;
+ }
+ if (matcher.match(p.getValue())) {
+ return p;
+ } else {
+ return null;
+ }
+ }
+
+ public interface Provider {
+
+ public Properties getProperties();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("[");
+ for (Property p : map.values()) {
+ sb.append(p.toString());
+ }
+ return sb.append("]").toString();
+ }
+
+ public static class PropertySelector {
+
+ private Collection objects;
+
+ public PropertySelector(Collection objects) {
+ this.objects = objects;
+ }
+
+ public T selectSingle(final String name, final String value) {
+ return selectSingle(new StringPropertyMatcher(name, value));
+ }
+
+ public T selectSingle(PropertyMatcher matcher) {
+
+ for (T t : objects) {
+ Property p = t.getProperties().selectSingle(matcher);
+ if (p != null) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+
+ public List selectMultiple(final String name, final String value) {
+ return selectMultiple(new StringPropertyMatcher(name, value));
+ }
+
+ public List selectMultiple(PropertyMatcher matcher) {
+ List result = new ArrayList();
+ for (T t : objects) {
+ Property p = t.getProperties().selectSingle(matcher);
+ if (p != null) {
+ result.add(t);
+ }
+ }
+ return result;
+ }
+ }
+
+ public String get(String key) {
+ Property p = map.get(key);
+ if (p == null) {
+ return null;
+ } else {
+ return p.getValue();
+ }
+ }
+
+ public String getProperty(String string) {
+ return get(string);
+ }
+
+ public Property setProperty(String name, String value) {
+
+ if (value == null) {
+ // remove this property
+ return map.remove(name);
+ } else {
+ Property p = map.get(name);
+ if (p == null) {
+ p = new Property(name, value);
+ map.put(name, p);
+ } else {
+ p.setValue(value);
+ }
+ return p;
+ }
+ }
+
+ public Collection getProperties() {
+ return Collections.unmodifiableCollection(map.values());
+ }
+
+ public void add(Properties properties) {
+ for (Property p : properties.getProperties()) {
+ add(p);
+ }
+ }
+
+ public void add(Property property) {
+ assert property.getName() != null;
+ assert property.getValue() != null;
+ map.put(property.getName(), property);
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Property.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Property.java
new file mode 100644
index 00000000000..6694153d3b7
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Property.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data;
+
+import java.io.Serializable;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class Property implements Serializable {
+
+ public static final long serialVersionUID = 1L;
+ private String name;
+ private String value;
+
+ public Property() {
+ this(null, null);
+ }
+
+ public Property(Property p) {
+ this(p.getName(), p.getValue());
+ }
+
+ public Property(String name) {
+ this(name, null);
+ }
+
+ public Property(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setName(String s) {
+ this.name = s;
+ }
+
+ public void setValue(String s) {
+ this.value = s;
+ }
+
+ @Override
+ public String toString() {
+ return name + " = " + value + "; ";
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/Parser.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/Parser.java
new file mode 100644
index 00000000000..410ee7c41a8
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/Parser.java
@@ -0,0 +1,422 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data.serialization;
+
+import com.sun.hotspot.igv.data.GraphDocument;
+import com.sun.hotspot.igv.data.Group;
+import com.sun.hotspot.igv.data.InputBlock;
+import com.sun.hotspot.igv.data.InputEdge;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.InputMethod;
+import com.sun.hotspot.igv.data.InputNode;
+import com.sun.hotspot.igv.data.Properties;
+import com.sun.hotspot.igv.data.Property;
+import com.sun.hotspot.igv.data.services.GroupCallback;
+import com.sun.hotspot.igv.data.serialization.XMLParser.ElementHandler;
+import com.sun.hotspot.igv.data.serialization.XMLParser.HandoverElementHandler;
+import com.sun.hotspot.igv.data.serialization.XMLParser.ParseMonitor;
+import com.sun.hotspot.igv.data.serialization.XMLParser.TopElementHandler;
+import java.io.IOException;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class Parser {
+
+ public static final String INDENT = " ";
+ public static final String TOP_ELEMENT = "graphDocument";
+ public static final String GROUP_ELEMENT = "group";
+ public static final String GRAPH_ELEMENT = "graph";
+ public static final String ROOT_ELEMENT = "graphDocument";
+ public static final String PROPERTIES_ELEMENT = "properties";
+ public static final String EDGES_ELEMENT = "edges";
+ public static final String PROPERTY_ELEMENT = "p";
+ public static final String EDGE_ELEMENT = "edge";
+ public static final String NODE_ELEMENT = "node";
+ public static final String NODES_ELEMENT = "nodes";
+ public static final String REMOVE_EDGE_ELEMENT = "removeEdge";
+ public static final String REMOVE_NODE_ELEMENT = "removeNode";
+ public static final String METHOD_NAME_PROPERTY = "name";
+ public static final String METHOD_IS_PUBLIC_PROPERTY = "public";
+ public static final String METHOD_IS_STATIC_PROPERTY = "static";
+ public static final String TRUE_VALUE = "true";
+ public static final String NODE_NAME_PROPERTY = "name";
+ public static final String EDGE_NAME_PROPERTY = "name";
+ public static final String NODE_ID_PROPERTY = "id";
+ public static final String FROM_PROPERTY = "from";
+ public static final String TO_PROPERTY = "to";
+ public static final String PROPERTY_NAME_PROPERTY = "name";
+ public static final String GRAPH_NAME_PROPERTY = "name";
+ public static final String TO_INDEX_PROPERTY = "index";
+ public static final String METHOD_ELEMENT = "method";
+ public static final String INLINE_ELEMENT = "inline";
+ public static final String BYTECODES_ELEMENT = "bytecodes";
+ public static final String METHOD_BCI_PROPERTY = "bci";
+ public static final String METHOD_SHORT_NAME_PROPERTY = "shortName";
+ public static final String CONTROL_FLOW_ELEMENT = "controlFlow";
+ public static final String BLOCK_NAME_PROPERTY = "name";
+ public static final String BLOCK_ELEMENT = "block";
+ public static final String SUCCESSORS_ELEMENT = "successors";
+ public static final String SUCCESSOR_ELEMENT = "successor";
+ public static final String ASSEMBLY_ELEMENT = "assembly";
+ public static final String DIFFERENCE_PROPERTY = "difference";
+ private TopElementHandler xmlDocument = new TopElementHandler();
+ private boolean difference;
+ private GroupCallback groupCallback;
+ //
+ private ElementHandler topHandler = new ElementHandler(TOP_ELEMENT) {
+
+ @Override
+ protected GraphDocument start() throws SAXException {
+ return new GraphDocument();
+ }
+ };
+ //
+ private ElementHandler groupHandler = new XMLParser.ElementHandler(GROUP_ELEMENT) {
+
+ @Override
+ protected Group start() throws SAXException {
+ Group group = new Group();
+ Parser.this.difference = false;
+ String differenceProperty = this.readAttribute(DIFFERENCE_PROPERTY);
+ if (differenceProperty != null && (differenceProperty.equals("1") || differenceProperty.equals("true"))) {
+ Parser.this.difference = true;
+ }
+
+ ParseMonitor monitor = getMonitor();
+ if (monitor != null) {
+ monitor.setState(group.getName());
+ }
+
+ return group;
+ }
+
+ @Override
+ protected void end(String text) throws SAXException {
+ if (groupCallback == null) {
+ getParentObject().addGroup(getObject());
+ }
+ }
+ };
+ private HandoverElementHandler assemblyHandler = new XMLParser.HandoverElementHandler(ASSEMBLY_ELEMENT, true) {
+
+ @Override
+ protected void end(String text) throws SAXException {
+ getParentObject().setAssembly(text);
+ }
+ };
+ //
+ private ElementHandler methodHandler = new XMLParser.ElementHandler(METHOD_ELEMENT) {
+
+ @Override
+ protected InputMethod start() throws SAXException {
+
+ InputMethod method = parseMethod(this, getParentObject());
+ getParentObject().setMethod(method);
+ return method;
+ }
+ };
+
+ private InputMethod parseMethod(XMLParser.ElementHandler handler, Group group) throws SAXException {
+ String s = handler.readRequiredAttribute(METHOD_BCI_PROPERTY);
+ int bci = 0;
+ try {
+ bci = Integer.parseInt(s);
+ } catch (NumberFormatException e) {
+ throw new SAXException(e);
+ }
+ InputMethod method = new InputMethod(group, handler.readRequiredAttribute(METHOD_NAME_PROPERTY), handler.readRequiredAttribute(METHOD_SHORT_NAME_PROPERTY), bci);
+ return method;
+ }
+ //
+ private HandoverElementHandler bytecodesHandler = new XMLParser.HandoverElementHandler(BYTECODES_ELEMENT, true) {
+
+ @Override
+ protected void end(String text) throws SAXException {
+ getParentObject().setBytecodes(text);
+ }
+ };
+ //
+ private HandoverElementHandler inlinedHandler = new XMLParser.HandoverElementHandler(INLINE_ELEMENT);
+ //
+ private ElementHandler inlinedMethodHandler = new XMLParser.ElementHandler(METHOD_ELEMENT) {
+
+ @Override
+ protected InputMethod start() throws SAXException {
+ InputMethod method = parseMethod(this, getParentObject().getGroup());
+ getParentObject().addInlined(method);
+ return method;
+ }
+ };
+ //
+ private ElementHandler graphHandler = new XMLParser.ElementHandler(GRAPH_ELEMENT) {
+
+ private InputGraph graph;
+
+ @Override
+ protected InputGraph start() throws SAXException {
+
+ String name = readAttribute(GRAPH_NAME_PROPERTY);
+ InputGraph previous = getParentObject().getLastAdded();
+ if (!difference) {
+ previous = null;
+ }
+ InputGraph curGraph = new InputGraph(getParentObject(), previous, name);
+ getParentObject().addGraph(curGraph);
+ this.graph = curGraph;
+ return curGraph;
+ }
+
+ @Override
+ protected void end(String text) throws SAXException {
+ graph.resolveBlockLinks();
+ }
+ };
+ //
+ private HandoverElementHandler nodesHandler = new HandoverElementHandler(NODES_ELEMENT);
+ //
+ private HandoverElementHandler controlFlowHandler = new HandoverElementHandler(CONTROL_FLOW_ELEMENT);
+ //
+ private ElementHandler blockHandler = new ElementHandler(BLOCK_ELEMENT) {
+
+ @Override
+ protected InputBlock start() throws SAXException {
+ InputGraph graph = getParentObject();
+ String name = readRequiredAttribute(BLOCK_NAME_PROPERTY);
+ InputBlock b = new InputBlock(getParentObject(), name);
+ graph.addBlock(b);
+ return b;
+ }
+ };
+ //
+ private HandoverElementHandler blockNodesHandler = new HandoverElementHandler(NODES_ELEMENT);
+ //
+ private ElementHandler blockNodeHandler = new ElementHandler(NODE_ELEMENT) {
+
+ @Override
+ protected InputBlock start() throws SAXException {
+ String s = readRequiredAttribute(NODE_ID_PROPERTY);
+
+ int id = 0;
+ try {
+ id = Integer.parseInt(s);
+ } catch (NumberFormatException e) {
+ throw new SAXException(e);
+ }
+ getParentObject().addNode(id);
+ return getParentObject();
+ }
+ };
+ //
+ private HandoverElementHandler successorsHandler = new HandoverElementHandler(SUCCESSORS_ELEMENT);
+ //
+ private ElementHandler successorHandler = new ElementHandler(SUCCESSOR_ELEMENT) {
+
+ @Override
+ protected InputBlock start() throws SAXException {
+ String name = readRequiredAttribute(BLOCK_NAME_PROPERTY);
+ getParentObject().addSuccessor(name);
+ return getParentObject();
+ }
+ };
+ //
+ private ElementHandler nodeHandler = new ElementHandler(NODE_ELEMENT) {
+
+ @Override
+ protected InputNode start() throws SAXException {
+ String s = readRequiredAttribute(NODE_ID_PROPERTY);
+ int id = 0;
+ try {
+ id = Integer.parseInt(s);
+ } catch (NumberFormatException e) {
+ throw new SAXException(e);
+ }
+ InputNode node = new InputNode(id);
+ getParentObject().addNode(node);
+ return node;
+ }
+ };
+ //
+ private ElementHandler removeNodeHandler = new ElementHandler(REMOVE_NODE_ELEMENT) {
+
+ @Override
+ protected InputNode start() throws SAXException {
+ String s = readRequiredAttribute(NODE_ID_PROPERTY);
+ int id = 0;
+ try {
+ id = Integer.parseInt(s);
+ } catch (NumberFormatException e) {
+ throw new SAXException(e);
+ }
+ return getParentObject().removeNode(id);
+ }
+ };
+ //
+ private HandoverElementHandler edgesHandler = new HandoverElementHandler(EDGES_ELEMENT);
+
+ // Local class for edge elements
+ private static class EdgeElementHandler extends ElementHandler {
+
+ public EdgeElementHandler(String name) {
+ super(name);
+ }
+
+ @Override
+ protected InputEdge start() throws SAXException {
+ int toIndex = 0;
+ int from = -1;
+ int to = -1;
+
+ try {
+ String toIndexString = readAttribute(TO_INDEX_PROPERTY);
+ if (toIndexString != null) {
+ toIndex = Integer.parseInt(toIndexString);
+ }
+
+ from = Integer.parseInt(readRequiredAttribute(FROM_PROPERTY));
+ to = Integer.parseInt(readRequiredAttribute(TO_PROPERTY));
+ } catch (NumberFormatException e) {
+ throw new SAXException(e);
+ }
+
+
+ InputEdge conn = new InputEdge((char) toIndex, from, to);
+ return start(conn);
+ }
+
+ protected InputEdge start(InputEdge conn) throws SAXException {
+ return conn;
+ }
+ }
+ //
+ private EdgeElementHandler edgeHandler = new EdgeElementHandler(EDGE_ELEMENT) {
+
+ @Override
+ protected InputEdge start(InputEdge conn) throws SAXException {
+ getParentObject().addEdge(conn);
+ return conn;
+ }
+ };
+ //
+ private EdgeElementHandler removeEdgeHandler = new EdgeElementHandler(REMOVE_EDGE_ELEMENT) {
+
+ @Override
+ protected InputEdge start(InputEdge conn) throws SAXException {
+ getParentObject().removeEdge(conn);
+ return conn;
+ }
+ };
+ //
+ private HandoverElementHandler propertiesHandler = new HandoverElementHandler(PROPERTIES_ELEMENT);
+ //
+ private HandoverElementHandler groupPropertiesHandler = new HandoverElementHandler(PROPERTIES_ELEMENT) {
+
+ @Override
+ public void end(String text) throws SAXException {
+ if (groupCallback != null) {
+ groupCallback.started(getParentObject());
+ }
+ }
+ };
+ //
+ private ElementHandler propertyHandler = new XMLParser.ElementHandler(PROPERTY_ELEMENT, true) {
+
+ @Override
+ public Property start() throws SAXException {
+ String value = "";
+ String name = readRequiredAttribute(PROPERTY_NAME_PROPERTY).intern();
+ return getParentObject().getProperties().setProperty(name, value);
+ }
+
+ @Override
+ public void end(String text) {
+ getObject().setValue(text.trim().intern());
+ }
+ };
+
+ public Parser() {
+ this(null);
+ }
+
+ public Parser(GroupCallback groupCallback) {
+
+ this.groupCallback = groupCallback;
+
+ // Initialize dependencies
+ xmlDocument.addChild(topHandler);
+ topHandler.addChild(groupHandler);
+
+ groupHandler.addChild(methodHandler);
+ groupHandler.addChild(assemblyHandler);
+ groupHandler.addChild(graphHandler);
+
+ methodHandler.addChild(inlinedHandler);
+ methodHandler.addChild(bytecodesHandler);
+
+ inlinedHandler.addChild(inlinedMethodHandler);
+ inlinedMethodHandler.addChild(bytecodesHandler);
+ inlinedMethodHandler.addChild(inlinedHandler);
+
+ graphHandler.addChild(nodesHandler);
+ graphHandler.addChild(edgesHandler);
+ graphHandler.addChild(controlFlowHandler);
+
+ controlFlowHandler.addChild(blockHandler);
+
+ blockHandler.addChild(successorsHandler);
+ successorsHandler.addChild(successorHandler);
+ blockHandler.addChild(blockNodesHandler);
+ blockNodesHandler.addChild(blockNodeHandler);
+
+ nodesHandler.addChild(nodeHandler);
+ nodesHandler.addChild(removeNodeHandler);
+ edgesHandler.addChild(edgeHandler);
+ edgesHandler.addChild(removeEdgeHandler);
+
+ methodHandler.addChild(propertiesHandler);
+ inlinedMethodHandler.addChild(propertiesHandler);
+ topHandler.addChild(propertiesHandler);
+ groupHandler.addChild(groupPropertiesHandler);
+ graphHandler.addChild(propertiesHandler);
+ nodeHandler.addChild(propertiesHandler);
+ propertiesHandler.addChild(propertyHandler);
+ groupPropertiesHandler.addChild(propertyHandler);
+ }
+
+ // Returns a new GraphDocument object deserialized from an XML input source.
+ public GraphDocument parse(XMLReader reader, InputSource source, XMLParser.ParseMonitor monitor) throws SAXException {
+ reader.setContentHandler(new XMLParser(xmlDocument, monitor));
+ try {
+ reader.parse(source);
+ } catch (IOException ex) {
+ throw new SAXException(ex);
+ }
+
+ return topHandler.getObject();
+ }
+}
diff --git a/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/Printer.java b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/Printer.java
new file mode 100644
index 00000000000..c5b794fce2f
--- /dev/null
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/Printer.java
@@ -0,0 +1,217 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+package com.sun.hotspot.igv.data.serialization;
+
+import com.sun.hotspot.igv.data.GraphDocument;
+import com.sun.hotspot.igv.data.Group;
+import com.sun.hotspot.igv.data.InputBlock;
+import com.sun.hotspot.igv.data.InputBytecode;
+import com.sun.hotspot.igv.data.InputEdge;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.InputMethod;
+import com.sun.hotspot.igv.data.InputNode;
+import com.sun.hotspot.igv.data.Properties;
+import com.sun.hotspot.igv.data.Property;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class Printer {
+
+ public void export(Writer writer, GraphDocument document) {
+
+ XMLWriter xmlWriter = new XMLWriter(writer);
+
+ try {
+ export(xmlWriter, document);
+ } catch (IOException ex) {
+ }
+ }
+
+ private void export(XMLWriter xmlWriter, GraphDocument document) throws IOException {
+ xmlWriter.startTag(Parser.ROOT_ELEMENT);
+ xmlWriter.writeProperties(document.getProperties());
+ for (Group g : document.getGroups()) {
+ export(xmlWriter, g);
+ }
+
+ xmlWriter.endTag();
+ xmlWriter.flush();
+ }
+
+ private void export(XMLWriter writer, Group g) throws IOException {
+ Properties attributes = new Properties();
+ attributes.add(new Property("difference", Boolean.toString(true)));
+ writer.startTag(Parser.GROUP_ELEMENT, attributes);
+ writer.writeProperties(g.getProperties());
+
+ if (g.getMethod() != null) {
+ export(writer, g.getMethod());
+ }
+
+ InputGraph previous = null;
+ for (InputGraph graph : g.getGraphs()) {
+ export(writer, graph, previous, true);
+ previous = graph;
+ }
+
+ writer.endTag();
+ }
+
+ public void export(XMLWriter writer, InputGraph graph, InputGraph previous, boolean difference) throws IOException {
+
+ writer.startTag(Parser.GRAPH_ELEMENT);
+ writer.writeProperties(graph.getProperties());
+ writer.startTag(Parser.NODES_ELEMENT);
+
+ Set removed = new HashSet();
+ Set equal = new HashSet();
+
+ if (previous != null) {
+ for (InputNode n : previous.getNodes()) {
+ int id = n.getId();
+ InputNode n2 = graph.getNode(id);
+ if (n2 == null) {
+ removed.add(n);
+ } else if (n.equals(n2)) {
+ equal.add(n);
+ }
+ }
+ }
+
+ if (difference) {
+ for (InputNode n : removed) {
+ writer.simpleTag(Parser.REMOVE_NODE_ELEMENT, new Properties(Parser.NODE_ID_PROPERTY, Integer.toString(n.getId())));
+ }
+ }
+
+ for (InputNode n : graph.getNodes()) {
+ if (!difference || !equal.contains(n)) {
+ writer.startTag(Parser.NODE_ELEMENT, new Properties(Parser.NODE_ID_PROPERTY, Integer.toString(n.getId())));
+ writer.writeProperties(n.getProperties());
+ writer.endTag();
+ }
+ }
+
+ writer.endTag();
+
+ writer.startTag(Parser.EDGES_ELEMENT);
+ Set removedEdges = new HashSet();
+ Set