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

Staffan Larsen staffan.larsen at oracle.com
Wed Apr 30 11:42:31 UTC 2014


Volker, 

I agree on all of that, it just seems widely out of scope for the small regression I’m trying to fix.

Thanks,
/Staffan

On 30 apr 2014, at 11:47, Volker Simonis <volker.simonis at gmail.com> wrote:

> 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