Dmitry Borisenkov
2015-Jun-10 11:45 UTC
[LLVMdev] [Help needed] How to get __LLVM_StackMaps section using MCJIT?
Dear llvm developers, I've just started to work with MCJIT and I'll appreciate if you help me answering the question. I jitted code with llvm.experimental.patchpoint and I'd like to get address of the code corresponded to the patchpoint. Having ExecutionEngine instance (how) can I obtain some wrapper over stackmap section to query address I need? P.S. I started familiarizing myself with MCJIT using documentation and examples, and I'd like to notice that HowToUseJIT might be confusing for a novice (as it was for me) beacuse it's actually demonstrate how to use the interpreter. -- Kind regards, Dmitry Borisenkov
Philip Reames
2015-Jun-11 01:03 UTC
[LLVMdev] [Help needed] How to get __LLVM_StackMaps section using MCJIT?
On 06/10/2015 04:45 AM, Dmitry Borisenkov wrote:> Dear llvm developers, > > I've just started to work with MCJIT and I'll appreciate if you help > me answering the question. > > I jitted code with llvm.experimental.patchpoint and I'd like to get > address of the code corresponded to the patchpoint. Having > ExecutionEngine instance (how) can I obtain some wrapper over stackmap > section to query address I need?To get the address of the start of the section, you will need to use a custom memory manager to capture the address of the section when allocated. See allocateDataSection. There may be a better way to do this, but since you probably need a custom memory manager anyway, this works pretty well. Once you have the address of the stackmap section, you can parse it using a parser like the one I just posted for review: http://reviews.llvm.org/D10377> > P.S. I started familiarizing myself with MCJIT using documentation and > examples, and I'd like to notice that HowToUseJIT might be confusing > for a novice (as it was for me) beacuse it's actually demonstrate how > to use the interpreter. > > -- > Kind regards, Dmitry Borisenkov > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev