author | kkharbas |
Wed, 29 Nov 2017 17:03:10 -0800 | |
changeset 48153 | cfa2c43e58c2 |
parent 47216 | 71c04702a3d5 |
child 48791 | 6e079ff6c83c |
permissions | -rw-r--r-- |
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
1 |
/* |
39414
4adf52148100
8160088: update hotspot tests depending on GC to use @requires vm.gc.X
dfazunen
parents:
36851
diff
changeset
|
2 |
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. |
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
4 |
* |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
8 |
* |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
13 |
* accompanied this code). |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
14 |
* |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
18 |
* |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
21 |
* questions. |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
22 |
*/ |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
23 |
|
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
24 |
/* |
35061 | 25 |
* @test TestRemsetLogging.java |
39414
4adf52148100
8160088: update hotspot tests depending on GC to use @requires vm.gc.X
dfazunen
parents:
36851
diff
changeset
|
26 |
* @requires vm.gc.G1 |
35189
a69874af6697
8145534: TestRemsetLogging.java takes a long time
tschatzl
parents:
35061
diff
changeset
|
27 |
* @bug 8013895 8129977 8145534 |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
39414
diff
changeset
|
28 |
* @library /test/lib |
36851 | 29 |
* @modules java.base/jdk.internal.misc |
29678
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
20305
diff
changeset
|
30 |
* java.management/sun.management |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
39414
diff
changeset
|
31 |
* @build sun.hotspot.WhiteBox |
35189
a69874af6697
8145534: TestRemsetLogging.java takes a long time
tschatzl
parents:
35061
diff
changeset
|
32 |
* @run main ClassFileInstaller sun.hotspot.WhiteBox |
a69874af6697
8145534: TestRemsetLogging.java takes a long time
tschatzl
parents:
35061
diff
changeset
|
33 |
* sun.hotspot.WhiteBox$WhiteBoxPermission |
35061 | 34 |
* @summary Verify output of -Xlog:gc+remset*=trace |
35 |
* @run main TestRemsetLogging |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
36 |
* |
35061 | 37 |
* Test the output of -Xlog:gc+remset*=trace in conjunction with G1SummarizeRSetStatsPeriod. |
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
38 |
*/ |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
39 |
|
35061 | 40 |
public class TestRemsetLogging { |
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
41 |
|
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
42 |
public static void main(String[] args) throws Exception { |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
43 |
String result; |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
44 |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
45 |
// no remembered set summary output |
35061 | 46 |
result = TestRemsetLoggingTools.runTest(null, 0); |
47 |
TestRemsetLoggingTools.expectRSetSummaries(result, 0, 0); |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
48 |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
49 |
// no remembered set summary output |
35061 | 50 |
result = TestRemsetLoggingTools.runTest(null, 2); |
51 |
TestRemsetLoggingTools.expectRSetSummaries(result, 0, 0); |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
52 |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
53 |
// no remembered set summary output |
35061 | 54 |
result = TestRemsetLoggingTools.runTest(new String[] { "-XX:G1SummarizeRSetStatsPeriod=1" }, 3); |
55 |
TestRemsetLoggingTools.expectRSetSummaries(result, 0, 0); |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
56 |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
57 |
// single remembered set summary output at the end |
35061 | 58 |
result = TestRemsetLoggingTools.runTest(new String[] { "-Xlog:gc+remset*=trace" }, 0); |
59 |
TestRemsetLoggingTools.expectRSetSummaries(result, 1, 0); |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
60 |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
61 |
// single remembered set summary output at the end |
35061 | 62 |
result = TestRemsetLoggingTools.runTest(new String[] { "-Xlog:gc+remset*=trace" }, 2); |
63 |
TestRemsetLoggingTools.expectRSetSummaries(result, 1, 0); |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
64 |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
65 |
// single remembered set summary output |
35061 | 66 |
result = TestRemsetLoggingTools.runTest(new String[] { "-Xlog:gc+remset*=trace", "-XX:G1SummarizeRSetStatsPeriod=1" }, 0); |
67 |
TestRemsetLoggingTools.expectRSetSummaries(result, 1, 0); |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
68 |
|
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
69 |
// two times remembered set summary output |
35061 | 70 |
result = TestRemsetLoggingTools.runTest(new String[] { "-Xlog:gc+remset*=trace", "-XX:G1SummarizeRSetStatsPeriod=1" }, 1); |
71 |
TestRemsetLoggingTools.expectRSetSummaries(result, 1, 2); |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
72 |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
73 |
// four times remembered set summary output |
35061 | 74 |
result = TestRemsetLoggingTools.runTest(new String[] { "-Xlog:gc+remset*=trace", "-XX:G1SummarizeRSetStatsPeriod=1" }, 3); |
75 |
TestRemsetLoggingTools.expectRSetSummaries(result, 1, 6); |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
76 |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
77 |
// three times remembered set summary output |
35061 | 78 |
result = TestRemsetLoggingTools.runTest(new String[] { "-Xlog:gc+remset*=trace", "-XX:G1SummarizeRSetStatsPeriod=2" }, 3); |
79 |
TestRemsetLoggingTools.expectRSetSummaries(result, 1, 4); |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
80 |
|
20305
af013cf4a5e6
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
17854
diff
changeset
|
81 |
// single remembered set summary output |
35061 | 82 |
result = TestRemsetLoggingTools.runTest(new String[] { "-Xlog:gc+remset*=trace", "-XX:G1SummarizeRSetStatsPeriod=100" }, 3); |
83 |
TestRemsetLoggingTools.expectRSetSummaries(result, 1, 2); |
|
17854
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
84 |
} |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
85 |
} |
d65bc1546091
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
86 |