RFR: 8168640: (fc) Avoiding AtomicBoolean in FileInput/-OutputStream improves startup

Paul Sandoz paul.sandoz at oracle.com
Wed Oct 26 19:38:15 UTC 2016


> On 26 Oct 2016, at 05:11, Claes Redestad <claes.redestad at oracle.com> wrote:
> 
> Hi,
> 
> does this commentary suffice?
> 
> http://cr.openjdk.java.net/~redestad/8168640/webrev.02/
> 

+1


> To answer Paul's question about the exact startup gain:
> 
> 20 named classes observable with -Xlog:class+load (11
> additional anonymous show up in heap dumps), for example:
> 
>  java.lang.invoke.MethodType$ConcurrentWeakInternSet
>  java.lang.invoke.MethodType$ConcurrentWeakInternSet$WeakEntry
>  java.lang.invoke.MethodTypeForm
>  java.lang.invoke.VarHandle$1
>  java.lang.invoke.VarHandle$AccessDescriptor
>  java.lang.invoke.VarHandle$AccessMode
>  java.lang.invoke.VarHandle$AccessType
>  java.lang.invoke.VarHandleGuards
>  java.lang.invoke.VarHandleInts$FieldInstanceReadOnly
>  java.lang.invoke.VarHandleInts$FieldInstanceReadWrite
>  java.lang.invoke.VarHandles
>  java.lang.invoke.VarHandle$TypesAndInvokers
> 
> Not initializing this eagerly drops retained heap on a minimal
> Hello World by ~17Kb, and a 3-10ms startup improvement
> on similar programs (naturally varies a lot between systems
> due to timing of when/if JIT compilations happen during early
> execution).
> 

Thanks.

Do you observe that MethodHandleStatics.<clinit> can take a large proportion of the VH initialisation time?

Paul.


More information about the core-libs-dev mailing list