RFR (S): 8024616: JSR292: lazily initialize core NamedFunctions used for bootstrapping

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Mon Sep 16 09:25:33 PDT 2013

Updated webrev: http://cr.openjdk.java.net/~vlivanov/8024616/webrev.01/

Best regards,
Vladimir Ivanov

On 9/11/13 3:24 PM, Vladimir Ivanov wrote:
> http://cr.openjdk.java.net/~vlivanov/8024616/webrev.00/
> 75 lines changed: 14 ins; 2 del; 59 mod
> A small set of NamedFunctions is pre-initialized to allow JSR292
> bootstrapping. After 8022595, which enabled JSR292 initialization during
> VM startup, they are instantiated even when JSR292 isn't used.
> It leads to unnecessary work being done and a regression in startup time
> (~20-25ms for HelloWorld application on my laptop). The major
> contribution to this time is bytecode compilation of LF's for
> preinitialized NamedFunctions.
> The fix is to factor NamedFunctions used for bootstrapping into an inner
> class to delay initialization till the first usage.
> After the fix, JSR292 pre-init duration goes down to 2-3ms (from 25ms)
> and no anonymous classes are produced, if JSR292 isn't used in the
> application.
> Testing: concurrent loading & init order tests for java.lang.invoke,
> JSR292 tests, octane.
> Best regards,
> Vladimir Ivanov

More information about the hotspot-compiler-dev mailing list