RFR(S) 8235629 Remove unnecessary calls to Thread::current
Ioi Lam
ioi.lam at oracle.com
Wed Dec 11 18:19:38 UTC 2019
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