[llvm-dev] Interest in integrating a linux perf JITEventListener?
Philip Reames via llvm-dev
llvm-dev at lists.llvm.org
Thu Dec 29 13:17:50 PST 2016
Having something like this available in tree would definitely be
useful. For simplicity, why don't we start with support for the second
style? This is the long term useful one and would be a good starting
point for getting the code in tree. Can you give a pointer to the patch
so that I can assess the rough complexity? If it's simple enough, I'd
be happy to help get it reviewed and in. If it's more complicated, I
probably won't have the time to assist.
Philip
On 12/10/2016 01:27 PM, Andres Freund via llvm-dev wrote:
> Hi,
>
> Under linux a large portion of the profiling these days happens with
> perf, but there's no support for it from LLVM's JITs.
>
> For a while perf could associate address+size to symbols by writing a
> /tmp/perf-$pid.map file:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Documentation/jit-interface.txt
>
> A year or so perf also gained the ability to actually see code & debug
> info. It's even being documented now:
> http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=b3151ea500655f232255ddcdf2bbcf691cb39646
>
> I've a very preliminary JITEventListener using both of this. Is there
> interest in integrating that into LLVM? If so, I'll try to follow LLVM
> coding standards and submit it, otherwise I'll keep it somewhere in
> postgres...
>
> If in LLVM, does anybody have preference about how to integrate the two
> methods above? Because the second method currently (linux limitation)
> only works if the program is profiled from start, I think it makes to
> allow either or both of the methods to be used, which seems to suggest
> an argument to the listener constructor, rather than different wrappers
> for either. Comments?
>
> Greetings,
>
> Andres Freund
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list