[graalvm-dev] How to use compiled source GraalVM to run a java program?

Fabio Niephaus lists at fniephaus.com
Sat Mar 21 16:22:18 PDT 2020


Hi Ofir,

On Sat, 21 Mar 2020 at 10:19 pm, Ofir Gordon <ofirg6 at gmail.com> wrote:

> Hello,
> I hope this is the right place to ask this question,
>
> I built the GraalVM jvm code from the project repository, using the following
> instructions
> <https://urldefense.com/v3/__https://github.com/oracle/graal/issues/588__;!!GqivPVa7Brio!ICgxEm8dO9IQVeG1kx6xihrh_Bcd1nsPfznVOtEwAXHatr9cKtppmSFbYNJs7PXELADkow$>.
> I think it completed successfully (didn't see any error messages), and it
> created a new folder graal\vm\mxbuild with what seems to be the compilation
> product.
>
> My question is, how do I use the compiled JVM to run a java program?
> usually I would expect some java execution file, but I can't find any.
>
If you ran mx --env ce build to build it, mx --env ce graalvm-home should
print the path to your custom built GraalVM home. This should contain the
usual bin/ directory with the java binary you are looking for.

> My goal is to eventually change the jvm code in order to test the behavior
> of the GC, so if there is a differnt way to do it with the graalvm source
> code I'll appreciate your instructions.
>
The JVM has lots of GC flags. But if that's not enough and you want to
change the actual implementation of one of the GCs, I think you'd need to
build a custom JVMCI-enabled OpenJDK (see [1]) with your patches and use
that to build a GraalVM.

Hope this helps!

Fabio

[1] https://urldefense.com/v3/__https://github.com/graalvm/graal-jvmci-8__;!!GqivPVa7Brio!Icfnj_-jZu3r6DH5hEX8ZCB99Jt213vP5jYJiNujYeYTkSqP9pNPBlLodx_YqYhaCyCDJA$ 


Thanks in advance,
>
> Ofir
> _______________________________________________
> GraalVM-Dev mailing list
> GraalVM-Dev at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/graalvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/graalvm-dev/attachments/20200322/7ffea7bc/attachment.html 


More information about the GraalVM-Dev mailing list