函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:account_event

函数原型:static void account_event(struct perf_event *event)

返回类型:void

参数:

类型参数名称
struct perf_event *event
10606  bool inc = false
10608  如果parent则返回
10611  如果attach_state按位与PERF_ATTACH_TASKinc = true
10613  如果mmapmmap_dataatomic_inc( & nr_mmap_events)
10615  如果commatomic_inc( & nr_comm_events)
10617  如果namespacesatomic_inc( & nr_namespaces_events)
10619  如果taskatomic_inc( & nr_task_events)
10621  如果freqaccount_freq_event()
10623  如果context_switch
10624  atomic_inc( & nr_switch_events)
10625  inc = true
10627  如果has_branch_stack(event)则inc = true
10629  如果is_cgroup_event(event)则inc = true
10631  如果ksymbolatomic_inc( & nr_ksymbol_events)
10633  如果bpf_eventatomic_inc( & nr_bpf_events)
10636  如果inc
10642  如果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.则转到:enabled
10645  mutex_lock( & perf_sched_mutex)
10646  如果非atomic_read( & perf_sched_count)则
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.
调用者
名称描述
perf_event_allocAllocate and initialize an event structure