Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:tracing_stats_read

Proto:static ssize_t tracing_stats_read(struct file *filp, char __user *ubuf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
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 = Allocation memory
7626  If Not s Then Return -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  If is this clock in nanoseconds? Then
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  Else
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  Return count