Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:perf_output_read_group

Proto:static void perf_output_read_group(struct perf_output_handle *handle, struct perf_event *event, u64 enabled, u64 running)

Type:void

Parameter:

TypeParameterName
struct perf_output_handle *handle
struct perf_event *event
u64enabled
u64running
6486  leader = group_leader
6487  read_format = read_format
6489  n = 0
6491  values[n++] = 1 + nr_siblings
6493  If read_format & PERF_FORMAT_TOTAL_TIME_ENABLED Then values[n++] = enabled
6496  If read_format & PERF_FORMAT_TOTAL_TIME_RUNNING Then values[n++] = running
6499  If leader != event && state == PERF_EVENT_STATE_ACTIVE Then read(leader)
6503  values[n++] = perf_event_count(leader)
6504  If read_format & PERF_FORMAT_ID Then values[n++] = If we inherit events we want to return the parent event id* to userspace.
6507  __output_copy(handle, values, n * sizeof(u64))
6510  n = 0
6512  If sub != event && state == PERF_EVENT_STATE_ACTIVE Then read(sub)
6516  values[n++] = perf_event_count(sub)
6517  If read_format & PERF_FORMAT_ID Then values[n++] = If we inherit events we want to return the parent event id* to userspace.
6520  __output_copy(handle, values, n * sizeof(u64))
Caller
NameDescribe
perf_output_readXXX PERF_SAMPLE_READ vs inherited events seems difficult.* The problem is that its both hard and excessively expensive to iterate the* child list, not to mention that its impossible to IPI the children running* on another CPU, from interrupt/NMI context.