Function report |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-28 11:54:05 |
Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:_handle_head_page - writer hit the head page* Returns: +1 to retry page* 0 to continue* -1 on error
Proto:static int rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer, struct buffer_page *tail_page, struct buffer_page *next_page)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct ring_buffer_per_cpu * | cpu_buffer | |
struct buffer_page * | tail_page | |
struct buffer_page * | next_page |
1984 | entries = rb_page_entries(next_page) |
2006 | Case type == RB_PAGE_HEAD |
2023 | Case type == RB_PAGE_UPDATE |
2028 | Break |
2029 | Case type == Making the ring buffer lockless makes things tricky |
2035 | Return 1 |
2036 | Case type == PAGE_MOVED is not part of the mask |
2042 | Return 1 |
2043 | Default |
2045 | Return -1 |
2063 | rb_inc_page(cpu_buffer, & new_head) |
2065 | ret = rb_head_page_set_head(cpu_buffer, new_head, next_page, Making the ring buffer lockless makes things tricky) |
2077 | Case ret == RB_PAGE_HEAD |
2078 | Case ret == Making the ring buffer lockless makes things tricky |
2080 | Break |
2081 | Default |
2083 | Return -1 |
2096 | If ret == Making the ring buffer lockless makes things tricky Then |
2099 | buffer_tail_page = READ_ONCE(write to tail ) |
2104 | If buffer_tail_page != tail_page && buffer_tail_page != next_page Then rb_head_page_set_normal(cpu_buffer, new_head, next_page, RB_PAGE_HEAD) |
2116 | If type == RB_PAGE_HEAD Then |
2120 | If uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ret != RB_PAGE_UPDATE) Then Return -1 |
2125 | Return 0 |
Name | Describe |
---|---|
rb_move_tail | This is the slow path, force gcc not to inline it. |
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 |