[LLVMdev] Why google-perftools fails to detect stack of JITted code? (with option -disable-fp-elim set)

Yuri yuri at rawbw.com
Sat Dec 18 21:38:17 PST 2010


I have this problem: google-perftools fails to detect stack for the code 
run under JIT called through C++ api from my program. It shows in 
profile like all program is one block with the name _init.
I clearly do set the option NoFramePointerElim and I do see how it makes 
a difference in stack frame under gdb.

When running some code in JIT in lli (with option -disable-fp-elim) 
google perftools is able to detect stack and build the correct profile.

Problem only exists in linux/i386. On FreeBSD/amd64 google perftools 
detects stack fine for exactly the same program.

How can I understand why google-perftools fails on JITted code?
Is it possible to print all options used by JIT in code generation in 
one string to be able to compare?

Yuri



More information about the llvm-dev mailing list