OpenJDK / amber / amber
changeset 50774:6f548c41a4fc
8202466: Test serviceability/tmtools/jstat/GcTest01.java fails: Number of concurrent GC events is 1, but CGCT is 0
Reviewed-by: cjplummer, sspitsyn
author | ysuenaga |
---|---|
date | Sun, 20 May 2018 20:25:51 +0900 |
parents | b8ed2c98202a |
children | c87fba18f2b9 |
files | test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcNewResults.java test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcResults.java test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatResults.java |
diffstat | 4 files changed, 8 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java Sat May 19 13:13:09 2018 -0700 +++ b/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java Sun May 20 20:25:51 2018 +0900 @@ -66,9 +66,6 @@ int YGC = getIntValue("YGC"); float YGCT = getFloatValue("YGCT"); assertThat(YGCT >= 0, "Incorrect time value for YGCT"); - if (YGC > 0) { - assertThat(YGCT > 0, "Number of young generation GC Events is " + YGC + ", but YGCT is 0"); - } float GCT = getFloatValue("GCT"); assertThat(GCT >= 0, "Incorrect time value for GCT"); @@ -86,15 +83,11 @@ if (CGC > 0) { CGCT = getFloatValue("CGCT"); assertThat(CGCT >= 0, "Incorrect time value for CGCT"); - 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)");
--- a/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcNewResults.java Sat May 19 13:13:09 2018 -0700 +++ b/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcNewResults.java Sun May 20 20:25:51 2018 +0900 @@ -1,5 +1,5 @@ /* - * 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 @@ -25,8 +25,8 @@ * Results of running the JstatGcTool ("jstat -gcnew <pid>") * * Output example: - * S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT - * 11264.0 11264.0 0.0 0.0 15 15 0.0 67584.0 1351.7 0 0.000 + * S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT + * 0.0 7168.0 0.0 7168.0 15 15 3584.0 62464.0 5120.0 27 0.340 * Output description: * S0C Current survivor space 0 capacity (KB). @@ -77,10 +77,6 @@ int YGC = getIntValue("YGC"); float YGCT = getFloatValue("YGCT"); - if (YGC > 0) { - assertThat(YGCT > 0, "Number of young generation GC Events is " + YGC + ", but YGCT is 0"); - } - int TT = getIntValue("TT"); int MTT = getIntValue("MTT"); assertThat(TT <= MTT, "TT > MTT (tenuring threshold > maximum tenuring threshold)");
--- a/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcResults.java Sat May 19 13:13:09 2018 -0700 +++ b/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcResults.java Sun May 20 20:25:51 2018 +0900 @@ -95,9 +95,6 @@ int YGC = getIntValue("YGC"); float YGCT = getFloatValue("YGCT"); assertThat(YGCT >= 0, "Incorrect time value for YGCT"); - if (YGC > 0) { - assertThat(YGCT > 0, "Number of young generation GC Events is " + YGC + ", but YGCT is 0"); - } float GCT = getFloatValue("GCT"); assertThat(GCT >= 0, "Incorrect time value for GCT"); @@ -115,15 +112,11 @@ if (CGC > 0) { CGCT = getFloatValue("CGCT"); assertThat(CGCT >= 0, "Incorrect time value for CGCT"); - 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)");
--- a/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatResults.java Sat May 19 13:13:09 2018 -0700 +++ b/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatResults.java Sun May 20 20:25:51 2018 +0900 @@ -1,5 +1,5 @@ /* - * 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 @@ -109,12 +109,12 @@ * measurements * * @param measurement1 -first measurement - * @param measurement2 -first measurement + * @param measurement2 -second measurement */ public static void assertGCTimeIncreased(JstatResults measurement1, JstatResults measurement2) { - assertThat(measurement2.getFloatValue("YGCT") > measurement1.getFloatValue("YGCT"), "YGCT time didn't increase between measurements 1 and 2"); - assertThat(measurement2.getFloatValue("FGCT") > measurement1.getFloatValue("FGCT"), "FGCT time didn't increase between measurements 1 and 2"); - assertThat(measurement2.getFloatValue("GCT") > measurement1.getFloatValue("GCT"), "GCT time didn't increase between measurements 1 and 2"); + assertThat(measurement2.getFloatValue("YGCT") >= measurement1.getFloatValue("YGCT"), "YGCT time rewinded between measurements 1 and 2"); + assertThat(measurement2.getFloatValue("FGCT") >= measurement1.getFloatValue("FGCT"), "FGCT time rewinded between measurements 1 and 2"); + assertThat(measurement2.getFloatValue("GCT") >= measurement1.getFloatValue("GCT"), "GCT time rewinded between measurements 1 and 2"); } /**