(Very) small patch for the jit event listener

Gaël Thomas gael.thomas at lip6.fr
Wed Nov 13 06:08:45 PST 2013

Hi all,

We have a small problem for vmkit. We rely on the JITEventListener to
register the safepoints generated for the garbage collector, and for
that purpose, we have to use the JITCodeEmitter (the
MachineCodeEmitter) that was used to generate the MachineFunction in
order to find the physical address of the safepoints (aka, the
MCSymbols). A long time ago, it was not a problem as the JIT class was
in the llvm interface, but today, the header is hidden inside the lib
directory and not installed by llvm. Currently, we directly use this
header, but it means that during the compilation of vmkit, we need the
sources of llvm. But, as we are currently developing a debian package
of vmkit, we would like to avoid the installation of the llvm sources
to compile vmkit.

So, I made a small patch that just adds a new MachineCodeEmitter field
in JITEvent_EmittedFunctionDetails and fill it in JITCodeEmitter. As
the patch only adds a new field in the
JITEvent_EmittedFunctionDetails, it should not break anything. At
least, my llvm and my vmkit are still running :) (by the way, I had to
execute a make clean before recompiling llvm because I think that a
dependency is missing)

As it is my first patch, I hope that I have used the llvm coding style...

See you,

Gaël Thomas, Associate Professor, UPMC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jiteventlistener.patch
Type: application/octet-stream
Size: 1140 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131113/caeb5595/attachment.obj>

More information about the llvm-commits mailing list