< prev index next >

src/hotspot/share/runtime/sharedRuntime.cpp

Print this page




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
















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




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


< prev index next >