RFR[s] 8179305 - Avoid repeated calls to JavaThread::last_frame in InterpreterRuntime
David Holmes
david.holmes at oracle.com
Fri Apr 28 11:30:46 UTC 2017
Hi Ioi,
This looks good to me! Nice speedup figures.
Thanks,
David
On 28/04/2017 9:06 PM, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8179305
> http://cr.openjdk.java.net/~iklam/jdk10/8179305-avoid-last-frame.v01/
>
> Summary:
>
> JavaThread::last_frame() is an expensive call. We use the helper class
> LastFrameAccessor holds the value of last_frame:
>
> OLD:
> methodHandle m (thread, method(thread));// calls
> JavaThread::last_frame() internally
> Bytecode_loadconstant ldc(m, bci(thread));// calls
> JavaThread::last_frame() internally
>
> NEW:
> LastFrameAccessor last_frame(thread);
> methodHandle m (thread, last_frame.method());
> Bytecode_loadconstant ldc(m, last_frame.bci());
>
> Testing:
>
> Preliminary benchmarking shows significant VM start-up improvement:
>
> java -version:
> no CDS = 80.35 ms -> 79.14ms (-1.5%)
> w/ CDS = 53.89ms -> 52.62ms (-2.36%)
>
> clojure sample app:
> no CDS = 1442.46ms -> 1436.11ms (-0.44%)
> w/ CDS = 695.78ms -> 679.52ms (-2.34%)
>
> Thanks
> - Ioi
More information about the hotspot-runtime-dev
mailing list