8175382: clhsdb pmap should print the end addresses of the load modules

Reviewed-by: sspitsyn, ysuenaga
This commit is contained in:
Chris Plummer 2022-09-01 16:35:41 +00:00
parent 9444a081cc
commit 07616de00c

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -72,8 +72,11 @@ public class PMap extends Tool {
}
while (itr.hasNext()) {
LoadObject lo = itr.next();
out.print(lo.getBase() + "\t");
out.print(lo.getSize()/1024 + "K\t");
long base = lo.getBase().asLongValue();
long size = lo.getSize();
long end = base + size;
out.print("0x" + Long.toHexString(base) + "-0x" + Long.toHexString(end) + "\t");
out.print(size/1024 + "K\t");
out.println(lo.getName());
}
} else {