[PATCH] Linux implementation for set_native_thread_name() (original) (raw)

Dmitry Samersoff Dmitry.Samersoff at oracle.com
Tue Jul 24 13:03:10 PDT 2012


Roman,

Looks good for me except a nit:

memcpy(buf,name,MAXTHREADNAMESIZE-1); buf[MAXTHREADNAMESIZE-1] = 0;

is much faster then snprintf call.

-Dmitry

On 2012-07-24 23:42, Roman Kennke wrote:

Hello,

The following patch implements setnativethreadname() for Linux, which was so far unimplemented. The name needs to be truncated to 15 chars, otherwise it would not be accepted by pthreadsetnamenp() at all. http://cr.openjdk.java.net/~rkennke/linuxthreadname/webrev.00/ This is my first patch to hotspot ever, so please let me know when I did anything fundamental wrong. I have another patch in the pipeline for implementing the other 2 missing methods in the same source file (distributeprocesses() and bindtoprocessor() ). What do you think? Kind regards, Roman

-- Dmitry Samersoff Java Hotspot development team, SPB04



More information about the hotspot-dev mailing list