RFR: 8288897: Clean up node dump code [v2]

Christian Hagedorn chagedorn at openjdk.org
Mon Jun 27 07:04:55 UTC 2022


On Fri, 24 Jun 2022 13:47:24 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/node.cpp line 1658:
>> 
>>> 1656: }
>>> 1657: 
>>> 1658: void find_node_by_dump(Node* start, const char* pattern) {
>> 
>> Since we now only dump nodes, how about renaming this method to `dump_nodes_by_dump()` and only keep `find_node(s?)_by_dump()` to call it from the debugger? Same for the other changed `find*()` methods.
>
> I did think about renaming it do `dump_...`. But then I also find it important that the name says that we do filter / search / find.

The filter/search action is probably implied but I don't have a strong opinion about it -  it's fine to leave the name like that. But I suggest to make it plural (`find_nodes_by_dump()`) as we are possibly returning multiple nodes.

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

PR: https://git.openjdk.org/jdk/pull/9234


More information about the hotspot-compiler-dev mailing list