★ wanayoo — archive 1999 http://openjdk.java.net/projects/graalNouvelle recherche | Portail wanayoo

Graal Project

a quest for the JVM to leverage it's own J

Mission

The goal of this Project is to design a dynamic compiler in Java that produces excellent code quality without compromising compile time and memory usage by the JVM. The origin and starting point for this project is the Graal compiler from the Maxine code base. This compiler is already integrated and runs in both HotSpot and Maxine.

The compiler uses a clearly defined interface for interacting with the runtime of the JVM. Furthermore, it uses features of Java that make it highly extensible such that adding extra IR nodes and/or transformations is as easy as possible.

In addition to performance goals, this project aims to demonstrate the advantages of writing (some of) a JVM in Java while at the same time addressing the unique challenges such an approach entails. In this sense, Graal is a narrower application of meta-circular JVM design principles as embodied in Maxine and the Jikes RVM.

This Project is sponsored by the HotSpot Group.

Community

Instructions

The repository of this project contains a modified version of HotSpot that uses Graal as its compiler instead of C1 or C2. For convenience, we call it the GraalVM. GraalVM development is currently possible on a x64 version of Linux, Solaris, Windows or Mac OS X Lion.

Here's how to download GraalVM:

hg clone http://hg.openjdk.java.net/graal/graal

There is a Python script in graal/mxtool/mx.py that simplifies working with the code base. It requires Python 2.7 which is in /usr/bin/python on modern Linux machines. While you can run this script by using an absolute path, it's more convenient to add graal/mxtool to your PATH environment variable so that the mx helper script can be used. The following instructions on this page assume this setup.

Here's the simple recipe for building and running the GraalVM (If on Windows, replace mx with mx.cmd):

cd graal
mx build
mx vm

You can generate IDE project configurations by running:

mx ideinit

This will generate both Eclipse and NetBeans configurations.

GraalVM includes a tool (derived from the Ideal Graph Visualizer) which is very useful in terms of visualizing Graal's intermediate representation (IR). You can get a quick insight into this tool by running the command below. This command launches the tool and then runs a simple "hello world" program in the VM in such a way that the IR for the program is sent to the visualizer.

mx intro