[PATCH] Linux implementation for set_native_thread_name()
rkennke at redhat.com
Thu Jul 26 05:18:49 PDT 2012
Am Donnerstag, den 26.07.2012, 22:00 +1000 schrieb David Holmes:
> 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
> > jio_snprintf):
> 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
> > http://cr.openjdk.java.net/~rkennke/linux_threadname/webrev.01/
> This also has the distribute_processes etc changes, which should be
> handled seperately.
Uff. I messed up something there. Please find the real webrev here:
> >> Do you have a bug number for this?
> > No. (I don't have access to bugster anymore).
> Bugster is nearly dead - long live Jira :)
> 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. :-)
More information about the hotspot-dev