Lines Matching defs:thread

34 #include "runtime/thread.hpp"
93 // Acquire the lock to update the peak thread count
94 // to synchronize with thread addition and removal.
99 void ThreadService::add_thread(JavaThread* thread, bool daemon) {
101 if (thread->is_hidden_from_external_view() ||
102 thread->is_jvmti_agent_thread()) {
118 void ThreadService::remove_thread(JavaThread* thread, bool daemon) {
121 if (thread->is_hidden_from_external_view() ||
122 thread->is_jvmti_agent_thread()) {
135 assert(jt == JavaThread::current(), "Called by current thread");
145 Handle ThreadService::get_current_contended_monitor(JavaThread* thread) {
146 assert(thread != NULL, "should be non-NULL");
149 ObjectMonitor *wait_obj = thread->current_waiting_monitor();
153 // thread is doing an Object.wait() call
157 ObjectMonitor *enter_obj = thread->current_pending_monitor();
159 // thread is trying to enter() or raw_enter() an ObjectMonitor.
233 // Returns StackTraceElement[][] each element is the stack trace of a thread in
258 assert(num_snapshots == num_threads, "Must have num_threads thread snapshots");
275 void ThreadService::reset_contention_count_stat(JavaThread* thread) {
276 ThreadStatistics* stat = thread->get_thread_stat();
282 void ThreadService::reset_contention_time_stat(JavaThread* thread) {
283 ThreadStatistics* stat = thread->get_thread_stat();
309 // this thread was already visited
322 // heavyweight monitor a thread is waiting to lock.
336 currentThread = threadObj != NULL ? java_lang_Thread::thread(threadObj) : NULL;
344 // No dependency on another thread
348 // First visit to this thread
537 // Iterate inflated monitors and find monitors locked by this thread
625 // Build a map of thread to its owned AQS locks
638 JavaThread* thread = java_lang_Thread::thread(owner_thread_obj);
640 add_lock(thread, (instanceOop) o);
645 void ConcurrentLocksDump::add_lock(JavaThread* thread, instanceOop o) {
646 ThreadConcurrentLocks* tcl = thread_concurrent_locks(thread);
652 // First owned lock found for this thread
653 tcl = new ThreadConcurrentLocks(thread);
663 ThreadConcurrentLocks* ConcurrentLocksDump::thread_concurrent_locks(JavaThread* thread) {
665 if (tcl->java_thread() == thread) {
690 ThreadConcurrentLocks::ThreadConcurrentLocks(JavaThread* thread) {
691 _thread = thread;
720 ThreadSnapshot::ThreadSnapshot(JavaThread* thread) {
721 _thread = thread;
722 _threadObj = thread->threadObj();
727 ThreadStatistics* stat = thread->get_thread_stat();
739 _is_ext_suspended = thread->is_being_ext_suspended();
740 _is_in_native = (thread->thread_state() == _thread_in_native);
746 Handle obj = ThreadService::get_current_contended_monitor(thread);
748 // monitor no longer exists; thread is not blocked
756 // (may no longer be owned or releasing to some other thread)
757 // make this thread in RUNNABLE state.
758 // And when the owner thread is in attaching state, the java thread
759 // is not completely initialized. For example thread name and id
760 // and may not be set, so hide the attaching thread.
774 _blocker_object = thread->current_park_blocker();
853 currentThread = java_lang_Thread::thread(ownerObj);
877 assert(cur_thread == Thread::current(), "Check current thread");