On Tue, 31 Oct 2023 16:58:19 GMT, Gerard Ziemski <gziem...@openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix various builds > > src/hotspot/os/linux/memMapPrinter_linux.cpp line 59: > >> 57: void print_OS_specific_details(outputStream* st) const override { >> 58: st->print("%s %s ", _info.prot, _info.offset); >> 59: } > > If that's all this is doing, do we really need it? 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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16301#discussion_r1378436209