Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Inherits an event group.* This will quietly suppress orphaned events; !inherit_event() is not an error.* This matches with perf_event_release_kernel() removing all child events.* Returns:* - 0 on success* - <0 on error

Proto:static int inherit_group(struct perf_event *parent_event, struct task_struct *parent, struct perf_event_context *parent_ctx, struct task_struct *child, struct perf_event_context *child_ctx)

Type:int

Parameter:

TypeParameterName
struct perf_event *parent_event
struct task_struct *parent
struct perf_event_context *parent_ctx
struct task_struct *child
struct perf_event_context *child_ctx
12185  leader = Inherit an event from parent task to child task.* Returns:* - valid pointer on success* - NULL for orphaned events* - IS_ERR() on error
12187  If IS_ERR(leader) Then Return PTR_ERR(leader)
12195  child_ctr = Inherit an event from parent task to child task.* Returns:* - valid pointer on success* - NULL for orphaned events* - IS_ERR() on error
12197  If IS_ERR(child_ctr) Then Return PTR_ERR(child_ctr)
12200  If aux_event == parent_event && child_ctr && Not perf_get_aux_event(child_ctr, leader) Then Return -EINVAL
12204  Return 0
Caller
NameDescribe
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