函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:tracing_open

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

返回类型:int

参数:

类型参数名称
struct inode *inode
struct file *file
4351  tr等于s or device private pointer
4355  ret等于tracing_check_open_get_tr(tr)
4356  如果ret则返回:ret
4360  如果f_mode按位与le is open for writing f_flags按位与O_TRUNC
4361  cpu等于Should be used after trace_array_get(), trace_types_lock* ensures that i_cdev was already initialized.
4362  trace_buf等于trace_buffer
4369  如果cpu恒等于RING_BUFFER_ALL_CPUStracing_reset_online_cpus(trace_buf)
4371  否则tracing_reset_cpu(trace_buf, cpu)
4375  如果f_mode按位与le is open for reading
4376  iter等于__tracing_open(inode, file, false)
4377  如果是错误ret等于错误
4379  否则如果trace_flags按位与TRACE_ITER_LATENCY_FMTiter_flags或等于TRACE_FILE_LAT_FMT
4383  如果ret小于0则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.
4386  返回:ret