函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kmsg_dump - dump kernel log to kernel message dumpers.*@reason: the reason (oops, panic etc) for dumping* Call each of the registered dumper's dump() callback, which can* retrieve the kmsg records with kmsg_dump_get_line() or* kmsg_dump_get_buffer().

函数原型:void kmsg_dump(enum kmsg_dump_reason reason)

返回类型:void

参数:

类型参数名称
enum kmsg_dump_reasonreason
3117  如果reason大于KMSG_DUMP_OOPS且非always_kmsg_dump则返回
3120  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
3122  如果max_reasonreason大于max_reason则继续下一循环
3126  active = true
3128  logbuf_lock_irqsave(flags)
3129  cur_seq等于he next printk record to read after the last 'clear' command
3130  private state of the kmsg iterator 等于clear_idx
3131  next_seq等于dex and sequence number of the next record to store in the buffer
3132  next_idx等于log_next_idx
3133  logbuf_unlock_irqrestore(flags)
3136  dump(dumper, reason)
3139  active = false
3141  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
调用者
名称描述
oops_exitCalled when the architecture exits its oops handler, after printing* everything.
emergency_restartmergency_restart - reboot the system* Without shutting down any hardware or taking any locks* reboot the system. This is called when we know we are in* trouble so this is our best effort to reboot. This is* safe to call in interrupt context.
kernel_restartkernel_restart - reboot the system*@cmd: pointer to buffer containing command to execute for restart* or %NULL* Shutdown everything and perform a clean reboot.* This is not safe to call in interrupt context.
kernel_haltkernel_halt - halt the system* Shutdown everything and perform a clean system halt.
kernel_power_offkernel_power_off - power_off the system* Shutdown everything and perform a clean system power_off.
panicpanic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.