函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alloc_perf_context

函数原型:static struct perf_event_context *alloc_perf_context(struct pmu *pmu, struct task_struct *task)

返回类型:struct perf_event_context

参数:

类型参数名称
struct pmu *pmu
struct task_struct *task
4230  ctx等于分配内存并置零
4231  如果非ctx则返回:NULL
4234  Initialize the perf_event context in a task_struct:
4235  如果tasktask等于get_task_struct(task)
4237  pmu等于pmu
4239  返回:ctx
调用者
名称描述
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