--- old/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java 2016-05-05 13:54:25.879307200 +0900 +++ new/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java 2016-05-05 13:54:25.833307200 +0900 @@ -25,8 +25,8 @@ * Results of running the JstatGcTool ("jstat -gccause ") * * Output example: - * S0 S1 E O M CCS YGC YGCT FGC FGCT GCT LGCC GCC - * 0.00 6.25 46.19 0.34 57.98 54.63 15305 1270.551 0 0.000 1270.551 Allocation Failure No GC + * S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT LGCC GCC + * 0.00 6.25 46.19 0.34 57.98 54.63 15305 1270.551 0 0.000 0 0.000 1270.551 Allocation Failure No GC * Output description: * S0 Survivor space 0 utilization as a percentage of the space's current capacity. @@ -39,6 +39,8 @@ * YGCT Young generation garbage collection time. * FGC Number of full GC events. * FGCT Full garbage collection time. + * CGC Number of STW of Concurrent GC. + * CGCT STW of Concurrent GC time. * GCT Total garbage collection time. * LGCC Cause of last Garbage Collection. * GCC Cause of current Garbage Collection. @@ -73,15 +75,20 @@ int FGC = getIntValue("FGC"); float FGCT = getFloatValue("FGCT"); - assertThat(FGCT >= 0, "Incorrect time value for FGCT"); if (FGC > 0) { assertThat(FGCT > 0, "Number of full GC events is " + FGC + ", but FGCT is 0"); } - assertThat(GCT >= FGCT, "GCT < YGCT (total garbage collection time < full generation garbage collection time)"); + int CGC = getIntValue("CGC"); + float CGCT = getFloatValue("CGCT"); + if (CGC > 0) { + assertThat(CGCT > 0, "Number of full GC events is " + CGC + ", but CGCT is 0"); + } + + assertThat(GCT >= (FGCT + CGCT), "GCT < YGCT (total garbage collection time < full generation garbage collection time)"); - assertThat(checkFloatIsSum(GCT, YGCT, FGCT), "GCT != (YGCT + FGCT) " + "(GCT = " + GCT + ", YGCT = " + YGCT - + ", FGCT = " + FGCT + ", (YCGT + FGCT) = " + (YGCT + FGCT) + ")"); + assertThat(checkFloatIsSum(GCT, YGCT, FGCT, CGCT), "GCT != (YGCT + FGCT + CGCT) " + "(GCT = " + GCT + ", YGCT = " + YGCT + + ", FGCT = " + FGCT + ", CGCT = " + CGCT + ", (YCGT + FGCT + CGCT) = " + (YGCT + FGCT + CGCT) + ")"); } private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f;