< prev index next >

src/hotspot/share/runtime/sharedRuntime.cpp

Print this page




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, &regs, 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(obj != NULL, "Should not be null");
2886   oop o(obj);
2887   o = Universe::heap()->pin_object(thread, o);
2888   assert(o != NULL, "Should not be null");
2889   return o;
2890 JRT_END
2891 
2892 JRT_LEAF(void, SharedRuntime::unpin_object(JavaThread* thread, oopDesc* obj))
2893   assert(Universe::heap()->supports_object_pinning(), "Why we here?");
2894   assert(obj != NULL, "Should not be null");
2895   oop o(obj);
2896   Universe::heap()->unpin_object(thread, o);
2897 JRT_END
2898 
2899 // -------------------------------------------------------------------------
2900 // Java-Java calling convention
2901 // (what you use when Java calls Java)
2902 
2903 //------------------------------name_for_receiver----------------------------------
2904 // For a given signature, return the VMReg for parameter 0.
2905 VMReg SharedRuntime::name_for_receiver() {
2906   VMRegPair regs;
2907   BasicType sig_bt = T_OBJECT;
2908   (void) java_calling_convention(&sig_bt, &regs, 1, true);
2909   // Return argument 0 register.  In the LP64 build pointers
2910   // take 2 registers, but the VM wants only the 'main' name.
2911   return regs.first();
2912 }
2913 
2914 VMRegPair *SharedRuntime::find_callee_arguments(Symbol* sig, bool has_receiver, bool has_appendix, int* arg_size) {
2915   // This method is returning a data structure allocating as a
2916   // ResourceObject, so do not put any ResourceMarks in here.
2917   char *s = sig->as_C_string();
2918   int len = (int)strlen(s);


< prev index next >