Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

[patch][new feature] Function addresses in JIT can be printed out and imported to the external debugging tools #8882

Open Quuxplusone opened 14 years ago

Quuxplusone commented 14 years ago
Bugzilla Link PR8518
Status NEW
Importance P enhancement
Reported by Yuri (yuri@tsoft.com)
Reported on 2010-10-30 19:18:22 -0700
Last modified on 2010-11-29 16:05:41 -0800
Version trunk
Hardware Other FreeBSD
CC baldrick@free.fr, clattner@nondot.org, geek4civic@gmail.com, jerrry94087@yahoo.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments patch-function-range.txt (5006 bytes, text/plain)
Blocks
Blocked by
See also

Synopsys: addition of a new debug option: -jit-emit-debug-function-range that enables JIT to produce the text file with function memory boundaries in it. External tools like google-perftools and valgrind (callgrind) will be able to import such file and display function names. Otherwise such names are unknown to those tools and JIT functions are shown with the hex address names.

Quuxplusone commented 14 years ago

Attached patch-function-range.txt (5006 bytes, text/plain): Patch file

Quuxplusone commented 13 years ago

Yuri, please adjust the patch to fit in 80 columns and not use fixed size buffers or mutable global variables like "incarnation". Note that this functionality will likely be removed when the JIT is converted to MC.

Quuxplusone commented 13 years ago

When JIT will be converted to MC?

If it will likely be removed, I guess its better to wait until MC conversion and re-implement it there?

Quuxplusone commented 13 years ago

Daniel is working on it now and seems pretty determined, but I don't know of a firm ETA.

Quuxplusone commented 13 years ago

Is MC conversion expected to make JIT work on currently unsupported CPUs like Sparc?

Quuxplusone commented 13 years ago

Yes, it will make it much easier to bring up a JIT for an unsupported CPU. The first step is to convert Sparc to use the MC infrastructure more (e.g. implementing instruction encoding support) which will get ELF .o file writing up. Once that works, adding a JIT should be very simple.