Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-28 13:40:24
Last Modify:2022-05-20 07:50:19 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:perf_init_event

Proto:static struct pmu *perf_init_event(struct perf_event *event)

Type:struct pmu

Parameter:

TypeParameterName
struct perf_event *event
10500  idx = srcu_read_lock - register a new reader for an SRCU-protected structure
10503  If parent && pmu Then
10504  pmu = pmu
10505  ret = perf_try_init_event(pmu, event)
10506  If Not ret Then Go to unlock
10514  type = type
10515  If type == PERF_TYPE_HARDWARE || type == PERF_TYPE_HW_CACHE Then type = 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  If pmu Then
10523  ret = perf_try_init_event(pmu, event)
10524  If ret == -ENOENT && type != type Then
10525  type = type
10526  Go to again
10529  If ret Then pmu = ERR_PTR(ret)
10532  Go to unlock
10536  ret = perf_try_init_event(pmu, event)
10537  If Not ret Then Go to unlock
10540  If ret != -ENOENT Then
10541  pmu = ERR_PTR(ret)
10542  Go to unlock
10545  pmu = ERR_PTR( - ENOENT)
10546  unlock :
10547  srcu_read_unlock - unregister a old reader from an SRCU-protected structure.*@ssp: srcu_struct in which to unregister the old reader.*@idx: return value from corresponding srcu_read_lock().* Exit an SRCU read-side critical section.
10549  Return pmu
Caller
NameDescribe
perf_event_allocAllocate and initialize an event structure