HotSpot Hacking

Ilya Mirsky ilya.mirsky at gmail.com
Tue Mar 13 04:52:20 PDT 2012


Hi,

I'm trying (unsuccessfully) to add a method to the Unsafe class.
As a start I'm trying to duplicate an existing method.
I add the declaration of the new method to Unsafe.java, and update
unsafe.cpp as well.
I register the new method in unsafe.cpp and vmSymbols.hpp, following the
example of the original method.

Then I compile the jdk, and want to test the change.
A test program, which uses the new method, compiles but fails to run due to
an UnsatisfiedLinkError.

So my question is, what are the steps of adding a native method to HotSpot?
Is there is some tutorial or documentation available?

Thanks in advance,

---
Best Regards,
Ilya Mirsky
 <http://www.cs.bgu.ac.il/~mirskyil/>  <http://il.linkedin.com/in/ilyamirsky>
   <https://www.facebook.com/ilya.mirsky>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20120313/79834816/attachment.html 


More information about the hotspot-dev mailing list