Mercurial > hg > truffle
annotate README_GRAAL.txt @ 14094:3f27e57439ed
Truffle/Instrumentation: significant rearrangement (including moved class) and extension of the Truffle Instrumentation Framework. New interfaces include DebugContext (which can be attached to the ExecutionContext), through which access is provided to possibly language-specific (a) node instrumentation, (b) debug services manager, (c) notification when programs halt, (d) display of language values, and (e) display of variable identifiers.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Mon, 03 Feb 2014 20:58:23 -0800 |
parents | a8132e3fd0d8 |
children |
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 |
11587
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
14 There are a number of VM configurations supported by mx which can |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
15 be explicitly specified using the --vm option. However, you'll typically |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
16 want one of these VM configurations: |
5181
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 |
11587
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
18 1. The 'server' configuration is a standard HotSpot VM that includes the |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
19 runtime support for Graal but uses the existing compilers for normal |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
20 compilation (e.g., when the interpreter threshold is hit for a method). |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
21 Compilation with Graal is only done by explicit requests to the |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
22 Graal API. This is how Truffle uses Graal. |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
23 |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
24 2. The 'graal' configuration is a VM where all compilation is performed |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
25 by Graal and no other compilers are built into the VM binary. This |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
26 VM will bootstrap Graal itself at startup unless the -XX:-BootstrapGraal |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
27 VM option is given. |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
28 |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
29 Unless you use the --vm option with the build command, you will be presented |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
30 with a dialogue to choose one of the above VM configurations for the build |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
31 as well as have the option to make it your default for subsequent commands |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
32 that need a VM specified. |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
33 |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
34 To build the debug or fastdebug builds: |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
35 |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
36 % mx --vmbuild debug build |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
37 % mx --vmbuild fastdebug build |
5181
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
38 |
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
|
39 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
|
40 ------------- |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
41 |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
42 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
|
43 |
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 % 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
|
45 |
11587
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
46 To select the fastdebug or debug builds of the 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
|
47 |
11558
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
48 % mx --vmbuild fastdebug vm ... |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
49 % mx --vmbuild debug vm ... |
5181
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
50 |
11587
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
51 Other VM Configurations |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
52 ----------------------- |
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
|
53 |
11587
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
54 In addition to the VM configurations described above, there are |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
55 VM configurations that omit all VM support for 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
|
56 |
11558
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
57 % 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
|
58 % 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
|
59 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
|
60 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
|
61 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
|
62 |
c106320fab79
updated README_GRAAL.txt to reflect recent mx changes
Doug Simon <doug.simon@oracle.com>
parents:
7781
diff
changeset
|
63 % 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
|
64 % 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
|
65 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
|
66 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
|
67 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
|
68 |
11587
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
69 These configurations aim to match as closely as possible the |
a8132e3fd0d8
further improvements to README_GRAAL.txt
Doug Simon <doug.simon@oracle.com>
parents:
11558
diff
changeset
|
70 VM(s) included in the OpenJDK binaries one can download. |