RFR (M): 8008772: remove gamma launcher

Christian Thalinger christian.thalinger at oracle.com
Mon May 6 21:26:40 UTC 2013


On May 6, 2013, at 10:34 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:

> I see, you also modified it. Okay I agree with changes.

FTR:

diff --git a/src/os/posix/launcher/launcher.script b/make/hotspot.script
copy from src/os/posix/launcher/launcher.script
copy to make/hotspot.script
--- a/src/os/posix/launcher/launcher.script
+++ b/make/hotspot.script
@@ -72,6 +72,7 @@
 REL_MYDIR=`dirname $0`
 MYDIR=`cd $REL_MYDIR && pwd`
 
+#
 # Look whether the user wants to run inside gdb
 case "$1" in
     -gdb)
@@ -95,16 +96,14 @@
         ;;
 esac
 
-JDK=
-if [ "${ALT_JAVA_HOME}" = "" ]; then
-    . ${MYDIR}/jdkpath.sh
+if [ "${ALT_JAVA_HOME}" != "" ]; then
+    JDK=${ALT_JAVA_HOME%%/jre}
 else
-    JDK=${ALT_JAVA_HOME%%/jre};
+    JDK=@@JDK_IMPORT_PATH@@
 fi
 
 if [ "${JDK}" = "" ]; then
-    echo Failed to find JDK. ALT_JAVA_HOME is not set or ./jdkpath.sh is empty or not found.
-    exit 1
+    echo "Failed to find JDK.  Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty."
 fi
 
 # We will set the LD_LIBRARY_PATH as follows:
@@ -142,12 +141,12 @@
     export LD_LIBRARY_PATH
 fi
 
-JPARMS="$@ $JAVA_ARGS";
+JPARMS="-Dsun.java.launcher=gamma -XXaltjvm=$MYDIR $@ $JAVA_ARGS";
 
-# Locate the gamma development launcher
-LAUNCHER=${MYDIR}/gamma
+# Locate the java launcher
+LAUNCHER=$JDK/bin/java
 if [ ! -x $LAUNCHER ] ; then
-    echo Error: Cannot find the gamma development launcher \"$LAUNCHER\"
+    echo Error: Cannot find the java launcher \"$LAUNCHER\"
     exit 1
 fi
 
@@ -166,9 +165,10 @@
 file $LAUNCHER
 directory $GDBSRCDIR
 # Get us to a point where we can set breakpoints in libjvm.so
-break InitializeJVM
+set breakpoint pending on
+break JNI_CreateJavaVM
 run
-# Stop in InitializeJVM
+# Stop in JNI_CreateJavaVM
 delete 1
 # We can now set breakpoints wherever we like
 EOF
@@ -199,7 +199,7 @@
 	rm -f $GDBSCR
         ;;
     dbx)
-        $DBX -s $HOME/.dbxrc $LAUNCHER $JPARMS
+        $DBX -s $HOME/.dbxrc -c "loadobject -load libjvm.so; stop in JNI_CreateJavaVM; run $JPARMS; delete all" $LAUNCHER
         ;;
     valgrind)
         echo Warning: Defaulting to 16Mb heap to make Valgrind run faster, use -Xmx for larger heap

> 
> Thanks
> Vladimir
> 
> On 5/6/13 10:20 AM, Christian Thalinger wrote:
>> 
>> On May 6, 2013, at 9:50 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>> 
>>> Did you use 'hg rename' to move hotspot.script? We need to preserve history.
>> 
>> hg move, yes.  An hg diff on my machine shows a diff:
>> 
>> cthaling at macbook:~/ws/8008772$ hg di make/hotspot.script
>> diff --git a/src/os/posix/launcher/launcher.script b/make/hotspot.script
>> copy from src/os/posix/launcher/launcher.script
>> copy to make/hotspot.script
>> --- a/src/os/posix/launcher/launcher.script
>> +++ b/make/hotspot.script
>> @@ -72,6 +72,7 @@
>>  REL_MYDIR=`dirname $0`
>>  MYDIR=`cd $REL_MYDIR && pwd`
>> 
>> +#
>>  # Look whether the user wants to run inside gdb
>>  case "$1" in
>>      -gdb)
>> @@ -95,16 +96,14 @@
>> 
>> -- Chris
>> 
>>> 
>>> Thanks,
>>> Vladimir
>>> 
>>> 
>>> On 5/6/13 9:35 AM, Christian Thalinger wrote:
>>>> Last warning!  If nobody speaks up today I'm going to push this later:
>>>> 
>>>> http://cr.openjdk.java.net/~twisti/8008772/
>>>> 
>>>> -- Chris
>>>> 
>>>> On May 2, 2013, at 5:28 PM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
>>>> 
>>>>> 
>>>>> On May 2, 2013, at 5:25 PM, John Rose <john.r.rose at oracle.com> wrote:
>>>>> 
>>>>>> On May 2, 2013, at 4:44 PM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
>>>>>> 
>>>>>>> is anyone using env.{sh,csh}?
>>>>>> 
>>>>>> I'll suggest that the answer is going to be "no".  I think very few people have ever used them.  — John
>>>>> 
>>>>> I think you're right.  Let's remove them with this change then.
>>>>> 
>>>>> -- Chris
>>>> 
>> 




More information about the build-dev mailing list