LWN.net Logo

Debugging the kernel using Ftrace - part 1

Debugging the kernel using Ftrace - part 1

Posted Dec 14, 2009 5:09 UTC (Mon) by gdt (subscriber, #6284)
Parent article: Debugging the kernel using Ftrace - part 1

Typically, that is mounted at /sys/kernel/debug. For easier accessibility, I usually create a /debug directory and mount it there.

Please don't do this sort of weirdness in tutorials, unnecessarily changing a perfectly usable default just gets in the way of your [otherwise very fine] exposition.

That goes double for reviewers of Linux distributions. I've lost count of the number of reviews that don't review the out-of-the-box distribution, but rather review some author's preferences applied to that distribution.


(Log in to post comments)

Debugging the kernel using Ftrace - part 1

Posted Dec 14, 2009 15:14 UTC (Mon) by nevets (subscriber, #11875) [Link]

BTW, I noticed that if DEBUGFS is configured, the /sys/kernel/debug directory automatically is created. But why isn't the debugfs automatically mounted there? I mean, the /sys file system is already a pseudo system, why not have it automatically mount debugfs?

If this was the case, I would not need to create a "find_debugfs()" function to search through mounts to find that directory in my tools.

I do pick /debug because I usually do not do my tracing in the debugfs/tracing directory. And it is much easier to type /debug than to type /sys/kernel/debug (even with tab completion). I could also ln -s to /sys/kernel/debug, but if I have to do that, why not just mount it at /debug.

Again, if /sys/kernel/debug automatically mounted debugfs, then a link would be reasonable.

Debugging the kernel using Ftrace - part 1

Posted Dec 17, 2009 5:59 UTC (Thu) by abadidea (guest, #62082) [Link]

gdt: bikeshedding much? :)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds