函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_output_read_one

函数原型:static void perf_output_read_one(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
6463  read_format等于read_format
6465  n等于0
6467  values[n++]等于perf_event_count(event)
6468  如果read_format按位与PERF_FORMAT_TOTAL_TIME_ENABLED
6469  values[n++]等于enabledatomic64_read( & child_total_time_enabled)
6472  如果read_format按位与PERF_FORMAT_TOTAL_TIME_RUNNING
6473  values[n++]等于runningatomic64_read( & child_total_time_running)
6476  如果read_format按位与PERF_FORMAT_IDvalues[n++]等于If we inherit events we want to return the parent event id* to userspace.
6479  __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.