函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static void perf_remove_from_context(struct perf_event *event, unsigned long flags)

返回类型:void

参数:

类型参数名称
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  如果flags按位与DETACH_GROUPattach_state按位与PERF_ATTACH_GROUP
2223  关闭本地中断,获取所要保护的运行队列(runqueue)的自旋锁(spinlock),为查找可运行进程做准备。( & 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:)
调用者
名称描述
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