RFR: JDK-8295461: IGV: Wrong src/dest nodes highlighted for edge [v2]
Tobias Holenstein
tholenstein at openjdk.org
Mon Oct 24 14:13:50 UTC 2022
On Mon, 24 Oct 2022 07:22:14 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:
>> Outgoing edges in IGV are organized like trees. When hovering with the mouse over a segment of an edge, the edge is highlighted all the way up the the source node, as well as all the way down to the leave nodes. This works as expected. The nodes at the source and leaves of the highlighted segments are highlighted as well. There is a bug that instead of only highlighting the leave nodes in the subtree, IGV highlights all leave nodes:
>> 
>>
>> # Solution
>> The segments in the edge tree are `LineWidget` objects. Each `LineWidget` has a single `LineWidget` `predecessor` and list of `LineWidget` `successors`. When hovering over a line segment the `notifyStateChanged` function is called in the corresponding `LineWidget` : `predecessor` and `successors` `LineWidget` are recursively visited and highlighted here. The nodes (of super type `Vertex`) are new highlighted with a new `highlightVertices` function instead of using recursion.
>> `highlightVertices(boolean enable)` uses the list of `connections` which already contains all the one-to-one connections between src/dest nodes that go through a single `LineWidget` segment. This gives as the `Vertex` nodes of the root as well as the leaves in the subtree of the hovered `LineWidget` segment.
>>
>> Now the highlighting of the leave nodes works as expected:
>> 
>> 
>
> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
>
> whitespace
>
> Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
Thanks @turbanoff , @TobiHartmann and @robcasloz for the reviews!
-------------
PR: https://git.openjdk.org/jdk/pull/10815
More information about the hotspot-compiler-dev
mailing list