函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:g_buffer_lock_reserve - reserve a part of the buffer*@buffer: the ring buffer to reserve from*@length: the length of the data to reserve (excluding event header)* Returns a reserved event on the ring buffer to copy directly to

函数原型:struct ring_buffer_event *ring_buffer_lock_reserve(struct ring_buffer *buffer, unsigned long length)

返回类型:struct ring_buffer_event

参数:

类型参数名称
struct ring_buffer *buffer
unsigned longlength
2971  preempt_disable_notrace()
2973  如果此条件成立可能性小(为编译器优化)(atomic_read( & record_disabled))则转到:out
2976  cpu等于These macros fold the SMP functionality into a single CPU system()
2978  如果此条件成立可能性小(为编译器优化)(!测试CPU信息)则转到:out
2981  cpu_buffer等于buffers[cpu]
2983  如果此条件成立可能性小(为编译器优化)(atomic_read( & record_disabled))则转到:out
2986  如果此条件成立可能性小(为编译器优化)(length > Max payload is BUF_PAGE_SIZE - header (8bytes) )则转到:out
2989  如果此条件成立可能性小(为编译器优化)(The lock and unlock are done within a preempt disable section)则转到:out
2992  event等于rb_reserve_next_event(buffer, cpu_buffer, length)
2993  如果非event则转到:out_unlock
2996  返回:event
2998  out_unlock :
2999  trace_recursive_unlock(cpu_buffer)
3000  out :
3001  preempt_enable_notrace()
3002  返回:NULL
调用者
名称描述
ring_buffer_producer
__trace_buffer_lock_reserve