函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ftrace_dump_buf

函数原型:static void ftrace_dump_buf(int skip_entries, long cpu_file)

返回类型:void

参数:

类型参数名称
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  如果skip_entrieskdb_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  如果cpu_file恒等于RING_BUFFER_ALL_CPUS
51  否则
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 Find the next real entry, and increment the iterator to the next entry 循环
61  如果非cntkdb_printf("---------------------------------\n")
63  cnt自加
65  如果非skip_entries
68  否则
69  skip_entries自减
72  如果KDB_FLAG(CMD_INTERRUPT)则转到:out
76  如果非cntkdb_printf(" (ftrace buffer empty)\n")
78  否则kdb_printf("---------------------------------\n")
81  out :
82  trace_flags等于old_userobj
84  for_each_tracing_cpu(cpu)
85  如果buffer_iter[cpu]则
87  buffer_iter[cpu] = NULL
调用者
名称描述
kdb_ftdumpkdb_ftdump - Dump the ftrace log buffer