RFR: 8253909: Implement detailed map file for CDS [v2]

Thomas Stuefe stuefe at openjdk.java.net
Wed Oct 7 12:20:12 UTC 2020


On Tue, 6 Oct 2020 06:57:18 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> src/hotspot/share/runtime/os.hpp line 693:
>> 
>>> 691:   static void print_hex_dump(outputStream* st, address start, address end, int unitsize) {
>>> 692:     print_hex_dump(st, start, end, unitsize, /*bytes_per_line=*/16, /*logical_start=*/start);
>>> 693:   }
>> 
>> This is a bit unclear. Could we do it like this instead:
>> 
>> // Print a hex dump from [start .. end). Output lines are prefixed with addresses.
>> static void print_hex_dump(outputStream* st, address start, address end, int unitsize)
>> 
>> 
>> // Print a hex dump from [base+start .. base+end). Output lines are prefixed with offset in relation to base.
>> static void print_hex_dump(outputStream* st, address base, intx start, intx end, int unitsize)
>
> But this is not what I want. I am calling with parameters like:
> 
> print_hex_dump(st, /*start=*/0x7ffff0000, end, unitsize, bytes_per_line,  /*logical_start=*/0x800000000);
> So my buffer is at some random address, but I want the print out to pretend that it started at 0x800000000.

Okay. A bit special, usually one would base it at 0 (e.g. printing network packets or similar). I think its okay then.
We can revisit this later if needed.

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

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


More information about the hotspot-runtime-dev mailing list