RFR: 8330198: Add some class loading related perf counters to measure VM startup [v3]
David Holmes
dholmes at openjdk.org
Wed May 29 12:50:04 UTC 2024
On Wed, 29 May 2024 05:01:27 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> Yeah I'm not really getting the control aspects here. If I turn on logging I should not get these new counters unless I explicitly ask for them - simply turning on the logging should not set `ProfileClassLinkage` IMO. But enabling `ProfileClassLinkage` should turn on `init` logging, else it serves no purpose.
>
> We are planning to add more diagnostic flags to control different sets of counters. With the current design, the user just needs to specify `-Xlog:init` to enable all the "new" counters. If the `init` logging is enabled by individual flag, the user needs to enable individual flag in the command line.
> Anyway, I think the follow would achieve what you are alluding to?
>
> if (FLAG_IS_CMDLINE(ProfileClassLinkage) && !log_is_enabled(Info, init)) {
> LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(init));
> }
>
> I think it's better to keep the current change.
This still seems convoluted to me. A -Xlog option shouldn't control anything but logging. If you want a set of counters enabled then use the flag to enable them, and separately use -Xlog:init to print them (though whether "init" is appropriate here is another matter). You could use -Xlog:init+foo to be more selective about which counters.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18790#discussion_r1618826710
More information about the hotspot-dev
mailing list