Mercurial > hg > truffle
annotate README_GRAAL.txt @ 9126:bc26f978b0ce
HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
don't use the (wrong) cached value, but ask the runtime on each request.
Fixes regression on xml.* benchmarks @ specjvm2008. The problem was:
After the constructor of Object was deoptimized due to an assumption violation,
it was recompiled again after some time. However, on recompilation, the value
of hasFinalizeSubclass for the class was not updated and it was compiled again
with a, now wrong, assumption, which then triggers deoptimization again.
This was repeated until it hit the recompilation limit (defined by
PerMethodRecompilationCutoff), and therefore only executed by the interpreter
from now on, causing the performance regression.
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Mon, 15 Apr 2013 19:54:58 +0200 |
parents | 3a6a718af535 |
children | c106320fab79 |
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 |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 mx build debug |
b97ef124c3ea
added README_GRAAL.txt with simple build instructions
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 mx build fastdebug |
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 |
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
|
29 % mx --fastdebug vm ... |
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
|
30 % mx --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 |
70aaaa83b93a
fixed gcc warning; added note to README_GRAAL about disabling the bootstrap step
Doug Simon <doug.simon@oracle.com>
parents:
5181
diff
changeset
|
33 compiling any application code. This bootstrap step currently takes about 7 seconds |
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 |
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
|
48 java version "1.7.0_07" |
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
|
49 Java(TM) SE Runtime Environment (build 1.7.0_07-b10) |
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
|
50 OpenJDK 64-Bit Graal VM (build 25.0-b10-internal, mixed mode) |
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 |
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
|
57 java version "1.7.0_07" |
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
|
58 Java(TM) SE Runtime Environment (build 1.7.0_07-b10) |
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
|
59 OpenJDK 64-Bit Server VM (build 25.0-b10-internal, mixed mode) |
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 |
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
|
66 To build a HotSpot binary that completely omits all VM support for Graal, |
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
|
67 define an environment variable OMIT_GRAAL (its value does not matter) and 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
|
68 with the --vm option as above (doing a clean first if necessary): |
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
|
69 |
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
|
70 % env OMIT_GRAAL= mx --vm server build |