函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_init_event

函数原型:static struct pmu *perf_init_event(struct perf_event *event)

返回类型:struct pmu

参数:

类型参数名称
struct perf_event *event
10500  idx等于srcu_read_lock - register a new reader for an SRCU-protected structure
10503  如果parentpmu
10504  pmu等于pmu
10505  ret等于perf_try_init_event(pmu, event)
10506  如果非ret则转到:unlock
10514  type等于type
10515  如果type恒等于PERF_TYPE_HARDWAREtype恒等于PERF_TYPE_HW_CACHEtype等于PERF_TYPE_RAW
10518  again :
10519  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
10520  pmu等于dr_find() - Return pointer for given ID
10521  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
10522  如果pmu
10523  ret等于perf_try_init_event(pmu, event)
10524  如果ret恒等于负ENOENTtype不等于type
10525  type等于type
10526  转到:again
10529  如果retpmu等于错误号
10532  转到:unlock
10536  ret等于perf_try_init_event(pmu, event)
10537  如果非ret则转到:unlock
10540  如果ret不等于负ENOENT
10541  pmu等于错误号
10542  转到:unlock
10545  pmu等于错误号
10546  unlock :
10547  注销过期读锁
10549  返回:pmu
调用者
名称描述
perf_event_allocAllocate and initialize an event structure