RFR(S) 8235629 Remove unnecessary calls to Thread::current
Harold Seigel
harold.seigel at oracle.com
Wed Dec 11 18:32:52 UTC 2019
Looks good!
Thanks, Harold
On 12/11/2019 1:19 PM, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8235629
> http://cr.openjdk.java.net/~iklam/jdk14/8235629-remove-thread-current.v01/
>
>
> + In mutex.cpp, put "assert_owner(Thread::current())" into DEBUG_ONLY
> to avoid
> the evaluation of the call in product builds.
> + Changed various "ResourceMark rm;" to "rm(THREAD)".
> + In UL logs, use "ResourceMark rm" only conditionally.
>
> I found these locations by running "java -version" in gdb, setting a
> breakpoint
> at Thread::current() and logging all the callstacks. So these are by
> no means complete,
> but are rather an easy-to-fix part of JVM start-up.
>
> Before: 0.0420053188 sec
> After: 0.0417649239 sec
> 99.42770374% = about .6% improvement
>
> Thanks
> - Ioi
>
>
More information about the hotspot-runtime-dev
mailing list