mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8246019: PerfClassTraceTime slows down VM start-up
Reviewed-by: dholmes, redestad, minqi, ccheung
This commit is contained in:
parent
6d137a3616
commit
2e09a58f64
1 changed files with 15 additions and 9 deletions
|
@ -1157,6 +1157,7 @@ void InstanceKlass::initialize_impl(TRAPS) {
|
|||
// Step 8
|
||||
{
|
||||
DTRACE_CLASSINIT_PROBE_WAIT(clinit, -1, wait);
|
||||
if (class_initializer() != NULL) {
|
||||
// Timer includes any side effects of class initialization (resolution,
|
||||
// etc), but not recursive entry into call_class_initializer().
|
||||
PerfClassTraceTime timer(ClassLoader::perf_class_init_time(),
|
||||
|
@ -1166,6 +1167,11 @@ void InstanceKlass::initialize_impl(TRAPS) {
|
|||
jt->get_thread_stat()->perf_timers_addr(),
|
||||
PerfClassTraceTime::CLASS_CLINIT);
|
||||
call_class_initializer(THREAD);
|
||||
} else {
|
||||
// The elapsed time is so small it's not worth counting.
|
||||
ClassLoader::perf_classes_inited()->inc();
|
||||
call_class_initializer(THREAD);
|
||||
}
|
||||
}
|
||||
|
||||
// Step 9
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue