8195731: [Graal] runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java intermittently fails with Graal JIT
Print detailed error if class transformation fails. Exclude tests from Graal testing. Reviewed-by: kvn, dholmes, sspitsyn
This commit is contained in:
parent
e5131d5ceb
commit
9eb320a418
@ -29,6 +29,7 @@
|
||||
* @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti
|
||||
* @requires vm.cds
|
||||
* @requires vm.flavor != "minimal"
|
||||
* @requires !vm.graal.enabled
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* jdk.jartool/sun.tools.jar
|
||||
* java.management
|
||||
|
@ -30,6 +30,7 @@
|
||||
* @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti
|
||||
* @requires vm.cds
|
||||
* @requires vm.flavor != "minimal"
|
||||
* @requires !vm.graal.enabled
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* jdk.jartool/sun.tools.jar
|
||||
* java.management
|
||||
|
@ -30,6 +30,7 @@
|
||||
* @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti
|
||||
* @requires vm.cds
|
||||
* @requires vm.flavor != "minimal"
|
||||
* @requires !vm.graal.enabled
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* jdk.jartool/sun.tools.jar
|
||||
* java.management
|
||||
|
@ -30,6 +30,7 @@
|
||||
* /test/hotspot/jtreg/runtime/appcds/test-classes /test/hotspot/jtreg/runtime/appcds/jvmti
|
||||
* /test/hotspot/jtreg/testlibrary/jvmti
|
||||
* @requires vm.cds
|
||||
* @requires !vm.graal.enabled
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
* jdk.jartool/sun.tools.jar
|
||||
|
@ -34,6 +34,7 @@
|
||||
* /test/hotspot/jtreg/runtime/appcds/customLoader/test-classes
|
||||
* @requires vm.cds
|
||||
* @requires vm.flavor != "minimal"
|
||||
* @requires !vm.graal.enabled
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* jdk.jartool/sun.tools.jar
|
||||
* java.management
|
||||
|
@ -34,6 +34,7 @@
|
||||
* /test/hotspot/jtreg/runtime/appcds/customLoader/test-classes
|
||||
* @requires vm.cds
|
||||
* @requires vm.flavor != "minimal"
|
||||
* @requires !vm.graal.enabled
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* jdk.jartool/sun.tools.jar
|
||||
* java.management
|
||||
|
@ -57,17 +57,25 @@ public class TransformerAgent {
|
||||
|
||||
|
||||
static class SimpleTransformer implements ClassFileTransformer {
|
||||
public byte[] transform(ClassLoader loader, String name, Class<?> classBeingRedefined,
|
||||
ProtectionDomain pd, byte[] buffer) throws IllegalClassFormatException {
|
||||
public byte[] transform(ClassLoader loader, String name, Class<?> classBeingRedefined,
|
||||
ProtectionDomain pd, byte[] buffer) throws IllegalClassFormatException {
|
||||
try {
|
||||
log("SimpleTransformer called for: " + name + "@" + incrCounter(name));
|
||||
if (!shouldTransform(name))
|
||||
return null;
|
||||
|
||||
log("SimpleTransformer called for: " + name + "@" + incrCounter(name));
|
||||
if (!shouldTransform(name))
|
||||
return null;
|
||||
|
||||
log("transforming: class name = " + name);
|
||||
int nrOfReplacements = TransformUtil.replace(buffer, TransformUtil.BeforePattern,
|
||||
TransformUtil.AfterPattern);
|
||||
log("replaced the string, nrOfReplacements = " + nrOfReplacements);
|
||||
log("transforming: class name = " + name);
|
||||
int nrOfReplacements = TransformUtil.replace(buffer, TransformUtil.BeforePattern,
|
||||
TransformUtil.AfterPattern);
|
||||
log("replaced the string, nrOfReplacements = " + nrOfReplacements);
|
||||
} catch (Throwable t) {
|
||||
// The retransform native code that called this method does not propagate
|
||||
// exceptions. Instead of getting an uninformative generic error, catch
|
||||
// problems here and print it, then exit.
|
||||
log("Transformation failed!");
|
||||
t.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user