I am trying to run some code allocating a lot of memory and not releasing it in JIT under google-perftools. Just one function 'main' calling 'malloc'. google-perftools fails to correctly read stack when malloc is called from inside the JITted code, and as a result perftools report is wrong: address of 'main' procedure appears shifted 0x3946e1d0->0x3946e1ed and is not aligned. And calling it procedure (runFunction) is skipped, but higher in stack methods are shown correctly. This causes me to ask this question: when the code is run in JIT, are the stack frames (and prologs) different from when the code results from compiler? Is it still possible to read this stack correctly using the same procedure for both JITted and regular code? Yuri
Now I see that JITted code doesn't have standard prolog, on x86 each procedure instead begins with 'sub $0x4,%esp'. Is there an option to make JIT generate regular prologs? Yuri
Chris Lattner
2010-Jun-18 16:35 UTC
[LLVMdev] Why google-perftools fails on the JITted code?
On Jun 18, 2010, at 3:29 AM, Yuri wrote:> Now I see that JITted code doesn't have standard prolog, on x86 each > procedure instead begins with 'sub $0x4,%esp'. > > Is there an option to make JIT generate regular prologs?Try turning off frame pointer elimination. On the llc command line, this is -disable-fp-elim -Chris> > Yuri > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Maybe Matching Threads
- [LLVMdev] Why google-perftools fails on the JITted code?
- [LLVMdev] Why google-perftools fails on the JITted code?
- [LLVMdev] Why google-perftools fails on the JITted code?
- [LLVMdev] [patch] New feature: debug info for function memory ranges (-jit-emit-debug-function-range)
- [LLVMdev] [patch] New feature: debug info in add2line format (--jit-emit-debug-addr2line)