title: Profilers Instrumenting Vs Sampling
body: <p>I am doing a study to between profilers mainly instrumenting and sampling.
  I have came up with the following info:</p>
  
  <ul>
  <li>sampling: stop the execution of program, take PC and thus deduce were the program is</li>
  <li>instrumenting: add some overhead code
  to the program so it would increment
  some pointers to know the program</li>
  </ul>
  
  <p>If the above info is wrong correct me.</p>
  
  <p>After this I was looking at the time of execution and some said that instrumenting takes more time than sampling! is this correct?</p>
  
  <p>if yes why is that? in sampling you have to pay the price of context switching between processes while in the latter your in the same program no cost</p>
  
  <p>Am i missing something?</p>
  
  <p>cheers! =)</p>