title: How to profile and log slow methods in long lived Java application?
body: <p>Is there any easy way to</p>
  
  <ul>
  <li>profile and write out to the file what methods are slow (>1sec)</li>
  <li>in a long lived Java application</li>
  <li>without any expensive overhead?</li>
  </ul>
  
  <p>With all profilers I know (YourKit, NetBeans, etc), I always have to watch the graphical monitor whether or not a problem occurs.
  Instead, I just want to get a hint to solve the problem by seeking log files when a problem occurs in customers side.</p>