Visualize IonMonkey CFGs using GraphViz.
Python Shell Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


  Primitive visualizer for IonMonkey graphs using GraphViz.
  Doesn't involve Java. Generated images and DOT files are saved on disk.

  Copyright Sean Stangl <>, 2011-2012.


  IonMonkey is a compiler for JavaScript that uses an SSA-form IR.

  Mozilla-Central ( includes IonMonkey
  as part of the SpiderMonkey JavaScript engine in js/src.


  Make a debug build of IonMonkey, then run with the envvar IONFLAGS=logs.
  IonMonkey will then dump observations about graph state into /tmp/ion.json.

    IonMonkey by default uses background threads for compilation, but the
    JitSpewer, the thing that outputs ion.json, was never updated to work
    with threads, so by default ion.json contains blank data.

    You can work around this by passing --ion-offthread-compile=off.
    If using jit-tests, this looks like:

      python jit-tests/ path/to/shell.js --args="--ion-offthread-compile=off"

    If you want to write the support for parallel ion.json generation,
    message sstangl on

  Executing 'make' reads in this file, outputs a DOT file for each function
  and for each pass for each function, and then generates visualizations
  of those DOT files in PNG and PDF format.

  Iterating over those files crudely shows changes to the graph over time.


  Blocks with green borders are loop headers.
  Blocks with red borders contain loop backedges (successor is a header).
  Blocks with dashed borders were created during critical edge splitting.

  Instructions that are movable are blue.
  Instructions that cannot be hoisted even if movable are underlined.

  MResumePoints are placed as instructions, colored gray.

  Edges from blocks ending with conditional branches are annotated with
    the truth value associated with each edge, given as '0' or '1'.