RFR(XXS) 8190357: NMT: Include metadata information in NMT final report when PrintNMTStatistics is on
Zhengyu Gu
zgu at redhat.com
Fri Nov 10 12:47:56 UTC 2017
Hi Andrew,
On 11/10/2017 04:22 AM, Andrew Dinn wrote:
> Hi Zhengyu,
>
> On 09/11/17 19:33, Zhengyu Gu wrote:
>> This patch adds metadata reporting in NMT final report.
>>
>> What complicates the matter, is that, reporting per-class loader
>> metadata requires a safepoint, so that it can safely walk class loaders.
>> So, we only report it when JVM is about to exit in good state.
>>
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8190357
>> Webrev: http://cr.openjdk.java.net/~zgu/8190357/webrev.00/
> I understand the need here to avoid reporting if we are under a fatal
> error. However, that assert is not going to work in product code. So,
> does that not imply that execution of the vmop needs to be conditional
> on VMError::fatal_error_in_progress() returning false?
MemTracker::report() is a private method, only called by
MemTracker::final_report() and MemTracker::error_report(). This
assertion ensures that metadata report should never be included in
MemTracker::error_report() if it decides to extend beyond summary report.
Of course, this is under assumption that final_report() is called during
JVM normal shutdown (good state) and error_report() is by error handler
(bad state).
Besides, VMError::fatal_error_in_progress() is inherently racy.
Thanks,
-Zhengyu
>
> regards,
>
>
> Andrew Dinn
> -----------
> Senior Principal Software Engineer
> Red Hat UK Ltd
> Registered in England and Wales under Company Registration No. 03798903
> Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
>
More information about the hotspot-runtime-dev
mailing list