函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_swevent_init

函数原型:static int perf_swevent_init(struct perf_event *event)

返回类型:int

参数:

类型参数名称
struct perf_event *event
8846  event_id等于config
8848  如果type不等于PERF_TYPE_SOFTWARE则返回:负ENOENT
8854  如果has_branch_stack(event)则返回:负EOPNOTSUPP
8858  :event_id恒等于PERF_COUNT_SW_CPU_CLOCK
8859  :event_id恒等于PERF_COUNT_SW_TASK_CLOCK
8860  返回:负ENOENT
8862  默认
8863  退出
8866  如果event_id大于等于PERF_COUNT_SW_MAX则返回:负ENOENT
8869  如果非parent
8872  err等于swevent_hlist_get()
8873  如果err则返回:err
8876  static_key_slow_inc( & perf_swevent_enabled[event_id])
8877  destroy等于sw_perf_event_destroy
8880  返回:0