title: simplest tool to measure C program cache hit/miss and cpu time in linux?
body: <p>I'm writing a small program in C, and I want to measure it's performance.</p>
  
  <p>I want to see how much time do it run in the processor and how many cache hit+misses has it made. Information about context switches and memory usage would be nice to have too. </p>
  
  <p>The program takes less than a second to execute.</p>
  
  <p>I like the information of /proc/[pid]/stat, but I don't know how to see it after the program has died/been killed.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT:</strong> I think Valgrind adds a lot of overhead. That's why I wanted a simple tool, like /proc/[pid]/stat, that is always there.</p>