//pr_debug 的定义在文件 include/linux/printk.h/* If you are writing a driver, please use dev_dbg instead */#ifdefined(CONFIG_DYNAMIC_DEBUG)#include<linux/dynamic_debug.h>/* dynamic_pr_debug() uses pr_fmt() interna
对于开启 CONFIG_DYNAMIC_DEBUG 的内核,不管是在启动阶段还是在编译阶段通过 -DDEBUG 开启的日志,运行时都可以通过写 /proc/dynamic_debug/control 文件关闭 log. 如何使能 Dynamic Debug 通过打开下面的开关使能 Dynamic Debug功能。 CONFIG_DYNAMIC_DEBUG=y # build catalog, enables CORE CONFIG_DYNAMIC_DEBUG_CORE...
那如果不开启CONFIG_DYNAMIC_DEBUG,将不会产生/sys/kernel/debug/dynamic_debug目录, 是不能进行动态打印的。 1.2.1 开启dynamic debug echo"module xxx_mipi_rx +p"> /sys/kernel/debug/dynamic_debug/control echo"file xxx_vip_cif.c +p">/sys/kernel/debug/dynamic_debug/control 这两种方式都是开dynamic...
"Dynamic debug is designed to allow you to dynamically enable/disable kernel code to obtain additional kernel information. Currently, ifCONFIG_DYNAMIC_DEBUGis set, allpr_debug()/dev_dbg()calls can be dynamically enabled per-callsite." extracted from theLinuxkernel documentation[1]. The relateddeb...
printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##__VA_ARGS__) #else #define pr_debug(fmt, ...) \ no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##__VA_ARGS__) #endif 另外还有这个 kernel-4.4/include/linux/netdevice.h #if defined(CONFIG_DYNAMIC_DEBUG) ...
menuconfig选上CONFIG_DEBUG_FS、CONFIG_DYNAMIC_DEBUG 1. 小机端 1. echo 8 > /proc/sys/kernel/printk 调整printk打印等级为7以上 2. cat /sys/kernel/debug/dynamic_debug/control | grep bluetooth 查看目前能控制的打印 3. echo 'file hci_core.c +p' > /sys/kernel/debug/dynamic_debug/control 指...
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) #elif defined(CONFIG_DYNAMIC_DEBUG) /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ #define pr_debug(fmt, ...) \ dynamic_pr_debug(fmt, ##__VA_ARGS__) ...
Original file line numberDiff line numberDiff line change Expand Up@@ -632,6 +632,7 @@ CONFIG_CRYPTO_SHA512_SSSE3=y CONFIG_CRC_CCITT=y CONFIG_CRC8=y CONFIG_XZ_DEC=y CONFIG_SWIOTLB_DYNAMIC=y CONFIG_DMA_CMA=y CONFIG_PRINTK_TIME=y CONFIG_DYNAMIC_DEBUG_CORE=y Expand Down...
pr_debug(fmt, ##args) ... Procedure: Make sure CONFIG_DYNAMIC_DEBUG=y is set into corresponding target defconfig file. First, please copy the following script provided at the end of this solution in between the marker <<<START OF FILE>> and <<<END OF FILE>>> and create a Windows...
tl;博士我想使用Linux“动态调试”,但是没有找到路径/sys/kernel/debug/dynamic_debug/。我想使用Linux的“动态调试”功能来启用特定内核模块(wireguard)的调试消息。要启用内核模块内核调试消息,需要编写指令来文件/sys/kernel/debug/dynamic_debug/control, echo mod ...