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?
What is the difference between using -agentlib:hprof=cpu=times vs -agentlib:hprof=cpu=sample when running a java class?
Share
hprof=cpu=timescauses 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).