<div dir="rtl"><div dir="ltr">Great! I found the java files both in the graalvm build products and the build graal-jvmci-8 products, your answer was very helpful.</div><div dir="ltr"><br></div><div dir="ltr">Do you know if it is possible to compile the jvm such that it will be compatible for an arm 32bit system? Is regular build (such as described in the links in this thread) will be enough? or is it creating only a version compatible for 64bit?</div></div><br><div class="gmail_quote"><div dir="rtl" class="gmail_attr">‫בתאריך יום א׳, 22 במרץ 2020 ב-10:50 מאת ‪Fabio Niephaus‬‏ &lt;‪<a href="mailto:lists@fniephaus.com">lists@fniephaus.com</a>‬‏&gt;:‬<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, Mar 22, 2020 at 9:25 AM Ofir Gordon &lt;<a href="mailto:ofirg6@gmail.com" target="_blank">ofirg6@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Thank you for your answer!<br>
&gt;<br>
&gt; When running mx --env ce graalvm-home I&#39;m getting the following error message:<br>
&gt;  &quot;Could not find a JDK<br>
&gt; The following JDKs are available:<br>
&gt;   /usr/java/jdk-12.0.2<br>
&gt;   /usr/java/openjdk1.8.0_242-jvmci-20.0-b02<br>
&gt; Specify one with the --java-home or --extra-java-homes option or with the JAVA_HOME or EXTRA_JAVA_HOMES environment variable.&quot;<br>
<br>
Oh no, that&#39;s an mx error. You need to run `mx --env ce graalvm-home`<br>
inside the graal/vm directory. If that doesn&#39;t work, try this: `mx<br>
--env ce --java-home /usr/java/openjdk1.8.0_242-jvmci-20.0-b02<br>
graalvm-home`.<br>
<br>
&gt;<br>
&gt; The two jdks specified in the message are jdks that I downloaded, not the product of the graalvm compilation.<br>
&gt;<br>
&gt; What does it mean build a custom JVMCI-enabled OpenJDK? I cloned the graal project from here: <a href="https://urldefense.com/v3/__https://github.com/oracle/graal__;!!GqivPVa7Brio!KxpRLQ0X2ffkAi-J3tzVWhPGTeCmK7gKouP3G28ROuRIFNw2CtXlBLe1VzoCpVMzPOmteA$" rel="noreferrer" target="_blank">https://github.com/oracle/graal</a><br>
&gt; and built the source code in it, under graal/vm.<br>
&gt; Isn&#39;t this the JVM source code? Did I build the wrong code? What am I missing here?<br>
<br>
Disclaimer: I&#39;m not on the GraalVM team, and my understanding of this<br>
process may not always be accurate.<br>
<br>
When you build a GraalVM, it copies over most of the JVMCI-enabled<br>
JVM&#39;s components (incl. GC). So the JVM you use to build GraalVM is<br>
basically a template for the resulting GraalVM. In your case, that<br>
would be /usr/java/openjdk1.8.0_242-jvmci-20.0-b02. The build process<br>
compiles and installs the Graal compiler as well as some other<br>
GraalVM-specific components.<br>
<br>
The graal-jvmci-8 repo [1] let&#39;s you build your own OpenJDK with JVMCI<br>
support, which mx accepts as a GraalVM template. So that&#39;s where you<br>
have to look for the JVM sources if you want to modify one of the GCs.<br>
<br>
Hope the above makes sense!<br>
<br>
Fabio<br>
<br>
[1] <a href="https://urldefense.com/v3/__https://github.com/graalvm/graal-jvmci-8__;!!GqivPVa7Brio!KxpRLQ0X2ffkAi-J3tzVWhPGTeCmK7gKouP3G28ROuRIFNw2CtXlBLe1VzoCpVPBvQdo2g$" rel="noreferrer" target="_blank">https://github.com/graalvm/graal-jvmci-8</a><br>
<br>
&gt;<br>
&gt; Again thank you for your help,<br>
&gt; Ofir<br>
&gt;<br>
&gt;<br>
&gt; ‫בתאריך יום א׳, 22 במרץ 2020 ב-1:22 מאת ‪Fabio Niephaus‬‏ &lt;‪<a href="mailto:lists@fniephaus.com" target="_blank">lists@fniephaus.com</a>‬‏&gt;:‬<br>
&gt;&gt;<br>
&gt;&gt; Hi Ofir,<br>
&gt;&gt;<br>
&gt;&gt; On Sat, 21 Mar 2020 at 10:19 pm, Ofir Gordon &lt;<a href="mailto:ofirg6@gmail.com" target="_blank">ofirg6@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hello,<br>
&gt;&gt;&gt; I hope this is the right place to ask this question,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I built the GraalVM jvm code from the project repository, using the following instructions. I think it completed successfully (didn&#39;t see any error messages), and it created a new folder graal\vm\mxbuild with what seems to be the compilation product.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 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&#39;t find any.<br>
&gt;&gt;<br>
&gt;&gt; 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.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 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&#39;ll appreciate your instructions.<br>
&gt;&gt;<br>
&gt;&gt; The JVM has lots of GC flags. But if that&#39;s not enough and you want to change the actual implementation of one of the GCs, I think you&#39;d need to build a custom JVMCI-enabled OpenJDK (see [1]) with your patches and use that to build a GraalVM.<br>
&gt;&gt;<br>
&gt;&gt; Hope this helps!<br>
&gt;&gt;<br>
&gt;&gt; Fabio<br>
&gt;&gt;<br>
&gt;&gt; [1] <a href="https://urldefense.com/v3/__https://github.com/graalvm/graal-jvmci-8__;!!GqivPVa7Brio!KxpRLQ0X2ffkAi-J3tzVWhPGTeCmK7gKouP3G28ROuRIFNw2CtXlBLe1VzoCpVPBvQdo2g$" rel="noreferrer" target="_blank">https://github.com/graalvm/graal-jvmci-8</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; Thanks in advance,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Ofir<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; GraalVM-Dev mailing list<br>
&gt;&gt;&gt; <a href="mailto:GraalVM-Dev@oss.oracle.com" target="_blank">GraalVM-Dev@oss.oracle.com</a><br>
&gt;&gt;&gt; <a href="https://oss.oracle.com/mailman/listinfo/graalvm-dev" rel="noreferrer" target="_blank">https://oss.oracle.com/mailman/listinfo/graalvm-dev</a><br>
</blockquote></div>