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