On Thu, 2 Nov 2023 15:25:14 GMT, Brice Dutheil <bduth...@openjdk.org> wrote:
>> This prints protection and offset. The former is interesting for obvious >> reasons (e.g. lets you tell apart stack guard regions from stack, or >> uncommitted from committed regions) and the latter interesting for some >> corner cases (e.g. ZGC mapped regions). >> >> I don't want to do this in shared code though since I am not sure every OS >> has this information or whether I can obtain this information. I rather not >> print out a bunch of 0s or empty strings. >> >> The alternative would be carrying a non-descriptive text string around with >> "OS information", but I don't want to have to think about storage and >> copying stuff around. It would not be simpler than this. >> >> BTW, the way to implement this on MacOS would be probably by spawning off >> `vmmap` and parsing the output; on Windows one would use `VirtualQuery`. But >> I leave this for other folks, I am happy with Linux for now. > > On ZGC, by the way, it's possible to see many `memfd:java_heap (deleted)`, > does this work allow annotate these mappings ? Yes, they should show up as JAVAHEAP. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16301#discussion_r1380570741