< prev index next >

src/hotspot/os/bsd/os_bsd.cpp

Print this page
rev 52189 : [mq]: tinit

*** 642,651 **** --- 642,654 ---- } #endif // Thread start routine for all newly created threads static void *thread_native_entry(Thread *thread) { + + thread->record_stack_base_and_size(); + // Try to randomize the cache line index of hot stack frames. // This helps when threads of the same stack traces evict each other's // cache lines. The threads can be either from the same JVM instance, or // from different JVM instances. The benefit is especially true for // processors with hyperthreading technology.
*** 658,670 **** OSThread* osthread = thread->osthread(); Monitor* sync = osthread->startThread_lock(); osthread->set_thread_id(os::Bsd::gettid()); - log_info(os, thread)("Thread is alive (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").", - os::current_thread_id(), (uintx) pthread_self()); - #ifdef __APPLE__ uint64_t unique_thread_id = locate_unique_thread_id(osthread->thread_id()); guarantee(unique_thread_id != 0, "unique thread id was not found"); osthread->set_unique_thread_id(unique_thread_id); #endif --- 661,670 ----
*** 694,707 **** sync->wait(Mutex::_no_safepoint_check_flag); } } // call one more level start routine ! thread->run(); ! ! log_info(os, thread)("Thread finished (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").", ! os::current_thread_id(), (uintx) pthread_self()); // If a thread has not deleted itself ("delete this") as part of its // termination sequence, we have to ensure thread-local-storage is // cleared before we actually terminate. No threads should ever be // deleted asynchronously with respect to their termination. --- 694,704 ---- sync->wait(Mutex::_no_safepoint_check_flag); } } // call one more level start routine ! thread->call_run(); // If a thread has not deleted itself ("delete this") as part of its // termination sequence, we have to ensure thread-local-storage is // cleared before we actually terminate. No threads should ever be // deleted asynchronously with respect to their termination.
< prev index next >