函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Accelerators for sched_clock()* convert from cycles(64bits) => nanoseconds (64bits)* basic equation:* ns = cycles / (freq / ns_per_sec)* ns = cycles * (ns_per_sec / freq)* ns = cycles * (10^9 / (cpu_khz * 10^3))* ns = cycles * (10^6 / cpu_khz)

函数原型:static __always_inline unsigned long long cycles_2_ns(unsigned long long cyc)

返回类型:unsigned long long

参数:

类型参数名称
unsigned long longcyc
113  cyc2ns_read_begin( & data)
115  ns等于cyc2ns_offset
116  ns加等于mul_u64_u32_shr(cyc, cyc2ns_mul, cyc2ns_shift)
118  cyc2ns_read_end()
120  返回:ns
调用者
名称描述
__set_cyc2ns_scale
native_sched_clockScheduler clock - returns current time in nanosec units.
native_sched_clock_from_tscGenerate a sched_clock if you already have a TSC value.