RFR: 8330339: G1: Move some public methods to private in G1BlockOffsetTable APIs
Guoxiong Li
gli at openjdk.org
Mon Apr 22 09:01:33 UTC 2024
On Wed, 17 Apr 2024 06:44:02 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Hi all,
>>
>> This patch moves several methods to the `private` part.
>>
>> Thanks for taking the time to review.
>>
>> Best Regards,
>> -- Guoxiong
>
> Since link-time-opt is disabled by default on most platforms (`# Only arm-32 should have link-time-opt enabled as default`), compiler needs to "see" the body of a method/function to not treat it as blackbox, i.e. emitting `call` in asm. As a result, inline.hpp is meant to expose some non-trivial & perf-critical methods to callers in another file (translation unit) so that compiler can perform more/better optimizations.
>
>> I think the non-trivial inlined methods should be put in `inline.hpp`
>
> I think it's more precise to say body of perf-critical public apis should be placed in hpp/inline.hpp. In order for compiler to see through those apis, their recursive callees should be "inlinable" (e.g. placed in inline.hpp) as well. Otherwise, the effect of placing those apis in inline.hpp will be limited.
@albertnetymk @walulyai Thanks for your reviews. Integrating.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18800#issuecomment-2068858696
More information about the hotspot-gc-dev
mailing list