RFR: JDK-8280941: os::print_memory_mappings() prints segment preceeding the inclusion range

Stefan Karlsson stefank at openjdk.java.net
Tue Feb 1 15:46:11 UTC 2022


On Mon, 31 Jan 2022 12:47:03 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> os::print_memory_mappings() is a helpful little routine to print existing memory mappings within a given range. On Linux, it parses proc/<pid>/maps. But it always prints a segment preceding the start address, e.g. here see the first line:
> 
> 
> Range [7f92467a3000-7f92467a9000) contains: 7f924679f000-7f92467a3000 rw-p 00000000 00:00 0
> 7f92467a3000-7f92467a4000 rwxp 00000000 00:00 0
> 7f92467a4000-7f92467a5000 rw-p 00000000 00:00 0
> 7f92467a5000-7f92467a6000 rwxp 00000000 00:00 0
> 7f92467a6000-7f92467a7000 rw-p 00000000 00:00 0
> 7f92467a7000-7f92467a8000 rwxp 00000000 00:00 0
> 7f92467a8000-7f92467a9000 rw-p 00000000 00:00 0
> 
> 
> and it should also precede the first line with a newline

Marked as reviewed by stefank (Reviewer).

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

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


More information about the hotspot-runtime-dev mailing list