Request for review: 6888526 Linux getCurrentThreadCpuTime is drastically slower than Windows
David Holmes
David.Holmes at oracle.com
Thu Jul 8 13:57:45 PDT 2010
Andrew Haley said the following on 07/09/10 02:49:
>> Further, as Dan mentions, this would then affect Java 6 updates and that
>> is not allowed (without additional 'paperwork') so we'd have to augment
>> Arguments::parse_each_vm_init_arg in arguments.cpp by adding to the end:
>>
>> if (JDK_Version::current().compare_major(6) <= 0 &&
>> FLAG_IS_DEFAULT(UseLinuxPosixThreadCPUClocks)) {
>> FLAG_SET_DEFAULT(UseLinuxPosixThreadCPUClocks, false);
>> }
>>
>> this forces the flag to false in Java 6 unless it has been set explicitly.
>
> New webrev at http://cr.openjdk.java.net/~aph/6888526-2/
>
> I enclosed the JDK version test in #ifdef LINUX because I don't think
> the UseLinuxPosixThreadCPUClocks flag exists in other systems.
Right. Thumbs up from me too.
Dan: do you know what test results we'd need to watch for any issues
this change introduces (ie buggy CPU clocks) ?
David
-----
> I've tested this patch on a RHEL 4 system with the 2.6.9 kernel, which
> works slowly, as expected, regardless of the setting of
> UseLinuxPosixThreadCPUClocks. I have made sure that on JDK 6 the flag
> defaults to false, but it can still be enabled with
> -XX:+UseLinuxPosixThreadCPUClocks. I also made sure that on JDK 7
> UseLinuxPosixThreadCPUClocks defaults to true.
>
> Andrew.
More information about the hotspot-dev
mailing list