RFR: 8308903: Print detailed info for Java objects in -Xlog:cds+map
Ioi Lam
iklam at openjdk.org
Wed Jul 12 16:42:13 UTC 2023
On Wed, 12 Jul 2023 05:51:58 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> > The output looks like oopDesc::print_on(tty), but we need to print the pointers using the locations of the objects at runtime.
>
>
>
> I don't understand. Are you not experimenting with a new allocation mode that would basically make the runtime address unpredictable? Or is this still for the old way of things where the heap archive is mapped as-is ?
>
>
>
> Other than that, this looks very useful.
This map file is useful for both the existing and experimental loading code.
My experimental loading code uses the same format for input. I partially wrote this PR to test the new loading code, which assumes contiguous objects in the input stream. So at runtime, I just need to look at the lower 3 digits, which would be the same as in the map file.
The map file also shows how the objects are grouped. For example, I am reordering the objects so that the first 50% of them don't need relocation. That can be verified with the map file.
Also, even with the new loading approach, we could have a future optimization where the GC knows that we are still in the archive loading stage, and can return contiguous objects that start with the requested address. This way, we can avoid relocation.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14841#issuecomment-1632868383
More information about the hotspot-dev
mailing list