RFR: 8330198: Add some class loading related perf counters to measure VM startup [v9]
Calvin Cheung
ccheung at openjdk.org
Thu Jun 13 05:03:15 UTC 2024
On Thu, 13 Jun 2024 02:19:16 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> remove log_vm_stats()
>
> src/hotspot/share/runtime/java.cpp line 362:
>
>> 360: if (log_is_enabled(Info, perf, class, link)) {
>> 361: ClassLoader::print_counters(tty);
>> 362: }
>
> Again this needs to comment why we check the log is active but write to tty instead of the logstream.
>
> Or we could put the `log_is_enabled` check inside `print_counters` rather than require callers to do it. That also allows us to print that the counters are disabled eg.
>
> void ClassLoader::print_counters(outputStream *st) {
> // The counters are only active if the logging is enabled, but
> // we print to the passed in outputStream as requested.
> if (log_is_enabled(Info, perf, class, link)) {
> st->print_cr("ClassLoader:");
> ...
> } else {
> st->print_cr("ClassLoader: <not enabled>");
> }
I've made the above changes as you suggested without the else part to be consistent with printing of other statistics.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18790#discussion_r1637537375
More information about the hotspot-dev
mailing list