-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathREADME
51 lines (32 loc) · 1.87 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Primitive visualizer for IonMonkey graphs using GraphViz.
Doesn't involve Java. Generated images and DOT files are saved on disk.
Copyright Sean Stangl <[email protected]>, 2011-2012.
IONMONKEY
IonMonkey is a compiler for JavaScript that uses an SSA-form IR.
Mozilla-Central (https://hg.mozilla.org/mozilla-central) includes IonMonkey
as part of the SpiderMonkey JavaScript engine in js/src.
USAGE
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.
IMPORTANT:
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/jit-tests.py path/to/shell.js --args="--ion-offthread-compile=off"
If you want to write the support for parallel ion.json generation,
message sstangl on irc.mozilla.org/#jsapi.
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.
GRAPH PROPERTIES
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'.