dynamically instrument the application class

Thomas Wuerthinger thomas.wuerthinger at oracle.com
Mon Feb 18 09:44:13 PST 2013


Graal only compiles methods whose invocation count is above a certain compilation threshold. When you manually enqueue a method at bootstrap time, you have to make sure that the class of the method is on the bootclasspath. If this is the case and the "methodname" is correct, the code snippet you write below should work.

- thomas

On Feb 18, 2013, at 5:16 AM, lpxz <lpxz at ust.hk> wrote:

> Dear developers,
>     I want to instrument the application class "HelloWorld" at runtime via the graal compiler. However, I notice that the methods of HelloWorld class are not compiled by graal as the VMToCompilerImpl.compileMethod() does not report the compilation about any method from the Helloworld class. I tried to use the "enqueue(Class.forName("HelloWorld").getDeclaredMethod(methodname))" to force graal to recompile the method, just as the enqueue operations in the bootstrap method, but the graalVM complains that No method is found by the getDeclaredMethod.
>    Could you give me some hints on how to handle this issue?
> Thanks a lot.
> Regards
> Peng

More information about the graal-dev mailing list