2592N/A## @summary test new added flags for gc log rotation 4503N/A## some tests require path to find test source dir 4503N/A## Adding common setup Variables for running shell tests. 2592N/A echo "Test skipped for Windows" 2592N/Apublic class Test implements Runnable 2592N/A private boolean _should_stop = false; 2592N/A public static void main(String[] args) throws Exception { 2592N/A long limit = Long.parseLong(args[0]) * 60L * 1000L; // minutes 2592N/A Thread thr = new Thread(t); 2592N/A long time1 = System.currentTimeMillis(); 2592N/A long time2 = System.currentTimeMillis(); 2592N/A while (time2 - time1 < limit) { 2592N/A Thread.sleep(2000); // 2 seconds 2592N/A time2 = System.currentTimeMillis(); 2592N/A System.out.print("\r... " + (time2 - time1)/1000 + " seconds"); 2592N/A public void set_stop(boolean value) { _should_stop = value; } 2592N/A Vector< byte[] > v = new Vector< byte[] >(cap); 2592N/A byte[] g = new byte[fix_size]; 2592N/A if (cap > 80000) cap = 80000; 2592N/A v = new Vector< byte[] >(cap); 2592N/A# test for 2 minutes, it will complete circulation of gc log rotation 2592N/A#also delete $hotspotlog if it exists 2592N/Aoptions=
"-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=$gclogsize" 2592N/Aecho "Test gc log rotation in same file, wait for $tts minutes ...." 2592N/A# rotation file will be $logfile.0