Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:perf_rotate_context

Proto:static bool perf_rotate_context(struct perf_cpu_context *cpuctx)

Type:bool

Parameter:

TypeParameterName
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 = If task_ctx Then Set when nr_events != nr_active, except tolerant to events not* necessary to be active due to scheduling constraints, such as cgroups. Else 0
3862  If Not (cpu_rotate || task_rotate) Then Return false
3865  perf_ctx_lock(cpuctx, task_ctx)
3866  perf_pmu_disable(pmu)
3868  If task_rotate Then task_event = pick an event from the flexible_groups to rotate
3870  If cpu_rotate Then cpu_event = pick an event from the flexible_groups to rotate
3877  If task_event || task_ctx && cpu_event Then ctx_sched_out(task_ctx, cpuctx, EVENT_FLEXIBLE)
3879  If cpu_event Then cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE)
3882  If task_event Then Move @event to the tail of the @ctx's elegible events.
3884  If cpu_event Then Move @event to the tail of the @ctx's elegible events.
3887  perf_event_sched_in(cpuctx, task_ctx, current process)
3889  perf_pmu_enable(pmu)
3890  perf_ctx_unlock(cpuctx, task_ctx)
3892  Return true
Caller
NameDescribe
perf_mux_hrtimer_handler must be called with interrupts disabled