函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_read_one

函数原型:static int perf_read_one(struct perf_event *event, u64 read_format, char __user *buf)

返回类型:int

参数:

类型参数名称
struct perf_event *event
u64read_format
char __user *buf
4979  n等于0
4981  values[n++]等于__perf_event_read_value(event, & enabled, & running)
4982  如果read_format按位与PERF_FORMAT_TOTAL_TIME_ENABLEDvalues[n++]等于enabled
4984  如果read_format按位与PERF_FORMAT_TOTAL_TIME_RUNNINGvalues[n++]等于running
4986  如果read_format按位与PERF_FORMAT_IDvalues[n++]等于If we inherit events we want to return the parent event id* to userspace.
4989  如果copy_to_user(buf, values, n * sizeof(u64))则返回:负EFAULT
4992  返回:nsizeof(u64)
调用者
名称描述
__perf_readRead the performance event - simple non blocking version for now