Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:NMI-safe method to read a local event, that is an event that* is:* - either for the current task, or for this CPU* - does not have inherit set, for inherited task events* will not be local and we cannot read them atomically* - must not have a pmu::count

Proto:int perf_event_read_local(struct perf_event *event, u64 *value, u64 *enabled, u64 *running)

Type:int

Parameter:

TypeParameterName
struct perf_event *event
u64 *value
u64 *enabled
u64 *running
4070  ret = 0
4076  local_irq_save(flags)
4082  If inherit Then
4083  ret = -EOPNOTSUPP
4084  Go to out
4088  If attach_state & PERF_ATTACH_TASK && target != current process Then
4090  ret = -EINVAL
4091  Go to out
4095  If Not (attach_state & PERF_ATTACH_TASK) && cpu != smp_processor_id() Then
4097  ret = -EINVAL
4098  Go to out
4102  If pinned && oncpu != smp_processor_id() Then
4103  ret = -EBUSY
4104  Go to out
4112  If oncpu == smp_processor_id() Then read(event)
4115  value = local64_read( & count)
4116  If enabled || running Then
4117  now = shadow_ctx_time + perf_clock()
4120  __perf_update_times(event, now, & __enabled, & __running)
4121  If enabled Then enabled = __enabled
4123  If running Then running = __running
4126  out :
4127  local_irq_restore(flags)
4129  Return ret
Caller
NameDescribe
measure_residency_fn
____bpf_perf_prog_read_value
perf_event_fd_array_get_ptr