Yuri
2010-Jun-16 19:23 UTC
[LLVMdev] [patch] New feature: debug info in add2line format (--jit-emit-debug-addr2line)
This new option will allow to output function information in the same format as addr2line from binutils emits: ... 0xABCDEF01 T function_name_is_here ... This feature is useful to profile the code when it is run in JIT by external tools like valgrind and google-perftools. For example, google-perftools runs addr2line on executable and uses the resulting file to resolve memory addresses to function names. In case of LLVM JIT the resulting from --jit-emit-debug-addr2line option addr2line-formatted file can be just appended to the original addr2line file to allow google-perftools to show created by JIT functions as well. Thank you, Yuri -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch-addr2line.txt URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100616/ebb4e938/attachment.txt>
Yuri
2010-Jun-16 20:19 UTC
[LLVMdev] [patch] New feature: debug info in add2line format (--jit-emit-debug-addr2line)
Please do not check this in yet. I will post an updated patch. Yuri
Yuri
2010-Jun-19 21:03 UTC
[LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
This new option (--jit-emit-debug-function-range) will allow to output function information for memory ranges that functions occupy in memory while they run in JIT. File format generated is like this: ... 0x5000000 0x5001000 function_name_is_here ... This feature is useful for external tools like valgrind and google-perftools to profile the code when it is run in JIT. Particularly google-perftools will have a special option (--external_symbols) that will be able to import this file. Note: to be useful this flag should be used with -disable-fp-elim to generate standard prologs. Thank you, Yuri -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch-debug-info.txt URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100619/7a359d1a/attachment.txt>
Jeffrey Yasskin
2010-Jun-19 21:14 UTC
[LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
Have you found http://llvm.org/docs/DebuggingJITedCode.html? The JIT already has support for something like this for gdb's benefit. Perftools and valgrind just don't know how to find it yet. On Sat, Jun 19, 2010 at 2:03 PM, Yuri <yuri at rawbw.com> wrote:> This new option (--jit-emit-debug-function-range) will allow to output > function information for memory ranges that functions occupy in memory while > they run in JIT. File format generated is like this: > ... > 0x5000000 0x5001000 function_name_is_here > ... > > This feature is useful for external tools like valgrind and google-perftools > to profile the code when it is run in JIT. Particularly google-perftools > will have a special option (--external_symbols) that will be able to import > this file. > > Note: to be useful this flag should be used with -disable-fp-elim to > generate standard prologs. > > Thank you, > Yuri > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >
Yuri
2010-Jun-20 01:00 UTC
[LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
Here is the corresponding patch to google-perftools. Both patches create a nice perftools profile with all functions in JIT. http://code.google.com/p/google-perftools/issues/detail?id=255 Yuri
Yuri
2010-Jun-21 16:43 UTC
[LLVMdev] [updated patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
-------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch-debug-info.txt URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100621/59f22f2c/attachment.txt>
Yuri
2010-Jun-22 23:18 UTC
[LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
On 06/19/2010 14:03, Yuri wrote:> This new option (--jit-emit-debug-function-range) will allow to output > function information for memory ranges that functions occupy in memory > while they run in JIT. File format generated is like this: > ... > 0x5000000 0x5001000 function_name_is_here > ... > > This feature is useful for external tools like valgrind and > google-perftools to profile the code when it is run in JIT. > Particularly google-perftools will have a special option > (--external_symbols) that will be able to import this file. > > Note: to be useful this flag should be used with -disable-fp-elim to > generate standard prologs. > > Thank you, > YuriAnybody can check this in? Yuri
Possibly Parallel Threads
- [LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
- [LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
- [LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
- [LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
- [LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)