To improve clarity and conciseness in logging code, a macro should be added so that when LogHandle(<tag>)::<level>_stream() is passed into a logging function, a ResourceMark is automatically created. A macro is also needed for when the external_name() function is used with classunload logging, so that
if (log_is_enabled(Trace, classunload)) {
ResourceMark rm;
log_trace(classunload)("unlinking class (sibling) %s", sibling->external_name());
}
does not require the first two lines.
if (log_is_enabled(Trace, classunload)) {
ResourceMark rm;
log_trace(classunload)("unlinking class (sibling) %s", sibling->external_name());
}
does not require the first two lines.
- relates to
-
JDK-8142506 Reimplement TraceClassUnloading with Unified Logging
- Closed