I want to analyze runtime behavior of the application with software profiling. As far as I know there are two basic types of profiling technique. First is Sample based profiling and second is Instrumentation. Can somebody please tell me which one should I use ? I want to analyze behavior of single (java) application and not behavior of one application with other. I am not concerned about the performance related issues like cpu cycle time, memory allocation etc. Please suggest some tools also which can help me.
I would really appreciate any help regarding this.
Thank you.
If you’re interested in control flow, sampling is not appropriate (it’s great for finding performance bottlenecks). Only instrumentation can provide data for control flow.
Recording method-level chronological data for an application will result in a huge amount of data unless you carefully define which classes should be instrumented.
JProfiler has a call tracer view that may be suitable for your purpose, also see this question.
Disclaimer: My company develops JProfiler.