RFR: 8302738: IGV: refine 'Simplify graph' filter
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Mon Mar 27 11:28:34 UTC 2023
On Mon, 20 Mar 2023 12:27:26 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> When selecting a CallStaticJava node, the custom node info is sometimes cut depending on the zoom level (sometimes more, sometimes less)
Good catch, @chhagedorn! This is an existing issue in mainline IGV, you can reproduce it e.g. by showing a long property such as `dump_spec` in the node text. The issue just becomes more visible with the addition of custom node info in this changeset.
As far as I understand, the node width is computed assuming it is selected (i.e. bold text) at 100% zoom level, and scaled proportionally to the selected zoom level. This assumes label fonts scale perfectly with the zoom level, which is not the case. As a result, very long node labels can overflow at different zoom levels than 100%. I don't see a better solution than multiplying the computed node width with a factor (`Figure::BOLD_LINE_FACTOR`) to account for the worst-case text overflow at any zoom level. This will not change the width of most nodes since this tends to be dominated by the input slots anyway, only for those nodes with long labels.
I selected this factor experimentally to be of 6% of the total width. Hope this new version fixes the issue you observed. If not, please try out and suggest a more appropriate factor.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/12955#issuecomment-1484974123
More information about the hotspot-compiler-dev
mailing list