RFR: 8282024: add EscapeAnalysis statistics under PrintOptoStatistics [v7]
Xin Liu
xliu at openjdk.java.net
Tue May 3 16:51:22 UTC 2022
On Mon, 2 May 2022 20:28:22 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 = 372, Arg escape = 74, Global escape = 1855 (EA executed in 10.49 seconds)
>> Objects scalar replaced = 240, Monitor objects removed = 44, GC barriers removed = 37, Memory barriers removed = 284
>
> 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/macro.cpp line 2608:
> 2606: }
> 2607:
> 2608: int PhaseMacroExpand::count_MemBar() {
I am not sure about this procedural. Even though you use Unique_Node_List, is it still possible to count the same membar multiple times? or maybe a backedge cause an infinitely loop?
I think you can use Compile::identify_useful_nodes to collect all useful nodes and then count MemBar nodes.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8019
More information about the hotspot-compiler-dev
mailing list