8212988: add recent class unloading events to the hs_err log

Also moved class unloading logging in expected place.

Reviewed-by: never, stuefe
This commit is contained in:
Coleen Phillimore 2019-02-13 06:48:34 -05:00
parent 052e8733b5
commit 2e4ac80e0c
4 changed files with 43 additions and 6 deletions

View file

@ -75,6 +75,7 @@
#include "services/classLoadingService.hpp"
#include "services/threadService.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
#include "utilities/macros.hpp"
#include "utilities/stringUtils.hpp"
#ifdef COMPILER1
@ -2447,6 +2448,13 @@ void InstanceKlass::unload_class(InstanceKlass* ik) {
// notify ClassLoadingService of class unload
ClassLoadingService::notify_class_unloaded(ik);
if (log_is_enabled(Info, class, unload)) {
ResourceMark rm;
log_info(class, unload)("unloading class %s " INTPTR_FORMAT, ik->external_name(), p2i(ik));
}
Events::log_class_unloading(Thread::current(), ik);
#if INCLUDE_JFR
assert(ik != NULL, "invariant");
EventClassUnload event;