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