函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:event_sched_out

函数原型:static void event_sched_out(struct perf_event *event, struct perf_cpu_context *cpuctx, struct perf_event_context *ctx)

返回类型:void

参数:

类型参数名称
struct perf_event *event
struct perf_cpu_context *cpuctx
struct perf_event_context *ctx
2093  state等于PERF_EVENT_STATE_INACTIVE
2095  WARN_ON_ONCE(ctx != ctx)
2096  lockdep_assert_held( & Protect the states of the events in the list,* nr_active, and the list:)
2098  如果state不等于PERF_EVENT_STATE_ACTIVE则返回
2106  删除链表项并重新初始化
2108  perf_pmu_disable(pmu)
2110  del(event, 0)
2111  oncpu等于负1
2113  如果READ_ONCE(pending_disable)大于等于0则
2114  WRITE_ONCE(pending_disable, - 1)
2115  state等于PERF_EVENT_STATE_OFF
2117  perf_event_set_state(event, state)
2119  如果非is_software_event(event)则active_oncpu自减
2121  如果非nr_active先自减则perf_event_ctx_deactivate(ctx)
2123  如果freqsample_freqnr_freq自减
2125  如果exclusive或非active_oncpuexclusive等于0
2128  perf_pmu_enable(pmu)
调用者
名称描述
perf_put_aux_event
group_sched_out
__perf_remove_from_contextCross CPU call to remove a performance event* We disable the event on the hardware level first. After that we* remove it from the context list.
__perf_event_disableCross CPU call to disable a performance event
group_sched_in