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?
llc and lli use the same code generator. LLI takes the -disable-fp-elim flag also. If you have embedded this JIT in your own stuff (which wasn't specified) you need to use the same api that the -disable-fp-elim flag sets in these two tools.
I think he meant lli.
Actually I use API instead and setting the flag equivalent to this option worked. Now google-perftools generates the correct profile.