Function report |
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 activity | Download SCCT | Chinese |
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:
| Type | Parameter | Name |
|---|---|---|
| struct file * | filp | |
| char __user * | ubuf | |
| size_t | count | |
| 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 |
| 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. |
| 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 |
| 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. |
| 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.) |
| 7650 | t = ns2usecs(ring_buffer_time_stamp(buffer, cpu)) |
| 7653 | Else |
| 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 |
| 7673 | Return count |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |