RFR: 8288897: Clean up node dump code [v3]
Emanuel Peter
epeter at openjdk.org
Fri Jul 8 14:39:32 UTC 2022
> I recently did some work in the area of `Node::dump` and `Node::find`, see [JDK-8287647](https://bugs.openjdk.org/browse/JDK-8287647) and [JDK-8283775](https://bugs.openjdk.org/browse/JDK-8283775).
>
> This change sets cleans up the code around, and tries to reduce code duplication.
>
> Things I did:
> - remove Node::related. It was added 7 years ago, with [JDK-8004073](https://bugs.openjdk.org/browse/JDK-8004073). However, it was not extended to many nodes, and hence it is incomplete, and nobody I know seems to use it.
> - refactor `dump(int)` to use `dump_bfs` (reduce code duplication).
> - redefine categories in `dump_bfs`, focusing on output types. Mixed type is now also control if it has control output, and memory if it has memory output, etc. Plus, a node is also in the control category if it `is_CFG`. This makes `dump_bfs` much more usable, to traverse control and memory flow.
> - Other small cleanups, like replacing rarely used dump functions with dump, making removing dead code, make some functions private
> - Adding `call from debugger` comment to VM functions that are useful in debugger
Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
- Merge branch 'master' into JDK-8288897
- Apply suggestions from code review
2 style fixes by Christian
Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
- cleanup, move debug functions to cpp to prevent inlining, add comment for debugger functions
- make dump_bfs const, change datastructures, change some signatures to const
- refactor dump to use dump_bfs, redefine categories through output types
- 8288897: Clean up dump code for nodes
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/9234/files
- new: https://git.openjdk.org/jdk/pull/9234/files/1a836616..b2a2f58f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=9234&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=9234&range=01-02
Stats: 71737 lines in 1313 files changed: 42386 ins; 13502 del; 15849 mod
Patch: https://git.openjdk.org/jdk/pull/9234.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9234/head:pull/9234
PR: https://git.openjdk.org/jdk/pull/9234
More information about the hotspot-compiler-dev
mailing list