hotspot/src/share/tools/IdealGraphVisualizer/README
author never
Tue, 24 Jun 2008 16:00:14 -0700
changeset 768 d0bebc7eefc2
child 1497 cd3234c89e59
permissions -rw-r--r--
6718676: putback for 6604014 is incomplete Reviewed-by: kvn, jrose
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
768
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
     1
The Ideal Graph Visualizer is a tool developed to help examine the
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
     2
intermediate representation of C2 which is commonly referred to as the
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
     3
"ideal graph".  It was developed in collaboration with the University
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
     4
of Linz in Austria and has been included as part of hotspot since that
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
     5
was the primary target of the tool.  The tool itself is fairly general
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
     6
with only a few modules that contain C2 specific elements.
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
     7
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
     8
The tool is built on top of the NetBeans 6.0 rich client
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
     9
infrastructure and so requires NetBeans to build.  It currently
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    10
requires Java 6 to run as it needs support for JavaScript for its
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    11
filtering mechanism and assumes it's built into the platform.  It
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    12
should build out of the box whit NetBeans 6 and Java 6 or later.  It's
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    13
possible to run it on 1.5 by including Rhino on the classpath though
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    14
that currently isn't working correctly.  Support for exporting graphs
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    15
as SVG can be enabled by adding batik to the classpath which isn't
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    16
included by default.
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    17
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    18
It can be built on top of NetBeans 6.1 if you change the required
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    19
modules to be platform8 instead of platform7.  The tool could run on
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    20
JDK 1.5 with some reworking of the how the JavaScript support is
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    21
enabled but currently it requires some tweaking of the setup.  This
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    22
will be fixed in a later setup.
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    23
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    24
The JVM support is controlled by the flag -XX:PrintIdealGraphLevel=#
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    25
where # is:
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    26
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    27
  0: no output, the default
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    28
  1: dumps graph after parsing, before matching, and final code.
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    29
     also dumps graph for failed compiles, if available
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    30
  2: more detail, including after loop opts
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    31
  3: even more detail
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    32
  4: prints graph after parsing every bytecode (very slow)
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    33
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    34
By default the JVM expects that it will connect to a visualizer on the
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    35
local host on port 4444.  This can be configured using the options
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    36
-XX:PrintIdealGraphAddress= and -XX:PrintIdealGraphPort=.
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    37
PrintIdealGraphAddress can actually be a hostname.
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    38
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    39
Alternatively the output can be sent to a file using
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    40
-XX:PrintIdealGraphFile=filename.  Each compiler thread will get it's
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    41
own file with unique names being generated by adding a number onto the
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    42
provided file name.
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    43
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    44
More information about the tool is available at
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents:
diff changeset
    45
http://wikis.sun.com/display/HotSpotInternals/IdealGraphVisualizer.