Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ctx_sched_out

Proto:static void ctx_sched_out(struct perf_event_context *ctx, struct perf_cpu_context *cpuctx, enum event_type_t event_type)

Type:void

Parameter:

TypeParameterName
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  If Value is more likely to compile time(!nr_events) Then
3043  WARN_ON_ONCE(is_active)
3044  If task Then WARN_ON_ONCE(task_ctx)
3046  Return
3049  is_active &= ~event_type
3050  If Not (is_active & EVENT_ALL) Then is_active = 0
3053  If task Then
3054  WARN_ON_ONCE(task_ctx != ctx)
3055  If Not is_active Then task_ctx = NULL
3069  If is_active & EVENT_TIME Then
3071  update_context_time(ctx)
3072  update_cgrp_time_from_cpuctx(cpuctx)
3075  is_active ^= is_active
3077  If Not nr_active || Not (is_active & EVENT_ALL) Then Return
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  If is_active & EVENT_PINNED Then
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  If is_active & EVENT_FLEXIBLE Then
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)
Caller
NameDescribe
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