函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ctx_sched_out

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

返回类型:void

参数:

类型参数名称
struct perf_event_context *ctx
struct perf_cpu_context *cpuctx
enum event_type_tevent_type
3035  is_active等于is_active
3037  lockdep_assert_held( & Protect the states of the events in the list,* nr_active, and the list:)
3039  如果此条件成立可能性大(为编译器优化)(!nr_events)则
3043  WARN_ON_ONCE(is_active)
3044  如果taskWARN_ON_ONCE(task_ctx)
3046  返回
3049  is_active与等于event_type的反
3050  如果非is_active按位与EVENT_ALL的值则is_active等于0
3053  如果task
3054  WARN_ON_ONCE(task_ctx != ctx)
3055  如果非is_activetask_ctx = NULL
3069  如果is_active按位与EVENT_TIME
3071  update_context_time(ctx)
3072  update_cgrp_time_from_cpuctx(cpuctx)
3075  is_active异或等于is_active
3077  如果非nr_active或非is_active按位与EVENT_ALL的值则返回
3084  Set when nr_events != nr_active, except tolerant to events not* necessary to be active due to scheduling constraints, such as cgroups.等于0
3086  perf_pmu_disable(pmu)
3087  如果is_active按位与EVENT_PINNED
3088  list_for_each_entry_safe - iterate over list of given type safe against removal of list entry*@pos: the type * to use as a loop cursor.*@n: another type * to use as temporary storage*@head: the head for your list.(event, tmp, & pinned_active, active_list)
3089  group_sched_out(event, cpuctx, ctx)
3092  如果is_active按位与EVENT_FLEXIBLE
3093  list_for_each_entry_safe - iterate over list of given type safe against removal of list entry*@pos: the type * to use as a loop cursor.*@n: another type * to use as temporary storage*@head: the head for your list.(event, tmp, & flexible_active, active_list)
3094  group_sched_out(event, cpuctx, ctx)
3096  perf_pmu_enable(pmu)
调用者
名称描述
task_ctx_sched_out
__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
cpu_ctx_sched_out
perf_rotate_context
perf_event_enable_on_execEnable all of a task's events that have been marked enable-on-exec.* This expects task == current.
__perf_event_exit_context