[LLVMdev] Performance degradation when repeatedly exchanging JITted functions

Joerg Sonnenberger joerg at britannica.bec.de
Tue Mar 6 07:44:45 PST 2012


On Tue, Mar 06, 2012 at 04:29:28PM +0100, Clemens Hammacher wrote:
> I think a solution would be to always call a function through it's
> stub, so that there is a single location to update when the function
> is exchanged. This would mean that there is always exactly one level
> of indirection, which is worse for programs that don't exchange
> functions at runtime, but is much better in our scenario.

Actually, you just have to make sure that you always patch the initial
function. You don't have to force it to be a stub.

Joerg



More information about the llvm-dev mailing list