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

Name:The lock and unlock are done within a preempt disable section

Proto:static __always_inline int trace_recursive_lock(struct ring_buffer_per_cpu *cpu_buffer)

Type:int

Parameter:

TypeParameterName
struct ring_buffer_per_cpu *cpu_buffer
2694  val = current_context
2695  pc = We mask the PREEMPT_NEED_RESCHED bit so as not to confuse all current users* that think a non-zero value indicates we cannot preempt.
2698  If Not (pc & ( NMI_MASK | HARDIRQ_MASK | SOFTIRQ_OFFSET)) Then bit = RB_CTX_NORMAL
2700  Else bit = If If pc & NMI_MASK Then RB_CTX_NMI Else pc & HARDIRQ_MASK Then RB_CTX_IRQ Else RB_CTX_SOFTIRQ
2704  If Value for the false possibility is greater at compile time(val & (1 << (bit + nest))) Then Return 1
2707  val |= 1 << bit + nest
2708  current_context = val
2710  Return 0
Caller
NameDescribe
ring_buffer_lock_reserveg_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
ring_buffer_writeg_buffer_write - write data to the buffer without reserving*@buffer: The ring buffer to write to