RFR (S): 8151322: Implement os::set_native_thread_name() on Solaris

Staffan Larsen staffan.larsen at oracle.com
Tue Mar 15 10:16:04 UTC 2016


Why do you assign the result to an unused variable:

L452:   const int rc = Solaris::_pthread_setname_np(pthread_self(), but);

Otherwise: Looks good!

Thanks,
/Staffan

> On 15 mars 2016, at 07:24, David Holmes <david.holmes at oracle.com> wrote:
> 
> RFE: https://bugs.openjdk.java.net/browse/JDK-8151322
> 
> Webrev: http://cr.openjdk.java.net/~dholmes/8151322/webrev/
> 
> As of Solaris 11.3 pthread_set_name_np has been implemented:
> 
> http://docs.oracle.com/cd/E53394_01/html/E54766/pthread-setname-np-3c.html#scrolltoc
> 
> https://blogs.oracle.com/observatory/entry/named_threads
> 
> So we can now implement os::set_native_thread_name using dynamic lookup as done on Linux. The only difference is we have 31 characters to play with instead of 16.
> 
> Testing: - JPRT (only 11.2 systems)
>         - Manually on 11.3 - see examples in bug report
> 
> Thanks,
> David



More information about the hotspot-runtime-dev mailing list