title: Profiling only certain parts/classes of a Java application
body: <p>I'm writing a java application that reads input, populates data structures, and then does some computations on them.  I want to optimize the final computation part, because with real, large inputs it dominates execution time.  Profiling the whole application with giant inputs would take forever.  So, I load a moderate-sized input for performance testing, but then input and preprocessing time dominates the profile.</p>
  
  <p>How can I profile just the part of a java application I care about?  Is there a way to say "only profile these two classes," or programmatically insert "start profiling here" directives?</p>