函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_output_read_group

函数原型:static void perf_output_read_group(struct perf_output_handle *handle, struct perf_event *event, u64 enabled, u64 running)

返回类型:void

参数:

类型参数名称
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  如果read_format按位与PERF_FORMAT_TOTAL_TIME_ENABLEDvalues[n++]等于enabled
6496  如果read_format按位与PERF_FORMAT_TOTAL_TIME_RUNNINGvalues[n++]等于running
6499  如果leader不等于eventstate恒等于PERF_EVENT_STATE_ACTIVEread(leader)
6503  values[n++]等于perf_event_count(leader)
6504  如果read_format按位与PERF_FORMAT_IDvalues[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  如果sub不等于eventstate恒等于PERF_EVENT_STATE_ACTIVEread(sub)
6516  values[n++]等于perf_event_count(sub)
6517  如果read_format按位与PERF_FORMAT_IDvalues[n++]等于If we inherit events we want to return the parent event id* to userspace.
6520  __output_copy(handle, values, n * sizeof(u64))
调用者
名称描述
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.