Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / tracevis / README
1 This directory contains TraceVis scripts.
2
3
4 To use TraceVis:
5
6 - Currently it can only be used with the JavaScript shell 'js', not within
7   Firefox.
8
9 - Configure using --enable-tracevis.
10
11 - If running your program from the command line, use the -T option, i.e.:
12
13     js -j -T <tracevis-file> foo.js
14   
15 - If running your programs within the interactive shell, use the
16   startTraceVis() and stopTraceVis() functions to turn TraceVis recording on
17   and off.  startTraceVis() takes an optional parameter which is the name of
18   the file to write the TraceVis output to;  if unspecified, the name
19   defaults to 'tracevis.dat' in the current directory.
20
21 - To view the recorded data in graphical form, run:
22
23     python vis.py <tracevis-file> <png-file>
24
25   The graph will be written to the file <png-file> in PNG format.
26
27 - To view some basic data about the recorded data, run:
28
29     python binlog.py <tracevis-file>
30
31
32 Troubleshooting:
33
34 - If you get this message when running the python scripts:
35
36     Traceback (most recent call last):
37       File "vis.py", line 2, in <module>
38         import Image, ImageDraw, ImageFont
39         ImportError: No module named Image
40
41   then you need to install libraries from
42   http://www.pythonware.com/products/pil/.
43
44
45 TODO list:
46
47 - Make the Python scripts more robust, e.g. handle file opening failures
48   gracefully.
49
50 - Make it usable within Firefox.