RFR: JDK-8281023: NMT integration into pp debug command does not work [v2]

Thomas Stuefe stuefe at openjdk.java.net
Wed Feb 2 08:27:14 UTC 2022


On Tue, 1 Feb 2022 14:55:10 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Zhengyus remarks
>
> Changes requested by zgu (Reviewer).

@zhengyu123 thanks for looking at this.

I rewrote the patch and made printing inline within lock protection. For symmetry, I also moved the printing code on the malloc side to the malloc tracker. Added comments.

Note that I think @iklam was overcautious in the original discussion. We already risk signals in the debugging session by using SafeFetch to read the malloc header. Using a reference to a potentially dead ReservedMemoryRegion runs an additional - very low - risk of signals. So, if we really want to be cautious, we should not print out NMT information at all in pp. But I think NMT is very useful and worth the risk. All we risk is a slightly miffed debugger.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7297


More information about the hotspot-dev mailing list