Code Monkey home page Code Monkey logo

graalvm's Introduction

Building Graal

There is a Python script in mxtool/mx.py that simplifies working with the code base. It requires Python 2.7. 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 in this file assume this setup.

Building both the Java and C++ source code comprising the Graal VM can be done with the following simple command.

% mx build

There are a number of VM configurations supported by mx which can be explicitly specified using the --vm option. However, you'll typically want one of these VM configurations:

  1. The 'server' configuration is a standard HotSpot VM that includes the runtime support for Graal but uses the existing compilers for normal compilation (e.g., when the interpreter threshold is hit for a method). Compilation with Graal is only done by explicit requests to the Graal API. This is how Truffle uses Graal.

  2. The 'graal' configuration is a VM where normal compilations are performed by Graal. This VM will bootstrap Graal itself at startup unless the -XX:-BootstrapGraal. Note that if tiered compilation is enabled, Graal will be used at the last tier while C1 will be used for the first compiled tiers.

Unless you use the --vm option with the build command, you will be presented with a dialogue to choose one of the above VM configurations for the build as well as have the option to make it your default for subsequent commands that need a VM specified.

To build the debug or fastdebug builds:

% mx --vmbuild debug build
% mx --vmbuild fastdebug build

Running Graal

To run the VM, use 'mx vm' in place of the standard 'java' command:

% mx vm ...

To select the fastdebug or debug builds of the VM:

% mx --vmbuild fastdebug vm ...
% mx --vmbuild debug vm ...

Other VM Configurations

In addition to the VM configurations described above, there are VM configurations that omit all VM support for Graal:

% mx --vm server-nograal build
% mx --vm server-nograal vm -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
OpenJDK 64-Bit Server VM (build 25.0-b43-internal, mixed mode)
% mx --vm client-nograal build
% mx --vm client-nograal vm -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
OpenJDK 64-Bit Client VM (build 25.0-b43-internal, mixed mode)

These configurations aim to match as closely as possible the VM(s) included in the OpenJDK binaries one can download.

graalvm's People

Contributors

ansalond avatar chrisseaton avatar christianhaeubl avatar christianwimmer avatar chumer avatar cyr0n avatar dougxc avatar eregon avatar gilles-duboscq avatar ldaynes avatar lewurm avatar lukasstadler avatar mlvdv avatar olpaw avatar rschatz avatar sanzinger avatar thomaswue avatar tkrodriguez avatar wirthi avatar zapster avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.