Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Get the context for a task and increment its pin_count so it* can't get swapped to another task. This also increments its* reference count so that the context can't get freed.

Proto:static struct perf_event_context *perf_pin_task_context(struct task_struct *task, int ctxn)

Type:struct perf_event_context

Parameter:

TypeParameterName
struct task_struct *task
intctxn
1430  ctx = Get the perf_event_context for a task and lock it.* This has to cope with with the fact that until it is locked,* the context could get moved to another task.
1431  If ctx Then
1432  ++pin_count
1433  raw_spin_unlock_irqrestore( & Protect the states of the events in the list,* nr_active, and the list:, flags)
1435  Return ctx
Caller
NameDescribe
perf_event_exit_task_context
perf_event_init_contextInitialize the perf_event context in task_struct