RFR (S) 8073479: Replace obj.getClass hacks with Objects.requireNonNull
Vitaly Davidovich
vitalyd at gmail.com
Fri Feb 20 13:55:48 UTC 2015
Besides that, there's also FreqInlineSize with a much larger size threshold
if this method gets very hot.
sent from my phone
On Feb 20, 2015 8:16 AM, "Vladimir Ivanov" <vladimir.x.ivanov at oracle.com>
wrote:
> So we hope for Objects.requireNonNull to be inlined most of the times.
>> It would be nice if @ForceInline annotation was accessible outside
>> java.lang.invoke package, so methods like requireNonNull could benefit
>> from it too. With modules, such platform annotations could be made
>> public and put into a package (java.lang.internal) that is not exported
>> to the world.
>>
> I don't think @ForceInline is the right solution here.
> I'd be happy to get rid of it in java.lang.invoke code as well :-)
> Instead, JIT inlining heuristics should be tuned to favor inlining trivial
> and small methods.
>
> There's -XX:MaxInlineSize(=35) flag in HotSpot. With current inlining
> heuristics, C1 & C2 should almost always inline the method.
>
> Best regards,
> Vladimir Ivanov
>
More information about the core-libs-dev
mailing list