Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace.c Create Date:2022-07-28 12:02:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:tracing_buffers_open

Proto:static int tracing_buffers_open(struct inode *inode, struct file *filp)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct file *filp
7296  tr = s or device private pointer
7300  ret = tracing_check_open_get_tr(tr)
7301  If ret Then Return ret
7304  info = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
7305  If Not info Then
7306  race_array_put - Decrement the reference counter for this trace array.* NOTE: Use this when we no longer need the trace array returned by* trace_array_get_by_name(). This ensures the trace array can be later* destroyed.
7307  Return -ENOMEM
7310  mutex_lock( & race_types_lock is used to protect the trace_types list.)
7312  tr = tr
7313  cpu_file = Should be used after trace_array_get(), trace_types_lock* ensures that i_cdev was already initialized.
7314  trace = current_trace
7315  trace_buffer = trace_buffer
7316  spare = NULL
7318  read = (unsigned int) - 1
7320  needed for tty driver, and maybe others = info
7322  ref++
7324  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.
7326  ret = nonseekable_open(inode, filp)
7327  If ret < 0 Then race_array_put - Decrement the reference counter for this trace array.* NOTE: Use this when we no longer need the trace array returned by* trace_array_get_by_name(). This ensures the trace array can be later* destroyed.
7330  Return ret