Unlike other modes only method invocations are counted,
neither call stacks nor times are gathered.
Use this mode to initially detect possible problems:
thanks to its low overhead you may do this even in production.
It's a simple tool for identifying potential performance problems caused
by suboptimal algorithms.
The approach is based on assumption that methods with a big number of invocations
may indicate a performance problem.
Further investigation may involve using CPU tracing or sampling
to get comprehensive profiling results including times and stack traces (call tree).
Use profiler toolbar to start call counting as shown on the picture below.
There are also alternate methods to start CPU profiling.
Call counting is specially designed to have minimal possible, almost zero overhead:
It provides a plain method list with method invocation counts.
Unlike other CPU profiling modes it does not provide stack traces nor method times.
Method invocations from different threads are summed and cannot be distinguished.
Counts are not guaranteed to be exact.
To ensure minimal overhead invocation counts are updated without taking any locks or
using test-and-set style atomic operations.
If the same method is simultaneously called in different threads running
in parallel on different CPU cores, some of its invocations may be missed by a non-atomic counter.
Fortunately, the probability of such events is low,
and missed invocations, if any, will normally constitute only a small fraction of all invocations.