RFR: 8330198: Add some class loading related perf counters to measure VM startup [v3]
Ioi Lam
iklam at openjdk.org
Mon Jun 3 20:48:33 UTC 2024
On Mon, 3 Jun 2024 08:30:46 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Thanks @iwanowww for charming in.
>> I've changed `arguments.cpp` back to the first version.
>
> 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
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18790#discussion_r1625030585
More information about the hotspot-dev
mailing list