函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ctx_sched_in

函数原型:static void ctx_sched_in(struct perf_event_context *ctx, struct perf_cpu_context *cpuctx, enum event_type_t event_type, struct task_struct *task)

返回类型:void

参数:

类型参数名称
struct perf_event_context *ctx
struct perf_cpu_context *cpuctx
enum event_type_tevent_type
struct task_struct *task
3512  is_active等于is_active
3515  lockdep_assert_held( & Protect the states of the events in the list,* nr_active, and the list:)
3517  如果此条件成立可能性大(为编译器优化)(!nr_events)则返回
3520  is_active或等于event_type按位或EVENT_TIME
3521  如果task
3522  如果非is_activetask_ctx等于ctx
3524  否则WARN_ON_ONCE(task_ctx != ctx)
3528  is_active异或等于is_active
3530  如果is_active按位与EVENT_TIME
3532  now等于perf_clock()
3533  timestamp等于now
3534  perf_cgroup_set_timestamp(task, ctx)
3541  如果is_active按位与EVENT_PINNEDctx_pinned_sched_in(ctx, cpuctx)
3545  如果is_active按位与EVENT_FLEXIBLEctx_flexible_sched_in(ctx, cpuctx)
调用者
名称描述
perf_event_sched_in
__perf_event_enableCross CPU call to enable a performance event
cpu_ctx_sched_in
perf_event_enable_on_execEnable all of a task's events that have been marked enable-on-exec.* This expects task == current.