函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_try_init_event

函数原型:static int perf_try_init_event(struct pmu *pmu, struct perf_event *event)

返回类型:int

参数:

类型参数名称
struct pmu *pmu
struct perf_event *event
10448  struct perf_event_context * ctx = NULL
10451  如果非判断模块是否处于活动状态则返回:负ENODEV
10460  如果group_leader不等于eventtask_ctx_nr不等于perf_sw_context
10465  ctx等于Because of perf_event::ctx migration in sys_perf_event_open::move_group and* perf_pmu_migrate_context() we need some magic.* Those places that change perf_event::ctx will hold both* perf_event_ctx::mutex of the 'old' and 'new' ctx value.
10467  BUG_ON(!ctx)
10470  pmu等于pmu
10471  ret等于event_init(event)
10473  如果ctxperf_event_ctx_unlock(group_leader, ctx)
10476  如果非ret
10477  如果非various common per-pmu feature flags按位与PERF_PMU_CAP_EXTENDED_REGS的值且has_extended_regs(event)则ret等于负EOPNOTSUPP
10481  如果various common per-pmu feature flags按位与PERF_PMU_CAP_NO_EXCLUDEevent_has_any_exclude_flag(event)则ret等于负EINVAL
10485  如果retdestroydestroy(event)
10489  如果retmodule_put(module)
10492  返回:ret
调用者
名称描述
perf_init_event