RFR: 8309463: IGV: Dynamic graph layout algorithm [v7]

emmyyin duke at openjdk.org
Thu Aug 24 08:31:32 UTC 2023


On Tue, 22 Aug 2023 11:38:40 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> emmyyin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixing trailing ws
>
> src/utils/IdealGraphVisualizer/HierarchicalLayout/src/main/java/com/sun/hotspot/igv/hierarchicallayout/HierarchicalStableLayoutManager.java line 807:
> 
>> 805:             n.preds.add(result);
>> 806:             result.to = n;
>> 807:             result.relativeTo = n.width / 2;
> 
> `n.width` equals `DUMMY_WIDTH` here which is 1. `n.width / 2` is therefore always zero. Is it intended to set `result.relativeTo` and `e.relativeFrom` to zero? Same further down in `expandNewLayerBeneath()`.

Yes since `relativeTo` and `relativeFrom` refers to the ports on the node, which is irrelevant for the dummy nodes. Could definitely be done differently, but this is how it is in `HierarchicalLayoutManager` and I thought it would be better to be consistent across the layout managers

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14349#discussion_r1303987350


More information about the hotspot-compiler-dev mailing list