函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:trace_event_buffer_lock_reserve

函数原型: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)

返回类型:struct ring_buffer_event

参数:

类型参数名称
struct ring_buffer **current_rb
struct trace_event_file *trace_file
inttype
unsigned longlen
unsigned longflags
intpc
2577  current_rb等于buffer
2579  如果非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)则
2583  val等于this_cpu_inc_return(trace_buffered_event_cnt)
2584  如果val恒等于1则
2586  array[0]等于len
2587  返回:entry
2589  this_cpu_dec(trace_buffered_event_cnt)
2592  entry等于__trace_buffer_lock_reserve( * current_rb, type, len, flags, pc)
2600  如果非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
2601  current_rb等于temp_buffer
2602  entry等于__trace_buffer_lock_reserve( * current_rb, type, len, flags, pc)
2605  返回:entry
调用者
名称描述
trace_event_buffer_reserve
__kprobe_trace_funcKprobe handler
__kretprobe_trace_funcKretprobe handler
__uprobe_trace_func