函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_recent_times

函数原型:static void get_recent_times(struct psi_group *group, int cpu, enum psi_aggregators aggregator, unsigned int *times, unsigned int *pchanged_states)

返回类型:void

参数:

类型参数名称
struct psi_group *group
intcpu
enum psi_aggregatorsaggregator
unsigned int *times
unsigned int *pchanged_states
241  groupc等于per_cpu_ptr(pcpu, cpu)
247  pchanged_states等于0
250  循环
251  seq等于ad_seqcount_begin - begin a seq-read critical section*@s: pointer to seqcount_t* Returns: count to be passed to read_seqcount_retry* read_seqcount_begin opens a read critical section of the given seqcount
252  now等于cpu_clock(cpu)
253  内存复制(times, times, times的长度)
254  state_mask等于state_mask
255  state_start等于state_start
256 ad_seqcount_retry - end a seq-read critical section*@s: pointer to seqcount_t*@start: count, from read_seqcount_begin* Returns: 1 if retry is required, else 0* read_seqcount_retry closes a read critical section of the given seqcount循环
259 s小于NR_PSI_STATES循环
270  如果state_mask按位与1左移s位则times[s]加等于nowstate_start
273  delta等于times[s]减times_prev[aggregator][s]
274  times_prev[aggregator][s]等于times[s]
276  times[s]等于delta
277  如果deltapchanged_states或等于1左移s
调用者
名称描述
collect_percpu_times