1 /*
2 * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
127 new LogMessageWithLevel("String Dedup Fixup", Level.DEBUG),
128 new LogMessageWithLevel("Expand Heap After Collection", Level.DEBUG),
129 // Free CSet
130 new LogMessageWithLevel("Free Collection Set", Level.DEBUG),
131 new LogMessageWithLevel("Free Collection Set Serial", Level.TRACE),
132 new LogMessageWithLevel("Young Free Collection Set", Level.TRACE),
133 new LogMessageWithLevel("Non-Young Free Collection Set", Level.TRACE),
134 // Humongous Eager Reclaim
135 new LogMessageWithLevel("Humongous Reclaim", Level.DEBUG),
136 new LogMessageWithLevel("Humongous Register", Level.DEBUG),
137 // Preserve CM Referents
138 new LogMessageWithLevel("Preserve CM Refs", Level.DEBUG),
139 // Merge PSS
140 new LogMessageWithLevel("Merge Per-Thread State", Level.DEBUG),
141 // TLAB handling
142 new LogMessageWithLevel("Prepare TLABs", Level.DEBUG),
143 new LogMessageWithLevel("Resize TLABs", Level.DEBUG),
144 // Reference Processing
145 new LogMessageWithLevel("Reference Processing", Level.DEBUG),
146 new LogMessageWithLevel("Reference Enqueuing", Level.DEBUG),
147
148 new LogMessageWithLevelC2OrJVMCIOnly("DerivedPointerTable Update", Level.DEBUG),
149 new LogMessageWithLevel("Start New Collection Set", Level.DEBUG),
150 };
151
152 void checkMessagesAtLevel(OutputAnalyzer output, LogMessageWithLevel messages[], Level level) throws Exception {
153 for (LogMessageWithLevel l : messages) {
154 if (level.lessThan(l.level) || !l.isAvailable()) {
155 output.shouldNotContain(l.message);
156 } else {
157 output.shouldMatch("\\[" + l.level + ".*" + l.message);
158 }
159 }
160 }
161
162 public static void main(String[] args) throws Exception {
163 new TestGCLogMessages().testNormalLogs();
164 new TestGCLogMessages().testWithToSpaceExhaustionLogs();
165 new TestGCLogMessages().testWithInitialMark();
166 new TestGCLogMessages().testExpandHeap();
|
1 /*
2 * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
127 new LogMessageWithLevel("String Dedup Fixup", Level.DEBUG),
128 new LogMessageWithLevel("Expand Heap After Collection", Level.DEBUG),
129 // Free CSet
130 new LogMessageWithLevel("Free Collection Set", Level.DEBUG),
131 new LogMessageWithLevel("Free Collection Set Serial", Level.TRACE),
132 new LogMessageWithLevel("Young Free Collection Set", Level.TRACE),
133 new LogMessageWithLevel("Non-Young Free Collection Set", Level.TRACE),
134 // Humongous Eager Reclaim
135 new LogMessageWithLevel("Humongous Reclaim", Level.DEBUG),
136 new LogMessageWithLevel("Humongous Register", Level.DEBUG),
137 // Preserve CM Referents
138 new LogMessageWithLevel("Preserve CM Refs", Level.DEBUG),
139 // Merge PSS
140 new LogMessageWithLevel("Merge Per-Thread State", Level.DEBUG),
141 // TLAB handling
142 new LogMessageWithLevel("Prepare TLABs", Level.DEBUG),
143 new LogMessageWithLevel("Resize TLABs", Level.DEBUG),
144 // Reference Processing
145 new LogMessageWithLevel("Reference Processing", Level.DEBUG),
146 new LogMessageWithLevel("Reference Enqueuing", Level.DEBUG),
147 // VM internal reference processing
148 new LogMessageWithLevel("Weak Processing", Level.DEBUG),
149
150 new LogMessageWithLevelC2OrJVMCIOnly("DerivedPointerTable Update", Level.DEBUG),
151 new LogMessageWithLevel("Start New Collection Set", Level.DEBUG),
152 };
153
154 void checkMessagesAtLevel(OutputAnalyzer output, LogMessageWithLevel messages[], Level level) throws Exception {
155 for (LogMessageWithLevel l : messages) {
156 if (level.lessThan(l.level) || !l.isAvailable()) {
157 output.shouldNotContain(l.message);
158 } else {
159 output.shouldMatch("\\[" + l.level + ".*" + l.message);
160 }
161 }
162 }
163
164 public static void main(String[] args) throws Exception {
165 new TestGCLogMessages().testNormalLogs();
166 new TestGCLogMessages().testWithToSpaceExhaustionLogs();
167 new TestGCLogMessages().testWithInitialMark();
168 new TestGCLogMessages().testExpandHeap();
|