RFR: 8282024: add EscapeAnalysis statistics under PrintOptoStatistics [v6]
Xin Liu
xliu at openjdk.java.net
Sun Apr 10 23:49:42 UTC 2022
On Mon, 4 Apr 2022 19:07:29 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: 230
>> Arg escape: 65
>> Global escape: 1589
>> Total java objects in escape analysis: 1884
>> Total time in escape analysis: 9.90 seconds
>> Objects scalar replaced: 146
>> Monitor objects removed: 37
>> GC barriers removed: 43
>> Memory barriers removed: 183
>
> aamarsh has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>
> adding escape analysis and scalar replacement statistics
src/hotspot/share/opto/escape.cpp line 3795:
> 3793:
> 3794: void ConnectionGraph::print_statistics() {
> 3795: tty->print_cr("No escape: %d", Atomic::load(&_no_escape_counter));
This is just my suggestion. I would say that we keep each print_statistics() method oneliner.
It will ease parsers. in Compile::print_statistics, most of them follow the pattern: phase: counter1, couter2, ...
```
tty->print_cr("Peephole: peephole rules applied: %d", _total_peepholes);
-------------
PR: https://git.openjdk.java.net/jdk/pull/8019
More information about the hotspot-compiler-dev
mailing list