RFR: JDK-8295461: IGV: Wrong src/dest nodes highlighted for edge [v2]

Tobias Holenstein tholenstein at openjdk.org
Mon Oct 24 07:22:14 UTC 2022


> 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:
> ![before](https://user-images.githubusercontent.com/71546117/197223077-962a5d97-c1c8-4720-9983-295e07468be9.png)
> 
> # 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: 
> ![ex1](https://user-images.githubusercontent.com/71546117/197225776-eb7cba50-6f6a-4f47-a91f-3b793021fdae.png)
> ![ex2](https://user-images.githubusercontent.com/71546117/197225789-d9510f36-d89a-44cd-ab69-1341edcafdfb.png)

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>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/10815/files
  - new: https://git.openjdk.org/jdk/pull/10815/files/cb318879..69093c3d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10815&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10815&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/10815.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10815/head:pull/10815

PR: https://git.openjdk.org/jdk/pull/10815


More information about the hotspot-compiler-dev mailing list