Lines Matching defs:thread

309   Klass::cast(s->klass())->copy_array(s, src_pos, d, dst_pos, length, thread);
400 before_exit(thread);
406 before_exit(thread);
483 Handle exception(thread, JNIHandles::resolve_non_null(receiver));
527 JavaThreadInObjectWaitState jtiows(thread, ms != 0);
584 // 4839641 (4840070): We must do an oop-atomic copy, because if another thread
681 klassOop k = thread->security_get_caller_class(depth);
798 h_prot, true, thread);
821 // check whether the current caller thread holds the lock or not.
980 KlassHandle klass(thread, java_lang_Class::as_klassOop(mirror));
1177 vframeStream vfst(thread);
1216 pi.initialize(&vfst, h_context(), thread->privileged_stack_top(), CHECK_NULL);
1217 thread->set_privileged_stack_top(&pi);
1230 assert(thread->privileged_stack_top() != NULL && thread->privileged_stack_top() == &pi, "wrong top element");
1231 thread->set_privileged_stack_top(thread->privileged_stack_top()->next());
1253 // Returns the inherited_access_control_context field of the running thread.
1256 oop result = java_lang_Thread::inherited_access_control_context(thread->threadObj());
1264 RegisterArrayForGC(JavaThread *thread, GrowableArray<oop>* array) {
1265 _thread = thread;
1288 vframeStream vfst(thread);
1291 Handle privileged_context(thread, NULL);
1301 if (thread->privileged_stack_top() && thread->privileged_stack_top()->frame_id() == frame_id) {
1304 privileged_context = Handle(thread, thread->privileged_stack_top()->privileged_context());
1305 protection_domain = thread->privileged_stack_top()->protection_domain();
1329 RegisterArrayForGC ragc(thread, local_array);
1332 objArrayHandle h_context(thread, context);
1392 instanceKlassHandle k(thread, java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(ofClass)));
1402 constantPoolHandle cp(thread, k->constants());
1469 Thread* thread = THREAD;
1476 constantPoolHandle i_cp(thread, k->constants());
1496 outer_klass = instanceKlassHandle(thread, ok);
1508 outer_klass = instanceKlassHandle(thread, ok);
2156 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2164 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2181 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2191 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2201 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2216 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2231 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2240 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2249 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2258 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2271 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2280 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2289 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2297 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2306 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2315 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2325 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2334 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2343 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2359 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2375 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2393 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2411 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2427 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2437 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2456 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2477 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2478 k_called = JvmtiThreadState::class_to_verify_considering_redefinition(k_called, thread);
2504 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2505 k_called = JvmtiThreadState::class_to_verify_considering_redefinition(k_called, thread);
2682 // to prevent the target thread from exiting after we have a pointer to the C++ Thread or
2683 // OSThread objects. The exception to this rule is when the target object is the thread
2684 // doing the operation, in which case we know that the thread won't exit until the
2692 static void thread_entry(JavaThread* thread, TRAPS) {
2694 Handle obj(THREAD, thread->threadObj());
2722 // re-starting an already started thread, so we should usually find
2723 // that the JavaThread is null. However for a JNI attached thread
2727 if (java_lang_Thread::thread(JNIHandles::resolve_non_null(jthread)) != NULL) {
2730 // We could also check the stillborn flag to see if this thread was already stopped, but
2731 // for historical reasons we let the thread detect that itself when it starts running
2735 // Allocate the C++ Thread structure and create the native thread. The
2745 // that we only grab the lock if the thread was created successfully -
2749 // Note: the current thread is not being used within "prepare".
2759 assert(native_thread != NULL, "Starting null thread?");
2767 "unable to create new native thread");
2770 "unable to create new native thread");
2780 // same thread as the sender, no safepoint is needed.
2789 JavaThread* receiver = java_lang_Thread::thread(java_thread);
2791 "JVM_StopThread thread JavaThread " INTPTR_FORMAT " as oop " INTPTR_FORMAT " [exception " INTPTR_FORMAT "]",
2793 // First check if thread is alive
2797 if (java_thread == thread->threadObj()) {
2806 // - target thread has not been started before being stopped, or
2807 // - target thread already terminated
2810 // stillborn flag for the first case, and if the thread has already
2828 JavaThread* receiver = java_lang_Thread::thread(java_thread);
2831 // thread has run and has not exited (still on threads list)
2840 if (receiver->is_exiting()) { // thread is in the process of exiting
2852 // resumed this thread right after we suspended it. Temporarily
2856 // assert(java_lang_Thread::thread(receiver->threadObj()) == NULL ||
2857 // receiver->is_being_ext_suspended(), "thread is not suspended");
2866 // a safepoint. The safepoint code relies on suspending a thread to examine its state. If other
2867 // threads randomly resumes threads, then a thread might not be suspended when the safepoint code
2870 JavaThread* thr = java_lang_Thread::thread(JNIHandles::resolve_non_null(jthread));
2872 // the thread has run and is not in the process of exiting
2884 JavaThread* thr = java_lang_Thread::thread(java_thread);
2902 os::sleep(thread, MinSleepInterval, false);
2920 // Save current thread state and restore it at the end of this block.
2921 // And set new thread state to SLEEPING.
2922 JavaThreadSleepState jtss(thread);
2941 ThreadState old_state = thread->osthread()->get_state();
2942 thread->osthread()->set_state(SLEEPING);
2943 os::sleep(thread, MinSleepInterval, false);
2944 thread->osthread()->set_state(old_state);
2947 ThreadState old_state = thread->osthread()->get_state();
2948 thread->osthread()->set_state(SLEEPING);
2949 if (os::sleep(thread, millis, true) == OS_INTRPT) {
2964 // to properly restore the thread state. That's likely wrong.
2968 thread->osthread()->set_state(old_state);
2984 oop jthread = thread->threadObj();
2985 assert (thread != NULL, "no current thread!");
2999 MutexLockerEx ml(thread->threadObj() == java_thread ? NULL : Threads_lock);
3002 JavaThread* thr = java_lang_Thread::thread(JNIHandles::resolve_non_null(jthread));
3007 // Check whether this java thread has been suspended already. If not, throws
3010 // The correct way to test a thread is actually suspended is
3027 "this thread is not suspended");
3048 MutexLockerEx ml(thread->threadObj() == java_thread ? NULL : Threads_lock);
3051 JavaThread* thr = java_lang_Thread::thread(JNIHandles::resolve_non_null(jthread));
3063 MutexLockerEx ml(thread->threadObj() == java_thread ? NULL : Threads_lock);
3066 JavaThread* thr = java_lang_Thread::thread(JNIHandles::resolve_non_null(jthread));
3075 // Return true iff the current thread has locked the object passed in
3101 JavaThread* thr = java_lang_Thread::thread(java_thread);
3102 // Thread naming only supported for the current thread, doesn't work for
3105 // we don't set the name of an attached thread to avoid stepping
3115 assert(jthread->is_Java_thread(), "must be a Java thread");
3130 for (vframeStream vfst(thread); !vfst.at_end(); vfst.next()) {
3132 bool trusted = is_trusted_frame(thread, &vfst);
3152 for (vframeStream vfst(thread); !vfst.at_end(); vfst.next()) {
3155 bool trusted = is_trusted_frame(thread, &vfst);
3191 for(vframeStream vfst(thread); !vfst.at_end(); vfst.security_get_caller_frame(1)) {
3197 KlassLink* l = new KlassLink(KlassHandle(thread, holder));
3235 for(vframeStream vfst(thread); !vfst.at_end(); vfst.next()) {
3253 for (vframeStream vfst(thread); !vfst.at_end(); vfst.next()) {
3255 bool trusted = is_trusted_frame(thread, &vfst);
3372 JavaCalls::call_default_constructor(thread, m, obj, CHECK_NULL);
3408 for (vframeStream vfst(thread); !vfst.at_end(); vfst.next()) {
3450 for (vframeStream vfst(thread);
3467 false, thread);
3715 ThreadToNativeFromVM ttnfvm(thread);
3726 Exceptions::new_exception(thread,
4155 if (thread->stack_available((address) &method_handle) >= JVMInvokeMethodSlack) {
4262 // Return StackTraceElement[][], each element is the stack trace of a thread in
4367 // If new thread states are added in future JDK and VM versions,
4368 // this should check if the JDK version is compatible with thread
4372 // to the Java thread state that the JDK supports.
4430 // If new thread states are added in future JDK and VM versions,
4431 // this should check if the JDK version is compatible with thread
4435 // to the Java thread state that the JDK supports.