JDK-7116189 : Export JVM_SetNativeThreadName from Hotspot
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs23
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-11-28
  • Updated: 2012-03-22
  • Resolved: 2012-01-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Relates :  
Description
JVM_SetNativeThreadName was added by 7098194, but not exported from libjvm.so
on linux and solaris.

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/242b4e0e6f73
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-emb/hotspot/rev/242b4e0e6f73
15-12-2011

EVALUATION http://hg.openjdk.java.net/jdk7u/jdk7u-osx/hotspot/rev/242b4e0e6f73
07-12-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/242b4e0e6f73
29-11-2011

EVALUATION Neither the Solaris nor Linux JDK implementation seems to support setting native thread names (though there seems to be an entry point in the latest Linux libpthread, pthread_setname_np(), that does so), but since OSX does, the reference to JVM_SetNativeThreadName exists in JDK native code, thus might be linked against, thus should be exported.
29-11-2011

EVALUATION Ok.
28-11-2011

SUGGESTED FIX From Mike McMahon (###@###.###): diff -r 7e508fbcb950 -r 0192a1740fad make/linux/makefiles/mapfile-vers-debug --- a/make/linux/makefiles/mapfile-vers-debug Thu Oct 27 12:21:43 2011 -0700 +++ b/make/linux/makefiles/mapfile-vers-debug Mon Nov 14 07:01:04 2011 -0800 @@ -221,6 +221,7 @@ JVM_SetArrayElement; JVM_SetClassSigners; JVM_SetLength; + JVM_SetNativeThreadName; JVM_SetPrimitiveArrayElement; JVM_SetProtectionDomain; JVM_SetSockOpt; diff -r 7e508fbcb950 -r 0192a1740fad make/linux/makefiles/mapfile-vers-product --- a/make/linux/makefiles/mapfile-vers-product Thu Oct 27 12:21:43 2011 -0700 +++ b/make/linux/makefiles/mapfile-vers-product Mon Nov 14 07:01:04 2011 -0800 @@ -221,6 +221,7 @@ JVM_SetArrayElement; JVM_SetClassSigners; JVM_SetLength; + JVM_SetNativeThreadName; JVM_SetPrimitiveArrayElement; JVM_SetProtectionDomain; JVM_SetSockOpt; diff -r 7e508fbcb950 -r 0192a1740fad make/solaris/makefiles/mapfile-vers --- a/make/solaris/makefiles/mapfile-vers Thu Oct 27 12:21:43 2011 -0700 +++ b/make/solaris/makefiles/mapfile-vers Mon Nov 14 07:01:04 2011 -0800 @@ -221,6 +221,7 @@ JVM_SetArrayElement; JVM_SetClassSigners; JVM_SetLength; + JVM_SetNativeThreadName; JVM_SetPrimitiveArrayElement; JVM_SetProtectionDomain; JVM_SetSockOpt;
28-11-2011