Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__ftrace_trace_stack

Proto:static void __ftrace_trace_stack(struct ring_buffer *buffer, unsigned long flags, int skip, int pc, struct pt_regs *regs)

Type:void

Parameter:

TypeParameterName
struct ring_buffer *buffer
unsigned longflags
intskip
intpc
struct pt_regs *regs
2892  call = event_kernel_stack
2904  If Not regs Then skip++
2914  preempt_disable_notrace()
2916  stackidx = __this_cpu_inc_return(ftrace_stack_reserve) - 1
2919  If WARN_ON_ONCE(stackidx > Allow 4 levels of nesting: normal, softirq, irq, NMI ) Then Go to out
2929  The "volatile" is due to gcc bugs ()
2931  fstack = this_cpu_ptr(stacks) + stackidx
2932  size = ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(calls)
2934  If regs Then
2935  nr_entries = stack_trace_save_regs - Save a stack trace based on pt_regs into a storage array*@regs: Pointer to pt_regs to examine*@store: Pointer to storage array*@size: Size of the storage array*@skipnr: Number of entries to skip at the start of the stack trace
2937  Else
2938  nr_entries = stack_trace_save - Save a stack trace into a storage array*@store: Pointer to storage array*@size: Size of the storage array*@skipnr: Number of entries to skip at the start of the stack trace* Return: Number of trace entries stored.
2941  size = nr_entries * sizeof(unsignedlong)
2942  event = __trace_buffer_lock_reserve(buffer, TRACE_STACK, size of entry + size, flags, pc)
2944  If Not event Then Go to out
2946  entry = g_buffer_event_data - return the data of the event*@event: the event to get the data from
2948  No 3D Now!( & caller, calls, size)
2949  size = nr_entries
2951  If Not call_filter_check_discard(call, entry, buffer, event) Then __buffer_unlock_commit(buffer, event)
2954  out :
2956  The "volatile" is due to gcc bugs ()
2957  __this_cpu_dec(ftrace_stack_reserve)
2958  preempt_enable_notrace()
Caller
NameDescribe
ftrace_trace_stack
__trace_stack
trace_dump_stackrace_dump_stack - record a stack back trace in the trace buffer*@skip: Number of functions to skip (helper handlers)