8293315: Add back logging for Placeholders
Reviewed-by: iklam
This commit is contained in:
parent
b6477fdb30
commit
83a34086bc
@ -238,12 +238,12 @@ static const char* action_to_string(PlaceholderTable::classloadAction action) {
|
||||
return "";
|
||||
}
|
||||
|
||||
inline void log(PlaceholderEntry* entry, const char* function, PlaceholderTable::classloadAction action) {
|
||||
inline void log(Symbol* name, PlaceholderEntry* entry, const char* function, PlaceholderTable::classloadAction action) {
|
||||
if (log_is_enabled(Debug, class, load, placeholders)) {
|
||||
LogTarget(Debug, class, load, placeholders) lt;
|
||||
ResourceMark rm;
|
||||
LogStream ls(lt);
|
||||
ls.print("%s %s ", function, action_to_string(action));
|
||||
ls.print("entry %s : %s %s ", name->as_C_string(), function, action_to_string(action));
|
||||
entry->print_on(&ls);
|
||||
}
|
||||
}
|
||||
@ -269,7 +269,7 @@ PlaceholderEntry* PlaceholderTable::find_and_add(Symbol* name,
|
||||
}
|
||||
}
|
||||
probe->add_seen_thread(thread, action);
|
||||
log(probe, "find_and_add", action);
|
||||
log(name, probe, "find_and_add", action);
|
||||
return probe;
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ void PlaceholderTable::find_and_remove(Symbol* name, ClassLoaderData* loader_dat
|
||||
assert_locked_or_safepoint(SystemDictionary_lock);
|
||||
PlaceholderEntry* probe = get_entry(name, loader_data);
|
||||
if (probe != NULL) {
|
||||
log(probe, "find_and_remove", action);
|
||||
log(name, probe, "find_and_remove", action);
|
||||
probe->remove_seen_thread(thread, action);
|
||||
// If no other threads using this entry, and this thread is not using this entry for other states
|
||||
if ((probe->superThreadQ() == NULL) && (probe->loadInstanceThreadQ() == NULL)
|
||||
|
@ -365,12 +365,12 @@ Klass* SystemDictionary::resolve_array_class_or_null(Symbol* class_name,
|
||||
return k;
|
||||
}
|
||||
|
||||
static inline void log_circularity_error(Thread* thread, PlaceholderEntry* probe) {
|
||||
static inline void log_circularity_error(Symbol* name, PlaceholderEntry* probe) {
|
||||
LogTarget(Debug, class, load, placeholders) lt;
|
||||
if (lt.is_enabled()) {
|
||||
ResourceMark rm(thread);
|
||||
ResourceMark rm;
|
||||
LogStream ls(lt);
|
||||
ls.print("ClassCircularityError detected for placeholder ");
|
||||
ls.print("ClassCircularityError detected for placeholder entry %s", name->as_C_string());
|
||||
probe->print_on(&ls);
|
||||
ls.cr();
|
||||
}
|
||||
@ -442,7 +442,7 @@ InstanceKlass* SystemDictionary::resolve_super_or_fail(Symbol* class_name,
|
||||
// Must check ClassCircularity before checking if superclass is already loaded.
|
||||
PlaceholderEntry* probe = PlaceholderTable::get_entry(class_name, loader_data);
|
||||
if (probe && probe->check_seen_thread(THREAD, PlaceholderTable::LOAD_SUPER)) {
|
||||
log_circularity_error(THREAD, probe);
|
||||
log_circularity_error(class_name, probe);
|
||||
throw_circularity_error = true;
|
||||
}
|
||||
}
|
||||
@ -562,7 +562,7 @@ InstanceKlass* SystemDictionary::handle_parallel_loading(JavaThread* current,
|
||||
// only need check_seen_thread once, not on each loop
|
||||
// 6341374 java/lang/Instrument with -Xcomp
|
||||
if (oldprobe->check_seen_thread(current, PlaceholderTable::LOAD_INSTANCE)) {
|
||||
log_circularity_error(current, oldprobe);
|
||||
log_circularity_error(name, oldprobe);
|
||||
*throw_circularity_error = true;
|
||||
return NULL;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user