Reputation: 16015
What is the difference between using -agentlib:hprof=cpu=times vs -agentlib:hprof=cpu=sample when running a java class? I know that cpu=sample causes the jvm to sample the call stack at regular intervals, but what does cpu=times do?
Upvotes: 7
Views: 3255
Reputation: 405745
hprof=cpu=times
causes the profiler to count the number of times each method was called and measure the time spent in each method.
Read about it here (using browser's find function: cpu=times).
Upvotes: 4