Merge
authoriignatyev
Tue, 09 Dec 2014 14:49:27 +0000
changeset 28043 59286db74db6
parent 28042 40ce95bcdc78 (diff)
parent 28041 fed7f90dc4c4 (current diff)
child 28044 ede40159fd3b
child 28045 dc52d4bb1316
Merge
--- a/hotspot/src/share/vm/prims/whitebox.hpp	Fri Dec 05 18:03:15 2014 +0100
+++ b/hotspot/src/share/vm/prims/whitebox.hpp	Tue Dec 09 14:49:27 2014 +0000
@@ -74,7 +74,7 @@
   static JavaThread* create_sweeper_thread(TRAPS);
   static int get_blob_type(const CodeBlob* code);
   static CodeHeap* get_code_heap(int blob_type);
-  static CodeBlob* allocate_code_blob(int blob_type, int size);
+  static CodeBlob* allocate_code_blob(int size, int blob_type);
   static int array_bytes_to_length(size_t bytes);
   static void register_methods(JNIEnv* env, jclass wbclass, JavaThread* thread,
     JNINativeMethod* method_array, int method_count);
--- a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Fri Dec 05 18:03:15 2014 +0100
+++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Tue Dec 09 14:49:27 2014 +0000
@@ -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 {