Integrated: 8279570: IGV: Add source/destination property for load and store nodes with an associated field

Christian Hagedorn chagedorn at openjdk.java.net
Fri Jan 14 16:20:37 UTC 2022


On Wed, 12 Jan 2022 10:22:06 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

> 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
> 
> ![Screenshot from 2022-01-07 15-12-41](https://user-images.githubusercontent.com/17833009/149097102-6192f9c1-72a5-4941-bf92-ff0f59018e08.png)
> 
> ![Screenshot from 2022-01-07 15-18-15](https://user-images.githubusercontent.com/17833009/149098172-0d750445-9e26-42da-82ff-7627428a4c12.png)
> 
> - `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

This pull request has now been integrated.

Changeset: cf283e2a
Author:    Christian Hagedorn <chagedorn at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/cf283e2a33a053407eac65ea35baa61a3a23c8d5
Stats:     94 lines in 2 files changed: 93 ins; 0 del; 1 mod

8279570: IGV: Add source/destination property for load and store nodes with an associated field

Reviewed-by: kvn, thartmann

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

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


More information about the hotspot-compiler-dev mailing list