RFR: 8348645: IGV: visualize live ranges
Damon Fenacci
dfenacci at openjdk.org
Wed Feb 19 12:06:53 UTC 2025
On Tue, 18 Feb 2025 08:52:56 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
>>> @robcasloz thanks a lot for this amazing improvement!
>>>
>>> Just a quick one: I noticed that, with your `java -Xbatch -XX:CompileCommand=IGVPrintLevel,java.util.HashMap::newNode,4` example with the `Initial spilling` phase selected, if I click on the live range icon <img alt="image" width="22" src="https://private-user-images.githubusercontent.com/2198987/413847416-afa5f9d3-acd3-4f86-9a52-022cdc675fbb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MDA1OTIsIm5iZiI6MTczOTgwMDI5MiwicGF0aCI6Ii8yMTk4OTg3LzQxMzg0NzQxNi1hZmE1ZjlkMy1hY2QzLTRmODYtOWE1Mi0wMjJjZGM2NzVmYmIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTdUMTM1MTMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmUzOWYyYmE3MWVmNDg5ZDBiYWZhM2RkY2YwNWRkOTAxNTdhNWY3MzZlNzNhODJmNDVmMzEzNmYyNDk0ZDg2NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.FBvjCADkNyXgLX2NGUXnQ
YIsWpZ66-0KbaHbyJlrOXA"> to make it disappear, I get a `NullPointerException` <img alt="image" width="483" src="https://private-user-images.githubusercontent.com/2198987/413848115-463d939c-1a84-4a55-8551-1950f56d818b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MDA1OTIsIm5iZiI6MTczOTgwMDI5MiwicGF0aCI6Ii8yMTk4OTg3LzQxMzg0ODExNS00NjNkOTM5Yy0xYTg0LTRhNTUtODU1MS0xOTUwZjU2ZDgxOGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTdUMTM1MTMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWI0YWY2ODI5Y2FhYzUxZTFhN2ZlZjYyMGM0NmNjNmIwNzg3NGJiZDlmOTkyNDg1ZGUxMWZjMGU0YTQzZmMwMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.u6Z7T4K35wJQvK03Eq03zT4YMUhj4kpr_0G4JSEEI5w"> (no further details apart from the exception)
>>
>> Thanks for the report Damon, will investigate!
>
>> Thanks for the report Damon, will investigate!
>
> Commit 00169223 should fix the issue, thanks again.
@robcasloz, I was a bit puzzled by live ranges with Phi nodes but then I noticed that in the description you mention that they are treated somewhat in a special way:
> To reflect accurately the semantics of Phi nodes w.r.t. liveness, the visualization treats live ranges related by Phi nodes specially: live ranges used by a Phi node end at the bottom of the corresponding predecessor basic blocks, whereas live ranges defined by a Phi node start at the top of the node's basic block.
I thought that variables that are joined by the Phi node are still live at the Phi node. Is this not the case? Or possibly you meant that it is better not to consider them live there (e.g. to reduce the number of live ranges in the block with the Phi node)?
Irrespective of that, would it be feasible to add a "termination dash" at the bottom of the line (e.g. at the bottom of `L8`)?
<img width="369" alt="image" src="https://github.com/user-attachments/assets/b7bf53c7-ccc3-4ec2-8847-e38ccdc28699" />
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23558#issuecomment-2668456896
More information about the hotspot-compiler-dev
mailing list