Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer.c Create Date:2022-07-28 11:54:33
Last Modify:2020-03-17 19:30:04 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__rb_reserve_next

Proto:static struct ring_buffer_event *__rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, struct rb_event_info *info)

Type:struct ring_buffer_event

Parameter:

TypeParameterName
struct ring_buffer_per_cpu *cpu_buffer
struct rb_event_info *info
2828  If Value for the false possibility is greater at compile time(add_timestamp) Then length += RB_LEN_TIME_EXTEND
2832  tail_page = tail_page = READ_ONCE(write to tail )
2833  write = local_add_return - add and return*@i: integer value to add*@l: pointer to type local_t* Atomically adds @i to @l and returns @i + @l
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 = write - length
2843  If Not tail && Not ring_buffer_time_stamp_abs(buffer) Then delta = 0
2847  If Value for the false possibility is greater at compile time(write > BUF_PAGE_SIZE) Then Return 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  If Not tail Then page time stamp = ts
2865  local_add(length, & entries_bytes)
2867  Return event
Caller
NameDescribe
rb_reserve_next_event