RFR: 8263790: C2: new igv_print_immediately() for debugging purpose
Christian Hagedorn
chagedorn at openjdk.java.net
Thu Mar 18 13:03:39 UTC 2021
On Thu, 18 Mar 2021 11:54:46 GMT, Yi Yang <yyang at openjdk.org> wrote:
>> I'm not sure if I understand this correctly. Is it just about having an ill-formatted xml file or are you actually having problems opening the graph in the IGV? I've just played around with calling `igv_print()` in gdb from a few places but could open the incomplete xml files in the IGV and have a look at the graphs. Are you seeing this when calling `igv_print()` from certain breakpoints while debugging?
>>
>> If it's the IGV that has problems opening it, could you maybe provide more information how to reproduce this and/or share the xml file that causes problems?
>
>> I'm not sure if I understand this correctly. Is it just about having an ill-formatted xml file or are you actually having problems opening the graph in the IGV? I've just played around with calling `igv_print()` in gdb from a few places but could open the incomplete xml files in the IGV and have a look at the graphs. Are you seeing this when calling `igv_print()` from certain breakpoints while debugging?
>>
>> If it's the IGV that has problems opening it, could you maybe provide more information how to reproduce this and/or share the xml file that causes problems?
>
> Let me add more information. When encountered a breakpoint, I call igv_print() from debugger, it produces a `custom_debug.xml`:
>
> $head -10 custom_debug.xml && echo '---' && tail -10 custom_debug.xml
> <graphDocument>
> <group>
> <properties>
> <p name='name'>
> virtual void java.lang.Object.<init>()</p>
> <p name='public'>
> true</p>
> </properties>
> <graph name='Debug'>
> <nodes>
> ---
> <edge from='1' to='11' index='1'/>
> <edge from='7' to='11' index='2'/>
> <edge from='1' to='11' index='3'/>
> <edge from='3' to='6' index='0'/>
> <edge from='3' to='5' index='0'/>
> <edge from='3' to='3' index='0'/>
> <edge from='0' to='3' index='1'/>
> <edge from='0' to='1' index='0'/>
> </edges>
> </graph>
> There is a lack of closed tags(`</graphDocument>` and `</group>`) at the end of the xml. These tags will be generated only when the VM exits normally, but the problem is that we sometimes cannot exit the VM normally during debugging (for example, when we are debugging another problem, which will crash the VM after breakpoint.), so if the VM exits abnormally, we get a problematic xml, it can not be opened by idealgraphvisualizer due to the following reason:
> 
> 
>
> When I add missing tags(`</graphDocument>` and `</group>`) manually, this file can be opened by idealgraphvisualizer correctly. So I think we can add igv_print_immediately to print a complete ideal graph XML as soon as it is called.
Okay, that is strange that the closing tags are the only problem. I cannot reproduce this. What version of IGV are you using? Looking at your filters in the screenshot, I assume you are not using one of the most recent versions (there were some fixes/improvements recently done by @robcasloz including new default filters). You could try to build the latest version of IGV and try it again. Could you also share the failing `custom_debug.xml` file in the JBS issue?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3071
More information about the hotspot-compiler-dev
mailing list