函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:event_function_call

函数原型:static void event_function_call(struct perf_event *event, event_f func, void *data)

返回类型:void

参数:

类型参数名称
struct perf_event *event
event_ffunc
void *data
250  ctx等于ctx
251  task等于READ_ONCE(task)
252  struct event_function_struct efs = {event = event, func = func, data = data, }
258  如果非parent
264  lockdep_assert_held( & Protect the list of events. Locking either mutex or lock* is sufficient to ensure the list doesn't change; to change* the list you need to lock both the mutex and the spinlock.)
267  如果非task
268  pu_function_call - call a function on the cpu*@func: the function to be called*@info: the function call argument* Calls the function @func on the remote cpu.* returns: @func return value or -ENXIO when the cpu is offline
269  返回
272  如果task恒等于TASK_TOMBSTONE则返回
275  again :
276  如果非ask_function_call - call a function on the cpu on which a task runs*@p: the task to evaluate*@func: the function to be called*@info: the function call argument* Calls the function @func when the task is currently running则返回
279  关闭本地中断,获取所要保护的运行队列(runqueue)的自旋锁(spinlock),为查找可运行进程做准备。( & Protect the states of the events in the list,* nr_active, and the list:)
284  task等于task
285  如果task恒等于TASK_TOMBSTONE
286  raw_spin_unlock_irq( & Protect the states of the events in the list,* nr_active, and the list:)
287  返回
289  如果is_active
290  raw_spin_unlock_irq( & Protect the states of the events in the list,* nr_active, and the list:)
291  转到:again
293  func(event, NULL, ctx, data)
294  raw_spin_unlock_irq( & Protect the states of the events in the list,* nr_active, and the list:)
调用者
名称描述
perf_remove_from_contextRemove the event from a task's (or a CPU's) list of events.* If event->ctx is a cloned context, callers must make sure that* every task struct that event->ctx->task could possibly point to* remains valid. This is OK when called from perf_release since
_perf_event_disableDisable an event
_perf_event_enableEnable an event
_perf_event_period