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:55
Last Modify:2020-03-17 19:30:04 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:g_buffer_entries - get the number of entries in a buffer*@buffer: The ring buffer* Returns the total number of entries in the ring buffer* (all CPU entries)

Proto:unsigned long ring_buffer_entries(struct ring_buffer *buffer)

Type:unsigned long

Parameter:

TypeParameterName
struct ring_buffer *buffer
3508  entries = 0
3512  for_each_buffer_cpu(buffer, cpu)
3513  cpu_buffer = buffers[cpu]
3514  entries += The total entries in the ring buffer is the running counter* of entries entered into the ring buffer, minus the sum of* the entries read from the ring buffer and the number of* entries that were overwritten.
3517  Return entries
Caller
NameDescribe
ring_buffer_producer