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 jvm to selectively check the call stack, but what does cpu = times do?
hprof=cpu=times causes the profiler to count the number of times each method has been called, and measure the time spent on each method.
hprof=cpu=times
Read about it here (using the browser search function: cpu = times).