Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Remove 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

Proto:static void perf_remove_from_context(struct perf_event *event, unsigned long flags)

Type:void

Parameter:

TypeParameterName
struct perf_event *event
unsigned longflags
2204  ctx = ctx
2206  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.)
2208  event_function_call(event, Cross CPU call to remove a performance event* We disable the event on the hardware level first. After that we* remove it from the context list., (void * )flags)
2216  WARN_ON_ONCE(attach_state & PERF_ATTACH_CONTEXT)
2217  If flags & DETACH_GROUP && attach_state & PERF_ATTACH_GROUP Then
2223  raw_spin_lock_irq( & Protect the states of the events in the list,* nr_active, and the list:)
2224  perf_group_detach(event)
2225  raw_spin_unlock_irq( & Protect the states of the events in the list,* nr_active, and the list:)
Caller
NameDescribe
perf_event_release_kernelKill an event dead; while event:refcount will preserve the event* object, it will not preserve its functionality. Once the last 'user'* gives up the object, we'll destroy the thing.
perf_pmu_migrate_context