RFR: 8263790: C2: new igv_print_immediately() for debugging purpose

Yi Yang yyang at openjdk.java.net
Thu Mar 18 11:57:39 UTC 2021


On Thu, 18 Mar 2021 11:12:57 GMT, Christian Hagedorn <chagedorn 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?

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:
![image](https://user-images.githubusercontent.com/5010047/111621967-95007480-8823-11eb-96cd-2ccc7a91d00c.png)
![image](https://user-images.githubusercontent.com/5010047/111622004-a34e9080-8823-11eb-8600-094e422aa560.png)

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

PR: https://git.openjdk.java.net/jdk/pull/3071


More information about the hotspot-compiler-dev mailing list