<div dir="ltr"><div>Hi, all<br><br>I am wondering if it is possible to dynamically profile  LLVM IR? For example, if I have a </div><div><br></div><div>void foo(){</div><div><span>  A a;   </span></div><div><span>  a.goo(); //invoke a virtual function of class A</span></div><div><span>}</span></div><div> </div><div>Assume we don’t know which “goo()" of class “A” will be executed at run time. We may want to print the  body of goo() as well as the bodies of the function called by goo() and etc., or do something along the execution trace. <br><br>How can we do this kind of dynamic profiling? I recently learned some LLVM basics. It seems to me that the purpose of LLVM passes is static profiling, right? <br></div><div><br></div><div> Thanks for your ideas. </div><div><br></div><div>Zhoulai</div><div><br></div>
</div>