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

Calvin Cheung ccheung at openjdk.org
Thu May 30 00:32:19 UTC 2024


On Wed, 29 May 2024 12:47:20 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> 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.

I've modified the fix so that the user needs to specify both `-Xlog:init` and `-XX:+ProfileClassLinkage` for the counters to be printed.

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

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


More information about the hotspot-dev mailing list