8204654: [testbug] Fix pattern matching in jstat tests.
authorgoetz
Thu, 14 Jun 2018 14:32:03 +0200
changeset 50580 eb0287b637bd
parent 50579 1596f418ffe4
child 50581 0cc4711c2112
8204654: [testbug] Fix pattern matching in jstat tests. Reviewed-by: clanger, stuefe
test/jdk/sun/jvmstat/testlibrary/utils.sh
test/jdk/sun/tools/jstat/classloadOutput1.awk
test/jdk/sun/tools/jstat/gcCauseOutput1.awk
test/jdk/sun/tools/jstat/jstatClassOutput1.sh
test/jdk/sun/tools/jstat/jstatClassloadOutput1.sh
test/jdk/sun/tools/jstat/jstatCompilerOutput1.sh
test/jdk/sun/tools/jstat/jstatFileURITest1.sh
test/jdk/sun/tools/jstat/jstatGcCapacityOutput1.sh
test/jdk/sun/tools/jstat/jstatGcCauseOutput1.sh
test/jdk/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh
test/jdk/sun/tools/jstat/jstatGcNewCapacityOutput1.sh
test/jdk/sun/tools/jstat/jstatGcNewOutput1.sh
test/jdk/sun/tools/jstat/jstatGcOldCapacityOutput1.sh
test/jdk/sun/tools/jstat/jstatGcOldOutput1.sh
test/jdk/sun/tools/jstat/jstatGcOutput1.sh
test/jdk/sun/tools/jstat/jstatLineCounts1.sh
test/jdk/sun/tools/jstat/jstatLineCounts2.sh
test/jdk/sun/tools/jstat/jstatLineCounts3.sh
test/jdk/sun/tools/jstat/jstatLineCounts4.sh
test/jdk/sun/tools/jstat/jstatOptions1.sh
test/jdk/sun/tools/jstat/jstatPrintCompilationOutput1.sh
test/jdk/sun/tools/jstat/jstatSnap1.sh
test/jdk/sun/tools/jstat/jstatSnap2.sh
test/jdk/sun/tools/jstat/jstatTimeStamp1.sh
test/jdk/sun/tools/jstat/timeStamp1.awk
--- a/test/jdk/sun/jvmstat/testlibrary/utils.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/jvmstat/testlibrary/utils.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -221,3 +221,10 @@
   fi
   echo "${port1}"
 }
+
+# Flags used by all jstat calls in jdk/sun/tools/jstat/*.sh
+#
+# The awk scripts parsing jstat output expect it to be in en-us locale. 
+# Especially, we must force '.' instead of ',' in numbers.
+COMMON_JSTAT_FLAGS="-J-XX:+UsePerfData -J-Duser.language=en -J-Duser.country=en"
+
--- a/test/jdk/sun/tools/jstat/classloadOutput1.awk	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/classloadOutput1.awk	Thu Jun 14 14:32:03 2018 +0200
@@ -5,6 +5,7 @@
 #
 # Loaded       Time Inited       Time Shared  Kbytes   LoadTime SysClass  Kbytes   LoadTime     Lookup      Parse Linked       Time Verified       Time AppClass  Kbytes      AppCL DefineClass       Time FindClass       Time Delegation URLCL Read
 #    956      0.115    777      0.032      0     0.0      0.000      956  3437.5      0.085      0.013      0.045    918      0.032      917      0.011       13     1.0      0.003           1      0.000         1      0.004      0.005      0.000
+#    941      0.214    870      0.080      0     0.0      0.000     1014  4331.2      0.127      0.000      0.000    941      0.080       77      0.005      165   249.1      0.044          97      0.035         -          -          -          -
 #
 
 BEGIN	{
@@ -15,7 +16,7 @@
 	    headerlines++;
 	}
 
-/^[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9][ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9][ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9][ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ {
+/^[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9][ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9][ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9][ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+|-[ ]*([0-9]+\.[0-9]+)|-[ ]*([0-9]+\.[0-9]+)|-[ ]*([0-9]+\.[0-9]+)|-$/ {
 	    datalines++;
 	}
 
--- a/test/jdk/sun/tools/jstat/gcCauseOutput1.awk	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/gcCauseOutput1.awk	Thu Jun 14 14:32:03 2018 +0200
@@ -4,7 +4,8 @@
 # specific values.
 #
 #  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     CGC    CGCT     GCT    LGCC                 GCC
-#  0.00   0.00   0.00   9.97  90.94  87.70      2    0.013     0    0.000     0    0.000    0.013 Allocation Failure   No GC
+#  0.00   0.00   0.00   9.97  90.94  87.70      2    0.013     0    0.000     0    0.000    0.013 Allocation Failure   No GC      
+#  0.00   0.00  82.15   0.00      -      -      0    0.000     0    0.000     -        -    0.000 No GC                No GC         
 
 
 BEGIN	{
@@ -23,7 +24,7 @@
 # or more letters and spaces. It also provides for the ".", "(", and ")"
 # characters to allow for the string "System.gc()".
 #
-/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*$/	{
+/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+)|-[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+\.[0-9]+[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*$/	{
 	    datalines++;
 	}
 
--- a/test/jdk/sun/tools/jstat/jstatClassOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatClassOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
-#
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -class 0 2>&1 | awk -f ${TESTSRC}/classOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -class 0 2>&1 | awk -f ${TESTSRC}/classOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatClassloadOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatClassloadOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -classload -J-Djstat.showUnsupported=true 0 2>&1 | awk -f ${TESTSRC}/classloadOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -classload -J-Djstat.showUnsupported=true 0 2>&1 | awk -f ${TESTSRC}/classloadOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatCompilerOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatCompilerOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -compiler 0 2>&1 | awk -f ${TESTSRC}/compilerOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -compiler 0 2>&1 | awk -f ${TESTSRC}/compilerOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatFileURITest1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatFileURITest1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -40,12 +40,12 @@
     # characters into forward slash characters in an effort to convert
     # TESTSRC into a canonical form useable as URI path.
     cp ${TESTSRC}/hsperfdata_3433 .
-    ${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil file:/`pwd`/hsperfdata_3433 2>&1 | awk -f ${TESTSRC}/fileURITest1.awk
+    ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil file:/`pwd`/hsperfdata_3433 2>&1 | awk -f ${TESTSRC}/fileURITest1.awk
     RC=$?
     rm -f hsperfdata_3433 2>&1 > /dev/null
     ;;
 *)
-    ${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil file:${TESTSRC}/hsperfdata_3433 2>&1 | awk -f ${TESTSRC}/fileURITest1.awk
+    ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil file:${TESTSRC}/hsperfdata_3433 2>&1 | awk -f ${TESTSRC}/fileURITest1.awk
     RC=$?
     ;;
 esac
--- a/test/jdk/sun/tools/jstat/jstatGcCapacityOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatGcCapacityOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gccapacity 0 2>&1 | awk -f ${TESTSRC}/gcCapacityOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gccapacity 0 2>&1 | awk -f ${TESTSRC}/gcCapacityOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatGcCauseOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatGcCauseOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -37,4 +37,4 @@
 # class machine, ergonomics will automatically use UseParallelGC.
 # The UseParallelGC collector does not currently update the gc cause counters.
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -J-XX:+UseSerialGC -gccause 0 2>&1 | awk -f ${TESTSRC}/gcCauseOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseSerialGC -gccause 0 2>&1 | awk -f ${TESTSRC}/gcCauseOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcmetacapacity 0 2>&1 | awk -f ${TESTSRC}/gcMetaCapacityOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcmetacapacity 0 2>&1 | awk -f ${TESTSRC}/gcMetaCapacityOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatGcNewCapacityOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatGcNewCapacityOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcnewcapacity 0 2>&1 | awk -f ${TESTSRC}/gcNewCapacityOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcnewcapacity 0 2>&1 | awk -f ${TESTSRC}/gcNewCapacityOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatGcNewOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatGcNewOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcnew 0 2>&1 | awk -f ${TESTSRC}/gcNewOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcnew 0 2>&1 | awk -f ${TESTSRC}/gcNewOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatGcOldCapacityOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatGcOldCapacityOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcoldcapacity 0 2>&1 | awk -f ${TESTSRC}/gcOldCapacityOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcoldcapacity 0 2>&1 | awk -f ${TESTSRC}/gcOldCapacityOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatGcOldOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatGcOldOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcold 0 2>&1 | awk -f ${TESTSRC}/gcOldOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcold 0 2>&1 | awk -f ${TESTSRC}/gcOldOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatGcOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatGcOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gc 0 2>&1 | awk -f ${TESTSRC}/gcOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gc 0 2>&1 | awk -f ${TESTSRC}/gcOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatLineCounts1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatLineCounts1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil 0 250 5 2>&1 | awk -f ${TESTSRC}/lineCounts1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil 0 250 5 2>&1 | awk -f ${TESTSRC}/lineCounts1.awk
--- a/test/jdk/sun/tools/jstat/jstatLineCounts2.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatLineCounts2.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil 0 2>&1 | awk -f ${TESTSRC}/lineCounts2.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil 0 2>&1 | awk -f ${TESTSRC}/lineCounts2.awk
--- a/test/jdk/sun/tools/jstat/jstatLineCounts3.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatLineCounts3.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil -h 10 0 250 10 2>&1 | awk -f ${TESTSRC}/lineCounts3.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil -h 10 0 250 10 2>&1 | awk -f ${TESTSRC}/lineCounts3.awk
--- a/test/jdk/sun/tools/jstat/jstatLineCounts4.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatLineCounts4.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil -h 10 0 250 11 2>&1 | awk -f ${TESTSRC}/lineCounts4.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil -h 10 0 250 11 2>&1 | awk -f ${TESTSRC}/lineCounts4.awk
--- a/test/jdk/sun/tools/jstat/jstatOptions1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatOptions1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
 JSTAT="${TESTJAVA}/bin/jstat"
 
 rm -f jstat.out1 jstat.out2 2>/dev/null
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -options > jstat.out1 2>&1
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -options -J-Djstat.showUnsupported=true > jstat.out2 2>&1
+${JSTAT} ${COMMON_JSTAT_FLAGS} -options > jstat.out1 2>&1
+${JSTAT} ${COMMON_JSTAT_FLAGS} -options -J-Djstat.showUnsupported=true > jstat.out2 2>&1
 
 diff -w jstat.out1 ${TESTSRC}/options1.out
 diff -w jstat.out2 ${TESTSRC}/options2.out
--- a/test/jdk/sun/tools/jstat/jstatPrintCompilationOutput1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatPrintCompilationOutput1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -35,4 +35,4 @@
 
 # run with -Xcomp as jstat may complete too quickly to assure
 # that compilation occurs.
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -J-Xcomp -printcompilation 0 2>&1 | awk -f ${TESTSRC}/printCompilationOutput1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -J-Xcomp -printcompilation 0 2>&1 | awk -f ${TESTSRC}/printCompilationOutput1.awk
--- a/test/jdk/sun/tools/jstat/jstatSnap1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatSnap1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -snap 0 2>&1 | awk -f ${TESTSRC}/snap1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -snap 0 2>&1 | awk -f ${TESTSRC}/snap1.awk
--- a/test/jdk/sun/tools/jstat/jstatSnap2.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatSnap2.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -J-Djstat.showUnsupported=true -snap 0 2>&1 | awk -f ${TESTSRC}/snap2.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -J-Djstat.showUnsupported=true -snap 0 2>&1 | awk -f ${TESTSRC}/snap2.awk
--- a/test/jdk/sun/tools/jstat/jstatTimeStamp1.sh	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/jstatTimeStamp1.sh	Thu Jun 14 14:32:03 2018 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -33,4 +33,4 @@
 
 JSTAT="${TESTJAVA}/bin/jstat"
 
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil -t 0 2>&1 | awk -f ${TESTSRC}/timeStamp1.awk
+${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil -t 0 2>&1 | awk -f ${TESTSRC}/timeStamp1.awk
--- a/test/jdk/sun/tools/jstat/timeStamp1.awk	Fri Jun 15 02:31:37 2018 -0700
+++ b/test/jdk/sun/tools/jstat/timeStamp1.awk	Thu Jun 14 14:32:03 2018 +0200
@@ -5,6 +5,7 @@
 #
 #Timestamp         S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT    CGC    CGCT     GCT
 #            0.3   0.00 100.00  68.74   1.95  77.73  68.02      1    0.004     0    0.000     0    0.000    0.004
+#            0.3   0.00   0.00  37.50   0.00      -      -      0    0.000     0    0.000     0    0.000    0.000
 
 BEGIN	{
 	    headerlines=0; datalines=0; totallines=0
@@ -14,7 +15,7 @@
 	    headerlines++;
 	}
 
-/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/	{
+/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/	{
 	    datalines++;
 	}