Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ftrace_dump_buf

Proto:static void ftrace_dump_buf(int skip_entries, long cpu_file)

Type:void

Parameter:

TypeParameterName
intskip_entries
longcpu_file
27  cnt = 0
29  tr = tr
31  old_userobj = trace_flags
34  trace_flags &= ~TRACE_ITER_SYM_USEROBJ
36  kdb_printf("Dumping ftrace buffer:\n")
37  If skip_entries Then kdb_printf("(skipping %d entries)\n", skip_entries)
40  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.
41  iter_flags |= TRACE_FILE_LAT_FMT
43  If cpu_file == RING_BUFFER_ALL_CPUS Then
51  Else
52  cpu_file = cpu_file
53  buffer_iter[cpu_file] = g_buffer_read_prepare - Prepare for a non consuming read of the buffer*@buffer: The ring buffer to read from*@cpu: The cpu buffer to iterate over*@flags: gfp flags to use for memory allocation* This performs the initial preparations necessary to iterate
56  g_buffer_read_start - start a non consuming read of the buffer*@iter: The iterator returned by ring_buffer_read_prepare* This finalizes the startup of an iteration through the buffer
57  tracing_iter_reset( & iter, cpu_file)
60  When Find the next real entry, and increment the iterator to the next entry cycle
61  If Not cnt Then kdb_printf("---------------------------------\n")
63  cnt++
65  If Not skip_entries Then
68  Else
69  skip_entries--
72  If KDB_FLAG(CMD_INTERRUPT) Then Go to out
76  If Not cnt Then kdb_printf(" (ftrace buffer empty)\n")
78  Else kdb_printf("---------------------------------\n")
81  out :
82  trace_flags = old_userobj
84  for_each_tracing_cpu(cpu)
85  If buffer_iter[cpu] Then
87  buffer_iter[cpu] = NULL
Caller
NameDescribe
kdb_ftdumpkdb_ftdump - Dump the ftrace log buffer