RFR: 8282024: add EscapeAnalysis statistics under PrintOptoStatistics [v7]

Xin Liu xliu at openjdk.java.net
Thu May 5 19:13:27 UTC 2022


On Wed, 4 May 2022 01:23:09 GMT, aamarsh <duke at openjdk.java.net> wrote:

>> 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.
>
> @navyxliu Since no nodes are ever removed from the list, I think this issue is avoided. If we find a loop back to a node we have already searched and attempt to push this node at line 2620, it will not be added to the list because it already exists.

okay. you're right. This is BFS but no element is pop.
I also ran twice jtreg with JTREG="VM_OPTIONS=-XX:+PrintOptoStatistics", it's safe.

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

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


More information about the hotspot-compiler-dev mailing list