Skip to content

Commit 692f275

Browse files
Satyen SubramaniamPaul Hohensee
authored andcommitted
8350211: CTW: Attempt to preload all classes in constant pool
Backport-of: d13fd5738f8a3d4b4009c2e15cfd967332d97bbd
1 parent 01425e4 commit 692f275

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

8888
private static void preloadClasses(String className, long id,
8989
ConstantPool constantPool) {
90-
try {
91-
for (int i = 0, n = constantPool.getSize(); i < n; ++i) {
92-
try {
90+
for (int i = 0, n = constantPool.getSize(); i < n; ++i) {
91+
try {
92+
if (constantPool.getTagAt(i) == ConstantPool.Tag.CLASS) {
9393
constantPool.getClassAt(i);
94-
} catch (IllegalArgumentException ignore) {
9594
}
95+
} catch (Throwable t) {
96+
CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING preloading failed : %s",
97+
id, className, t));
98+
t.printStackTrace(CompileTheWorld.ERR);
9699
}
97-
} catch (Throwable t) {
98-
CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING preloading failed : %s",
99-
id, className, t));
100-
t.printStackTrace(CompileTheWorld.ERR);
101100
}
102101
}
103102

0 commit comments

Comments
 (0)