[LLVMdev] Performance degradation when repeatedly exchanging JITted functions

Joerg Sonnenberger joerg at britannica.bec.de
Tue Mar 6 08:28:06 PST 2012


On Tue, Mar 06, 2012 at 04:09:36PM +0000, James Molloy wrote:
> Surely you need to patch *all* functions, not just the initial?

Depends on whether you always link to the original address or not.
If you use link with the latest address, you have to patch all versions
to point to the latest, otherwise you can just patch the first.
Advantage of using the latest address: one saved jmp per call.
Advantage of using the initial address: easier G/C of intermediate
versions, less things to keep track of.

Joerg



More information about the llvm-dev mailing list