Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:tracing_open

Proto:static int tracing_open(struct inode *inode, struct file *file)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct file *file
4351  tr = s or device private pointer
4355  ret = tracing_check_open_get_tr(tr)
4356  If ret Then Return ret
4360  If f_mode & le is open for writing && f_flags & O_TRUNC Then
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  If cpu == RING_BUFFER_ALL_CPUS Then tracing_reset_online_cpus(trace_buf)
4371  Else tracing_reset_cpu(trace_buf, cpu)
4375  If f_mode & le is open for reading Then
4376  iter = __tracing_open(inode, file, false)
4377  If IS_ERR(iter) Then ret = PTR_ERR(iter)
4379  Else if trace_flags & TRACE_ITER_LATENCY_FMT Then iter_flags |= TRACE_FILE_LAT_FMT
4383  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.
4386  Return ret