Java profiling - how can I get a method by method analysis of my application?

后端 未结 7 1255
挽巷
挽巷 2020-12-29 03:01

I want to run my Java app and for a given workload be able to see:

  • how many times a given function was called
  • how expensive each function call is in
7条回答
  •  悲&欢浪女
    2020-12-29 03:54

    Java 1.7* comes bundled with Java Mission Control (jmc), which has 'Flight Recorder' feature which can be used to profile the method execution. Profiling results are displayed almost similar to AppDynamics - easy to spot the perf issues (esp. which methods are eating up all the CPU).

    Though not detailed, but good blog post explaining the about Flight Recorder: http://hirt.se/blog/?p=364

    * Not sure about the minor version

提交回复
热议问题