RFR: 8033441: print line numbers with -XX:+PrintOptoAssembly

Xin Liu xliu at openjdk.java.net
Tue Nov 17 20:06:13 UTC 2020


On Tue, 17 Nov 2020 19:31:25 GMT, Jason Tatton <github.com+70893615+jasontatton-aws at openjdk.org> wrote:

> Hi all,
> 
> Here is a patch which adds line number information to the `-XX:+PrintOptoAssembly` cmd line option output.
> 
> A new unit test is provided for this functionality. Note that the build must have debugging enabled for the test to be relevant and enabled.
> 
> Here is an example output:-
> before:
>         # Tryme::foo @ bci:3  L[0]=_ STK[0]=#NULL STK[1]=#Ptr0x0000ffff340089c0
> 
> after:
>         # Tryme::foo @ bci:3 (line 12)  L[0]=_ STK[0]=#NULL STK[1]=#Ptr0x0000ffff1008fd80
> 
> Testing:
> I have run tier 1/2 on linux on x86 and aarch64. With a `--enable-debug` build.

test/hotspot/jtreg/compiler/arguments/TestPrintOptoAssemblyLineNumbers.java line 29:

> 27:  * @summary Test to ensure that line numbers are now present with the -XX:+PrintOptoAssembly command line option
> 28:  *
> 29:  * @requires vm.debug == true

the flag `PrintOptoAssembly` comes from c2. 
IMHO, you need `@requires vm.compiler2.enabled` instead of vm.debug == true.

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

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


More information about the hotspot-compiler-dev mailing list