RFR: JDK-8221694: jstatLineCounts1 needs to be NaN resilient

Gary Adams gary.adams at oracle.com
Fri Mar 29 18:12:01 UTC 2019


With additional testing of jdk/sun/tools The problem seen previously with
lineCounts3 and lineCounts4 has begun to appear in lineCounts1. To complete
the set this changset will also invlude the same fix for lineCounts2.
e.g. allow floating point or NaN dash ("-") in the metaspace column
      ([0-9]+\.[0-9]+|-)

   Issue: https://bugs.openjdk.java.net/browse/JDK-8221694



diff --git a/test/jdk/sun/tools/jstat/lineCounts1.awk 
b/test/jdk/sun/tools/jstat/lineCounts1.awk
--- a/test/jdk/sun/tools/jstat/lineCounts1.awk
+++ b/test/jdk/sun/tools/jstat/lineCounts1.awk
@@ -18,7 +18,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]+$/    {
          datalines++;
      }

diff --git a/test/jdk/sun/tools/jstat/lineCounts2.awk 
b/test/jdk/sun/tools/jstat/lineCounts2.awk
--- a/test/jdk/sun/tools/jstat/lineCounts2.awk
+++ b/test/jdk/sun/tools/jstat/lineCounts2.awk
@@ -14,7 +14,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]+$/    {
          datalines++;
      }


More information about the serviceability-dev mailing list