< prev index next >
src/os/aix/vm/os_aix.cpp
Print this page
rev 10311 : 8150619: Improve thread based logging introduced with 8149036
Reviewed-by:
*** 1,8 ****
/*
! * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,8 ----
/*
! * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2012, 2016 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 790,809 ****
}
const pthread_t pthread_id = ::pthread_self();
const tid_t kernel_thread_id = ::thread_self();
! log_info(os, thread)("Thread is alive (pthread id " UINTX_FORMAT ", tid " UINTX_FORMAT ")",
! (uintx) pthread_id, (uintx) kernel_thread_id);
// Normally, pthread stacks on AIX live in the data segment (are allocated with malloc()
// by the pthread library). In rare cases, this may not be the case, e.g. when third-party
// tools hook pthread_create(). In this case, we may run into problems establishing
// guard pages on those stacks, because the stacks may reside in memory which is not
// protectable (shmated).
if (thread->stack_base() > ::sbrk(0)) {
! log_warning(os, thread)("Thread " UINTX_FORMAT ": stack not in data segment.", (uintx)pthread_id);
}
// 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
--- 790,809 ----
}
const pthread_t pthread_id = ::pthread_self();
const tid_t kernel_thread_id = ::thread_self();
! log_info(os, thread)("Thread is alive (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT ").",
! os::current_thread_id(), (uintx) kernel_thread_id);
// Normally, pthread stacks on AIX live in the data segment (are allocated with malloc()
// by the pthread library). In rare cases, this may not be the case, e.g. when third-party
// tools hook pthread_create(). In this case, we may run into problems establishing
// guard pages on those stacks, because the stacks may reside in memory which is not
// protectable (shmated).
if (thread->stack_base() > ::sbrk(0)) {
! log_warning(os, thread)("Thread stack not in data segment.");
}
// 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
*** 833,844 ****
assert(osthread->get_state() == RUNNABLE, "invalid os thread state");
// Call one more level start routine.
thread->run();
! log_info(os, thread)("Thread finished (pthread id " UINTX_FORMAT ", tid " UINTX_FORMAT ").",
! (uintx) pthread_id, (uintx) kernel_thread_id);
return 0;
}
bool os::create_thread(Thread* thread, ThreadType thr_type, size_t stack_size) {
--- 833,844 ----
assert(osthread->get_state() == RUNNABLE, "invalid os thread state");
// Call one more level start routine.
thread->run();
! log_info(os, thread)("Thread finished (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT ").",
! os::current_thread_id(), (uintx) kernel_thread_id);
return 0;
}
bool os::create_thread(Thread* thread, ThreadType thr_type, size_t stack_size) {
*** 976,987 ****
// initialize signal mask for this thread
// and save the caller's signal mask
os::Aix::hotspot_sigmask(thread);
! log_info(os, thread)("Thread attached (pthread id " UINTX_FORMAT ", tid " UINTX_FORMAT ")",
! (uintx) pthread_id, (uintx) kernel_thread_id);
return true;
}
void os::pd_start_thread(Thread* thread) {
--- 976,987 ----
// initialize signal mask for this thread
// and save the caller's signal mask
os::Aix::hotspot_sigmask(thread);
! log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT ").",
! os::current_thread_id(), (uintx) kernel_thread_id);
return true;
}
void os::pd_start_thread(Thread* thread) {
< prev index next >