RFR: 8031126 java/lang/management/ThreadMXBean/ThreadUserTime.java fails intermittently
Volker Simonis
volker.simonis at gmail.com
Wed Apr 30 09:47:05 UTC 2014
On Tue, Apr 29, 2014 at 4:21 PM, Staffan Larsen
<staffan.larsen at oracle.com> wrote:
> 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.
>
I agree that we only use NPTL now.
However if you remove the check, I'd suggest we remove
os::Linux::is_NPTL() altogether.
For any case we can change the detection of the pthread version in
os::Linux::libpthread_init() into a guarantee that we really use NPTL.
And we should remove the kernel versions 2.5 and 2.5 from the list of
supported kernel versions (i.e. SUPPORTED_OS_VERSION) in
make/linux/Makefile because kernel 2.6 was the first one which
supported NPTL.
Of course all this cleanup could be done in extra, follow-up change.
Regards,
Volker
> webrev: http://cr.openjdk.java.net/~sla/8031126/webrev.00/
> bug: https://bugs.openjdk.java.net/browse/JDK-8031126
>
> Thanks,
> /Staffan
More information about the hotspot-runtime-dev
mailing list