Lines Matching defs:thread

400     // check whether the current caller thread holds the lock or not.
458 instanceKlassHandle k (THREAD, thread->security_get_caller_class(0));
469 thread);
471 Handle ex(thread, thread->pending_exception());
488 protection_domain, true, thread);
757 static void jni_check_async_exceptions(JavaThread *thread) {
758 assert(thread == Thread::current(), "must be itself");
759 thread->check_and_handle_async_exceptions();
770 jni_check_async_exceptions(thread);
771 oop exception = thread->pending_exception();
791 if (thread->has_pending_exception()) {
792 Handle ex(thread, thread->pending_exception());
793 thread->clear_pending_exception();
798 if (thread != NULL && thread->threadObj() != NULL) {
801 "in thread \"%s\" ", thread->get_thread_name());
814 // for the exception - hence, it might still be in the thread when DestroyVM gets
845 // So just mark jvmti thread exception state as exception caught.
850 thread->clear_pending_exception();
869 thread->print_stack();
892 JNIHandleBlock* old_handles = thread->active_handles();
893 JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread);
896 thread->set_active_handles(new_handles);
917 Handle result_handle(thread, JNIHandles::resolve(result));
918 JNIHandleBlock* old_handles = thread->active_handles();
925 thread->set_active_handles(new_handles);
927 JNIHandleBlock::release_block(old_handles, thread); // may block
928 result = JNIHandles::make_local(thread, result_handle());
948 Handle ref_handle(thread, JNIHandles::resolve(ref));
1066 if (JNIHandles::is_local_handle(thread, obj) ||
1067 JNIHandles::is_frame_handle(thread, obj))
1647 jmethodID ret = get_method_id(env, clazz, name, sig, false, thread);
1667 jmethodID ret = get_method_id(env, clazz, name, sig, true, thread);
2642 o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false);
2694 o = JvmtiExport::jni_GetField_probe_nh(thread, obj, o, k, fieldID, false); \
2731 o = JvmtiExport::jni_GetField_probe_nh(thread, obj, o, k, fieldID, false); \
2806 o = JvmtiExport::jni_SetField_probe_nh(thread, obj, o, k, fieldID, false, 'L', (jvalue *)&field_value);
2836 o = JvmtiExport::jni_SetField_probe_nh(thread, obj, o, k, fieldID, false, SigType, (jvalue *)&field_value); \
2870 o = JvmtiExport::jni_SetField_probe_nh(thread, obj, o, k, fieldID, false, SigType, (jvalue *)&field_value); \
3005 DEBUG_ONLY(klassOop param_k = jniCheck::validate_class(thread, clazz);)
3011 JvmtiExport::jni_GetField_probe(thread, NULL, NULL, id->holder(), fieldID, true);
3039 JvmtiExport::jni_GetField_probe(thread, NULL, NULL, id->holder(), fieldID, true); \
3073 JvmtiExport::jni_GetField_probe(thread, NULL, NULL, id->holder(), fieldID, true); \
3113 JvmtiExport::jni_SetField_probe(thread, NULL, NULL, id->holder(), fieldID, true, 'L', (jvalue *)&field_value);
3141 JvmtiExport::jni_SetField_probe(thread, NULL, NULL, id->holder(), fieldID, true, SigType, (jvalue *)&field_value); \
3172 JvmtiExport::jni_SetField_probe(thread, NULL, NULL, id->holder(), fieldID, true, SigType, (jvalue *)&field_value); \
4040 KlassHandle h_k(thread, java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(clazz)));
4126 Handle obj(thread, JNIHandles::resolve_non_null(jobj));
4240 GC_locker::lock_critical(thread);
4272 GC_locker::unlock_critical(thread);
4290 GC_locker::lock_critical(thread);
4323 GC_locker::unlock_critical(thread);
4341 Handle ref_handle(thread, JNIHandles::resolve(ref));
4379 jni_check_async_exceptions(thread);
4380 jboolean ret = (thread->has_pending_exception()) ? JNI_TRUE : JNI_FALSE;
4420 if ((bufferClass = lookupOne(env, "java/nio/Buffer", thread)) == NULL) { return false; }
4421 if ((directBufferClass = lookupOne(env, "sun/nio/ch/DirectBuffer", thread)) == NULL) { return false; }
4422 if ((directByteBufferClass = lookupOne(env, "java/nio/DirectByteBuffer", thread)) == NULL) { return false; }
4428 static bool initializeDirectBufferSupport(JNIEnv* env, JavaThread* thread) {
4464 ThreadInVMfromNative tivn(thread);
4475 JavaThread* thread = JavaThread::thread_from_jni_environment(env);
4486 if (!initializeDirectBufferSupport(env, thread)) {
4522 JavaThread* thread = JavaThread::thread_from_jni_environment(env);
4535 if (!initializeDirectBufferSupport(env, thread)) {
4558 JavaThread* thread = JavaThread::thread_from_jni_environment(env);
4571 if (!initializeDirectBufferSupport(env, thread)) {
4915 // any java thread access the jni function table in the middle of memcpy.
4997 #define JAVASTACKSIZE (400 * 1024) /* Default size of a thread java stack */
5100 // one thread can call this method at a time
5130 JavaThread *thread = JavaThread::current();
5131 /* thread is thread_in_vm here */
5133 *(JNIEnv**)penv = thread->jni_environment();
5140 JvmtiExport::post_thread_start(thread);
5145 event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
5151 // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving.
5152 ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native);
5238 // Since this is not a JVM_ENTRY we have to set the thread state manually before entering.
5239 JavaThread* thread = JavaThread::current();
5240 ThreadStateTransition::transition_from_native(thread, _thread_in_vm);
5242 // Should not change thread state, VM is gone
5247 ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native);
5266 // If the thread has been attached this operation is a no-op
5271 // Create a thread and mark it as attaching so it will be skipped by the
5273 JavaThread* thread = new JavaThread(true);
5275 // Set correct safepoint info. The thread is going to call into Java when
5276 // initializing the Java level thread object. Hence, the correct state must
5278 thread->set_thread_state(_thread_in_vm);
5280 thread->record_stack_base_and_size();
5282 thread->initialize_thread_local_storage();
5284 if (!os::create_attached_thread(thread)) {
5285 delete thread;
5289 thread->create_stack_guard_pages();
5291 thread->initialize_tlab();
5293 thread->cache_global_variables();
5295 // Crucial that we do not have a safepoint check for this thread, since it has
5299 // avoid this thread trying to do a GC before it is added to the thread-list
5300 thread->set_active_handles(JNIHandleBlock::allocate_block());
5301 Threads::add(thread, daemon);
5304 // Create thread group and name info from attach arguments
5313 // Create Java level thread object and attach it to this thread
5319 thread->allocate_threadObj(thread_group, thread_name, daemon, THREAD);
5329 thread->cleanup_failed_attach_current_thread();
5333 // mark the thread as no longer attaching
5336 thread->set_done_attaching_via_jni();
5338 // Set java thread status.
5339 java_lang_Thread::set_thread_status(thread->threadObj(),
5344 JvmtiExport::post_thread_start(thread);
5349 event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
5353 *(JNIEnv**)penv = thread->jni_environment();
5360 ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native);
5409 // If the thread has been deattacted the operations is a no-op
5410 if (ThreadLocalStorage::thread() == NULL) {
5420 JavaThread* thread = JavaThread::current();
5421 if (thread->has_last_Java_frame()) {
5428 // Can't detach a thread that's running java, that can't work.
5434 ThreadStateTransition::transition_from_native(thread, _thread_in_vm);
5445 thread->exit(false, JavaThread::jni_detach);
5446 delete thread;
5491 Thread* thread = ThreadLocalStorage::thread();
5492 if (thread != NULL && thread->is_Java_thread()) {
5494 *(JNIEnv**)penv = ((JavaThread*) thread)->jni_environment();