RFR: 8330198: Add some class loading related perf counters to measure VM startup [v3]

Vladimir Ivanov vlivanov at openjdk.org
Tue Jun 4 03:50:06 UTC 2024


On Mon, 3 Jun 2024 20:45:39 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> I'm getting confused.
>> 
>> The ProfileClassLinkage flag should control whether the counters are initialized and used.
>> 
>> The -Xlog:init (perhaps with a better name/tag!) should control whether they get printed - in theory you could chose to print under any logging setting.
>> 
>> I don't think either flag should imply/force the setting of the other.
>
> It's about usability. `-Xlog:init` means "I want to see logs related to initialization", so it should enable all the counters for printing the related logs. We may add several groups of counters in the future. We don't want to force the user to enumerate all these counters like:
> 
> 
> java -Xlog:init -XX:+ ProfileClassLinkage -XX:+ProfileAAA  -XX:+ProfileBBB ....
> 
> 
> Also,  `-Xlog:init` doesn't force the all the counters to be used. It just changes the default value of the selection:
> 
> 
>   if (log_is_enabled(Info, init)) {
>     FLAG_SET_ERGO_IF_DEFAULT(ProfileClassLinkage, true);
>     FLAG_SET_ERGO_IF_DEFAULT(ProfileAAA, true);
>     FLAG_SET_ERGO_IF_DEFAULT(ProfileBBB, true);
>   }
> 
> 
> The user could disable certain counters by:
> 
> 
> java -Xlog:init  -XX:-ProfileAAA

> The -Xlog:init (perhaps with a better name/tag!)

I'm all for a better naming scheme. Any suggestions?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18790#discussion_r1625302912


More information about the hotspot-dev mailing list