以下摘自维基百科:
debugfs is a simple to use RAM-based file system specially designed for debugging purposes. It exists as a simple way for kernel developers to make information available to user space. Unlike /proc, which is only meant for information about a process, or sysfs, which has strict one-value-per-file rules, debugfs has no rules at all. Developers can put any information they want there.
debugfs
是一个用于调试目的,简单的,基于内存的文件系统。kernel
的信息可以输出到debugfs
中,这样方便user space
程序查看和使用。
为了使用debugfs
功能,编译kernel
时需要把CONFIG_DEBUG_FS
置成yes
。
典型的挂载debugfs
文件系统命令:
mount -t debugfs none /sys/kernel/debug
由于没有具体设备,所以设备的位置使用了none
(参考这个帖子)