Skip to content

Commit 4af56ac

Browse files
committed
Bugfixes for the inclusion of all metadata from reflectively-accessed classes
1 parent 0765926 commit 4af56ac

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

substratevm/src/com.oracle.svm.graal/src/com/oracle/svm/graal/substitutions/GraalSubstitutions.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import com.oracle.svm.core.SubstrateTargetDescription;
4949
import com.oracle.svm.core.VMInspectionOptions;
5050
import com.oracle.svm.core.annotate.Alias;
51+
import com.oracle.svm.core.annotate.Delete;
5152
import com.oracle.svm.core.annotate.Inject;
5253
import com.oracle.svm.core.annotate.InjectAccessors;
5354
import com.oracle.svm.core.annotate.RecomputeFieldValue;
@@ -257,6 +258,25 @@ public static void dumpHeap(String outputFile, boolean live) throws IOException,
257258
}
258259
}
259260

261+
/**
262+
* These field and methods make HotSpot types reachable when
263+
* {@code jdk.graal.compiler.management.JMXServiceProvider} is registered for reflection.
264+
*/
265+
@TargetClass(className = "jdk.graal.compiler.management.JMXServiceProvider", onlyWith = GraalCompilerFeature.IsEnabled.class)
266+
final class Target_jdk_graal_compiler_management_JMXServiceProvider {
267+
@Delete private Target_com_sun_management_HotSpotDiagnosticMXBean hotspotMXBean;
268+
269+
@Delete
270+
private static native Target_com_sun_management_HotSpotDiagnosticMXBean getHotSpotMXBean();
271+
272+
@Delete
273+
private native void initHotSpotMXBean();
274+
}
275+
276+
@TargetClass(className = "com.sun.management.HotSpotDiagnosticMXBean", onlyWith = GraalCompilerFeature.IsEnabled.class)
277+
final class Target_com_sun_management_HotSpotDiagnosticMXBean {
278+
}
279+
260280
@TargetClass(className = "jdk.graal.compiler.serviceprovider.GlobalAtomicLong", onlyWith = GraalCompilerFeature.IsEnabled.class)
261281
final class Target_jdk_graal_compiler_serviceprovider_GlobalAtomicLong {
262282
@Alias//

0 commit comments

Comments
 (0)