函数逻辑报告 |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-27 13:01:17 |
Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:g_buffer_read_page - extract a page from the ring buffer*@buffer: buffer to extract from*@data_page: the page to use allocated from ring_buffer_alloc_read_page*@len: amount to extract*@cpu: the cpu of the buffer to extract
函数原型:int ring_buffer_read_page(struct ring_buffer *buffer, void **data_page, size_t len, int cpu, int full)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct ring_buffer * | buffer | |
void ** | data_page | |
size_t | len | |
int | cpu | |
int | full |
4703 | cpu_buffer等于buffers[cpu] |
4712 | ret等于负1 |
4721 | 如果len小于等于BUF_PAGE_HDR_SIZE则转到:out |
4724 | len减等于BUF_PAGE_HDR_SIZE |
4733 | raw_spin_lock_irqsave( & serialize readers , flags) |
4735 | reader等于rb_get_reader_page(cpu_buffer) |
4736 | 如果非reader则转到:out_unlock |
4739 | event等于rb_reader_event(cpu_buffer) |
4741 | read等于dex for next read |
4742 | commit等于rb_page_commit(reader) |
4745 | missed_events等于lost_events |
4754 | 如果read或len小于commit减read或reader_page恒等于committed pages 则 |
4756 | rpage等于Actual data page |
4758 | pos等于0 |
4761 | 如果full则转到:out_unlock |
4768 | size等于Return total length of time extend and data,* or just the event length for all other events. |
4770 | 如果len小于size则转到:out_unlock |
4774 | save_timestamp等于read_stamp |
4777 | 循环 |
4784 | size等于Return the length of the given event. Will return* the length of the time extend if the event is a* time extend. |
4785 | 内存复制( data of buffer page + pos, data of buffer page + rpos, size) |
4789 | rb_advance_reader(cpu_buffer) |
4790 | rpos等于dex for next read |
4796 | event等于rb_reader_event(cpu_buffer) |
4802 | local_set( & write committed index , pos) |
4803 | page time stamp 等于save_timestamp |
4806 | read等于0 |
4807 | 否则 |
4809 | read加等于rb_page_entries(reader) |
4810 | read_bytes加等于BUF_PAGE_SIZE |
4813 | rb_init_page(bpage) |
4814 | bpage等于Actual data page |
4815 | Actual data page 等于data_page |
4816 | local_set( & dex for next write , 0) |
4817 | local_set( & ries on this page , 0) |
4818 | dex for next read 等于0 |
4826 | 如果al end of data 则local_set( & write committed index , al end of data ) |
4831 | lost_events等于0 |
4833 | commit等于local_read( & write committed index ) |
4837 | 如果missed_events则 |
4841 | 如果BUF_PAGE_SIZE减commit大于等于missed_events的长度则 |
4842 | 内存复制( & data of buffer page [commit], & missed_events, missed_events的长度) |
4845 | commit加等于missed_events的长度 |
4853 | 如果commit小于BUF_PAGE_SIZE则memset( & data of buffer page [commit], 0, BUF_PAGE_SIZE - commit) |
4856 | out_unlock : |
4857 | raw_spin_unlock_irqrestore( & serialize readers , flags) |
4859 | out : |
4860 | 返回:ret |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |