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

Thomas Stuefe stuefe at openjdk.java.net
Tue Feb 1 17:22:16 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

This pull request has now been integrated.

Changeset: d1cc5fda
Author:    Thomas Stuefe <stuefe at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/d1cc5fda8f9fe3480d661985f15c71a8a9a4a7f8
Stats:     9 lines in 1 file changed: 1 ins; 2 del; 6 mod

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

Reviewed-by: stefank, minqi

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

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


More information about the hotspot-runtime-dev mailing list