RFR: 8292692: Move MethodCounters inline functions out of method.hpp

Calvin Cheung ccheung at openjdk.org
Wed Sep 6 22:31:38 UTC 2023


On Mon, 31 Jul 2023 20:12:19 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

> The inline functions related to MethodCounters in method.hpp can be moved to the inline file to reduce the number of includes. Verified with tier 1-5 tests.
> 
> Below is a comparison of the old and new include statistics:
> 
> Old
> ----
> scanning    836 methodCounters.hpp
>    2 found    836 method.hpp
> 
> scanning    837 invocationCounter.hpp
>    2 found    836 method.hpp
>    3 found    836 methodCounters.hpp
>    4 found    649 interp_masm_x86.hpp
>    5 found      0 interp_masm_aarch64.hpp
>    6 found      0 interp_masm_arm.hpp
>    7 found      0 interp_masm_ppc.hpp
>    8 found      0 interp_masm_riscv.hpp
>    9 found      0 interp_masm_s390.hpp
>   10 found      0 interp_masm_zero.hpp
> 
> scanning    298 method.inline.hpp
>    2 found    286 continuationEntry_x86.inline.hpp
>    3 found      0 continuationEntry_aarch64.inline.hpp
>    4 found      0 continuationEntry_ppc.inline.hpp
>    5 found      0 continuationEntry_riscv.inline.hpp
> 
> 
> 
> New
> -----
> scanning    304 methodCounters.hpp
>    2 found    299 method.inline.hpp
> 
> scanning    476 invocationCounter.hpp
>    2 found    304 methodCounters.hpp
>    3 found    257 methodData.hpp
>    4 found      0 interp_masm_aarch64.hpp
>    5 found      0 interp_masm_ppc.hpp
>    6 found      0 interp_masm_riscv.hpp
>    7 found      0 interp_masm_s390.hpp
>    8 found      0 interp_masm_zero.hpp
> 
> scanning    299 method.inline.hpp
>    2 found    286 continuationEntry_x86.inline.hpp
>    3 found      0 continuationEntry_aarch64.inline.hpp
>    4 found      0 continuationEntry_ppc.inline.hpp
>    5 found      0 continuationEntry_riscv.inline.hpp

Looks good. Just one nit.

src/hotspot/share/oops/method.inline.hpp line 142:

> 140:   }
> 141: }
> 142: #endif

Suggestion:
   ` #endif // INCLUDE_JVMTI`

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

Marked as reviewed by ccheung (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15094#pullrequestreview-1614304034
PR Review Comment: https://git.openjdk.org/jdk/pull/15094#discussion_r1317890673


More information about the hotspot-dev mailing list