Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:account_event

Proto:static void account_event(struct perf_event *event)

Type:void

Parameter:

TypeParameterName
struct perf_event *event
10606  bool inc = false
10608  If parent Then Return
10611  If attach_state & PERF_ATTACH_TASK Then inc = true
10613  If mmap || mmap_data Then atomic_inc( & nr_mmap_events)
10615  If comm Then atomic_inc( & nr_comm_events)
10617  If namespaces Then atomic_inc( & nr_namespaces_events)
10619  If task Then atomic_inc( & nr_task_events)
10621  If freq Then account_freq_event()
10623  If context_switch Then
10624  atomic_inc( & nr_switch_events)
10625  inc = true
10627  If has_branch_stack(event) Then inc = true
10629  If is_cgroup_event(event) Then inc = true
10631  If ksymbol Then atomic_inc( & nr_ksymbol_events)
10633  If bpf_event Then atomic_inc( & nr_bpf_events)
10636  If inc Then
10642  If atomic_inc_not_zero - increment unless the number is zero*@v: pointer of type atomic_t* Atomically increments @v by 1, if @v is non-zero.* Returns true if the increment was done. Then Go to enabled
10645  mutex_lock( & perf_sched_mutex)
10646  If Not atomic_read( & perf_sched_count) Then
10659  atomic_inc( & perf_sched_count)
10660  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
10662  enabled :
10664  account_event_cpu(event, cpu)
10666  We keep a list of all !task (and therefore per-cpu) events* that need to receive side-band records.* This avoids having to scan all the various PMU per-cpu contexts* looking for them.
Caller
NameDescribe
perf_event_allocAllocate and initialize an event structure