Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Insert @event into @groups' tree; using {@event->cpu, ++@groups->index} for* key (see perf_event_groups_less). This places it last inside the CPU* subtree.

Proto:static void perf_event_groups_insert(struct perf_event_groups *groups, struct perf_event *event)

Type:void

Parameter:

TypeParameterName
struct perf_event_groups *groups
struct perf_event *event
1555  group_index = ++index
1557  node = rb_node
1558  parent = node
1560  When node cycle
1561  parent = node
1562  node_event = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.( * node, structperf_event, group_node)
1564  If Compare function for event groups;* Implements complex key that first sorts by CPU and then by virtual index* which provides ordering when rotating groups for the same CPU. Then node = rb_left
1566  Else node = rb_right
1570  rb_link_node( & group_node, parent, node)
1571  rb_insert_color( & group_node, & tree)
Caller
NameDescribe
add_event_to_groupsHelper function to insert event into the pinned or flexible groups.
rotate_ctxMove @event to the tail of the @ctx's elegible events.