[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines

Amogh Akshintala amoghakshintala at gmail.com
Fri Nov 1 14:27:56 PDT 2013


Hey Everyone,

I understood this a little differently (well, I do have direct contact with
Sumeeth given that we both work in the same lab). Allow me to try and
explain his proposal.

We are trying to optimise out instructions from a program (JIT-compiled OS
Kernels or JIT-compiled Web Server code) during run time and we have this
hypothesis that some of the decisions are best taken by the programmer
himself, e.g. if statistics shows that a particular subsystem of the
program being run hasn't seen any action in quite a while, the programmer
is in a position to decide whether that part of the code can be optimised
out of the binary or not (if the code is some highly sensitive failure
detection code then I guess he wouldn't want it removed no matter what).

For this, we wanted to some mechanism to call back into the execution
engine to get stuff like stats or to tell the execution engine to recompile
a particular module or function etc.

His proposal is to introduce a callback mechanism in the execution engine
that allows the internal tools to expose functions like offering stats or
the ability to toggle a recompile etc. to the user program.

Hope that clears some things up.

Cheers,
Amogh


On Fri, Nov 1, 2013 at 1:53 PM, Caldarale, Charles R <
Chuck.Caldarale at unisys.com> wrote:

> > *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> ****
>
> > *On Behalf Of *Kaylor, Andrew
> > *Subject:* Re: [LLVMdev] [Proposal] Adding callback mechanism to
> Execution Engines****
>
> ** **
>
> > If the function is in a statically linked module, you need to do
> something to explicitly expose it.  With ****
>
> > the older JIT engine you can use addGlobalMapping as Yaron suggests,
> but I don’t think that will work****
>
> > with MCJIT.****
>
> ** **
>
> Seems to work fine for us with MCJIT.****
>
> ** **
>
> - Chuck****
>
> ** **
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>


-- 
The Wheel of Time turns and Ages come and go, leaving memories that become
legend. Legend fades to myth, and even myth is long forgotten when the Age
that gave it birth returns again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131101/2041d4ea/attachment.html>


More information about the llvm-dev mailing list