< prev index next >

test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -23,12 +23,12 @@
 
 /*
  * Results of running the JstatGcTool ("jstat -gccause <pid>")
  *
  * 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.00  1270.551 Allocation Failure   No GC
 
  * Output description:
  * S0         Survivor space 0 utilization as a percentage of the space's current capacity.
  * S1         Survivor space 1 utilization as a percentage of the space's current capacity.
  * E           Eden space utilization as a percentage of the space's current capacity.

@@ -37,10 +37,12 @@
  * CCS     Compressed Class Space
  * YGC     Number of young generation GC events.
  * YGCT    Young generation garbage collection time.
  * FGC      Number of full GC events.
  * FGCT    Full garbage collection time.
+ * CGC     Concurrent Collections (STW phase)
+ * CGCT     Concurrent Garbage Collection Time (STW phase)
  * GCT      Total garbage collection time.
  * LGCC    Cause of last Garbage Collection.
  * GCC      Cause of current Garbage Collection.
  */
 package utils;

@@ -70,18 +72,25 @@
 
         float GCT = getFloatValue("GCT");
         assertThat(GCT >= 0, "Incorrect time value for GCT");
         assertThat(GCT >= YGCT, "GCT < YGCT (total garbage collection time < young generation garbage collection time)");
 
+        int CGC = getIntValue("CGC");
+        float CGCT = getFloatValue("CGCT");
+        assertThat(CGCT >= 0, "Incorrect time value for CGCT");
+        if (CGC > 0) {
+            assertThat(CGCT > 0, "Number of concurrent GC events is " + CGC + ", but CGCT is 0");
+        }
+
         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)");
 
-        assertThat(checkFloatIsSum(GCT, YGCT, FGCT), "GCT != (YGCT + FGCT) " + "(GCT = " + GCT + ", YGCT = " + YGCT
-                + ", FGCT = " + FGCT + ", (YCGT + FGCT) = " + (YGCT + FGCT) + ")");
+        assertThat(checkFloatIsSum(GCT, YGCT, CGCT, FGCT), "GCT != (YGCT + CGCT + FGCT) " + "(GCT = " + GCT + ", YGCT = " + YGCT
+                + ", CGCT = " + CGCT + ", FGCT = " + FGCT + ", (YCGT + CGCT + FGCT) = " + (YGCT + CGCT + FGCT) + ")");
     }
 }
< prev index next >