< prev index next >
src/hotspot/os/linux/os_linux.cpp
Print this page
rev 52189 : [mq]: tinit
@@ -647,10 +647,13 @@
//////////////////////////////////////////////////////////////////////////////
// create new thread
// 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.
@@ -663,13 +666,10 @@
OSThread* osthread = thread->osthread();
Monitor* sync = osthread->startThread_lock();
osthread->set_thread_id(os::current_thread_id());
- log_info(os, thread)("Thread is alive (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").",
- os::current_thread_id(), (uintx) pthread_self());
-
if (UseNUMA) {
int lgrp_id = os::numa_get_group_id();
if (lgrp_id != -1) {
thread->set_lgrp_id(lgrp_id);
}
@@ -693,14 +693,11 @@
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());
+ 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 >