pthread_setname_np (replacement) on AIX ?
Hello, currently pthread_setname_np is used on e.g. Linux and BSD https://hg.openjdk.java.net/jdk/jdk/file/ccb7bf459cbd/src/hotspot/os/linux/o... https://hg.openjdk.java.net/jdk/jdk/file/ccb7bf459cbd/src/hotspot/os/bsd/os_... for setting unique names for a threads. See the Linux manpage : https://linux.die.net/man/3/pthread_setname_np I noticed that the function seems to be available now on IBM i https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/pthread_set... but I did not find it on AIX - are there plans to include it on AIX ? Or is it already available in some SP ? If not is there a replacmenet function for it we could use ? Thanks, Matthias
Hi Matthias, I dont think it exists on AIX: We use it to set the thread name for debugging support (see os::set_native_thread_name). I personally think it is terribly important, since debugging on AIX in dbx is something we try to avoid :) Do you plan to commonize the implementation of os::set_native_thread_name for all Posix platforms? If yes, this makes sense, but I would dlsym the function. Cheers, Thomas On Thu, Oct 10, 2019 at 9:37 AM Baesken, Matthias <matthias.baesken@sap.com> wrote:
Hello, currently pthread_setname_np is used on e.g. Linux and BSD
https://hg.openjdk.java.net/jdk/jdk/file/ccb7bf459cbd/src/hotspot/os/linux/o...
https://hg.openjdk.java.net/jdk/jdk/file/ccb7bf459cbd/src/hotspot/os/bsd/os_...
for setting unique names for a threads.
See the Linux manpage :
https://linux.die.net/man/3/pthread_setname_np
I noticed that the function seems to be available now on IBM i
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/pthread_set...
but I did not find it on AIX - are there plans to include it on AIX ? Or is it already available in some SP ?
If not is there a replacmenet function for it we could use ?
Thanks, Matthias
Hi Thomas , I think it is not only useful for debugging but also in general for supportability , for instance AIX ps (-mo THREAD) has this : “…. The ps command writes the status of active processes and if the -m flag is given, displays the associated kernel threads to standard output. While the -m flag displays threads associated with processes using extra lines, you must use the -o flag with the THREAD field specifier to display extra thread-related columns. “ * Do you plan to commonize the implementation of os::set_native_thread_name for all Posix platforms If possible , yes . But I first just wanted to check for some functions in os_aix that still miss a “real” implementation … Best regards, Matthias From: Thomas Stüfe <thomas.stuefe@gmail.com> Sent: Donnerstag, 10. Oktober 2019 11:34 To: Baesken, Matthias <matthias.baesken@sap.com> Cc: ppc-aix-port-dev@openjdk.java.net Subject: Re: pthread_setname_np (replacement) on AIX ? Hi Matthias, I dont think it exists on AIX: We use it to set the thread name for debugging support (see os::set_native_thread_name). I personally think it is terribly important, since debugging on AIX in dbx is something we try to avoid :) Do you plan to commonize the implementation of os::set_native_thread_name for all Posix platforms? If yes, this makes sense, but I would dlsym the function. Cheers, Thomas On Thu, Oct 10, 2019 at 9:37 AM Baesken, Matthias <matthias.baesken@sap.com<mailto:matthias.baesken@sap.com>> wrote: Hello, currently pthread_setname_np is used on e.g. Linux and BSD https://hg.openjdk.java.net/jdk/jdk/file/ccb7bf459cbd/src/hotspot/os/linux/o... https://hg.openjdk.java.net/jdk/jdk/file/ccb7bf459cbd/src/hotspot/os/bsd/os_... for setting unique names for a threads. See the Linux manpage : https://linux.die.net/man/3/pthread_setname_np I noticed that the function seems to be available now on IBM i https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/pthread_set... but I did not find it on AIX - are there plans to include it on AIX ? Or is it already available in some SP ? If not is there a replacmenet function for it we could use ? Thanks, Matthias
participants (2)
-
Baesken, Matthias
-
Thomas Stüfe