Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Cross CPU call to enable a performance event

Proto:static void __perf_event_enable(struct perf_event *event, struct perf_cpu_context *cpuctx, struct perf_event_context *ctx, void *info)

Type:void

Parameter:

TypeParameterName
struct perf_event *event
struct perf_cpu_context *cpuctx
struct perf_event_context *ctx
void *info
2781  leader = group_leader
2784  If state >= PERF_EVENT_STATE_INACTIVE || state <= PERF_EVENT_STATE_ERROR Then Return
2788  If is_active Then ctx_sched_out(ctx, cpuctx, EVENT_TIME)
2791  perf_event_set_state(event, PERF_EVENT_STATE_INACTIVE)
2793  If Not is_active Then Return
2796  If Not event_filter_match(event) Then
2797  ctx_sched_in(ctx, cpuctx, EVENT_TIME, current process)
2798  Return
2805  If leader != event && state != PERF_EVENT_STATE_ACTIVE Then
2806  ctx_sched_in(ctx, cpuctx, EVENT_TIME, current process)
2807  Return
2810  task_ctx = task_ctx
2811  If task Then WARN_ON_ONCE(task_ctx != ctx)
2814  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)