Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:event_sched_in

Proto:static int event_sched_in(struct perf_event *event, struct perf_cpu_context *cpuctx, struct perf_event_context *ctx)

Type:int

Parameter:

TypeParameterName
struct perf_event *event
struct perf_cpu_context *cpuctx
struct perf_event_context *ctx
2351  ret = 0
2353  lockdep_assert_held( & Protect the states of the events in the list,* nr_active, and the list:)
2355  If state <= PERF_EVENT_STATE_OFF Then Return 0
2358  WRITE_ONCE(oncpu, smp_processor_id())
2364  smp_wmb()
2365  perf_event_set_state(event, PERF_EVENT_STATE_ACTIVE)
2372  If Value for the false possibility is greater at compile time(interrupts == MAX_INTERRUPTS) Then
2373  perf_log_throttle(event, 1)
2374  interrupts = 0
2377  perf_pmu_disable(pmu)
2379  perf_set_shadow_time(event, ctx)
2381  perf_log_itrace_start(event)
2383  If add(event, start the counter when adding ) Then
2384  perf_event_set_state(event, PERF_EVENT_STATE_INACTIVE)
2385  oncpu = -1
2386  ret = -EAGAIN
2387  Go to out
2390  If Not is_software_event(event) Then active_oncpu++
2392  If Not nr_active ++ Then perf_event_ctx_activate(), perf_event_ctx_deactivate(), and* perf_event_task_tick() are fully serialized because they're strictly cpu* affine and perf_event_ctx{activate,deactivate} are called with IRQs
2394  If freq && sample_freq Then nr_freq++
2397  If exclusive Then exclusive = 1
2400  out :
2401  perf_pmu_enable(pmu)
2403  Return ret
Caller
NameDescribe
group_sched_in