Mercurial > hg > truffle
annotate README_GRAAL.txt @ 11584:65cedae2647e
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 10 Sep 2013 19:18:24 +0200 |
parents | c106320fab79 |
children | a8132e3fd0d8 |
rev | line source |
---|---|
5182
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
1 Building Graal |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
2 -------------- |
6452
a89a18a57617
fixed wrong path in README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
5182
diff
changeset
|
3 There is a Python script in mxtool/mx.py that simplifies working with the code |
5181
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 base. It requires Python 2.7. While you can run this script by using an absolute path, |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 it's more convenient to add graal/mxtool to your PATH environment variable so that the |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 'mx' helper script can be used. The following instructions in this file assume this |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 setup. |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 Building both the Java and C++ source code comprising the Graal VM |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 can be done with the following simple command. |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
12 % mx build |
5181
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 This builds the 'product' version of HotSpot with the Graal modifications. |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 To build the debug or fastdebug versions: |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 |
11558
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
17 mx --vmbuild debug build |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
18 mx --vmbuild fastdebug build |
5181
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 |
5182
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
20 Running Graal |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
21 ------------- |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
22 |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
23 To run the VM, use 'mx vm' in place of the standard 'java' command: |
5181
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
25 % mx vm ... |
5182
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
26 |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
27 To select the fastdebug or debug versions of the VM: |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
28 |
11558
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
29 % mx --vmbuild fastdebug vm ... |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
30 % mx --vmbuild debug vm ... |
5181
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
31 |
5182
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
32 Graal has an optional bootstrap step where it compiles itself before |
11558
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
33 compiling any application code. This bootstrap step currently takes about 20 seconds |
5182
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
34 on a fast x64 machine. It's useful to disable this bootstrap step when running small |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
35 programs with the -XX:-BootstrapGraal options. For example: |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
36 |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
37 % mx vm -XX:-BootstrapGraal ... |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
38 |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
39 |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
40 Other Build Configurations |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
41 -------------------------- |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
42 |
7781 | 43 By default the build commands above create a HotSpot binary where Graal |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
44 is the only compiler. This binary is the Graal VM binary and identifies as |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
45 such with the -version option: |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
46 |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
47 % mx vm -XX:-BootstrapGraal -version |
11558
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
48 java version "1.7.0_25" |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
49 Java(TM) SE Runtime Environment (build 1.7.0_25-b15) |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
50 OpenJDK 64-Bit Graal VM (build 25.0-b43-internal, mixed mode) |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
51 |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
52 It's also possible to build and execute the standard HotSpot binaries |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
53 using the --vm option: |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
54 |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
55 % mx --vm server build |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
56 % mx --vm server vm -version |
11558
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
57 java version "1.7.0_25" |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
58 Java(TM) SE Runtime Environment (build 1.7.0_25-b15) |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
59 OpenJDK 64-Bit Server VM (build 25.0-b43-internal, mixed mode) |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
60 |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
61 These standard binaries still include the code necessary to support use of the |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
62 Graal compiler for explicit compilation requests. However, in this configuration |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
63 the Graal compiler will not service VM issued compilation requests (e.g., upon |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
64 counter overflow in the interpreter). |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
65 |
11558
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
66 To build and run a HotSpot binary that completely omits all VM support for Graal, |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
67 use the following as a guide: |
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
Doug Simon <doug.simon@oracle.com>
parents:
6452
diff
changeset
|
68 |
11558
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
69 % mx --vm server-nograal build |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
70 % mx --vm server-nograal vm -version |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
71 java version "1.7.0_25" |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
72 Java(TM) SE Runtime Environment (build 1.7.0_25-b15) |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
73 OpenJDK 64-Bit Server VM (build 25.0-b43-internal, mixed mode) |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
74 |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
75 % mx --vm client-nograal build |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
76 % mx --vm client-nograal vm -version |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
77 java version "1.7.0_25" |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
78 Java(TM) SE Runtime Environment (build 1.7.0_25-b15) |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
79 OpenJDK 64-Bit Cleint VM (build 25.0-b43-internal, mixed mode) |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
80 |