RFR: 8031126 java/lang/management/ThreadMXBean/ThreadUserTime.java fails intermittently

Staffan Larsen staffan.larsen at oracle.com
Tue Apr 29 14:21:10 UTC 2014

When JDK-8036122 "Fix warning "format not a string literal”” was fixed, the fix introduced a regression in 
os_linux.cpp:slow_thread_cpu_time(). There is a static variable in the method with a format string. The format string was set to different value if NTPL was used. This check was only done once. After the fix, the incorrect format string is used on NPTL for all but the first call.

Since all our linux variants use NPTL now, I suggest a simple fix that has only one format string.

webrev: http://cr.openjdk.java.net/~sla/8031126/webrev.00/
bug: https://bugs.openjdk.java.net/browse/JDK-8031126


More information about the hotspot-runtime-dev mailing list