8144223: Move j.l.invoke.{ForceInline, DontInline, Stable} to jdk.internal.vm.annotation package

Paul Sandoz paul.sandoz at oracle.com
Mon Nov 30 17:40:48 UTC 2015


Hi,

Please review:

  http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8144223-move-stable-force-dont-inline-jdk/webrev/
  http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8144223-move-stable-force-dont-inline-hotspot/webrev/

This moves the package private annotations j.l.invoke.{ForceInline, DontInline, Stable} to public annotations of the same name in the non-exported (at least for unqualified exports) package jdk.internal.vm.annotation where @Contended lives (in hs-rt not currently hs-comp) and where HotSpotIntrinsicCandidate will move to.

The intent is these annotations can be used sparingly in classes in java.base packages other than java.lang.invoke. From the issue description:

https://bugs.openjdk.java.net/browse/JDK-8144223

> The annotations j.l.invoke.{ForceInline, DontInline, Stable} are currently package private but could have use outside that package if used carefully and sparingly. For example:
> 
> 1) Methods on Atomic*FieldUpdater classes may benefit from @ForceInline, as would array support methods of JDK-8136924 to preserve existing inlining characteristics.
> 2) Reference.reachabilityFence (JDK-8133348) could be annotated with @DontInline rather than explicitly making the method signature known to the VM.
> 3) The alias jdk.vm.ci.hotspot.Stable could potentially be removed.

I am especially interested if 3) is possible, it seems so from my limited knowledge.


This patch is based off hs-comp because there is a test in hs-comp using @Stable that was added 2 weeks ago and it is not yet in hs-rt (AFAIK hs-rt is a sub-set of hs-comp in this respect):

$ hg log test/compiler/stable/TestStableMemoryBarrier.java
changeset:   9489:1a552f9b912e
tag:         JDK-8144223-move-stable-force-dont-inline-hotspot
tag:         qtip
tag:         tip
user:        psandoz
date:        Mon Nov 30 18:24:44 2015 +0100
summary:     8144223: Move j.l.invoke.{ForceInline, DontInline, Stable} to jdk.internal.vm.annotation package

changeset:   9270:9348fbca9f67
parent:      9268:ee63c0026315
user:        hshi
date:        Mon Nov 16 16:14:15 2015 +0100
summary:     8139758: [REDO] Elide more final field's write memory barrier with escape analysis result

Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20151130/93cd1d8a/signature-0001.asc>


More information about the hotspot-compiler-dev mailing list