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

Christian Thalinger christian.thalinger at oracle.com
Wed Sep 18 12:22:11 PDT 2013

Looks good.

On Sep 11, 2013, at 4:24 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> 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