函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace.c Create Date:2022-07-27 13:07:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:tracing_open_pipe

函数原型:static int tracing_open_pipe(struct inode *inode, struct file *filp)

返回类型:int

参数:

类型参数名称
struct inode *inode
struct file *filp
5947  tr等于s or device private pointer
5951  ret等于tracing_check_open_get_tr(tr)
5952  如果ret则返回:ret
5955  mutex_lock( & race_types_lock is used to protect the trace_types list.)
5958  iter等于分配内存并置零
5959  如果非iter
5960  ret等于负ENOMEM
5961  __trace_array_put(tr)
5962  转到:out
5965  trace_seq_init( & The below is zeroed out in pipe_read )
5966  trace等于current_trace
5968  如果非分配CPU掩码
5969  ret等于负ENOMEM
5970  转到:fail
5974  设置全部CPU信息
5976  如果trace_flags按位与TRACE_ITER_LATENCY_FMTiter_flags或等于TRACE_FILE_LAT_FMT
5980  如果 is this clock in nanoseconds? iter_flags或等于TRACE_FILE_TIME_IN_NS
5983  tr等于tr
5984  trace_buffer等于trace_buffer
5985  cpu_file等于Should be used after trace_array_get(), trace_types_lock* ensures that i_cdev was already initialized.
5986  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & mutex)
5987  needed for tty driver, and maybe others 等于iter
5989  如果pipe_openpipe_open(iter)
5992  nonseekable_open(inode, filp)
5994  ref自加
5995  out :
5996  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.
5997  返回:ret
5999  fail :
6000  kfree(iter)
6001  __trace_array_put(tr)
6002  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.
6003  返回:ret