Function report |
Source Code:kernel\trace\trace.c |
Create Date:2022-07-28 12:02:52 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:tracing_buffers_splice_read
Proto:static ssize_t tracing_buffers_splice_read(struct file *file, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file | |
| loff_t * | ppos | |
| struct pipe_inode_info * | pipe | |
| size_t | len | |
| unsigned int | flags |
| 7512 | ret = 0 |
| 7528 | If r dynamic pipe sizing Then Return -ENOMEM |
| 7531 | again : |
| 7532 | trace_access_lock(cpu_file) |
| 7533 | entries = 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. |
| 7535 | When i < pages[] & partial[] arrays size && len && entries cycle |
| 7539 | ref = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 7540 | If Not ref Then |
| 7547 | page = g_buffer_alloc_read_page - allocate a page to read from buffer*@buffer: the buffer to allocate for |
| 7558 | If r < 0 Then |
| 7562 | Break |
| 7565 | page = virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(page) |
| 7569 | offset = 0 |
| 7571 | umber of populated pages in map ++ |
| 7577 | trace_access_unlock(cpu_file) |
| 7578 | umber of populated pages in map = i |
| 7581 | If Not umber of populated pages in map Then |
| 7586 | If f_flags & O_NONBLOCK || flags & don't block on the pipe splicing (but Then Go to out |
| 7589 | ret = wait_on_pipe(iter, buffer_percent) |
| 7593 | Go to again |
| 7597 | out : |
| 7598 | splice_shrink_spd( & spd) |
| 7600 | Return ret |
| 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 |