函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:tracing_splice_read_pipe

函数原型:static ssize_t tracing_splice_read_pipe(struct file *filp, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags)

返回类型:ssize_t

参数:

类型参数名称
struct file *filp
loff_t *ppos
struct pipe_inode_info *pipe
size_tlen
unsigned intflags
6260  iter等于 needed for tty driver, and maybe others
6261  struct splice_pipe_desc spd = {page map = pages_def, pages[] may not be contig = partial_def, umber of populated pages in map = 0, pages[] & partial[] arrays size = PIPE_DEF_BUFFERS, ps associated with output pipe = & tracing_pipe_buf_ops, spd_release = tracing_spd_release_pipe, }
6273  如果r dynamic pipe sizing则返回:负ENOMEM
6276  mutex_lock( & mutex)
6278  如果splice_read
6279  ret等于splice_read(iter, filp, ppos, pipe, len, flags)
6281  如果ret则转到:out_err
6285  ret等于Must be called with iter->mutex held.
6286  如果ret小于等于0则转到:out_err
6289  如果非ent且非Find the next real entry, and increment the iterator to the next entry
6290  ret等于负EFAULT
6291  转到:out_err
6294  trace_event_read_lock()
6295  trace_access_lock(cpu_file)
6298 i小于pages[] & partial[] arrays size rem循环
6299  page map [i]等于alloc_page(GFP_KERNEL)
6300  如果非page map [i]则退出
6303  rem等于tracing_fill_pipe_page(rem, iter)
6306  ret等于TODO add a seq_buf_to_buffer()
6309  如果ret小于0则
6311  退出
6313  offset等于0
6314  len等于race_seq_used - amount of actual data written to buffer*@s: trace sequence descriptor* Returns the amount of data written to the buffer.* IMPORTANT!* Use this instead of @s->seq.len if you need to pass the amount
6316  trace_seq_init( & The below is zeroed out in pipe_read )
6319  trace_access_unlock(cpu_file)
6320  trace_event_read_unlock()
6321  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.
6323  umber of populated pages in map 等于i
6325  如果iret等于splice_to_pipe - fill passed data into a pipe*@pipe: pipe to fill*@spd: data to fill* Description:*@spd contains a map of pages and len/offset tuples, along with* the struct pipe_buf_operations associated with these pages. This
6327  否则ret等于0
6329  out :
6330  splice_shrink_spd( & spd)
6331  返回:ret
6333  out_err :
6334  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.
6335  转到:out