Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ctx_sched_in

Proto: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)

Type:void

Parameter:

TypeParameterName
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  If Value is more likely to compile time(!nr_events) Then Return
3520  is_active |= event_type | EVENT_TIME
3521  If task Then
3522  If Not is_active Then task_ctx = ctx
3524  Else WARN_ON_ONCE(task_ctx != ctx)
3528  is_active ^= is_active
3530  If is_active & EVENT_TIME Then
3532  now = perf_clock()
3533  timestamp = now
3534  perf_cgroup_set_timestamp(task, ctx)
3541  If is_active & EVENT_PINNED Then ctx_pinned_sched_in(ctx, cpuctx)
3545  If is_active & EVENT_FLEXIBLE Then ctx_flexible_sched_in(ctx, cpuctx)
Caller
NameDescribe
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.