RFR: 8357568: IGV: Show NULL and numbers up to 4 characters in "Condense graph" filter [v2]
Marc Chevalier
mchevalier at openjdk.org
Fri May 23 07:32:51 UTC 2025
On Thu, 22 May 2025 14:44:07 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> When using the "Condense graph" filter in IGV, it would be useful to show `NULL` and numbers wider than 2 characters instead of `P` and `I/L` (fallback for larger numbers), respectively. There is a comment in `idealGrapPrinter.cpp` which says that maximally 2 chars are allowed for numbers:
>> https://github.com/openjdk/jdk/blob/428d33ef3ca0af34d8f164fe9d9b722e81e866a7/src/hotspot/share/opto/idealGraphPrinter.cpp#L646
>>
>> But we already allow larger entries today:
>> 
>>
>> I there propose to use `NULL` and allow up to 4 characters for numbers which could be a good trade-off between shortness and expressiveness. This allows us to quickly see null checks and larger constants.
>>
>> Without patch:
>> 
>>
>>
>> With patch:
>> 
>>
>> Thanks,
>> Christian
>
> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>
> Increase number of parameters as suggested by Manuel
I like it.
src/hotspot/share/opto/idealGraphPrinter.cpp line 657:
> 655:
> 656: // Only use up to 4 chars and fall back to a generic "L" to keep it short.
> 657: if (value >= -999 && value <= 9999) {
Just for the sake of saying something, can we somewhat factor this test? And ideally, it could be marginally nicer, if I want to see 6 chars, to just replace a 4 into a 6 and it'd work magically. But I don't really see a way beside length(to_string(value)) <= max_length, and it's not really efficient so... If you have a brilliant idea, good. Otherwise, feel free to ignore: changing it as it is now is easy too.
-------------
Marked as reviewed by mchevalier (Committer).
PR Review: https://git.openjdk.org/jdk/pull/25393#pullrequestreview-2863481391
PR Review Comment: https://git.openjdk.org/jdk/pull/25393#discussion_r2103989707
More information about the hotspot-compiler-dev
mailing list