RFR: 8282024: add EscapeAnalysis statistics under PrintOptoStatistics [v12]
Vladimir Kozlov
kvn at openjdk.java.net
Fri May 20 18:57:54 UTC 2022
On Fri, 20 May 2022 07:51:40 GMT, aamarsh <duke at openjdk.java.net> wrote:
>> Escape Analysis and Scalar Replacement statistics were added when the -XX:+PrintOptoStatistics flag is set. All code is placed in `#ifndef Product` block, so this code is only run when creating a debug build. Using renaissance benchmark I ran a few tests to confirm that numbers were printing correctly. Below is an example run:
>>
>>
>> No escape = 317, Arg escape = 118, Global escape = 1995 (EA executed in 11.71 seconds) ** EA stats might be slightly off since objects might be double counted due to iterative EA **
>> Objects scalar replaced = 201, Monitor objects removed = 23, GC barriers removed = 50, Memory barriers removed = 224
>
> aamarsh has updated the pull request incrementally with one additional commit since the last revision:
>
> eliminate trailing whitespace
Thank you for addressing my comment. I have only one left.
I started testing.
src/hotspot/share/opto/escape.cpp line 3773:
> 3771: tty->print("No escape = %d, Arg escape = %d, Global escape = %d", Atomic::load(&_no_escape_counter), Atomic::load(&_arg_escape_counter), Atomic::load(&_global_escape_counter));
> 3772: tty->print(" (EA executed in %7.2f seconds)", Atomic::load(&_time_elapsed) * 0.001);
> 3773: tty->print_cr(" ** EA stats might be slightly off since objects might be double counted due to iterative EA **");
I don't think we need to print this warning. I suggest to put it as comment in this method.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8019
More information about the hotspot-compiler-dev
mailing list