Skip to content
forked from oracle/graal

GraalVM: Run Programs Faster Anywhere 🚀

License

Notifications You must be signed in to change notification settings

Patricksss/graal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

callTracer-graalVM

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

Use query results to improve GraalVM performance

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.

Use calltracer tool to create call graph of JavaScript program.

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.

Running queries on output CSV

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

GraalVM downloads GraalVM docs GraalVM on Slack GraalVM on Twitter GraalVM on YouTube GraalVM Gate License

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.

Documentation

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.

Get Support

Repository Structure

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.

Related Repositories

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.

License

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

About

GraalVM: Run Programs Faster Anywhere 🚀

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 85.9%
  • Java 13.0%
  • C 0.6%
  • Python 0.2%
  • WebAssembly 0.2%
  • C++ 0.1%