pthread_setname_np (replacement) on AIX ?

Baesken, Matthias matthias.baesken at sap.com
Thu Oct 10 10:35:32 UTC 2019


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 at gmail.com>
Sent: Donnerstag, 10. Oktober 2019 11:34
To: Baesken, Matthias <matthias.baesken at sap.com>
Cc: ppc-aix-port-dev at 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 at sap.com<mailto:matthias.baesken at 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/os_linux.cpp#l5101

https://hg.openjdk.java.net/jdk/jdk/file/ccb7bf459cbd/src/hotspot/os/bsd/os_bsd.cpp#l3280


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_setname_np.htm

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







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20191010/ef3c2a4e/attachment-0001.html>


More information about the ppc-aix-port-dev mailing list