RFR(s): 8218145: block_if_requested is not proper inlined due to size
Kim Barrett
kim.barrett at oracle.com
Fri Feb 1 16:22:08 UTC 2019
> On Feb 1, 2019, at 4:54 AM, Robbin Ehn <robbin.ehn at oracle.com> wrote:
>
> Hi all, please review.
>
> Code:
> http://cr.openjdk.java.net/~rehn/8218145/webrev/index.html
> Issue:
> https://bugs.openjdk.java.net/browse/JDK-8218145
>
> SafepointMechanism::block_if_requested(JavaThread*) is often not inlined to due inline-unit-growth.
> This improve the inlining frequency with 6-7x.
> Some startup benchmarks show 1% better time.
>
> Test -+ThreadsLocalHandshakes and t1.
>
> Note that we are planning to deprecate -ThreadsLocalHandshakes in 13, therefore -ThreadsLocalHandshakes is put in slow path to further reduce size.
> When we can remove the uses_thread_local_poll() it become so small it is always inlined. Arguably this method should have ALWAYSINLINE, but I would prefer not.
>
> Thanks, Robbin
Seems like block_if_requested_slow could be simplified. Unconditionally
do the global_poll() case first. Then conditionally do the has_handshake()
case if uses_thread_local_poll().
More information about the hotspot-runtime-dev
mailing list