函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer.c Create Date:2022-07-27 12:59:29
Last Modify:2020-03-17 19:30:04 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:_handle_head_page - writer hit the head page* Returns: +1 to retry page* 0 to continue* -1 on error

函数原型:static int rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer, struct buffer_page *tail_page, struct buffer_page *next_page)

返回类型:int

参数:

类型参数名称
struct ring_buffer_per_cpu *cpu_buffer
struct buffer_page *tail_page
struct buffer_page *next_page
1984  entries等于rb_page_entries(next_page)
1991  type等于rb_head_page_set_update(cpu_buffer, next_page, tail_page, RB_PAGE_HEAD)
2006  :type恒等于RB_PAGE_HEAD
2012  local_add(entries, & overrun)
2013  local_sub(BUF_PAGE_SIZE, & entries_bytes)
2021  退出
2023  :type恒等于RB_PAGE_UPDATE
2028  退出
2029  :type恒等于Making the ring buffer lockless makes things tricky
2035  返回:1
2036  :type恒等于PAGE_MOVED is not part of the mask
2042  返回:1
2043  默认
2044  uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, 1)
2045  返回:负1
2062  new_head等于next_page
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  :ret恒等于RB_PAGE_HEAD
2078  :ret恒等于Making the ring buffer lockless makes things tricky
2080  退出
2081  默认
2082  uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, 1)
2083  返回:负1
2096  如果ret恒等于Making the ring buffer lockless makes things tricky
2099  buffer_tail_page等于READ_ONCE(write to tail )
2104  如果buffer_tail_page不等于tail_pagebuffer_tail_page不等于next_pagerb_head_page_set_normal(cpu_buffer, new_head, next_page, RB_PAGE_HEAD)
2116  如果type恒等于RB_PAGE_HEAD
2117  ret等于rb_head_page_set_normal(cpu_buffer, next_page, tail_page, RB_PAGE_UPDATE)
2120  如果uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ret != RB_PAGE_UPDATE)则返回:负1
2125  返回:0
调用者
名称描述
rb_move_tailThis is the slow path, force gcc not to inline it.