[llvm-dev] How to add custom instrumentation?

Alex Denisov via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 13 00:57:23 PDT 2017


Hi everyone,

I run some functions using ORC JIT, now I need to add custom instrumentation.
I want to add two callbacks to each function: ‘enterFunction' at the beginning and ‘leaveFunction' at the end.
Intuition says that I could ‘just' insert CallInst's to the first and the last basic blocks in the function.

Am I correct? Are there any other/better way to do this? Is there anything special I need to be aware of?

Thank you.
--
AlexDenisov
Software Engineer, https://lowlevelbits.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170713/e81e70e6/attachment.sig>


More information about the llvm-dev mailing list