Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recommended GraalVM native reflect-config.json #356

Open
jvican opened this issue Feb 12, 2022 · 4 comments
Open

Add recommended GraalVM native reflect-config.json #356

jvican opened this issue Feb 12, 2022 · 4 comments

Comments

@jvican
Copy link

jvican commented Feb 12, 2022

I've lately been creating a complete reflect-config.json file with all of the fields that need to be available for Substrate VM (GraalVM Native) to produce an image that works correctly with the jctools API.

I was wondering if it would make sense to check in this file into this repository —or most ambitiously find a way we can automate the configuration of jctools with GraalVM Native— so that this work can be reused and there's less magic involved in compiling jctools to native. Would this be a welcome contribution @nitsanw ?

P.S. I'm myself not aware of a way we can configure the reflect-config.json automatically for GraalVM native to pick it up during compilation and thus automate the process of using this file, but if this was possible I'd happily implement something similar to this too.

@jvican
Copy link
Author

jvican commented Feb 12, 2022

Here's an example of how it's currently difficult to know you have the right config for your application to work well and in a performant manner with GraalVM Native netty/netty#10376

@TheMode
Copy link

TheMode commented Mar 21, 2022

Have you checked https://www.graalvm.org/22.0/reference-manual/native-image/Agent/?
I assume that it would be possible to include a task in jctools to run all the tests with the agent running to generate the reflection file.

@nitsanw
Copy link
Contributor

nitsanw commented Mar 22, 2022

I would welcome a PR which automates this into the build :-)

@programmatix
Copy link

Hi @jvican, could you possibly share that reflect-config.json? I'm hitting the following error when compiling MpscArrayQueue with Graal and it's unclear how to resolve it:

Caused by: java.lang.RuntimeException: java.lang.NoSuchFieldException: producerIndex at com.couchbase.client.core.deps.org.jctools.util.UnsafeAccess.fieldOffset(UnsafeAccess.java:111) at com.couchbase.client.core.deps.org.jctools.queues.MpscArrayQueueProducerIndexField.<clinit>(MpscArrayQueue.java:48) ... 47 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants