函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:g_buffer_alloc_read_page - allocate a page to read from buffer*@buffer: the buffer to allocate for

函数原型:void *ring_buffer_alloc_read_page(struct ring_buffer *buffer, int cpu)

返回类型:void

参数:

类型参数名称
struct ring_buffer *buffer
intcpu
4596  struct buffer_data_page * bpage = NULL
4600  如果非测试CPU信息则返回:错误号
4603  cpu_buffer等于buffers[cpu]
4604  local_irq_save(flags)
4605  r sched/core.c and kernel_lock.c: ( & lock)
4607  如果free_page
4608  bpage等于free_page
4609  free_page = NULL
4612  arch_spin_unlock( & lock)
4613  local_irq_restore(flags)
4615  如果bpage则转到:out
4618  page等于Allocate pages, preferring the node given as nid. When nid == NUMA_NO_NODE,* prefer the current CPU's closest node. Otherwise node must be valid and* online.
4620  如果非page则返回:错误号
4623  bpage等于page_address(page)
4625  out :
4626  rb_init_page(bpage)
4628  返回:bpage
调用者
名称描述
read_page
tracing_buffers_read
tracing_buffers_splice_read