BackEnd Service Provider.

Gary Frost frost.gary at gmail.com
Mon Apr 20 09:17:08 UTC 2020


I feel I am missing something obvious ;)

I am working (well playing actually) with Graal and JDK13 and have built my
own implementation of org.graalvm.compiler.hotspot.HotSpotBackendFactory to
inject some custom code into generated x86.  Very cool.

If I hack the org.graalvm.compiler.hotspot.CompilerConfigurationFactory
class (from JDK13 source) I can instantiate  my factory directly, and I see
my modified code.

But of course I want to able to build against and use use my factory using
a clean opendjdk JDK13 binary distribution.

It looks like the
class org.graalvm.compiler.hotspot.CompilerConfigurationFactory is setup to
allow me to offer my factory as a 'service provider' which the
CompilerConfigurationFactory accesses via this call
           GraalServices.load(HotSpotBackendFactory.class)
but nothing I try works.

It looks like I need to provide a module-info.java class, but of course I
only want my one service to override the default.

Any suggestions/help oir pointers to docs would be appreciated.

Gary


More information about the graal-dev mailing list