From 43b0ff27cb26e040747b12e9857a76137deeac99 Mon Sep 17 00:00:00 2001 From: sendaoYan Date: Thu, 12 Sep 2024 11:34:03 +0800 Subject: [PATCH] remove and mkdir plot-data before start test --- .../jtreg/compiler/codecache/stress/CodecacheMemoryCheck.sh | 4 +++- .../compiler/codecache/stress/get-native-memory-usage.pl | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/hotspot/jtreg/compiler/codecache/stress/CodecacheMemoryCheck.sh b/test/hotspot/jtreg/compiler/codecache/stress/CodecacheMemoryCheck.sh index db04c9633e5..bb871ba07f1 100755 --- a/test/hotspot/jtreg/compiler/codecache/stress/CodecacheMemoryCheck.sh +++ b/test/hotspot/jtreg/compiler/codecache/stress/CodecacheMemoryCheck.sh @@ -170,10 +170,12 @@ generatePlotPNG() fi } +set -x commonJvmOptions="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-DeoptimizeRandom \ -XX:CompileCommand=dontinline,compiler.codecache.stress.Helper$TestCase::method -XX:NativeMemoryTracking=summary" -rm -rf java.log +rm -rf java.log plot-data +mkdir -p plot-data ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} -XX:+SegmentedCodeCache ${commonJvmOptions} \ -Dtest.src=${TESTSRC} -cp ${TESTCLASSPATH} compiler.codecache.stress.UnexpectedDeoptimizationTestLoop 40 &> java.log & pid=$! diff --git a/test/hotspot/jtreg/compiler/codecache/stress/get-native-memory-usage.pl b/test/hotspot/jtreg/compiler/codecache/stress/get-native-memory-usage.pl index 36a66bbccce..932a867facf 100755 --- a/test/hotspot/jtreg/compiler/codecache/stress/get-native-memory-usage.pl +++ b/test/hotspot/jtreg/compiler/codecache/stress/get-native-memory-usage.pl @@ -24,7 +24,6 @@ use warnings; use POSIX; use File::Path qw(make_path); -use File::Path qw(remove_tree); my $verbose = 0; die "please input more than 2 jcmd native log files" if( @ARGV < 2 ); @@ -82,11 +81,10 @@ } } -if( -d $plotDataDir ) +if( ! -d $plotDataDir ) { - remove_tree($plotDataDir); + make_path($plotDataDir); } -make_path($plotDataDir); open(my $csvFh, ">native-memory-summary.csv"); open(my $summaryFh, ">native-memory-summary.txt");