Hi Liu,

On 8/9/18 10:12 AM, Liu Xin wrote:
Hi, Vladimir,

I think that one single JIT is good to pinpoint the problem.
Why not just allow Graal-only there. You don’t need to run all tests for 
Graal-only hotspot.

My main motivation is that it is not supported configuration for us. And if you don't use Graal you waste space with Graal module.

But if people object to this change I can drop it. You can specify configure --with-jvm-features=-compiler1,-graal to remove Graal together with C1.


I understand that Graal itself needs to JIT itself. libgraal.so is AOT result 
of Graal itself, right?
Is it easy to do that?  I can take a shot.  If you have the compiled graal, you 
will revert this commit.

Yes, it is AOTed Graal with own GC, heap and small runtime. We are working on to use Substrate VM native-image tool (which is similar to JDK jaotc but target "closed world" app) to generate this library and avoid issues current Java Graal JIT has (slow compilation startup, shared Java heap, polluted profiles). It is not simple issue because we have to modify heavily JVMCI to allow communication between two libraries (hotspot and graal).
I hope soon we can publish this work in Metropolis project.

If you want to learn about Graal and SVM here are starting points:

https://github.com/oracle/graal/tree/master/compiler
https://github.com/oracle/graal/tree/master/substratevm

Regards,
Vladimir


Thanks,
—lx


On Aug 8, 2018, at 10:22 PM, Vladimir Kozlov <vladimir.koz...@oracle.com> wrote:

http://cr.openjdk.java.net/~kvn/8209165/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8209165

Graal Java JIT requires C1 compiler to compile Graal's methods. Otherwise it 
takes long time to compile application's hot methods because Graal have to 
compile itself and run in Interpreter until then. Some tests timeout in such 
configuration.

I assume when people build Hotspot without C1 they want to have only C2 and 
don't care about Graal.
I suggest to not build Graal's module in such case (it save space). We will 
enable Graal build later when libgraal.so is available regardless C1 presence 
because it will not depend on it.

Also generation of graalunit libraries should be guarded by presence of Graal. 
Currently Hotspot VM features setup done after libraries are set:
http://hg.openjdk.java.net/jdk/jdk/file/554bb4e2d10d/make/autoconf/configure.ac#l219

But we can fix it by reverting changes done by JDK-8171008 when AOT was 
dependent on presence of libelf:
http://hg.openjdk.java.net/jdk/jdk/rev/4780f4130eb0

Currently I don't see any dependencies on libraries in hotspot.m4

Testing by running tier1-3 tests without C1.

--
Thanks,
Vladimir

Reply via email to