RFR: 8320276: Improve class initialization barrier in TemplateTable::_new [v4]

Frederic Parain fparain at openjdk.org
Wed Jan 3 20:08:28 UTC 2024


On Fri, 22 Dec 2023 05:08:19 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> The class initialization barrier in TemplateTable::_new fast path check ensures that the class being instantiated is fully initialized. It can be improved by introducing additional fast path check when current thread is initializer thread as MacroAssembler::clinit_barrier() does. It avoids repeated calls into interpreter runtime for classes being initialized. This patch adds the optimization for x86 and aarch64. Verified with tier 1-5 tests.
>> 
>> This change was tested with Spring Petclinic which reported the following startup times:
>> 
>> Clean build:   #### Booted and returned in 161941ms
>> Patched build: #### Booted and returned in 160657ms
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Added comment to remaining platforms

LGTM

-------------

Marked as reviewed by fparain (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17006#pullrequestreview-1802997314


More information about the hotspot-dev mailing list