RFR (S) 8212988: add recent class unloading events to the hs_err log
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Tue Feb 12 16:51:10 UTC 2019
On 2/12/19 10:57 AM, Thomas Stüfe wrote:
> Hi Coleen,
>
> this is useful.
We have had some problems where the class is unloaded and this would
help with diagnosing this.
>
> Why just InstanceKlass?
This is all we report when using -Xlog:class+unload, also arrays are
only unloaded when their InstanceKlass (bottom_klass) are unloaded so
this didn't seem like useful additional information.
>
> Why is the pointer interesting in the event log printout?
When debugging core files after the fact, we might have logging that
this class was unloaded and some field off the pointer may be also found
in the core file. It might not be that helpful to have the
InstanceKlass pointer vs. some other metaspace pointer though. Including
the pointer was to help with core file analysis though. Maybe there
could be a different pointer printed ?
>
> Since we pay always for this, how about offloading the format printf
> to when the log is actually printed. You could use, as EventRecord
> payload, a struct containing the strduped class name and its IK*. Then
> you only pay for the strdup, not for the whole format printf, and not
> for the multiple copies of the prefix text.
I didn't want to deconstruct this further for performance sake. Most of
the changes are to keep the performance neutral since we always pay.
Most of the Events are infrequent and this is relatively infrequent
also. Events for exceptions are less infrequent so that would benefit
more from more deconstruction than this would.
Thanks for your comments. What do you think?
Coleen
>
> Cheers, Thomas
>
>
> On Tue, Feb 12, 2019 at 4:20 PM <coleen.phillimore at oracle.com
> <mailto:coleen.phillimore at oracle.com>> wrote:
>
> Summary: also moved class unloading logging in expected place.
>
> Tested with assert to verify hs_err_file, some dacapo performance
> testing, and hs tier1-6. See bug for details.
>
> open webrev at
> http://cr.openjdk.java.net/~coleenp/2019/8212988.01/webrev
> bug link https://bugs.openjdk.java.net/browse/JDK-8212988
>
> Thanks,
> Coleen
>
More information about the hotspot-runtime-dev
mailing list