函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_rotate_context

函数原型:static bool perf_rotate_context(struct perf_cpu_context *cpuctx)

返回类型:bool

参数:

类型参数名称
struct perf_cpu_context *cpuctx
3849  struct perf_event * cpu_event = NULL, * task_event = NULL
3850  struct perf_event_context * task_ctx = NULL
3858  cpu_rotate等于Set when nr_events != nr_active, except tolerant to events not* necessary to be active due to scheduling constraints, such as cgroups.
3859  task_ctx等于task_ctx
3860  task_rotate等于如果task_ctxSet when nr_events != nr_active, except tolerant to events not* necessary to be active due to scheduling constraints, such as cgroups.否则0
3862  如果非cpu_rotatetask_rotate的值则返回:false
3865  perf_ctx_lock(cpuctx, task_ctx)
3866  perf_pmu_disable(pmu)
3868  如果task_rotatetask_event等于pick an event from the flexible_groups to rotate
3870  如果cpu_rotatecpu_event等于pick an event from the flexible_groups to rotate
3877  如果task_eventtask_ctxcpu_eventctx_sched_out(task_ctx, cpuctx, EVENT_FLEXIBLE)
3879  如果cpu_eventcpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE)
3882  如果task_eventMove @event to the tail of the @ctx's elegible events.
3884  如果cpu_eventMove @event to the tail of the @ctx's elegible events.
3887  perf_event_sched_in(cpuctx, task_ctx, 当前进程)
3889  perf_pmu_enable(pmu)
3890  perf_ctx_unlock(cpuctx, task_ctx)
3892  返回:true
调用者
名称描述
perf_mux_hrtimer_handler must be called with interrupts disabled