Code review request: 7188594 Print statistic collected by NMT with VM flag

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Aug 29 19:34:54 PDT 2012


On 8/29/12 6:07 PM, Zhengyu Gu wrote:
>
>
> On 8/29/2012 4:34 PM, Vladimir Kozlov wrote:
>> You need to duplicate code in java.cpp in #else version of print_statistics() since you can collect this date in
>> product VM. And move warning message to arguments.cpp (and switch off flag if NMT is off):
>> if (!MemTracker::is_on() && PrintNMTStatistics) {
>> warning(err_msg("Native memory tracking is off due to ", MemTracker::reason()));
>> PrintNMTStatistics = false;
>> }
> NMT can be shutdown during VM execution, through jcmd or by NMT runtime itself in some extreme scenarios, such as
> running out of native memory, etc. so the checking in argument parsing phase is not sufficient.

Do NMT throw out already collected data (free memory used by data) if it is shutdown this way? If a data still there you 
can print it even when NMT is off when VM exit.

Vladimir

>
> -Zhengyu
>
>>
>> Vladimir
>>
>> Vladimir Kozlov wrote:
>>> Hi, Zhengyu
>>>
>>> Could you give an example of output? I thought you need more changes for this.
>>>
>>> thanks,
>>> Vladimir
>>>
>>> Zhengyu Gu wrote:
>>>> This is a simple RFE, that allows VM to dump collected native memory
>>>>
>>>> tracking data before exits.
>>>>
>>>> CR: http://bugs.sun.com/view_bug.do?bug_id=7188594
>>>> Webrev: http://cr.openjdk.java.net/~zgu/7188594/webrev.00/
>>>>
>>>> Thanks,
>>>>
>>>> -Zhengyu
>>>>


More information about the hotspot-dev mailing list