Skip to content

Commit

Permalink
1. delete option -XX:+SegmentedCodeCache; 2. timeout value set to 720…
Browse files Browse the repository at this point in the history
…0; 3. check the pid exist or not when jcmd command error; 4. manimum value can be zero
  • Loading branch information
sendaoYan committed Sep 14, 2024
1 parent 441c58f commit 9ab8aec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# @build compiler.codecache.stress.UnexpectedDeoptimizationTest
# @build compiler.codecache.stress.UnexpectedDeoptimizationTestLoop
# @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
# @run shell/timeout=36000 CodecacheMemoryCheck.sh
# @run shell/timeout=7200 CodecacheMemoryCheck.sh


# set a few environment variables so that the shell-script can run stand-alone
Expand Down Expand Up @@ -104,16 +104,21 @@ useJcmdPrintMemoryUsage()
do
${TESTJAVA}${FS}bin${FS}jcmd ${pid} VM.native_memory summary &> ${i}-native_memory-summary.log
if [[ 0 -ne $? ]] ; then
if grep -q "Exception" ${i}-native_memory-summary.log ; then
if grep -q "Exception" ${i}-native_memory-summary.log || ! kill -0 ${pid} ; then
#The target java process has been teminated/finished
#java.io.IOException: No such process
#com.sun.tools.attach.AttachNotSupportedException: Unable to parse namespace
#java.io.IOException: Premature EOF
mv ${i}-native_memory-summary.log jcmd-exception.log
break
else
echo "jcmd command execute fail!"
exit 1
if kill -0 $$ ; then
echo "jcmd command execute fail!"
exit 1
else
mv ${i}-native_memory-summary.log jcmd-error.log
break
fi
fi
fi
let i++
Expand Down Expand Up @@ -193,7 +198,7 @@ commonJvmOptions="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteB

rm -rf java.log plot-data
mkdir -p plot-data
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} -XX:+SegmentedCodeCache ${commonJvmOptions} \
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} ${commonJvmOptions} \
-Dtest.src=${TESTSRC} -cp ${TESTCLASSPATH} compiler.codecache.stress.UnexpectedDeoptimizationTestLoop ${loopCount} &> java.log &
pid=$!
ps -ef | grep java | grep UnexpectedDeoptimizationTestLoop &> ps-java.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,15 @@
foreach my $key ( sort @nameArray )
{
print $csvFh "$resultCsv{$key}\n";
my $maxMultiple = ceil($resultMaxValue{$key} / $resultMinValue{$key});
my $quartermultiple = ceil($resultQuarterValue{$key} / $resultMinValue{$key});
print $summaryFh "$key\tmax=$resultMaxValue{$key},index=$resultMaxIndex{$key}\tmin=$resultMinValue{$key},index=$resultMinIndex{$key}\tquarter=$resultQuarterValue{$key}\tmax/min=$maxMultiple\tquarter/mix=$quartermultiple\n";
my $minValue = $resultMinValue{$key};
if( $minValue == 0 )
{
print("$key minimum vaule is $minValue, the minimum value will set to 0.01 to log file.\n");
$minValue = 0.01;
}
my $maxMultiple = ceil($resultMaxValue{$key} / $minValue);
my $quartermultiple = ceil($resultQuarterValue{$key} / $minValue);
print $summaryFh "$key\tmax=$resultMaxValue{$key},index=$resultMaxIndex{$key}\tmin=$minValue,index=$resultMinIndex{$key}\tquarter=$resultQuarterValue{$key}\tmax/min=$maxMultiple\tquarter/mix=$quartermultiple\n";

#write plot data
my @data = split /,/, $resultCsv{$key};
Expand Down

0 comments on commit 9ab8aec

Please sign in to comment.