Instrument to create a call graph for projects run on GraalVM and use these call graphs to optimise GraalVM.
Graaljs commit version (Apr 14): c6fc92e7367004b1b952ce21da7c8a13f3f436a1
Mx commit version (Apr 9): 65c6727a0080515696c25934f3da02ef7a1aa43a
Install GraalJS and build: https://github.com/oracle/graaljs/blob/master/docs/Building.md
Install Graal tools: https://github.com/oracle/graal/tree/master/tools
All changes to the main repo can be found in https://github.com/Patricksss/graal/tree/master/auxiliry_files
Taking as example the TypeScript benchmark.
Benchmark can be found under: https://github.com/Patricksss/graal/tree/master/auxiliry_files/benchmarks
.
Example input files under: https://github.com/Patricksss/graal/tree/master/auxiliry_files/InputLists/typescript_inputs
.
Now we can run the benchmark with an improved compiler strategy with:
mx --dy /compiler js --experimental-options --vm.DcallTarget.useGraph=true --vm.DcallTarget.inputCompile="input.csv" --engine.TraversingCompilationQueue=false engine.PriorityQueue=false --engine.CompilerThreads=1 --engine.Inlining=true typescript.js
.
Run the following command to get call graph of TypeScript compiler in csv format.
mx --dy /tools js --vm.Xms4g --calltracer --calltracer.Output=CSV --calltracer.OutputFile=output.csv typescript.js
Additional information such as arguments and object instances can be enabled by adding options: --calltracer.TraceArguments
All options can be found by mx --dy /tools --help:tools
.
Install Neo4j Community Server: Neo4j 4.3.7 (tar)
: https://neo4j.com/download-center/#community
Place CSV of interest in neo4j-community-4.3.7/import
directory.
Enter bin directory:
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-4.el8_5.x86_64
export PATH=$JAVA_HOME/bin:$PATH
./neo4j start
./cypher-shell
Example Cypher queries are in: https://github.com/Patricksss/graal/blob/master/auxiliry_files/Queries.cypher
GraalVM is a high-performance JDK distribution designed to accelerate the execution of applications written in Java and other JVM languages along with support for JavaScript, Ruby, Python, and a number of other popular languages.
The project website at https://www.graalvm.org/ describes how to get started, how to stay connected, and how to contribute.
Please refer to the GraalVM website for documentation. You can find most of the documentation sources in the docs/
directory in the same hierarchy as displayed on the website. Additional documentation including developer instructions for individual components can be found in corresponding docs/
sub-directories. The documentation for the Truffle framework, for example, is in truffle/docs/
. This also applies to languages, tools, and other components maintained in related repositories.
- Open a GitHub issue for bug reports, questions, or requests for enhancements.
- Join the GraalVM Slack to connect with the community and the GraalVM team.
- Report a security vulnerability according to the Reporting Vulnerabilities guide.
This source repository is the main repository for GraalVM and includes the following components:
Directory | Description |
---|---|
.github/ |
Configuration files for GitHub issues, workflows, …. |
compiler/ |
Graal compiler, a modern, versatile compiler written in Java. |
espresso/ |
Espresso, a meta-circular Java bytecode interpreter for the GraalVM. |
java-benchmarks/ |
Java benchmarks. |
regex/ |
TRegex, a regular expression engine for other GraalVM languages. |
sdk/ |
GraalVM SDK, long-term supported APIs of GraalVM. |
substratevm/ |
Framework for ahead-of-time (AOT) compilation with Native Image. |
sulong/ |
Sulong, an engine for running LLVM bitcode on GraalVM. |
tools/ |
Tools for GraalVM languages implemented with the instrumentation framework. |
truffle/ |
GraalVM's language implementation framework for creating languages and tools. |
vm/ |
Components for building GraalVM distributions. |
wasm/ |
GraalWasm, an engine for running WebAssembly programs on GraalVM. |
GraalVM provides additional languages, tools, and other components developed in related repositories. These are:
Name | Description |
---|---|
FastR | Implementation of the R language. |
GraalJS | Implementation of JavaScript and Node.js. |
GraalPython | Implementation of the Python language. |
GraalVM Demos | Several example applications illustrating GraalVM capabilities. |
Native Build Tools | Build tool plugins for GraalVM Native Image. |
SimpleLanguage | A simple example language built with the Truffle framework. |
SimpleTool | A simple example tool built with the Truffle framework. |
TruffleRuby | Implementation of the Ruby language. |
VS Code Extensions | VS Code extensions for GraalVM. |
GraalVM Community Edition is open source and distributed under version 2 of the GNU General Public License with the “Classpath” Exception, which are the same terms as for Java. The licenses of the individual GraalVM components are generally derivative of the license of a particular language (see the table below). GraalVM Community is free to use for any purpose - no strings attached.
Component(s) | License |
---|---|
Espresso | GPL 2 |
GraalVM Compiler, SubstrateVM, Tools, VM | GPL 2 with Classpath Exception |
GraalVM SDK, GraalWasm, Truffle Framework, TRegex | Universal Permissive License |
Sulong | 3-clause BSD |