RFR: 8279570: IGV: Add source/destination property for load and store nodes with an associated field [v2]
Christian Hagedorn
chagedorn at openjdk.java.net
Thu Jan 13 08:36:57 UTC 2022
> This patch adds a source/destination property field in the "Properties" view for a load/store node associated with a field in IGV. This simplifies the analysis of graphs when dealing with multiple loads/stores from/to fields.
>
> For each node, we are trying to get the associated `ciField` (`get_field()`). This works fine for direct field load/stores nodes. However, when facing an array access, we need to find the actual node doing the field access to get the `ciField` from. For that purpose, I added an additional search based on pattern matching (`find_source_field_of_array_access()`). It follows the address input of a load/store to find the field `LoadN` (compressed oops) or `LoadP` (non-compressed oops) from which we can get the `ciField`.
>
> Example:
>
> iFld = 1; // StoreI 25 (not shown in graph)
> iArrFld[2] = 3; // StoreI 67
> x = iArrFld2[4][5]; // LoadI 138
>
> 
>
> 
>
> - `StoreI 25`: Can directly fetch the field `iFld` with `get_field()`.
> - `StoreI 67`: For the store to an array, we follow the address input `AddP 66` -> `46 CastPP` -> `29 DecodeN` -> `28 LoadN` to get the field `iFldArr` from `28 LoadN` (done in `find_source_field_of_array_access()`)
> - `LoadI 138`: Same as for `StoreI 67` but we repeat the loop in `find_source_field_of_array_access()` when reaching `LoadI 138` -> ... -> `104 LoadN` to get the field `iArrFld2` eventually from `70 LoadN`.
>
> I additionally ran the following sanity testing with a Hello World program:
>
> java -XX:-TieredCompilation -Xcomp -XX:+PrintIdealGraph -XX:PrintIdealGraphLevel=3 -XX:PrintIdealGraphFile=graph.xml HelloWorld.java
>
> Thanks,
> Christian
Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
Change to Node::uncast
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7048/files
- new: https://git.openjdk.java.net/jdk/pull/7048/files/315b3806..3495d46c
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7048&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7048&range=00-01
Stats: 6 lines in 1 file changed: 0 ins; 3 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/7048.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7048/head:pull/7048
PR: https://git.openjdk.java.net/jdk/pull/7048
More information about the hotspot-compiler-dev
mailing list