effective clocks are more a mesurement of LOAD. it is relatively useless for detecting clock streching
quote from Robert Hallock: Former AMD Technical marketing director
There are different ways to approximate it, but at a basic level you take the clockspeeds seen during active use over X sample period, then average it against the time spent in any one of the low-power sleep states. The result of that is conveyed as MHz because that's what most people know or understand and is easy to show as one figure in a UI, but it could just as easily be shown as two values: average frequency while active, and % time sleeping.
And just to put a fine point on it: while we don't want to probe the core itself for activity and wake it, other aspects of the CPU are still awake (e.g. SoC fabric) that control and report the cores' current power state. You can ask the CPU firmware what state the cores are in without waking the cores themselves.
In the case of Ryzen specifically, we have the Infinity Fabric that connects all aspects of the chip together. It acts like an air traffic controller or a central command unit, facilitating the movement of data/telemetry/control signals around the chip. When you probe for temperature, frequency, sleep state and the like, you're talking to our fabric.