--- old/src/share/classes/sun/tools/jstat/resources/jstat_options 2013-01-28 15:04:37.977618713 +0100 +++ new/src/share/classes/sun/tools/jstat/resources/jstat_options 2013-01-28 15:04:37.821618718 +0100 @@ -192,16 +192,16 @@ format "0.0" } column { - header "^PC^" /* Perm Space Capacity - Current */ - data sun.gc.generation.2.space.0.capacity + header "^MC^" /* Metaspace Capacity - Current */ + data sun.rt.metaspace.capacity align center width 6 scale K format "0.0" } column { - header "^PU^" /* Perm Space Used */ - data sun.gc.generation.2.space.0.used + header "^MU^" /* Metaspae Used */ + data sun.rt.metaspace.used align center width 6 scale K @@ -330,32 +330,24 @@ format "0.0" } column { - header "^PGCMN^" /* Perm Generation Capacity - Minimum */ - data sun.gc.generation.2.minCapacity + header "^MCMN^" /* Metaspace Capacity - Minimum */ + data sun.rt.metaspace.minCapacity scale K align right width 8 format "0.0" } column { - header "^PGCMX^" /* Perm Generation Capacity - Maximum */ - data sun.gc.generation.2.maxCapacity + header "^MCMX^" /* Metaspace Capacity - Maximum */ + data sun.rt.metaspace.maxCapacity scale K align right width 8 format "0.0" } column { - header "^PGC^" /* Perm Generation Capacity - Current */ - data sun.gc.generation.2.capacity - scale K - align right - width 8 - format "0.0" - } - column { - header "^PC^" /* Perm Space Capacity - Current */ - data sun.gc.generation.2.space.0.capacity + header "^MC^" /* Metaspace Capacity - Current */ + data sun.rt.metaspace.capacity scale K align right width 8 @@ -412,8 +404,8 @@ format "0.00" } column { - header "^P^" /* Perm Space - Percent Used */ - data (1-((sun.gc.generation.2.space.0.capacity - sun.gc.generation.2.space.0.used)/sun.gc.generation.2.space.0.capacity)) * 100 + header "^M^" /* Metaspace - Percent Used */ + data (1-((sun.rt.metaspace.capacity - sun.rt.metaspace.used)/sun.rt.metaspace.capacity)) * 100 align right width 6 scale raw @@ -654,16 +646,16 @@ option gcold { column { - header "^PC^" /* Perm Space Capacity - Current */ - data sun.gc.generation.2.space.0.capacity + header "^MC^" /* Metaspace Capacity - Current */ + data sun.rt.metaspace.capacity width 8 align right scale K format "0.0" } column { - header "^PU^" /* Perm Space Used */ - data sun.gc.generation.2.space.0.used + header "^MU^" /* Metaspace Space Used */ + data sun.rt.metaspace.used width 8 align right scale K @@ -784,34 +776,26 @@ } } -option gcpermcapacity { - column { - header "^PGCMN^" /* Perm Generation Capacity - Minumum */ - data sun.gc.generation.2.minCapacity - scale K - align right - width 10 - format "0.0" - } +option gcmetacapacity { column { - header "^PGCMX^" /* Perm Generation Capacity - Maximum */ - data sun.gc.generation.2.maxCapacity + header "^MCMN^" /* Metaspace Capacity - Minimum */ + data sun.rt.metaspace.minCapacity scale K align right width 10 format "0.0" } column { - header "^PGC^" /* Perm Generation Capacity - Current */ - data sun.gc.generation.2.capacity + header "^MCMX^" /* Metaspace Capacity - Maximum */ + data sun.rt.metaspace.maxCapacity scale K align right width 10 format "0.0" } column { - header "^PC^" /* Perm Space Capacity - Current */ - data sun.gc.generation.2.space.0.capacity + header "^MC^" /* Metaspace Capacity - Current */ + data sun.rt.metaspace.capacity scale K align right width 10 @@ -884,8 +868,8 @@ format "0.00" } column { - header "^P^" /* Perm Space - Percent Used */ - data (1-((sun.gc.generation.2.space.0.capacity - sun.gc.generation.2.space.0.used)/sun.gc.generation.2.space.0.capacity)) * 100 + header "^M^" /* Metaspace Space - Percent Used */ + data (1-((sun.rt.metaspace.capacity - sun.rt.metaspace.used)/sun.rt.metaspace.capacity)) * 100 align right width 6 scale raw --- old/test/sun/tools/jstat/gcCapacityOutput1.awk 2013-01-28 15:04:38.489618699 +0100 +++ new/test/sun/tools/jstat/gcCapacityOutput1.awk 2013-01-28 15:04:38.329618703 +0100 @@ -3,7 +3,7 @@ # that the numerical values conform to a specific pattern, rather than # specific values. # -# NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC PGCMN PGCMX PGC PC YGC FGC +# NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC MCMN MCMX MC YGC FGC # 2176.0 7232.0 2176.0 64.0 64.0 2048.0 6016.0 58304.0 6016.0 6016.0 8192.0 65536.0 8192.0 8192.0 0 0 @@ -11,11 +11,11 @@ headerlines=0; datalines=0; totallines=0 } -/^ NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC PGCMN PGCMX PGC PC YGC FGC $/ { +/^ NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC MCMN MCMX MC YGC FGC $/ { 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]+$/ { datalines++; } --- old/test/sun/tools/jstat/gcCauseOutput1.awk 2013-01-28 15:04:38.961618686 +0100 +++ new/test/sun/tools/jstat/gcCauseOutput1.awk 2013-01-28 15:04:38.797618690 +0100 @@ -11,7 +11,7 @@ headerlines=0; datalines=0; totallines=0 } -/^ S0 S1 E O P YGC YGCT FGC FGCT GCT LGCC GCC $/ { +/^ S0 S1 E O M YGC YGCT FGC FGCT GCT LGCC GCC $/ { headerlines++; } --- old/test/sun/tools/jstat/gcOldOutput1.awk 2013-01-28 15:04:39.413618671 +0100 +++ new/test/sun/tools/jstat/gcOldOutput1.awk 2013-01-28 15:04:39.257618676 +0100 @@ -3,7 +3,7 @@ # that the numerical values conform to a specific pattern, rather than # specific values. # -# PC PU OC OU YGC FGC FGCT GCT +# MC MU OC OU YGC FGC FGCT GCT # 8192.0 1877.3 6016.0 180.8 1 0 0.000 0.030 @@ -11,7 +11,7 @@ headerlines=0; datalines=0; totallines=0 } -/^ PC PU OC OU YGC FGC FGCT GCT $/ { +/^ MC MU OC OU YGC FGC FGCT GCT $/ { headerlines++; } --- old/test/sun/tools/jstat/gcOutput1.awk 2013-01-28 15:04:39.877618659 +0100 +++ new/test/sun/tools/jstat/gcOutput1.awk 2013-01-28 15:04:39.725618662 +0100 @@ -3,7 +3,7 @@ # that the numerical values conform to a specific pattern, rather than # specific values. # -# S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT +# S0C S1C S0U S1U EC EU OC OU MC MU YGC YGCT FGC FGCT GCT # 64.0 64.0 0.0 0.0 2048.0 1711.2 6016.0 0.0 8192.0 1948.6 0 0.000 0 0.000 0.000 @@ -11,7 +11,7 @@ headerlines=0; datalines=0; totallines=0 } -/^ S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT $/ { +/^ S0C S1C S0U S1U EC EU OC OU MC MU YGC YGCT FGC FGCT GCT $/ { headerlines++; } --- old/test/sun/tools/jstat/lineCounts1.awk 2013-01-28 15:04:40.329618646 +0100 +++ new/test/sun/tools/jstat/lineCounts1.awk 2013-01-28 15:04:40.173618649 +0100 @@ -3,7 +3,7 @@ # that the numerical values conform to a specific pattern, rather than # specific values. # -# S0 S1 E O P YGC YGCT FGC FGCT GCT +# S0 S1 E O M YGC YGCT FGC FGCT GCT # 0.00 100.00 68.87 1.24 27.75 1 0.044 0 0.000 0.044 # 0.00 100.00 68.87 1.24 27.84 1 0.044 0 0.000 0.044 # 0.00 100.00 68.87 1.24 27.84 1 0.044 0 0.000 0.044 @@ -14,7 +14,7 @@ headerlines=0; datalines=0; totallines=0 } -/^ S0 S1 E O P YGC YGCT FGC FGCT GCT $/ { +/^ S0 S1 E O M YGC YGCT FGC FGCT GCT $/ { headerlines++; } --- old/test/sun/tools/jstat/lineCounts2.awk 2013-01-28 15:04:40.809618632 +0100 +++ new/test/sun/tools/jstat/lineCounts2.awk 2013-01-28 15:04:40.645618635 +0100 @@ -3,14 +3,14 @@ # that the numerical values conform to a specific pattern, rather than # specific values. # -# S0 S1 E O P YGC YGCT FGC FGCT GCT +# S0 S1 E O M YGC YGCT FGC FGCT GCT # 0.00 100.00 68.87 1.24 27.75 1 0.044 0 0.000 0.044 BEGIN { headerlines=0; datalines=0; totallines=0 } -/^ S0 S1 E O P YGC YGCT FGC FGCT GCT $/ { +/^ S0 S1 E O M YGC YGCT FGC FGCT GCT $/ { headerlines++; } --- old/test/sun/tools/jstat/lineCounts3.awk 2013-01-28 15:04:41.253618619 +0100 +++ new/test/sun/tools/jstat/lineCounts3.awk 2013-01-28 15:04:41.097618622 +0100 @@ -3,7 +3,7 @@ # that the numerical values conform to a specific pattern, rather than # specific values. # -# S0 S1 E O P YGC YGCT FGC FGCT GCT +# S0 S1 E O M YGC YGCT FGC FGCT GCT # 0.00 99.99 66.81 1.24 26.55 1 0.028 0 0.000 0.028 # 0.00 99.99 68.81 1.24 27.84 1 0.028 0 0.000 0.028 # 0.00 99.99 70.81 1.24 27.84 1 0.028 0 0.000 0.028 @@ -19,7 +19,7 @@ headerlines=0; datalines=0; totallines=0 } -/^ S0 S1 E O P YGC YGCT FGC FGCT GCT $/ { +/^ S0 S1 E O M YGC YGCT FGC FGCT GCT $/ { headerlines++; } --- old/test/sun/tools/jstat/lineCounts4.awk 2013-01-28 15:04:41.689618606 +0100 +++ new/test/sun/tools/jstat/lineCounts4.awk 2013-01-28 15:04:41.537618609 +0100 @@ -3,7 +3,7 @@ # that the numerical values conform to a specific pattern, rather than # specific values. # -# S0 S1 E O P YGC YGCT FGC FGCT GCT +# S0 S1 E O M YGC YGCT FGC FGCT GCT # 0.00 99.99 66.81 1.24 26.55 1 0.028 0 0.000 0.028 # 0.00 99.99 68.81 1.24 27.84 1 0.028 0 0.000 0.028 # 0.00 99.99 70.81 1.24 27.84 1 0.028 0 0.000 0.028 @@ -22,7 +22,7 @@ datalines2=0; } -/^ S0 S1 E O P YGC YGCT FGC FGCT GCT $/ { +/^ S0 S1 E O M YGC YGCT FGC FGCT GCT $/ { headerlines++; } --- old/test/sun/tools/jstat/options1.out 2013-01-28 15:04:42.129618592 +0100 +++ new/test/sun/tools/jstat/options1.out 2013-01-28 15:04:41.973618598 +0100 @@ -3,10 +3,10 @@ -gc -gccapacity -gccause +-gcmetacapacity -gcnew -gcnewcapacity -gcold -gcoldcapacity --gcpermcapacity -gcutil -printcompilation --- old/test/sun/tools/jstat/options2.out 2013-01-28 15:04:42.573618579 +0100 +++ new/test/sun/tools/jstat/options2.out 2013-01-28 15:04:42.417618585 +0100 @@ -4,10 +4,10 @@ -gc -gccapacity -gccause +-gcmetacapacity -gcnew -gcnewcapacity -gcold -gcoldcapacity --gcpermcapacity -gcutil -printcompilation --- old/test/sun/tools/jstat/timeStamp1.awk 2013-01-28 15:04:43.017618566 +0100 +++ new/test/sun/tools/jstat/timeStamp1.awk 2013-01-28 15:04:42.869618570 +0100 @@ -3,14 +3,14 @@ # that the numerical values conform to a specific pattern, rather than # specific values. # -# S0 S1 E O P YGC YGCT FGC FGCT GCT +# S0 S1 E O M YGC YGCT FGC FGCT GCT # 0.00 100.00 68.87 1.24 27.75 1 0.044 0 0.000 0.044 BEGIN { headerlines=0; datalines=0; totallines=0 } -/^Timestamp S0 S1 E O P YGC YGCT FGC FGCT GCT $/ { +/^Timestamp S0 S1 E O M YGC YGCT FGC FGCT GCT $/ { headerlines++; } --- old/test/sun/tools/jstatd/jstatGcutilOutput1.awk 2013-01-28 15:04:43.465618553 +0100 +++ new/test/sun/tools/jstatd/jstatGcutilOutput1.awk 2013-01-28 15:04:43.321618557 +0100 @@ -3,7 +3,7 @@ # that the numerical values conform to a specific pattern, rather than # specific values. # -# S0 S1 E O P YGC YGCT FGC FGCT GCT +# S0 S1 E O M YGC YGCT FGC FGCT GCT # 0.00 100.00 68.87 1.24 27.75 1 0.044 0 0.000 0.044 # 0.00 100.00 68.87 1.24 27.84 1 0.044 0 0.000 0.044 # 0.00 100.00 68.87 1.24 27.84 1 0.044 0 0.000 0.044 @@ -14,7 +14,7 @@ headerlines=0; datalines=0; totallines=0 } -/^ S0 S1 E O P YGC YGCT FGC FGCT GCT $/ { +/^ S0 S1 E O M YGC YGCT FGC FGCT GCT $/ { headerlines++; } --- /dev/null 2013-01-28 09:33:58.546198786 +0100 +++ new/test/sun/tools/jstat/gcMetaCapacityOutput1.awk 2013-01-28 15:04:43.757618544 +0100 @@ -0,0 +1,30 @@ +# +# matching the following output specified as a pattern that verifies +# that the numerical values conform to a specific pattern, rather than +# specific values. +# +# MCMN MCMX MC YGC FGC FGCT GCT +# 8192.0 65536.0 8192.0 8192.0 1 0 0.000 0.029 + +BEGIN { + headerlines=0; datalines=0; totallines=0 + } + +/^ MCMN MCMX MC YGC FGC FGCT GCT $/ { + 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]+$/ { + datalines++; + } + + { totallines++; print $0 } + +END { + if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) { + exit 0 + } + else { + exit 1 + } + } --- /dev/null 2013-01-28 09:33:58.546198786 +0100 +++ new/test/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh 2013-01-28 15:04:44.165618533 +0100 @@ -0,0 +1,36 @@ +# +# Copyright (c) 2004, 2012, 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# @test +# @bug 4990825 +# @run shell jstatGcMetaCapacityOutput1.sh +# @summary Test that output of 'jstat -gcmetacapacity 0' has expected line counts + +. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh + +setup +verify_os + +JSTAT="${TESTJAVA}/bin/jstat" + +${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcmetacapacity 0 2>&1 | awk -f ${TESTSRC}/gcMetaCapacityOutput1.awk --- old/test/sun/tools/jstat/gcPermCapacityOutput1.awk 2013-01-28 15:04:44.753618515 +0100 +++ /dev/null 2013-01-28 09:33:58.546198786 +0100 @@ -1,30 +0,0 @@ -# -# matching the following output specified as a pattern that verifies -# that the numerical values conform to a specific pattern, rather than -# specific values. -# -# PGCMN PGCMX PGC PC YGC FGC FGCT GCT -# 8192.0 65536.0 8192.0 8192.0 1 0 0.000 0.029 - -BEGIN { - headerlines=0; datalines=0; totallines=0 - } - -/^ PGCMN PGCMX PGC PC YGC FGC FGCT GCT $/ { - 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]+$/ { - datalines++; - } - - { totallines++; print $0 } - -END { - if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) { - exit 0 - } - else { - exit 1 - } - } --- old/test/sun/tools/jstat/jstatGcPermCapacityOutput1.sh 2013-01-28 15:04:45.065618506 +0100 +++ /dev/null 2013-01-28 09:33:58.546198786 +0100 @@ -1,36 +0,0 @@ -# -# Copyright (c) 2004, 2012, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4990825 -# @run shell jstatGcPermCapacityOutput1.sh -# @summary Test that output of 'jstat -gcpermcapcaity 0' has expected line counts - -. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh - -setup -verify_os - -JSTAT="${TESTJAVA}/bin/jstat" - -${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcpermcapacity 0 2>&1 | awk -f ${TESTSRC}/gcPermCapacityOutput1.awk