函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_pmu_migrate_context

函数原型:void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu)

返回类型:void

参数:

类型参数名称
struct pmu *pmu
intsrc_cpu
intdst_cpu
11701  LIST_HEAD(events)
11703  src_ctx = & ({
11703  src_cpu
11703  ({
11703  循环
11703  const void * __vpp_verify = NULL
11703  当0循环
11703  pmu_cpu_context
11703  })
11703  })->ctx
11704  dst_ctx = & ({
11704  dst_cpu
11704  ({
11704  循环
11704  const void * __vpp_verify = NULL
11704  当0循环
11704  pmu_cpu_context
11704  })
11704  })->ctx
11710  mutex_lock_double( & 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., & 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.)
11713  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
11714  unaccount_event_cpu(event, src_cpu)
11715  put_ctx(src_ctx)
11716  添加链表项
11722  Wait for a grace period to elapse. But it is illegal to invoke* synchronize_rcu() from within an RCU read-side critical section.* Therefore, any legal call to synchronize_rcu() is a quiescent
11733  如果group_leader恒等于event则继续下一循环
11736  删除链表项
11737  如果state大于等于PERF_EVENT_STATE_OFFstate等于PERF_EVENT_STATE_INACTIVE
11739  account_event_cpu(event, dst_cpu)
11740  Attach a performance event to a context.* Very similar to event_function_call, see comment there.
11741  get_ctx(dst_ctx)
11749  删除链表项
11750  如果state大于等于PERF_EVENT_STATE_OFFstate等于PERF_EVENT_STATE_INACTIVE
11752  account_event_cpu(event, dst_cpu)
11753  Attach a performance event to a context.* Very similar to event_function_call, see comment there.
11754  get_ctx(dst_ctx)
11756  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
11757  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.