In the Profiler window, what does "Calls" mean under CPU Usage?

I’ve tested that it doesn’t mean how many times the function is called on a per-frame basis. For instance, I have a function that increments a global integer each time it’s called, and a global frame tracker as well. This function is only called 3 times per frame; however, the “Calls” for this function under the Profiler > CPU Usage > Calls column shows anything from 40-50 calls per frame.

So what does “Calls” mean? I’m not profiling the Update method directly, but a method that is nested deeply within it that has a lot of conditional checks (it’s not called by every game object every frame).

Hello,
What you are describing sounds like a bug (either in the profiler or your tracker script) or a misunderstanding somewhere, as that column does mean the amount of times that this profiler sample was emitted as a sub sample to the parent sample.

Note that a Profiler Sample isn’t necessarily the same as a script call, unless we are talking Deep Profiling automatically instrumented samples. E.g. you could have

public class MyBehaviour : MonoBehaviour
{
    void MyFunction()
    {
        for (int i = 0; i < 20; i++)
        {
            Profiler.BeginSample("MyBehaviour.MyFunction()");
            Profiler.EndSample();
        }
    }
}

Or similar construct with samples emitted via the CustomSampler or ProfilerMarker APIs. I’m not assuming that this is the case here but it explains the difference between the Sample Stack the profiler shows and the actual Call Stack a bit. This kind of situation would also be the only scenario I can currently think of in which I’d expect the Call Columns count to not actually represent the amount of Calls made to a function.

Could you maybe share a bit more context on what it looks like in the Profiler and what the script looks like?