RFR (XS) 7901097: Blackhole methods should be non-inlined
Gilles Duboscq
duboscq at ssw.jku.at
Thu Nov 13 17:34:26 UTC 2014
Hi,
An other interesting option would be to have blackhole methods in
WhiteBox or Unsafe or similar which compilers can intrinsify to pin a
synthetic usage of the consumed value in the CFG. This would have a
minimal overhead (no code at all).
However, that would only ensure the value is consumed if there are no
further optimizations at a lower level (in the CPU for example). Are
you aware of such optimizations in any interesting platform?
-Gilles
On Thu, Nov 13, 2014 at 4:50 PM, Aleksey Shipilev
<aleksey.shipilev at oracle.com> wrote:
> Hi,
>
> On 11/13/2014 06:01 PM, Sergey Kuksenko wrote:
>> I'd like to emphasize forth assumption/requirement:
>> (c') there is a way to prohibit inlining of particular method
>>
>> If JVM doesn't satisfy (c') the we can do - to rely on (a) and pray that
>> (b) is also working.
>> I agreed with suggested idea to force Blackhole to be non-inlinable.
>
> Good, thanks, I'll push shortly given no other comments.
>
>
>> Conclusion, ability to choose Blackhole implementation from the
>> following list may be useful:
>> 1) non-inlineable full Blackhole (as the most defensive)
>> 2) full Blackhole (where there is no way to do (c')
>> 3) non-inlineable empty Blackwhole (where I know (c) & (c') are exist)
>
> Okay. This would take a while to implement in performant way, but I
> agree with the approach. Filed:
> https://bugs.openjdk.java.net/browse/CODETOOLS-7901098
>
> Thanks,
> -Aleksey.
>
More information about the jmh-dev
mailing list