RFR: 8337662: Improve os::print_hex_dump for printing Instructions sections [v2]

Thomas Stuefe stuefe at openjdk.org
Tue Aug 6 18:26:31 UTC 2024


On Mon, 5 Aug 2024 06:54:46 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> Currently we use os::print_hex_dump for printing Instruction sections in the hserr file. The function could be slightly improved, .e.g. by showing directly the pc .
>> The instructions section would for example look like this, with a small helper '=>' pointing to the pc. Makes the output more readable.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   simplify coding

src/hotspot/share/runtime/os.cpp line 1049:

> 1047:       // highlight start of line if address of interest is located there
> 1048:       bool should_highlight = false;
> 1049:       if (highlight_address == p) should_highlight = true;

Would this not still be restricted to highlighting if the address matches the start of the line? Would you not need something like this instead (not tested):


if (highlight_address >= p && highlight_address < p + cols_per_line/unitsize)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20419#discussion_r1705948204


More information about the hotspot-runtime-dev mailing list