[jdk11u-dev] RFR: 8204267: Generate comments in -XX:+PrintInterpreter to link to source code
SendaoYan
syan at openjdk.org
Thu Nov 21 02:44:25 UTC 2024
On Sat, 19 Oct 2024 08:25:50 GMT, SendaoYan <syan at openjdk.org> wrote:
> Hi all,
> HotSpot's interpreter is dynamically generated (by C++ sources such as src/hotspot/cpu/x86/templateTable_x86.cpp).
>
> The command `java -XX:+PrintInterpreter` can be used to print a disassembly of the HotSpot interpreter. However, the output has very little comment, and it's very hard to associate the assembler instructions with the C++ code that generates them.
>
> To make it easier to understand the -XX:+PrintInterpreter, we should generate comments to link the instructions back to the C++ source code that generates them. This is doable because much of the interpreter code generation is done via a macro "__". We can redefine this macro to generate comments.
>
> The file `src/hotspot/share/compiler/disassembler.cpp` has different context cause this PR can't backport cleanly, all other files are backport cleanly.
>
> Only change the behavior of `PrintInterpreter`, risk is low.
>
> Additional testing:
>
> - [x] linux x64 build with fastdebug and slowdebug configure
> - [x] linux x64 jtreg tests(include tier1/2/3 etc.) with release build
> - [x] linux aarch64 jtreg tests(include tier1/2/3 etc.) with release build
>
>
> Thanks.
I think it's not quite strong necessary to backport this PR, sorry for the interrupt.
-------------
PR Comment: https://git.openjdk.org/jdk11u-dev/pull/2957#issuecomment-2489949609
More information about the jdk-updates-dev
mailing list