函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\aperfmperf.c Create Date:2022-07-27 08:56:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:aperfmperf_snapshot_khz()* On the current CPU, snapshot APERF, MPERF, and jiffies* unless we already did it within 10ms* calculate kHz, save snapshot

函数原型:static void aperfmperf_snapshot_khz(void *dummy)

返回类型:void

参数:

类型参数名称
void *dummy
43  s等于this_cpu_ptr( & samples)
46  local_irq_save(flags)
47  rdmsrl(MSR_IA32_APERF, aperf)
48  rdmsrl(MSR_IA32_MPERF, mperf)
49  local_irq_restore(flags)
51  aperf_delta等于aperfaperf
52  mperf_delta等于mperfmperf
58  如果mperf_delta恒等于0则返回
61  time等于ktime_get()
62  aperf等于aperf
63  mperf等于mperf
64  khz等于div64_u64 - unsigned 64bit divide with 64bit divisor*@dividend: 64bit dividend*@divisor: 64bit divisor* This implementation is a modified version of the algorithm proposed* by the book 'Hacker's Delight'. The original source and full proof