README revision 222
a4544a5a0e622ef69e38641f87ab1b5685e05911Phill CunningtonThe Ideal Graph Visualizer is a tool developed to help examine the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterintermediate representation of C2 which is commonly referred to as the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster"ideal graph". It was developed in collaboration with the University
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterof Linz in Austria and has been included as part of hotspot since that
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterwas the primary target of the tool. The tool itself is fairly general
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterwith only a few modules that contain C2 specific elements.
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterThe tool is built on top of the NetBeans 6.0 rich client
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinfrastructure and so requires NetBeans to build. It currently
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterrequires Java 6 to run as it needs support for JavaScript for its
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterfiltering mechanism and assumes it's built into the platform. It
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostershould build out of the box whit NetBeans 6 and Java 6 or later. It's
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterpossible to run it on 1.5 by including Rhino on the classpath though
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterthat currently isn't working correctly. Support for exporting graphs
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosteras SVG can be enabled by adding batik to the classpath which isn't
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterincluded by default.
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterIt can be built on top of NetBeans 6.1 if you change the required
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostermodules to be platform8 instead of platform7. The tool could run on
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterJDK 1.5 with some reworking of the how the JavaScript support is
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterenabled but currently it requires some tweaking of the setup. This
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterwill be fixed in a later setup.
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterThe JVM support is controlled by the flag -XX:PrintIdealGraphLevel=#
1c3134bddb7b413373d1668cbc4b7d95c2477667Mark de Reeper 0: no output, the default
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster 1: dumps graph after parsing, before matching, and final code.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster also dumps graph for failed compiles, if available
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster 2: more detail, including after loop opts
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster 3: even more detail
c184142912cff04e5442d8bf70febe477285fb1cCraig McDonnell 4: prints graph after parsing every bytecode (very slow)
c184142912cff04e5442d8bf70febe477285fb1cCraig McDonnellBy default the JVM expects that it will connect to a visualizer on the
c184142912cff04e5442d8bf70febe477285fb1cCraig McDonnelllocal host on port 4444. This can be configured using the options
c184142912cff04e5442d8bf70febe477285fb1cCraig McDonnell-XX:PrintIdealGraphAddress= and -XX:PrintIdealGraphPort=.
c184142912cff04e5442d8bf70febe477285fb1cCraig McDonnellPrintIdealGraphAddress can actually be a hostname.
c184142912cff04e5442d8bf70febe477285fb1cCraig McDonnellAlternatively the output can be sent to a file using
c184142912cff04e5442d8bf70febe477285fb1cCraig McDonnell-XX:PrintIdealGraphFile=filename. Each compiler thread will get it's
c184142912cff04e5442d8bf70febe477285fb1cCraig McDonnellown file with unique names being generated by adding a number onto the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterprovided file name.
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterMore information about the tool is available at