Help with generating library call

Rohit Arul Raj rohitarulraj at
Mon Jul 31 04:33:39 UTC 2017

Hi All,

I am newbie to openJDK and recently started working on openJDK8 hotspot.
I need some help regarding one of the issues I am looking in to.

My requirement is that for any object/array initialization, I want to
replace the existing loop code with 'memset' and do a performance
I have been looking through the code and haven't found any notes or
documentation on how to generate a function call to native library

Can any one point me in the right direction? Any reference to similar
implementation of any other C or Math library function will be

I ended up doing the following, but not sure if this is the right way
to go about it.
push (c_rarg2);
push (c_rarg1);
push (c_rarg0);
call_VM_leaf(CAST_FROM_FN_PTR(address, memset),3);

Thanks in advance,

More information about the hotspot-dev mailing list