title: How do I produce a graphical code profile report for C++ code compiled with Clang LLVM?
body: <p>How do I produce a graphical code profile report for C++ code compiled with Clang LLVM?</p>
  
  <ul>
  <li><p>What command-line options to I pass to clang++ to instruct it to gather profiling data when the code is executed?</p></li>
  <li><p>Into which file(s) is the gathered profiling data stored?</p></li>
  <li><p>What are the post-processing steps to convert the collected profile data into a graphical report that shows how often each function is called, what percentage of time is spent in each function, and from which functions each function is called (similar to <a href="https://s3-us-west-2.amazonaws.com/brunorijsman-public/example-rift-python-code-profile.png" rel="nofollow noreferrer">https://s3-us-west-2.amazonaws.com/brunorijsman-public/example-rift-python-code-profile.png</a>)?</p></li>
  </ul>
  
  <p>I have full control over the C++ source code and Makefile.</p>
  
  <p>It has to be LLVM clang++ (GNU g++ is not an option for me). Xcode is also not an option for me.</p>