Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace.c Create Date:2022-07-28 11:58:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:trace_event_buffer_lock_reserve

Proto:struct ring_buffer_event *trace_event_buffer_lock_reserve(struct ring_buffer **current_rb, struct trace_event_file *trace_file, int type, unsigned long len, unsigned long flags, int pc)

Type:struct ring_buffer_event

Parameter:

TypeParameterName
struct ring_buffer **current_rb
struct trace_event_file *trace_file
inttype
unsigned longlen
unsigned longflags
intpc
2577  current_rb = buffer
2579  If Not ring_buffer_time_stamp_abs( * current_rb) && * 32 bit flags: * bit 0: enabled * bit 1: enabled cmd record * bit 2: enable/disable with the soft disable bit * bit 3: soft disabled * bit 4: trigger enabled * Note: The bits must be set atomically to prevent races * from other writers. Reads of flags do & (EVENT_FILE_FL_SOFT_DISABLED | EVENT_FILE_FL_FILTERED) && (entry = Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(trace_buffered_event)) Then
2583  val = this_cpu_inc_return(trace_buffered_event_cnt)
2584  If val == 1 Then
2586  array[0] = len
2587  Return entry
2589  this_cpu_dec(trace_buffered_event_cnt)
2592  entry = __trace_buffer_lock_reserve( * current_rb, type, len, flags, pc)
2600  If Not entry && * 32 bit flags: * bit 0: enabled * bit 1: enabled cmd record * bit 2: enable/disable with the soft disable bit * bit 3: soft disabled * bit 4: trigger enabled * Note: The bits must be set atomically to prevent races * from other writers. Reads of flags do & EVENT_FILE_FL_TRIGGER_COND Then
2601  current_rb = temp_buffer
2602  entry = __trace_buffer_lock_reserve( * current_rb, type, len, flags, pc)
2605  Return entry
Caller
NameDescribe
trace_event_buffer_reserve
__kprobe_trace_funcKprobe handler
__kretprobe_trace_funcKretprobe handler
__uprobe_trace_func