Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:perf_read_one

Proto:static int perf_read_one(struct perf_event *event, u64 read_format, char __user *buf)

Type:int

Parameter:

TypeParameterName
struct perf_event *event
u64read_format
char __user *buf
4979  n = 0
4981  values[n++] = __perf_event_read_value(event, & enabled, & running)
4982  If read_format & PERF_FORMAT_TOTAL_TIME_ENABLED Then values[n++] = enabled
4984  If read_format & PERF_FORMAT_TOTAL_TIME_RUNNING Then values[n++] = running
4986  If read_format & PERF_FORMAT_ID Then values[n++] = If we inherit events we want to return the parent event id* to userspace.
4989  If copy_to_user(buf, values, n * sizeof(u64)) Then Return -EFAULT
4992  Return n * sizeof(u64)
Caller
NameDescribe
__perf_readRead the performance event - simple non blocking version for now