Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:perf_output_read_one

Proto:static void perf_output_read_one(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
6463  read_format = read_format
6465  n = 0
6467  values[n++] = perf_event_count(event)
6468  If read_format & PERF_FORMAT_TOTAL_TIME_ENABLED Then
6469  values[n++] = enabled + atomic64_read( & child_total_time_enabled)
6472  If read_format & PERF_FORMAT_TOTAL_TIME_RUNNING Then
6473  values[n++] = running + atomic64_read( & child_total_time_running)
6476  If read_format & PERF_FORMAT_ID Then values[n++] = If we inherit events we want to return the parent event id* to userspace.
6479  __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.