Skip to content

Commit 1329551

Browse files
shyamkishororaclePaul Hohensee
authored andcommitted
8350211: CTW: Attempt to preload all classes in constant pool
Reviewed-by: phh Backport-of: d13fd5738f8a3d4b4009c2e15cfd967332d97bbd
1 parent 3d1f63d commit 1329551

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
@@ -108,17 +108,16 @@ public static void compileClass(Class<?> aClass, long id, Executor executor) {
108108

109109
private static void preloadClasses(String className, long id,
110110
ConstantPool constantPool) {
111-
try {
112-
for (int i = 0, n = constantPool.getSize(); i < n; ++i) {
113-
try {
111+
for (int i = 0, n = constantPool.getSize(); i < n; ++i) {
112+
try {
113+
if (constantPool.getTagAt(i) == ConstantPool.Tag.CLASS) {
114114
constantPool.getClassAt(i);
115-
} catch (IllegalArgumentException ignore) {
116115
}
116+
} catch (Throwable t) {
117+
CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING preloading failed : %s",
118+
id, className, t));
119+
t.printStackTrace(CompileTheWorld.ERR);
117120
}
118-
} catch (Throwable t) {
119-
CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING preloading failed : %s",
120-
id, className, t));
121-
t.printStackTrace(CompileTheWorld.ERR);
122121
}
123122
}
124123

0 commit comments

Comments
 (0)