[OpenJDK 2D-Dev] Java2d code using @ForceInline or @Stable annotations

Laurent Bourgès bourges.laurent at gmail.com
Wed Mar 16 22:25:20 UTC 2016


I tested adding @ForceInline to few important methods in marlin that
jitwatch detected as too large (>325 byte codes).

It seems hotspot perform inlining with the hint and few long tests are a
bit faster (max 10%).

I agree it is border line and java2d must respect vm and module rules.


Le 16 mars 2016 17:51, "Philip Race" <philip.race at oracle.com> a écrit :
> The jigsaw team would need to sign off on any changes
> to the module graph and in addition I think the VM team
> might have some input on this since I don't think this
> is intended to be used other than extremely sparingly.
> I see @Stable used only by String and java.lang.invoke
> which has deep ties to the VM.
> In other words I am not sure we should do this or if, for ForceIine,
> it would bring any benefits over what hotspot is doing without prompting.
> -phil.
> On 3/16/16, 8:24 AM, Laurent Bourgès wrote:
>> Hi,
>> In the marlin renderer, I am wondering if I could use the compiler
annotations @ForceInline / @Stable (in java.base module).
>> It would provide hints to the hotspot compiler and maybe bring some
performance benefits.
>> Of course, it means adding a qualified export in the modules.xml:
>>     <export>
>>       <name>jdk.internal.vm.annotation</name>
>>       <to>java.desktop</to>
>>     </export>
>> Please give me your opinion & comments.
>> Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160316/84df019f/attachment.html>

More information about the 2d-dev mailing list