Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\cpuacct.c Create Date:2022-07-28 09:44:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cpuacct_stats_show

Proto:static int cpuacct_stats_show(struct seq_file *sf, void *v)

Type:int

Parameter:

TypeParameterName
struct seq_file *sf
void *v
271  ca = css_ca(seq_css(sf))
276  memset(val, 0, size of val )
277  for_each_possible_cpu(cpu)
278  u64 * cpustat = ({
278  ({
278  Do
278  const void * __vpp_verify = NULL
278  When 0 cycle
278  cpustat
278  })
278  })->cpustat
280  val[... user mode ] += cpustat[CPUTIME_USER]
281  val[... user mode ] += cpustat[CPUTIME_NICE]
282  val[... kernel mode ] += cpustat[CPUTIME_SYSTEM]
283  val[... kernel mode ] += cpustat[CPUTIME_IRQ]
284  val[... kernel mode ] += cpustat[CPUTIME_SOFTIRQ]
287  When stat < CPUACCT_STAT_NSTATS cycle
288  seq_printf(sf, "%s %lld\n", cpuacct_stat_desc[stat], (longlong)nsec_to_clock_t(val[stat]))
293  Return 0