RFR: 8330198: Add some class loading related perf counters to measure VM startup [v2]
Calvin Cheung
ccheung at openjdk.org
Mon May 13 23:02:30 UTC 2024
On Fri, 10 May 2024 22:58:25 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Calvin Cheung has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>>
>> - Merge branch 'master' into xloginit-classloading
>> - fix build issues on macos-x64 and -aarch64
>> - Merge branch 'master' into xloginit-classloading
>> - fix linux-x86 and minimal build issues
>> - 8330198: Add some class loading related perf counters to measure VM startup
>
> src/hotspot/share/runtime/java.cpp line 245:
>
>> 243: #else
>> 244:
>> 245: void print_method_invocation_histogram() {}
>
> Is this change necessary?
No, I've removed it.
> src/hotspot/share/runtime/perfData.hpp line 420:
>
>> 418: inline void inc(jlong val) { (*(jlong*)_valuep) += val; }
>> 419: inline void dec(jlong val) { inc(-val); }
>> 420: inline void reset() { (*(jlong*)_valuep) = 0; }
>
> This new function doesn't seem to be used.
Removed.
> src/hotspot/share/runtime/perfData.hpp line 835:
>
>> 833: public:
>> 834: inline PerfTraceTime(PerfLongCounter* timerp, bool is_on = true) : _timerp(timerp) {
>> 835: if (!is_on || !UsePerfData) return;
>
> Instead of having a separate `is_on` parameter, can we check for `timerp == nullptr1` instead?
It works. I've pushed another commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18790#discussion_r1599184407
PR Review Comment: https://git.openjdk.org/jdk/pull/18790#discussion_r1599184566
PR Review Comment: https://git.openjdk.org/jdk/pull/18790#discussion_r1599184469
More information about the hotspot-dev
mailing list