[PATCH] Linux implementation for set_native_thread_name() (original) (raw)
Roman Kennke rkennke at redhat.com
Thu Jul 26 05🔞49 PDT 2012
- Previous message: [PATCH] Linux implementation for set_native_thread_name()
- Next message: [PATCH] Linux implementation for set_native_thread_name()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am Donnerstag, den 26.07.2012, 22:00 +1000 schrieb David Holmes:
Roman,
On 25/07/2012 7:10 AM, Roman Kennke wrote: >> I think it looks fine. > > Great! I posted an updated webrev for this (replaced snprint with > jiosnprintf): You are assuming that these non-posix pthread extensions will always exist. Do we know that is true for all Linux's - including potentially custom distributions on embedded systems? I think we need dynamic lookup of the function, as done elsewhere, to verify that it exists.
Do you mean at runtime, using dlopen or such? Or at compile time, using #ifdefs ?
> http://cr.openjdk.java.net/~rkennke/linuxthreadname/webrev.01/
This also has the distributeprocesses etc changes, which should be handled seperately.
Uff. I messed up something there. Please find the real webrev here:
http://cr.openjdk.java.net/~rkennke/linux_threadname/webrev.02/
>> Do you have a bug number for this? > > No. (I don't have access to bugster anymore).
Bugster is nearly dead - long live Jira :)
Wow, cool!
But for now someone will need to create a bug for this ... though it may already exist from when this function was added.
>> Also, how do we verify the result? > > I verified it using htop and by inspecting /proc/$PID/task/$TID/stat. > Unfortuntately, I couldn't get top or ps to show the thread name, but > maybe I'm just stupid (and I did not try very hard). gdb? Not sure how this shows up on OSX. If the name doesn't appear in anything useful then there's not much point implementing the method.
Yes, gdb shows the thread name as well (dunno why I forgot about this most obvious use case).
> Also: which of the many repositories do I need to push this to?
It would go into hsx/hotspot-rt forest, but you can't push it directly. All hotspot changes must go via JPRT so you will need a sponsor.
Ok. I think Keith said he can do this. :-)
Thanks!
Regards, Roman
- Previous message: [PATCH] Linux implementation for set_native_thread_name()
- Next message: [PATCH] Linux implementation for set_native_thread_name()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]