函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kdb_ftdump - Dump the ftrace log buffer

函数原型:static int kdb_ftdump(int argc, const char **argv)

返回类型:int

参数:

类型参数名称
intargc
const char **argv
97  skip_entries等于0
103  如果argc大于2则返回:KDB_ARGCOUNT
106  如果argc
107  skip_entries等于simple_strtol(argv[1], & cp, 0)
108  如果cpskip_entries等于0
112  如果argc恒等于2则
113  cpu_file等于simple_strtol(argv[2], & cp, 0)
114  如果cpcpu_file大于等于CPU数量cpu_file小于0或非cpu_online(cpu_file)则返回:KDB_BADINT
117  否则
118  cpu_file等于RING_BUFFER_ALL_CPUS
121  kdb_trap_printk自加
123  trace_init_global_iter( & iter)
124  buffer_iter等于buffer_iter
126  for_each_tracing_cpu(cpu)
127  atomic_inc( & disabled)
131  如果skip_entries小于0则
132  如果cpu_file恒等于RING_BUFFER_ALL_CPUScnt等于trace_total_entries(NULL)
134  否则cnt等于trace_total_entries_cpu(NULL, cpu_file)
136  skip_entries等于两数取大(cnt + skip_entries, 0)
139  ftrace_dump_buf(skip_entries, cpu_file)
141  for_each_tracing_cpu(cpu)
142  atomic_dec( & disabled)
145  kdb_trap_printk自减
147  返回:0