title: How to determine which method is generating the most garbage
body: <p>I have three objects:</p>
  
  <pre><code>ClassA classA = new ClassA();
  ClassA classB = new ClassA();
  ClassA classC = new ClassA();
  </code></pre>
  
  <p>Each of these objects has a <code>public void</code> called <code>run</code> which does something and is called in the following way:</p>
  
  <pre><code>   classA.run();                                                                             
     classB.run();                                                                             
     classC.run();   
  </code></pre>
  
  <p>Within each loop iteration, a particular amount of garbage is generated by each <code>run</code> call.   </p>
  
  <p>How do I accurately determine the amount of generated garbage by each <code>run</code>?                  </p>