函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_read_group

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

返回类型:int

参数:

类型参数名称
struct perf_event *event
u64read_format
char __user *buf
4931  leader等于group_leader
4932  ctx等于ctx
4936  lockdep_assert_held( & Protect the list of events. Locking either mutex or lock* is sufficient to ensure the list doesn't change; to change* the list you need to lock both the mutex and the spinlock.)
4938  values等于分配内存并置零
4939  如果非values则返回:负ENOMEM
4942  values[0]等于1加nr_siblings
4948  mutex_lock( & child_mutex)
4950  ret等于__perf_read_group_add(leader, read_format, values)
4951  如果ret则转到:unlock
4955  ret等于__perf_read_group_add(child, read_format, values)
4956  如果ret则转到:unlock
4960  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
4962  ret等于read_size
4963  如果copy_to_user(buf, values, read_size)则ret等于负EFAULT
4965  转到:out
4967  unlock :
4968  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
4969  out :
4970  kfree(values)
4971  返回:ret
调用者
名称描述
__perf_readRead the performance event - simple non blocking version for now