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

Tobias Holenstein tholenstein at openjdk.org
Tue Mar 28 10:37:15 UTC 2023


On Mon, 27 Mar 2023 07:14:09 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

>> Tobias Holenstein has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - always select previous profile for new tabs
>>  - .js ending for filters
>>  - save order of filters
>
> src/utils/IdealGraphVisualizer/Filter/src/main/java/com/sun/hotspot/igv/filter/FilterChain.java line 71:
> 
>> 69:     }
>> 70: 
>> 71:     public void applyInOrder(Diagram diagram, FilterChain filterOrder) {
> 
> I have also addressed this in [#12955](https://github.com/openjdk/jdk/pull/12955), but I think your solution of sorting the filter list upfront, rather than every time filters are applied, is preferable. I will wait for this PR to be integrated and then exclude the corresponding changes from #12955.

sounds good

> 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

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

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


More information about the hotspot-compiler-dev mailing list