8248886: InstanceKlass::initialize_impl crashes with -XX:-UsePerfData after JDK-8246019

Reviewed-by: ccheung
This commit is contained in:
Ioi Lam 2020-07-06 17:52:52 -07:00
parent 28e219f038
commit 8170244a81

View file

@ -1169,7 +1169,9 @@ void InstanceKlass::initialize_impl(TRAPS) {
call_class_initializer(THREAD);
} else {
// The elapsed time is so small it's not worth counting.
ClassLoader::perf_classes_inited()->inc();
if (UsePerfData) {
ClassLoader::perf_classes_inited()->inc();
}
call_class_initializer(THREAD);
}
}