<div style="font-family:SimSun,STSong;font-size:large;;"><span style="font-family: Arial Black;"></span><div><br></div><div><font size="2"><span style="font-family: Arial Black;">Hi Peng,</span></font></div><div><font size="2"><span style="font-family: Arial Black;"><br></span></font></div><div><font size="2"><span style="font-family: Arial Black;">Do you require basic block coverage? As far as I know, there is no such trace provided in LLVM. <br></span></font></div><div><font size="2"><span style="font-family: Arial Black;"><br></span></font></div><div><font size="2"><span style="font-family: Arial Black;">If
 you just want simple basic block trace (without overhead), you could 
try instrument all basic blocks and print information you want.<br></span></font></div><div><font size="2"><span style="font-family: Arial Black;"><br></span></font></div><div><font size="2"><span style="font-family: Arial Black;">If you have higher expectations and care about performance overhead, it's better to check academic paper for existing solutions.</span></font></div><div><font size="2"><span style="font-family: Arial Black;"><br></span></font></div><div><font size="2"><span style="font-family: Arial Black;">BTW, Clang 9 has a new feature (with coverage):</span></font></div><div><font size="2"><span style="font-family: Arial Black;">https://clang.llvm.org/docs/SanitizerCoverage.html</span></font></div><div><font size="2"><span style="font-family: Arial Black;"><br></span></font></div><div><span style="font-family: Arial Black;"><font size="2"><div>Cheers,</div><div>Yushan<br><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="font-size: 12px; padding: 2px 0px;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Peng Yu via llvm-dev"<llvm-dev@lists.llvm.org>;</div><div><b>Date: </b> Tue, Jan 22, 2019 01:10 AM</div><div><b>To: </b> "llvm-dev"<llvm-dev@lists.llvm.org>; <wbr></div><div><b>Subject: </b> [llvm-dev] Is there a way to trace what code block in a bitcode file is run?</div></div><div> </div><div style="position:relative;">Hi,<br><br>The cfg pass is only a static analysis of a bitcode file. Is there a<br>way to trace what code blocks in a bitcode file actually run? Thanks.<br><br>-- <br>Regards,<br>Peng<br>_______________________________________________<br>LLVM Developers mailing list<br>llvm-dev@lists.llvm.org<br>http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br></div></div></div></font></span></div></div>