< prev index next >

src/hotspot/share/runtime/sharedRuntime.cpp

Print this page




2856       CompileTask::print(tty, nm, msg);
2857     }
2858     nm->post_compiled_method_load_event();
2859   }
2860 }
2861 
2862 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::block_for_jni_critical(JavaThread* thread))
2863   assert(thread == JavaThread::current(), "must be");
2864   // The code is about to enter a JNI lazy critical native method and
2865   // _needs_gc is true, so if this thread is already in a critical
2866   // section then just return, otherwise this thread should block
2867   // until needs_gc has been cleared.
2868   if (thread->in_critical()) {
2869     return;
2870   }
2871   // Lock and unlock a critical section to give the system a chance to block
2872   GCLocker::lock_critical(thread);
2873   GCLocker::unlock_critical(thread);
2874 JRT_END
2875 
















2876 // -------------------------------------------------------------------------
2877 // Java-Java calling convention
2878 // (what you use when Java calls Java)
2879 
2880 //------------------------------name_for_receiver----------------------------------
2881 // For a given signature, return the VMReg for parameter 0.
2882 VMReg SharedRuntime::name_for_receiver() {
2883   VMRegPair regs;
2884   BasicType sig_bt = T_OBJECT;
2885   (void) java_calling_convention(&sig_bt, &regs, 1, true);
2886   // Return argument 0 register.  In the LP64 build pointers
2887   // take 2 registers, but the VM wants only the 'main' name.
2888   return regs.first();
2889 }
2890 
2891 VMRegPair *SharedRuntime::find_callee_arguments(Symbol* sig, bool has_receiver, bool has_appendix, int* arg_size) {
2892   // This method is returning a data structure allocating as a
2893   // ResourceObject, so do not put any ResourceMarks in here.
2894   char *s = sig->as_C_string();
2895   int len = (int)strlen(s);




2856       CompileTask::print(tty, nm, msg);
2857     }
2858     nm->post_compiled_method_load_event();
2859   }
2860 }
2861 
2862 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::block_for_jni_critical(JavaThread* thread))
2863   assert(thread == JavaThread::current(), "must be");
2864   // The code is about to enter a JNI lazy critical native method and
2865   // _needs_gc is true, so if this thread is already in a critical
2866   // section then just return, otherwise this thread should block
2867   // until needs_gc has been cleared.
2868   if (thread->in_critical()) {
2869     return;
2870   }
2871   // Lock and unlock a critical section to give the system a chance to block
2872   GCLocker::lock_critical(thread);
2873   GCLocker::unlock_critical(thread);
2874 JRT_END
2875 
2876 JRT_LEAF(oopDesc*, SharedRuntime::pin_object(JavaThread* thread, oopDesc* obj))
2877   assert(Universe::heap()->supports_object_pinning(), "Why we here?");
2878   assert(obj != NULL, "Should not be null");
2879   oop o(obj);
2880   o = Universe::heap()->pin_object(thread, o);
2881   assert(o != NULL, "Should not be null");
2882   return o;
2883 JRT_END
2884 
2885 JRT_LEAF(void, SharedRuntime::unpin_object(JavaThread* thread, oopDesc* obj))
2886   assert(Universe::heap()->supports_object_pinning(), "Why we here?");
2887   assert(obj != NULL, "Should not be null");
2888   oop o(obj);
2889   Universe::heap()->unpin_object(thread, o);
2890 JRT_END
2891 
2892 // -------------------------------------------------------------------------
2893 // Java-Java calling convention
2894 // (what you use when Java calls Java)
2895 
2896 //------------------------------name_for_receiver----------------------------------
2897 // For a given signature, return the VMReg for parameter 0.
2898 VMReg SharedRuntime::name_for_receiver() {
2899   VMRegPair regs;
2900   BasicType sig_bt = T_OBJECT;
2901   (void) java_calling_convention(&sig_bt, &regs, 1, true);
2902   // Return argument 0 register.  In the LP64 build pointers
2903   // take 2 registers, but the VM wants only the 'main' name.
2904   return regs.first();
2905 }
2906 
2907 VMRegPair *SharedRuntime::find_callee_arguments(Symbol* sig, bool has_receiver, bool has_appendix, int* arg_size) {
2908   // This method is returning a data structure allocating as a
2909   // ResourceObject, so do not put any ResourceMarks in here.
2910   char *s = sig->as_C_string();
2911   int len = (int)strlen(s);


< prev index next >