diff --git a/modules.xml b/modules.xml index 355f56a4270..9fb031e5ef2 100644 --- a/modules.xml +++ b/modules.xml @@ -218,6 +218,10 @@ jdk.internal.jimage jdk.dev + + jdk.internal.jimage.decompressor + jdk.dev + jdk.internal.org.objectweb.asm java.instrument diff --git a/test/lib/sun/hotspot/WhiteBox.java b/test/lib/sun/hotspot/WhiteBox.java index 0121ca4fecc..17ade810b77 100644 --- a/test/lib/sun/hotspot/WhiteBox.java +++ b/test/lib/sun/hotspot/WhiteBox.java @@ -26,6 +26,7 @@ package sun.hotspot; import java.lang.management.MemoryUsage; import java.lang.reflect.Executable; +import java.nio.ByteBuffer; import java.util.Arrays; import java.util.List; import java.util.function.BiFunction; @@ -37,7 +38,6 @@ import java.util.Objects; import sun.hotspot.parser.DiagnosticCommand; public class WhiteBox { - @SuppressWarnings("serial") public static class WhiteBoxPermission extends BasicPermission { public WhiteBoxPermission(String s) { @@ -362,6 +362,23 @@ public class WhiteBox { .orElse(null); } + public native boolean readImageFile(String imagePath); + public native long imageOpenImage(String imagePath, boolean bigEndian); + public native void imageCloseImage(long id); + public native long imageGetIndexAddress(long id); + public native long imageGetDataAddress(long id); + public native boolean imageReadCompressed(long id, long offset, + ByteBuffer compressedBuffer, long compressedSize, + ByteBuffer uncompressedBuffer, long uncompressedSize); + public native boolean imageRead(long id, long offset, + ByteBuffer uncompressedBuffer, long uncompressedSize); + public native byte[] imageGetStringBytes(long id, int offset); + public native long imageGetStringsSize(long id); + public native long[] imageGetAttributes(long id, int offset); + public native long[] imageFindAttributes(long id, byte[] path); + public native int[] imageAttributeOffsets(long id); + public native int imageGetIntAtAddress(long address, int offset, boolean big_endian); + // Safepoint Checking public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);