Integrated: 8265587: IGV: track nodes across matching

Roberto Castañeda Lozano rcastanedalo at openjdk.java.net
Wed Apr 28 08:48:56 UTC 2021


On Fri, 23 Apr 2021 12:31:20 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This change preserves, as much as possible, the IGV node identifier of Ideal nodes in their corresponding machine nodes created by `Matcher::match()`. This makes it possible to track nodes when stepping from "Before matching" to "After matching" in IGV, as illustrated for an extracted compare-and-branch subgraph in the following screenshot: 
> 
> ![before-after-matching](https://user-images.githubusercontent.com/8792647/115867587-94b75280-a43b-11eb-8a79-9c13a0a68d42.png)
> 
> #### Limitations
> This solution preserves most of the node relations across matching, however if an Ideal node is expanded into multiple machine nodes, only one of them is assigned the IGV identifier of the Ideal node (since IGV identifiers need to be unique within a compilation phase). This limitation can be seen in the following example, where the `CmpU` Ideal node is implemented with three `compU_rReg` machine nodes (one for each `jmpConU` machine node), but only one of the `compU_rReg` machine nodes (50) preserves the IGV identifier:
> 
> ![before-after-matching-limitation](https://user-images.githubusercontent.com/8792647/115869469-3770d080-a43e-11eb-9ede-d8845862c7bd.png)
> 
> Overcoming this limitation would require explicitly serializing the entire before-after relation among nodes and adapting IGV's node selection and graph difference logic, which seems too complex for a relatively infrequent case.
> 
> #### Testing
> - Regression-tested HotSpot changes on hs-tier1-3, windows-x64, linux-x64, linux-aarch64, and macosx-x64 (both release and debug).
> - Tested HotSpot graph generation and IGV graph loading and scheduling on tens of thousands of graphs by running `java -Xcomp -XX:-TieredCompilation -XX:PrintIdealGraphLevel=4 ...` on an instrumented IGV. Loading and scheduling are useful graph well-formedness tests, as they tend to fail for incorrect graphs, e.g. with repeated node identifiers.
> - Tested manually, for a few graphs, that nodes of different types can be tracked across matching.

This pull request has now been integrated.

Changeset: e879f8c6
Author:    Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/e879f8c6c874cc7039d344f19430cce7cfb138ea
Stats:     50 lines in 4 files changed: 20 ins; 13 del; 17 mod

8265587: IGV: track nodes across matching

Preserve the IGV node identifier of Ideal nodes in their corresponding machine
nodes after matching, to allow IGV users to track nodes across this phase.

Reviewed-by: thartmann, vlivanov

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

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


More information about the hotspot-compiler-dev mailing list