RFR(XXXS): 7194409: os::javaTimeNanos() shows hot on CPU_CLK_UNHALTED profiles

Vitaly Davidovich vitalyd at gmail.com
Tue Aug 28 22:50:09 UTC 2012


Looks good.  Not sure if it's hot but should
supports_fast_thread_cpu_time() get the same treatment as it's very small?

I'm curious if anyone knows why the compiler didn't inline it on its own
(I'm assuming this is some not-too-ancient gcc for the Linux build)?

Sent from my phone
On Aug 28, 2012 1:59 PM, "John Cuthbertson" <john.cuthbertson at oracle.com>
wrote:

> Hi Everyone,
>
> Can I have another volunteer to review the changes for this CR (which were
> contributed by Brandon Mitchell at Twitter)? The webrev can be found at:
> http://cr.openjdk.java.net/~**johnc/7194409/webrev.0/<http://cr.openjdk.java.net/~johnc/7194409/webrev.0/>
>
> Here's the description, according to Brandon:
>
>  os::javaTimeNanos() shows hot on CPU_CLK_UNHALTED profiles due to
>> unnecessary function setup/teardown code around
>> Linux::supports_monotonic_**clock(). I've added an inline annotation to
>> simplify the funcall to a NULL check, and verified the change using
>> both gdb disas and additional profiling. I observed a 2-3% CPU time
>> delta in my profile data for os::javaTimeNanos().
>>
>>
> Thanks,
>
> JohnC
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20120828/15937313/attachment.htm>


More information about the hotspot-gc-dev mailing list