Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:alloc_perf_context

Proto:static struct perf_event_context *alloc_perf_context(struct pmu *pmu, struct task_struct *task)

Type:struct perf_event_context

Parameter:

TypeParameterName
struct pmu *pmu
struct task_struct *task
4230  ctx = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
4231  If Not ctx Then Return NULL
4234  Initialize the perf_event context in a task_struct:
4235  If task Then task = get_task_struct(task)
4237  pmu = pmu
4239  Return ctx
Caller
NameDescribe
find_get_contextReturns a matching context with refcount and pincount.
inherit_task_groupCreates the child task context and tries to inherit the event-group.* Clears @inherited_all on !attr.inherited or error. Note that we'll leave* inherited_all set when we 'fail' to inherit an orphaned event; this is