Mercurial > hg > truffle
comparison README_GRAAL.txt @ 7154:5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 12 Dec 2012 21:36:40 +0100 |
parents | a89a18a57617 |
children | 3a6a718af535 |
comparison
equal
deleted
inserted
replaced
7153:c421c19b7bf8 | 7154:5d0bb7d52783 |
---|---|
7 setup. | 7 setup. |
8 | 8 |
9 Building both the Java and C++ source code comprising the Graal VM | 9 Building both the Java and C++ source code comprising the Graal VM |
10 can be done with the following simple command. | 10 can be done with the following simple command. |
11 | 11 |
12 mx build | 12 % mx build |
13 | 13 |
14 This builds the 'product' version of HotSpot with the Graal modifications. | 14 This builds the 'product' version of HotSpot with the Graal modifications. |
15 To build the debug or fastdebug versions: | 15 To build the debug or fastdebug versions: |
16 | 16 |
17 mx build debug | 17 mx build debug |
20 Running Graal | 20 Running Graal |
21 ------------- | 21 ------------- |
22 | 22 |
23 To run the VM, use 'mx vm' in place of the standard 'java' command: | 23 To run the VM, use 'mx vm' in place of the standard 'java' command: |
24 | 24 |
25 mx vm ... | 25 % mx vm ... |
26 | 26 |
27 To select the fastdebug or debug versions of the VM: | 27 To select the fastdebug or debug versions of the VM: |
28 | 28 |
29 mx --fastdebug vm ... | 29 % mx --fastdebug vm ... |
30 mx --debug vm ... | 30 % mx --debug vm ... |
31 | 31 |
32 Graal has an optional bootstrap step where it compiles itself before | 32 Graal has an optional bootstrap step where it compiles itself before |
33 compiling any application code. This bootstrap step currently takes about 7 seconds | 33 compiling any application code. This bootstrap step currently takes about 7 seconds |
34 on a fast x64 machine. It's useful to disable this bootstrap step when running small | 34 on a fast x64 machine. It's useful to disable this bootstrap step when running small |
35 programs with the -XX:-BootstrapGraal options. For example: | 35 programs with the -XX:-BootstrapGraal options. For example: |
36 | 36 |
37 mx vm -XX:-BootstrapGraal ... | 37 % mx vm -XX:-BootstrapGraal ... |
38 | |
39 | |
40 Other Build Configurations | |
41 -------------------------- | |
42 | |
43 By default the build commands above create a HotSpot binary where the Graal | |
44 is the only compiler. This binary is the Graal VM binary and identifies as | |
45 such with the -version option: | |
46 | |
47 % mx vm -XX:-BootstrapGraal -version | |
48 java version "1.7.0_07" | |
49 Java(TM) SE Runtime Environment (build 1.7.0_07-b10) | |
50 OpenJDK 64-Bit Graal VM (build 25.0-b10-internal, mixed mode) | |
51 | |
52 It's also possible to build and execute the standard HotSpot binaries | |
53 using the --vm option: | |
54 | |
55 % mx --vm server build | |
56 % mx --vm server vm -version | |
57 java version "1.7.0_07" | |
58 Java(TM) SE Runtime Environment (build 1.7.0_07-b10) | |
59 OpenJDK 64-Bit Server VM (build 25.0-b10-internal, mixed mode) | |
60 | |
61 These standard binaries still include the code necessary to support use of the | |
62 Graal compiler for explicit compilation requests. However, in this configuration | |
63 the Graal compiler will not service VM issued compilation requests (e.g., upon | |
64 counter overflow in the interpreter). | |
65 | |
66 To build a HotSpot binary that completely omits all VM support for Graal, | |
67 define an environment variable OMIT_GRAAL (its value does not matter) and build | |
68 with the --vm option as above (doing a clean first if necessary): | |
69 | |
70 % env OMIT_GRAAL= mx --vm server build |