Finding out the CPU clock frequency (per core, per processor)

前端 未结 6 1905
无人及你
无人及你 2020-11-30 01:26

Programs like CPUz are very good at giving in depth information about the system (bus speed, memory timings, etc.)

However, is there a programmatic way of calculatin

6条回答
  •  自闭症患者
    2020-11-30 01:37

    One should refer to this white paper: Intel® Turbo Boost Technology in Intel® Core™ Microarchitecture (Nehalem) Based Processors. Basically, produce several reads of the UCC fixed performance counter over a sample period T.

    Relative.Freq = Delta(UCC)  / T
    
    Where:
       Delta() = UCC @ period T
                     - UCC @ period T-1
    

    Starting with Nehalem architecture, UCC increase and decrease the number of click ticks relatively to the Unhalted state of the core.

    When SpeedStep or Turbo Boost are activated, the estimated frequency using UCC will be measured accordingly; while TSC remains constant. For instance, Turbo Boost in action reveals that Delta(UCC) is greater or equal to Delta(TSC)

    Example in function Core_Cycle function at Cyring | CoreFreq GitHub.

提交回复
热议问题