函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__rb_reserve_next

函数原型:static struct ring_buffer_event *__rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, struct rb_event_info *info)

返回类型:struct ring_buffer_event

参数:

类型参数名称
struct ring_buffer_per_cpu *cpu_buffer
struct rb_event_info *info
2828  如果此条件成立可能性小(为编译器优化)(add_timestamp)则length加等于RB_LEN_TIME_EXTEND
2832  tail_page等于tail_page等于READ_ONCE(write to tail )
2833  write等于返回和
2836  write与等于The buffer page counters, write and entries, must be reset* atomically when crossing page boundaries. To synchronize this* update, two counters are inserted into the number. One is* the actual counter for the write position or count on the page.
2837  tail等于writelength
2843  如果非tail且非ring_buffer_time_stamp_abs(buffer)则delta等于0
2847  如果此条件成立可能性小(为编译器优化)(write > BUF_PAGE_SIZE)则返回:This is the slow path, force gcc not to inline it.
2852  event等于__rb_page_index(tail_page, tail)
2853  _update_event - update event type and data*@event: the event to update*@type: the type of event*@length: the size of the event field in the ring buffer* Update the type and data fields of the event
2855  local_inc( & ries on this page )
2861  如果非tail page time stamp 等于ts
2865  local_add(length, & entries_bytes)
2867  返回:event
调用者
名称描述
rb_reserve_next_event