RFR: 8316967: Correct the scope of vmtimer in UnregisteredClasses::load_class [v2]

Ioi Lam iklam at openjdk.org
Mon Oct 16 04:58:45 UTC 2023


On Fri, 13 Oct 2023 22:00:19 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

> > Thanks for the review and sorry for the delay in replying as I took a few days off.
> > How about changing `ClassLoader::perf_sys_class_lookup_time()` to `ClassLoader::perf_app_class_lookup_time()`?
> > Or simply using the existing `ClassLoader::perf_app_classload_time()`? (Which is being used in https://github.com/openjdk/jdk/blob/master/src/hotspot/share/classfile/systemDictionary.cpp#L1289-#L1299)
> 
> `ClassLoader::perf_app_classload_time` seems ok. If there is any interest in differentiating the class loading time for user defined classloader and archived cases, `perf_shared_unregistered_classload_time` might be more specific.

I think for simplicity, we can just use the existing `ClassLoader::perf_app_classload_time()`, which counts the time spent in loading classes that are not loaded by the boot loader.

`UnregisteredClasses::load_class()` is used only during `-Xshare:dump`, so I think this timer usually won't be looked at.

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

PR Comment: https://git.openjdk.org/jdk/pull/16046#issuecomment-1763725571


More information about the hotspot-runtime-dev mailing list