test/jdk/sun/tools/jstat/gcCauseOutput1.awk
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 37329 jdk/test/sun/tools/jstat/gcCauseOutput1.awk@1cebe5df8ece
child 49377 ecd91135d645
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# matching the following output specified as a pattern that verifies
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# that the numerical values conform to a specific pattern, rather than
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
# specific values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
#
37329
1cebe5df8ece 8153302: [BACKOUT] STW phases at Concurrent GC should count in PerfCounter
dcubed
parents: 37328
diff changeset
     6
#  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT    LGCC                 GCC                 
1cebe5df8ece 8153302: [BACKOUT] STW phases at Concurrent GC should count in PerfCounter
dcubed
parents: 37328
diff changeset
     7
#  0.00   0.00   0.00   9.97  90.94  87.70      2    0.013     0    0.000    0.013 Allocation Failure   No GC
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
BEGIN	{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
	    headerlines=0; datalines=0; totallines=0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
	}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
37329
1cebe5df8ece 8153302: [BACKOUT] STW phases at Concurrent GC should count in PerfCounter
dcubed
parents: 37328
diff changeset
    14
/^  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT    LGCC                 GCC                 $/	{
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
	    headerlines++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
	}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# The following pattern does not verify the validity of the gc cause
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# string as the values can vary depending on conditions out of our
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
# control. To accomodate this variability, the pattern matcher simply
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# detects that there are two strings that match a specific pattern
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# where the first character is a letter followed by a sequence of zero
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# or more letters and spaces. It also provides for the ".", "(", and ")"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
# characters to allow for the string "System.gc()".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
#
20763
95cf1b4945f4 8025427: jstat tests fails on 32-bit platforms
sla
parents: 20194
diff changeset
    26
/^[ ]*[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 \.\(\)]*$/	{
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
	    datalines++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
	}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
	{ totallines++; print $0 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
END	{
22562
e909d64b8dd8 6545321: [TESTBUG] jstatLineCounts4.sh has to be resilient to unexpected output
sla
parents: 20763
diff changeset
    33
	    if ((headerlines == 1) && (datalines == 1)) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
	        exit 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
	    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
	    else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
	        exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
	    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
	}