Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:We want to maintain the following priority of scheduling:* - CPU pinned (EVENT_CPU | EVENT_PINNED)* - task pinned (EVENT_PINNED)* - CPU flexible (EVENT_CPU | EVENT_FLEXIBLE)* - task flexible (EVENT_FLEXIBLE)

Proto:static void ctx_resched(struct perf_cpu_context *cpuctx, struct perf_event_context *task_ctx, enum event_type_t event_type)

Type:void

Parameter:

TypeParameterName
struct perf_cpu_context *cpuctx
struct perf_event_context *task_ctx
enum event_type_tevent_type
2551  cpu_event = Not Not (event_type & see ctx_resched() for details )
2557  If event_type & EVENT_PINNED Then event_type |= EVENT_FLEXIBLE
2560  ctx_event_type = event_type & EVENT_ALL
2562  perf_pmu_disable(pmu)
2563  If task_ctx Then task_ctx_sched_out(cpuctx, task_ctx, event_type)
2573  If cpu_event Then cpu_ctx_sched_out(cpuctx, ctx_event_type)
2575  Else if ctx_event_type & EVENT_PINNED Then cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE)
2578  perf_event_sched_in(cpuctx, task_ctx, current process)
2579  perf_pmu_enable(pmu)
Caller
NameDescribe
perf_pmu_resched
__perf_install_in_contextCross CPU call to install and enable a performance event* Very similar to remote_function() + event_function() but cannot assume that* things like ctx->is_active and cpuctx->task_ctx are set.
__perf_event_enableCross CPU call to enable a performance event
perf_event_enable_on_execEnable all of a task's events that have been marked enable-on-exec.* This expects task == current.