Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:perf_event_set_output

Proto:static int perf_event_set_output(struct perf_event *event, struct perf_event *output_event)

Type:int

Parameter:

TypeParameterName
struct perf_event *event
struct perf_event *output_event
11010  struct ring_buffer * rb = NULL
11011  ret = -EINVAL
11013  If Not output_event Then Go to set
11017  If event == output_event Then Go to out
11023  If cpu != cpu Then Go to out
11029  If cpu == -1 && ctx != ctx Then Go to out
11035  If clock != clock Then Go to out
11042  If is_write_backward(output_event) != is_write_backward(event) Then Go to out
11048  If has_aux(event) && has_aux(output_event) && pmu != pmu Then Go to out
11052  set :
11053  mutex_lock( & mmap_mutex)
11055  If atomic_read( & mmap_count) Then Go to unlock
11058  If output_event Then
11060  rb = ring_buffer_get(output_event)
11061  If Not rb Then Go to unlock
11065  ring_buffer_attach(event, rb)
11067  ret = 0
11068  unlock :
11069  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.
11071  out :
11072  Return ret
Caller
NameDescribe
_perf_ioctl