函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static void ctx_resched(struct perf_cpu_context *cpuctx, struct perf_event_context *task_ctx, enum event_type_t event_type)

返回类型:void

参数:

类型参数名称
struct perf_cpu_context *cpuctx
struct perf_event_context *task_ctx
enum event_type_tevent_type
2551  cpu_event等于非非event_type按位与 see ctx_resched() for details 的值
2557  如果event_type按位与EVENT_PINNEDevent_type或等于EVENT_FLEXIBLE
2560  ctx_event_type等于event_type按位与EVENT_ALL
2562  perf_pmu_disable(pmu)
2563  如果task_ctxtask_ctx_sched_out(cpuctx, task_ctx, event_type)
2573  如果cpu_eventcpu_ctx_sched_out(cpuctx, ctx_event_type)
2575  否则如果ctx_event_type按位与EVENT_PINNEDcpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE)
2578  perf_event_sched_in(cpuctx, task_ctx, 当前进程)
2579  perf_pmu_enable(pmu)
调用者
名称描述
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.