hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java
changeset 28042 40ce95bcdc78
parent 27923 2c79bc396381
child 28170 b985dc631984
--- a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Mon Dec 08 18:21:02 2014 +0300
+++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Tue Dec 09 17:31:40 2014 +0300
@@ -153,6 +153,14 @@
   public native int     getMethodEntryBci(Executable method);
   public native Object[] getNMethod(Executable method, boolean isOsr);
   public native long    allocateCodeBlob(int size, int type);
+  public        long    allocateCodeBlob(long size, int type) {
+      int intSize = (int) size;
+      if ((long) intSize != size || size < 0) {
+          throw new IllegalArgumentException(
+                "size argument has illegal value " + size);
+      }
+      return allocateCodeBlob( intSize, type);
+  }
   public native void    freeCodeBlob(long addr);
   public        void    forceNMethodSweep() {
     try {