Code review request: 2 Native Memory Tracking bugs

Zhengyu Gu zhengyu.gu at oracle.com
Wed Aug 1 13:20:14 PDT 2012


Karen,

On 8/1/2012 4:01 PM, Karen Kinnear wrote:
> Zhengyu,
>
> Thank you also for putting in the additional debug information to try 
> to get more information on the duplicate pointer assertion which is so 
> hard to catch.
>
> Couple of questions:
>
> 1. MemTrackWorker.cpp
> line 134 transites -> transits
>
> When you call shutdown, do you also want to break out of the loop? 
> (which would change the assertion at the end)
> Or is there any potential hard in continuing to loop?
shutdown sets shutdown pending flag, which will break out the loop when 
check loop condition (!shutdown_in_progress())

> 2. MemTracker.hpp
> Might it make sense to put the shutdown check in ceate_memory_record 
> so you don't need to check all callers?
> But wait - it already is in create_memory_record ... so did you need 
> to add it in those cases?
>
right, it is not needed.

Thanks,

-Zhengyu




> thanks,
> Karen
>
> On Aug 1, 2012, at 1:39 PM, Zhengyu Gu wrote:
>
>> These are two simple fixes for NMT.
>>
>> CR: 7185614 NMT ON: "check by caller" assertion failed on nsk 
>> ThreadMXBean test 
>> (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7185614)
>>   The assertion was incorrect, since there can be a race condition 
>> between caller's check and assertion. The assertion is now removed, 
>> shutdown in progress is checked instead.
>>
>> CR: 7187429 NMT ON: Merge failure should cause NMT to shutdown 
>> (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7187429)
>>   Out-of-memory is the only cause to merge failure, to be consistent, 
>> NMT should shutdown itself.
>>
>> Webrev: http://cr.openjdk.java.net/~zgu/7187429/webrev.00/
>>
>>
>> Thanks,
>>
>> -Zhengyu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20120801/7bb7e4e2/attachment.html 


More information about the hotspot-runtime-dev mailing list