Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:event_function_call

Proto:static void event_function_call(struct perf_event *event, event_f func, void *data)

Type:void

Parameter:

TypeParameterName
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  If Not parent Then
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  If Not task Then
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  Return
272  If task == TASK_TOMBSTONE Then Return
275  again :
276  If Not 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 Then Return
279  raw_spin_lock_irq( & Protect the states of the events in the list,* nr_active, and the list:)
284  task = task
285  If task == TASK_TOMBSTONE Then
286  raw_spin_unlock_irq( & Protect the states of the events in the list,* nr_active, and the list:)
287  Return
289  If is_active Then
290  raw_spin_unlock_irq( & Protect the states of the events in the list,* nr_active, and the list:)
291  Go to 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:)
Caller
NameDescribe
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