函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-27 14:54:44
Last Modify:2022-05-20 07:50:19 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__perf_event_period

函数原型:static void __perf_event_period(struct perf_event *event, struct perf_cpu_context *cpuctx, struct perf_event_context *ctx, void *info)

返回类型:void

参数:

类型参数名称
struct perf_event *event
struct perf_cpu_context *cpuctx
struct perf_event_context *ctx
void *info
5143  value等于*info
5146  如果freq
5147  sample_freq等于value
5148  否则
5149  sample_period等于value
5150  sample_period等于value
5153  active等于state恒等于PERF_EVENT_STATE_ACTIVE
5154  如果active
5155  perf_pmu_disable(pmu)
5160  如果interrupts恒等于MAX_INTERRUPTS
5161  interrupts等于0
5164  stop(event, update the counter when stopping )
5167  local64_set( & period_left, 0)
5169  如果active
5170  start(event, load the counter when starting )
5171  perf_pmu_enable(pmu)