RFR: JDK-8302644: IGV: Apply filters per graph tab and not globally [v6]

Tobias Holenstein tholenstein at openjdk.org
Wed Mar 29 10:42:22 UTC 2023


On Tue, 28 Mar 2023 10:33:18 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:

>> src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/DiagramViewModel.java line 326:
>> 
>>> 324: 
>>> 325:     // called when the filter in filterChain changed, but not filterChain itself
>>> 326:     private void filterChanged() {
>> 
>> After applying this PR, `DiagramViewModel::filterChanged()` is fired every time a new graph in a group is viewed. This is not a functional bug, but it causes the expensive `DiagramViewModel::rebuildDiagram()` to be called twice in that scenario (the other call comes from `DiagramViewModel::changed()`). Would it be possible to arrange the code so that `DiagramViewModel::rebuildDiagram()` is only called once when a new graph in a group is viewed?
>
> You are right. `DiagramViewModel::rebuildDiagram()` was called too many times when it was not necessary. I updated the code - now `DiagramViewModel::rebuildDiagram()` should be only called when needed

my changed caused the checkbox to not be updated anymore when changing the profile (thanks @chhagedorn for finding that bug). Should be fixed now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/12714#discussion_r1151736953


More information about the hotspot-compiler-dev mailing list