RFR: 8344122: IGV: Extend c2 IdealGraphPrinter to send subgraphs to IGV

Tobias Holenstein tholenstein at openjdk.org
Thu Nov 14 08:45:59 UTC 2024


IGV XML already support to define which graphs are visible when opened. Extend the IdealGraphPrinter::print... in C2 to define which nodes should be visible in IGV when sent over the network

### Add a new option "!" to dump_bfs
The option ! send the printed nodes of dump_bfs to IGV and shows them 

p find_node(0)->dump_bfs(1,0,"dcmxo+!")

dist dump
---------------------------------------------
   1  51  Return  === 46 6 47 8 9 returns 39  [[ 0 ]] 
   0   0  Root  === 0 51  [[ 0 1 3 26 ]] 
Method printed over network stream to IGV


<img width="668" alt="dump" src="https://github.com/user-attachments/assets/d476e8b0-c444-4cd3-b40d-4a8f35caba83">

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

Commit messages:
 - Update src/hotspot/share/opto/idealGraphPrinter.hpp
 - Update src/hotspot/share/opto/idealGraphPrinter.hpp
 - Update src/hotspot/share/opto/idealGraphPrinter.cpp
 - Update src/hotspot/share/opto/idealGraphPrinter.cpp
 - Update src/hotspot/share/opto/idealGraphPrinter.cpp
 - Update src/hotspot/share/opto/compile.hpp
 - Update src/hotspot/share/opto/compile.cpp
 - Update src/hotspot/share/opto/compile.cpp
 - Update src/hotspot/share/opto/node.cpp
 - JDK-8344122: IGV: Extends c2 IdealGraphPrinter to send subgraphs to IGV

Changes: https://git.openjdk.org/jdk/pull/22076/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22076&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8344122
  Stats: 72 lines in 6 files changed: 51 ins; 2 del; 19 mod
  Patch: https://git.openjdk.org/jdk/pull/22076.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22076/head:pull/22076

PR: https://git.openjdk.org/jdk/pull/22076


More information about the hotspot-compiler-dev mailing list