RFR: 8343535: IGV: Colorize nodes on demand [v2]

Tobias Holenstein tholenstein at openjdk.org
Mon Nov 11 13:28:21 UTC 2024


On Fri, 8 Nov 2024 09:02:53 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

>> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/DiagramScene.java
>>   
>>   Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
>
> In my opinion, the IGV toolbar is already pretty crowded (this hurts most when opening two graphs side-by-side) and I would prefer not adding the color icon there. On the other hand, we could add the action to the pop-up menu that's opened when right-clicking into a node or set of nodes. Here's my suggestion:
> 
> 
> diff --git a/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java b/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java
> index e68abd3297e..c4f2ac670e7 100644
> --- a/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java
> +++ b/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java
> @@ -100,6 +100,7 @@ public EditorTopComponent(DiagramViewModel diagramViewModel) {
>          };
>  
>          Action[] actionsWithSelection = new Action[]{
> +                ColorAction.get(ColorAction.class),
>                  ExtractAction.get(ExtractAction.class),
>                  HideAction.get(HideAction.class),
>                  null,
> @@ -168,8 +169,6 @@ public void mouseMoved(MouseEvent e) {}
>          toolBar.add(ReduceDiffAction.get(ReduceDiffAction.class));
>          toolBar.add(ExpandDiffAction.get(ExpandDiffAction.class));
>          toolBar.addSeparator();
> -        toolBar.add(ColorAction.get(ColorAction.class));
> -        toolBar.addSeparator();
>          toolBar.add(ExtractAction.get(ExtractAction.class));
>          toolBar.add(HideAction.get(HideAction.class));
>          toolBar.add(ShowAllAction.get(ShowAllAction.class));
> diff --git a/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/actions/ColorAction.java b/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/actions/ColorAction.java
> index a51934a4322..92921c81512 100644
> --- a/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/actions/ColorAction.java
> +++ b/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/actions/ColorAction.java
> @@ -43,7 +43,7 @@
>          @ActionReference(path = "Shortcuts", name = "D-C")
>  })
>  @Messages({
> -        "CTL_ColorAction=Color action",
> +        "CTL_ColorAction=Color",
>          "HINT_ColorAction=Color current set of selected nodes"
>  })
>  public final class ColorAction extends ModelAwareAction {
> diff --git a/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/actions/ExtractAction.java b/src/utils/I...

thanks for the reviews @robcasloz and @chhagedorn

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

PR Comment: https://git.openjdk.org/jdk/pull/21925#issuecomment-2468173021


More information about the hotspot-compiler-dev mailing list