[LLVMdev] Why google-perftools fails on the JITted code?

Yuri yuri at rawbw.com
Thu Jun 17 18:02:06 PDT 2010


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



More information about the llvm-dev mailing list