Skip to content

Commit d13fd57

Browse files
committed
8350211: CTW: Attempt to preload all classes in constant pool
Reviewed-by: vlivanov, chagedorn
1 parent 0ef1c40 commit d13fd57

File tree

1 file changed

+7
-8
lines changed
  • test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw

1 file changed

+7
-8
lines changed

test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,16 @@ public static void compileClass(Class<?> aClass, long id, Executor executor) {
122122

123123
private static void preloadClasses(String className, long id,
124124
ConstantPool constantPool) {
125-
try {
126-
for (int i = 0, n = constantPool.getSize(); i < n; ++i) {
127-
try {
125+
for (int i = 0, n = constantPool.getSize(); i < n; ++i) {
126+
try {
127+
if (constantPool.getTagAt(i) == ConstantPool.Tag.CLASS) {
128128
constantPool.getClassAt(i);
129-
} catch (IllegalArgumentException ignore) {
130129
}
130+
} catch (Throwable t) {
131+
CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING preloading failed : %s",
132+
id, className, t));
133+
t.printStackTrace(CompileTheWorld.ERR);
131134
}
132-
} catch (Throwable t) {
133-
CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING preloading failed : %s",
134-
id, className, t));
135-
t.printStackTrace(CompileTheWorld.ERR);
136135
}
137136
}
138137

0 commit comments

Comments
 (0)