RFR: 8330198: Add some class loading related perf counters to measure VM startup [v3]
Calvin Cheung
ccheung at openjdk.org
Fri Jun 14 01:23:20 UTC 2024
On Sat, 25 May 2024 06:41:28 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>>> Okay my first reaction here is "I object!". I get that Leyden wants to be able to easily compare startup costs between itself and mainline, but what is this costing mainline? Even if these counters are not active there is an impact on the code execution and I want to know that impact is negligible.
>>
>> I added some perf numbers for various startup benchmarks in the bug report [comment](https://bugs.openjdk.org/browse/JDK-8330198?focusedId=14675860&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14675860).
>
>> Okay my first reaction here is "I object!". I get that Leyden wants to be able to easily compare startup costs between itself and mainline, but what is this costing mainline? Even if these counters are not active there is an impact on the code execution and I want to know that impact is negligible.
>
> These counters are useful in the mainline as well. We want to be able to use `java -Xlog:init` to diagnose start-up time performance for the mainline.
>
> The main cost of the performance counters is reading of the clock. All the new counters added in the PR are guarded by a global flag, so the cost is negligible when the logging is not enabled.
Thanks @iklam, @dholmes-ora for the review.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18790#issuecomment-2167039542
More information about the hotspot-dev
mailing list