test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.sh

Print this page

        

*** 30,58 **** # method # # @build DumpHeap # @run shell DumpHeap.sh ! #Set appropriate jdk ! ! if [ ! -z "${TESTJAVA}" ] ; then ! jdk="$TESTJAVA" ! else echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test." exit 1 fi failed=0 # we use the pid of this shell process to name the heap dump output file. DUMPFILE="java_pid$$.hprof" ${TESTJAVA}/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES \ DumpHeap ${DUMPFILE} || exit 2 # check that heap dump is parsable ! ${TESTJAVA}/bin/jhat -parseonly true ${DUMPFILE} if [ $? != 0 ]; then failed=1; fi # dump file is large so remove it rm ${DUMPFILE} --- 30,58 ---- # method # # @build DumpHeap # @run shell DumpHeap.sh ! if [ "${TESTJAVA}" = "" ] ; then echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test." exit 1 fi + if [ "${COMPILEJAVA}" = "" ] ; then + COMPILEJAVA="${TESTJAVA}" + fi + failed=0 # we use the pid of this shell process to name the heap dump output file. DUMPFILE="java_pid$$.hprof" ${TESTJAVA}/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES \ DumpHeap ${DUMPFILE} || exit 2 # check that heap dump is parsable ! ${COMPILEJAVA}/bin/jhat ${TESTTOOLVMOPTS} -parseonly true ${DUMPFILE} if [ $? != 0 ]; then failed=1; fi # dump file is large so remove it rm ${DUMPFILE}