Mercurial > hg > graal-jvmci-8
comparison README.html @ 13878:64b9375246e4
Update README and AUTHORS. Move to HTML format.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 05 Feb 2014 14:02:54 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13877:c6b1802ae32b | 13878:64b9375246e4 |
---|---|
1 <h2>Building Graal</h2> | |
2 <p>There is a Python script in mxtool/mx.py that simplifies working with the code | |
3 base. It requires Python 2.7. While you can run this script by using an absolute path, | |
4 it's more convenient to add graal/mxtool to your PATH environment variable so that the | |
5 'mx' helper script can be used. The following instructions in this file assume this | |
6 setup.</p> | |
7 | |
8 <p>Building both the Java and C++ source code comprising the Graal VM | |
9 can be done with the following simple command.</p> | |
10 | |
11 <pre> | |
12 % mx build | |
13 </pre> | |
14 | |
15 <p>There are a number of VM configurations supported by mx which can | |
16 be explicitly specified using the --vm option. However, you'll typically | |
17 want one of these VM configurations:</p> | |
18 | |
19 <ol> | |
20 <li> The 'server' configuration is a standard HotSpot VM that includes the | |
21 runtime support for Graal but uses the existing compilers for normal | |
22 compilation (e.g., when the interpreter threshold is hit for a method). | |
23 Compilation with Graal is only done by explicit requests to the | |
24 Graal API. This is how Truffle uses Graal.</li> | |
25 | |
26 <li> The 'graal' configuration is a VM where all compilation is performed | |
27 by Graal and no other compilers are built into the VM binary. This | |
28 VM will bootstrap Graal itself at startup unless the -XX:-BootstrapGraal | |
29 VM option is given. </li> | |
30 </ol> | |
31 | |
32 <p>Unless you use the --vm option with the build command, you will be presented | |
33 with a dialogue to choose one of the above VM configurations for the build | |
34 as well as have the option to make it your default for subsequent commands | |
35 that need a VM specified.</p> | |
36 | |
37 <p>To build the debug or fastdebug builds:</p> | |
38 | |
39 <pre> | |
40 % mx --vmbuild debug build | |
41 % mx --vmbuild fastdebug build | |
42 </pre> | |
43 | |
44 <h2>Running Graal</h2> | |
45 | |
46 <p>To run the VM, use 'mx vm' in place of the standard 'java' command:</p> | |
47 | |
48 <pre> | |
49 % mx vm ... | |
50 </pre> | |
51 | |
52 <p>To select the fastdebug or debug builds of the VM:</p> | |
53 | |
54 <pre> | |
55 % mx --vmbuild fastdebug vm ... | |
56 % mx --vmbuild debug vm ... | |
57 </pre> | |
58 | |
59 <h2>Other VM Configurations</h2> | |
60 | |
61 <p>In addition to the VM configurations described above, there are | |
62 VM configurations that omit all VM support for Graal:</p> | |
63 | |
64 <pre> | |
65 % mx --vm server-nograal build | |
66 % mx --vm server-nograal vm -version | |
67 java version "1.7.0_25" | |
68 Java(TM) SE Runtime Environment (build 1.7.0_25-b15) | |
69 OpenJDK 64-Bit Server VM (build 25.0-b43-internal, mixed mode) | |
70 </pre> | |
71 | |
72 <pre> | |
73 % mx --vm client-nograal build | |
74 % mx --vm client-nograal vm -version | |
75 java version "1.7.0_25" | |
76 Java(TM) SE Runtime Environment (build 1.7.0_25-b15) | |
77 OpenJDK 64-Bit Cleint VM (build 25.0-b43-internal, mixed mode) | |
78 </pre> | |
79 | |
80 <p>These configurations aim to match as closely as possible the | |
81 VM(s) included in the OpenJDK binaries one can download.</p> |