[llvm-commits] [PATCH] Generate info about the JIT process

Chris Lattner clattner at apple.com
Wed May 13 10:21:41 PDT 2009

On May 13, 2009, at 2:20 AM, Argiris Kirtzidis wrote:
>> Thats basically what MachineCodeInfo enables. ATM, there are only 2
>> things it publishes directly to the MCI, but future APIs can easily  
>> be
>> added using virtual methods to allow for subclasses of  
>> MachineCodeInfo
>> to do new things.
>> This is far from a final set of things MCI will do, it's primarily a
>> way of introduce an API that we can add future things to.
> Ok, that sounds great. It's just that MachineCodeInfo is restricted to
> the "function level", how about "module level" info, specifically
> getting notifications during code execution like:
> -"I lazy JITed this function"
> -"I allocated this memory chunk for this global variable"
> Of course, MachineCodeInfo could be the one for the "function level"  
> and
> something like "JITListener" at the module level. The JITListener  
> could
> have a method that passes a MachineCodeInfo before function JITing.  
> this is flexible and clean.

I agree with Argiris: there should be a simple abstract interface with  
methods like the above.  The JIT should have an optional pointer to  
it.  If non-null, it would invoke the methods on the JITListener.   
This would allow lots of detailed instrumentation, but would introduce  
no overhead if it's not being used.


More information about the llvm-commits mailing list