函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:tracing_stats_read

函数原型:static ssize_t tracing_stats_read(struct file *filp, char __user *ubuf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *filp
char __user *ubuf
size_tcount
loff_t *ppos
7616  inode等于file_inode(filp)
7617  tr等于s or device private pointer
7618  trace_buf等于trace_buffer
7619  cpu等于Should be used after trace_array_get(), trace_types_lock* ensures that i_cdev was already initialized.
7625  s等于开辟内存
7626  如果非s则返回:负ENOMEM
7629  trace_seq_init(s)
7631  cnt等于g_buffer_entries_cpu - get the number of entries in a cpu buffer*@buffer: The ring buffer*@cpu: The per CPU buffer to get the entries from.
7632  Currently only defined when tracing is enabled.
7634  cnt等于g_buffer_overrun_cpu - get the number of overruns caused by the ring* buffer wrapping around (only if RB_FL_OVERWRITE is on).*@buffer: The ring buffer*@cpu: The per CPU buffer to get the number of overruns from
7635  Currently only defined when tracing is enabled.
7637  cnt等于g_buffer_commit_overrun_cpu - get the number of overruns caused by* commits failing due to the buffer wrapping around while there are uncommitted* events, such as during an interrupt storm
7638  Currently only defined when tracing is enabled.
7640  cnt等于g_buffer_bytes_cpu - get the number of bytes consumed in a cpu buffer*@buffer: The ring buffer*@cpu: The per CPU buffer to read from.
7641  Currently only defined when tracing is enabled.
7643  如果 is this clock in nanoseconds?
7645  t等于ns2usecs(g_buffer_oldest_event_ts - get the oldest event timestamp from the buffer*@buffer: The ring buffer*@cpu: The per CPU buffer to read from.)
7646  usec_rem等于do_div() is NOT a C function(t, USEC_PER_SEC)
7647  Currently only defined when tracing is enabled.
7650  t等于ns2usecs(ring_buffer_time_stamp(buffer, cpu))
7651  usec_rem等于do_div() is NOT a C function(t, USEC_PER_SEC)
7652  Currently only defined when tracing is enabled.
7653  否则
7655  Currently only defined when tracing is enabled.
7658  Currently only defined when tracing is enabled.
7662  cnt等于g_buffer_dropped_events_cpu - get the number of dropped events caused by* the ring buffer filling up (only if RB_FL_OVERWRITE is off).*@buffer: The ring buffer*@cpu: The per CPU buffer to get the number of overruns from
7663  Currently only defined when tracing is enabled.
7665  cnt等于g_buffer_read_events_cpu - get the number of events successfully read*@buffer: The ring buffer*@cpu: The per CPU buffer to get the number of events read
7666  Currently only defined when tracing is enabled.
7668  count等于simple_read_from_buffer(ubuf, count, ppos, buffer, 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)
7671  kfree(s)
7673  返回:count