Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ftrace_dump

Proto:void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)

Type:void

Parameter:

TypeParameterName
enum ftrace_dump_modeoops_dump_mode
9060  tr = The global_trace is the descriptor that holds the top-level tracing* buffers for the live tracing.
9063  cnt = 0
9066  If atomic_inc_return( & dump_running) != 1 Then
9067  atomic_dec( & dump_running)
9068  Return
9079  racing_off - turn off tracing buffers* This function stops the tracing buffers from recording data.* It does not disable any overhead the tracers themselves may* be causing. This function simply causes all recording to* the ring buffers to fail.
9081  local_irq_save(flags)
9082  printk_nmi_direct_enter()
9085  trace_init_global_iter( & iter)
9087  for_each_tracing_cpu(cpu)
9088  atomic_inc( & disabled)
9091  old_userobj = trace_flags & TRACE_ITER_SYM_USEROBJ
9094  trace_flags &= ~TRACE_ITER_SYM_USEROBJ
9097  Case oops_dump_mode == DUMP_ALL
9098  cpu_file = RING_BUFFER_ALL_CPUS
9099  Break
9100  Case oops_dump_mode == DUMP_ORIG
9101  cpu_file = These macros fold the SMP functionality into a single CPU system()
9102  Break
9103  Case oops_dump_mode == DUMP_NONE
9104  Go to out_enable
9105  Default
9106  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
9107  cpu_file = RING_BUFFER_ALL_CPUS
9110  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
9113  If ftrace_is_dead() Then
9114  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
9115  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
9125  When Not trace_empty( & iter) cycle
9127  If Not cnt Then printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
9130  cnt++
9132  Reset the state of the trace_iterator so that it can read consumed data.* Normally, the trace_iterator is used for reading the data when it is not* consumed, and must retain state.
9133  iter_flags |= TRACE_FILE_LAT_FMT
9142  h_nmi_watchdog - restart NMI watchdog timeout.* If the architecture supports the NMI watchdog, touch_nmi_watchdog()* may be used to reset the timeout - for code which intentionally* disables interrupts for a long time. This call is stateless.
9144  trace_printk_seq( & The below is zeroed out in pipe_read )
9147  If Not cnt Then printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
9149  Else printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
9152  out_enable :
9153  trace_flags |= old_userobj
9155  for_each_tracing_cpu(cpu)
9156  atomic_dec( & disabled)
9158  atomic_dec( & dump_running)
9159  printk_nmi_direct_exit()
9160  local_irq_restore(flags)
Caller
NameDescribe
trace_panic_handler
trace_die_handler