8377665: JFR: Symbol table not setup for early class unloading

Reviewed-by: jsikstro
This commit is contained in:
Markus Grönlund 2026-02-20 10:55:45 +00:00
parent 7ec561f8b7
commit c3a698f7be
3 changed files with 14 additions and 7 deletions

View File

@ -1265,7 +1265,7 @@ static size_t teardown() {
JfrKlassUnloading::clear();
_artifacts->clear();
_initial_type_set = true;
} else {
} else if (is_initial_typeset_for_chunk()) {
_initial_type_set = false;
}
return total_count;

View File

@ -102,6 +102,9 @@ bool JfrRecorder::on_create_vm_1() {
if (!create_checkpoint_manager()) {
return false;
}
if (!JfrSymbolTable::create()) {
return false;
}
}
// fast time initialization
@ -316,10 +319,7 @@ bool JfrRecorder::create_components() {
if (!create_thread_group_manager()) {
return false;
}
if (!create_symbol_table()) {
return false;
}
return true;
return create_symbol_table();
}
// subsystems
@ -418,7 +418,13 @@ bool JfrRecorder::create_thread_group_manager() {
}
bool JfrRecorder::create_symbol_table() {
return JfrSymbolTable::create();
return !is_started_on_commandline() ? JfrSymbolTable::create() : true;
}
void JfrRecorder::destroy_symbol_table() {
if (!is_started_on_commandline()) {
JfrSymbolTable::destroy();
}
}
void JfrRecorder::destroy_components() {
@ -461,7 +467,7 @@ void JfrRecorder::destroy_components() {
}
JfrEventThrottler::destroy();
JfrThreadGroupManager::destroy();
JfrSymbolTable::destroy();
destroy_symbol_table();
}
bool JfrRecorder::create_recorder_thread() {

View File

@ -59,6 +59,7 @@ class JfrRecorder : public JfrCHeapObj {
static bool create_event_throttler();
static bool create_symbol_table();
static bool create_components();
static void destroy_symbol_table();
static void destroy_components();
static void on_recorder_thread_exit();