12

I have downloaded the trial version of JProfiler, and am testing it out on a java 1.5 console app. It only shows me memory usage, ie, how many times a java.lang.String was instantiated. I want to see what methods were called and how much time is spent in each method. I have not figured out how to do this in the trial version.

I viewed the following article http://java.dzone.com/articles/jprofiler-your-java-code-could, which shows a menu choice for "Performance Bottle Necks". I don't have this option in my drop down menu. Is this feature disabled in the trial version?

joneric wennerstrom
  • 301
  • 1
  • 4
  • 18
  • It's possible it's related to how you're running the program. If JProfiler only shows CPU information based on instrumentation, and you haven't instrumented the program, then it wouldn't show that information to you. See http://en.wikipedia.org/wiki/Profiling_(computer_programming) for the difference. – sharakan Jan 29 '13 at 19:06

2 Answers2

17

Activate the CPU view section in the left side bar, then choose the "Hot spots" tab. You might have to start recording CPU data first. If no data has been recorded, there will be a button that tab that allows you to start CPU recording.

Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
  • 1
    Doing that does not cause the "Performance Bottleneck Search" menu choice to appear in the "Session Settings", "Profile Settings", "Select a profiling settings template" drop down list. – joneric wennerstrom Feb 05 '13 at 18:18
  • That's in the session settings. I was referring to the views that show time spent in methods. – Ingo Kegel Feb 06 '13 at 09:01
5
  1. Open the CPU view section, now click on the "Call Tree" Tab.
  2. Right click and click on Find.
  3. Now you can start typing your method name that you want to investigate and you will see your method's tree hierarchy.
  4. You can also right click on your method and click on "Set As Root".
  5. Now it will easy to analyze both "Hot Spots" and "Call Graph" after setting method set as root.

I was using Jprofiler 10.0.3.

S'chn T'gai Spock
  • 1,203
  • 18
  • 16