gecko/js/src/tracevis
2010-09-20 12:43:52 -07:00
..
acts.py Bug 557841 - TM: "Assertion failure: BINDNAME in global code resolved to non-global object, at ../jstracer.cpp". r=dmandelin. 2010-04-19 09:21:10 -05:00
binlog.py
config.py
README
tree.py
vis.py Bug 583143 - Fix bustage with MOZ_TRACEVIS and other NPOTB code (r=lw) 2010-09-20 12:43:52 -07:00

This directory contains TraceVis scripts.


To use TraceVis:

- Currently it can only be used with the JavaScript shell 'js', not within
  Firefox.

- Configure using --enable-tracevis.

- If running your program from the command line, use the -T option, i.e.:

    js -j -T <tracevis-file> foo.js
  
- If running your programs within the interactive shell, use the
  startTraceVis() and stopTraceVis() functions to turn TraceVis recording on
  and off.  startTraceVis() takes an optional parameter which is the name of
  the file to write the TraceVis output to;  if unspecified, the name
  defaults to 'tracevis.dat' in the current directory.

- To view the recorded data in graphical form, run:

    python vis.py <tracevis-file> <png-file>

  The graph will be written to the file <png-file> in PNG format.

- To view some basic data about the recorded data, run:

    python binlog.py <tracevis-file>


Troubleshooting:

- If you get this message when running the python scripts:

    Traceback (most recent call last):
      File "vis.py", line 2, in <module>
        import Image, ImageDraw, ImageFont
        ImportError: No module named Image

  then you need to install libraries from
  http://www.pythonware.com/products/pil/.


TODO list:

- Make the Python scripts more robust, e.g. handle file opening failures
  gracefully.

- Make it usable within Firefox.