RFR: 8316967: Correct the scope of vmtimer in UnregisteredClasses::load_class [v2]
Ioi Lam
iklam at openjdk.org
Tue Oct 10 17:21:12 UTC 2023
On Thu, 5 Oct 2023 21:25:40 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> Simple fix for removing the vmtimer from `UnregisteredClasses::load_class` and the corresponding `PerfClassTraceTime` constructor.
>>
>> Passed tier1 testing.
>> --------------------
>> Update: correct the scope of the vmtimer instead of removing it.
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>
> correct the scope of the vmtimer
LGTM
In the non-CDS code, the `PerfClassTraceTime::CLASS_LOAD` event covers the call to `java.lang.ClassLoader::loadClass()`, so I think we should do that in `UnregisteredClasses::load_class()` as well.
https://github.com/openjdk/jdk/blob/33591a30d2e495b46877b76084aa2f52e5389246/src/hotspot/share/classfile/systemDictionary.cpp#L1294-L1319
I am trying to understand why I originally covered only the stream reading time but not the class parsing time. It was probably a bug :-)
https://github.com/openjdk/jdk/blob/4fd2a149977b05eb6e4b28d147ab9c043a7934ec/src/hotspot/share/classfile/classLoaderExt.cpp#L274-L295
-------------
Marked as reviewed by iklam (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16046#pullrequestreview-1668444321
PR Comment: https://git.openjdk.org/jdk/pull/16046#issuecomment-1755904109
More information about the hotspot-runtime-dev
mailing list