United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7143766 add ALT_JDK_IMAGE_DIR and improve test_jdk
JDK-7143766 : add ALT_JDK_IMAGE_DIR and improve test_jdk

Details
Type:
Enhancement
Submit Date:
2012-02-08
Status:
Closed
Updated Date:
2012-03-24
Project Name:
JDK
Resolved Date:
2012-03-24
Component:
hotspot
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P5
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23 (b16)

Related Reports
Backport:
Backport:

Sub Tasks

Description
I'd like to add the possibility to specify JDK_IMAGE_DIR via ALT_JDK_IMAGE_DIR.  This is very helpful during development since it's possible to copy a JDK into a specified directory and export different VM builds to the same JDK.  Doing this you don't have to change any paths (or command line arguments) but use the same java command, e.g.:

$ make copy_product_jdk ALT_JDK_IMAGE_DIR=/foo/jdk
$ make jvmg export_debug ALT_EXPORT_DIR=/foo/jdk

And after all your bugs are fixed do a product build, export that and use the same java command:

$ make product export_product ALT_EXPORT_DIR=/foo/jdk

The changes for test_jdk make sure that the right VM is tested.  This might not be the case when you are doing 64-bit builds on Solaris, export the VM and do a test_jdk:

$ make test_jdk LP64=1
INFO: no objcopy cmd found so cannot create .debuginfo files.
/export/twisti/build/hsx/hotspot-comp/hotspot/build/jdk-solaris/bin/java -server -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b24)
Java HotSpot(TM) Server VM (build 23.0-b12, mixed mode)

What you actually want is to run the just-built 64-bit VM, like:

$ make test_jdk LP64=1
INFO: no objcopy cmd found so cannot create .debuginfo files.
/export/twisti/build/hsx/hotspot-comp/hotspot/build/jdk-solaris/bin/java -d64 -server -Xinternalversion
Java HotSpot(TM) 64-Bit Server VM (23.0-b15-internal-jvmg) for solaris-amd64 JRE (1.8.0), built on Feb  8 2012 04:26:02 by "ct232829" with Sun Studio 12u1
/export/twisti/build/hsx/hotspot-comp/hotspot/build/jdk-solaris/bin/java -d64 -server -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b15-internal-jvmg, mixed mode)

I also added printing -Xinternalversion to test_jdk.  This makes it easier to verify the installed VM is the one you just built (and want to test).

                                    

Comments
EVALUATION

See description.
                                     
2012-02-08
PUBLIC COMMENTS

There's no reason to add ALT_JDK_IMAGE_DIR as you can just set JDK_IMAGE_DIR on the make invocation.
                                     
2012-02-08
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/f09ae3853e3b
                                     
2012-02-13
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/f09ae3853e3b
                                     
2012-02-18
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/f09ae3853e3b
                                     
2012-03-22



Hardware and Software, Engineered to Work Together