RFR: JDK-8302644: IGV: Apply filters per graph tab and not globally [v13]
Tobias Hartmann
thartmann at openjdk.org
Wed Mar 29 12:35:42 UTC 2023
On Wed, 29 Mar 2023 10:56:03 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:
>> In IGV the user can apply a set of filters to a graph. Currently, the same set of selected filters is applied to all graphs (globally).
>>
>> - With this change the use can define a set of filters for each individual graph tab using the `--Local--` profile
>> - Further a filter profile can be created that represents a set of filter. This filter profile can the be selected in each graph tab individually.
>>
>> ### Global profile
>> Each tab has a `--Global--` filter profile which is selected when opening a graph. Filters applied to the `--Global--` profile are applied to all tabs that have the `--Global--` profile selected.
>>
>> ### Local profile
>> Each tab has its own `--Local--` filter profile. Filters applied to the `--Local--` profile are applied only to the currently selected tabs. Only one tab can be selected at a time and a tab gets selected by clicking on it. To make it more clear which tab is currently selected, the title of the selected tab is displayed in **bold** font.
>> <img width="1252" alt="tabA" src="https://user-images.githubusercontent.com/71546117/222127949-38a3ed8f-8f61-4485-aca6-67cbc341a4d1.png">
>>
>> When clicking on a different tab with a different `--Local--` profile, the selected filters get updated accordingly.
>> <img width="1256" alt="tabB" src="https://user-images.githubusercontent.com/71546117/222127988-66be7a76-a638-4c40-b8f1-ad56a1ab1fd7.png">
>>
>> ### New profile
>> The user can also create a new filter profile and give it a name. E.g. `My Filters`
>> <img width="396" alt="newProfile" src="https://user-images.githubusercontent.com/71546117/222128202-ea1f8de6-9260-4a78-b396-b69a354dc883.png">
>>
>> The `My Filters` profile is then globally available to other tabs as well
>> <img width="254" alt="selectProfile" src="https://user-images.githubusercontent.com/71546117/222128229-e33ab7b1-ebbe-4abc-a759-b50965ca64e1.png">
>>
>>
>> ### Filters for cloned tabs
>> When the user clones a tab, the `--Local--` profile gets cloned as well. Further the clone has the same filter profile selected when it gets opened
>> <img width="1250" alt="cloneTab" src="https://user-images.githubusercontent.com/71546117/222128014-2ca5eac0-ae8a-42da-b407-acc62c09edcf.png">
>>
>> ### Saving of filters and profiles
>> When the users closes IGV, the filters (in their exact order) are save, as well as the filter profiles. The profile that was last used is selected when opening IGV.
>
> Tobias Holenstein has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 32 additional commits since the last revision:
>
> - Merge remote-tracking branch 'origin/master' into JDK-8302644
> - add missing empty line
> - Merge branch 'JDK-8302644' of github.com:tobiasholenstein/jdk into JDK-8302644
> - Update src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java
>
> remove empty line
>
> Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
> - init fields directly in RangeSliderModel constructor
> - move useBoldDisplayName to fields
> - make group final again
> - Merge branch 'JDK-8302644' of github.com:tobiasholenstein/jdk into JDK-8302644
> - Update src/utils/IdealGraphVisualizer/Filter/src/main/java/com/sun/hotspot/igv/filter/FilterChain.java
>
> missing newline
>
> Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
> - renamed fo to fileObject, cf to customFilter
> - ... and 22 more: https://git.openjdk.org/jdk/compare/603f9b64...0ce7ab64
Works well for me but I spotted the following issue which seems to be a regression from this change:
- Open two .xml files, open a graph in each and select the local profile
- Double click on a filter and then click Cancel
java.lang.AssertionError
at com.sun.hotspot.igv.view.DiagramViewModel.filterChanged(DiagramViewModel.java:356)
at com.sun.hotspot.igv.view.DiagramViewModel.lambda$new$1(DiagramViewModel.java:73)
at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:44)
at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:31)
at com.sun.hotspot.igv.data.Event.fire(Event.java:56)
at com.sun.hotspot.igv.filter.FilterChain$1.changed(FilterChain.java:48)
at com.sun.hotspot.igv.filter.FilterChain$1.changed(FilterChain.java:45)
at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:44)
at com.sun.hotspot.igv.data.ChangedEvent.fire(ChangedEvent.java:31)
at com.sun.hotspot.igv.data.Event.fire(Event.java:56)
at com.sun.hotspot.igv.filter.CustomFilter.openInEditor(CustomFilter.java:86)
at com.sun.hotspot.igv.filter.CustomFilter$1.open(CustomFilter.java:77)
at org.openide.actions.OpenAction.performAction(OpenAction.java:59)
at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:561)
at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:70)
at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:91)
at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:74)
at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:558)
at org.openide.explorer.view.ListView.performObjectAt(ListView.java:681)
at org.openide.explorer.view.ListView$PopupSupport.mouseClicked(ListView.java:1306)
at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6638)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at java.desktop/java.awt.Component.processEvent(Component.java:6400)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4556)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/12714#issuecomment-1488516728
More information about the hotspot-compiler-dev
mailing list