linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ways to debug Filesystem code.
@ 2013-08-05  2:38 jon ernst
  2013-08-05 13:46 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: jon ernst @ 2013-08-05  2:38 UTC (permalink / raw)
  To: linux-ext4

Hi list,

Sorry for the spam. Just curious what are the ways/tools filesystem
experts using for debugging.
I sometimes use Ftrace, Kgtp and printk. Seldomly use virtualbox with kgdb.
But each way has it short-comes.
Just want to get some enlightenment about debugging skills, especially
from you Filesystem experts.

Thank you!
Best,
Jon

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ways to debug Filesystem code.
  2013-08-05  2:38 ways to debug Filesystem code jon ernst
@ 2013-08-05 13:46 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2013-08-05 13:46 UTC (permalink / raw)
  To: jon ernst; +Cc: linux-ext4

On Mon, Aug 05, 2013 at 02:38:53AM +0000, jon ernst wrote:
> Hi list,
> 
> Sorry for the spam. Just curious what are the ways/tools filesystem
> experts using for debugging.
> I sometimes use Ftrace, Kgtp and printk. Seldomly use virtualbox with kgdb.
> But each way has it short-comes.
> Just want to get some enlightenment about debugging skills, especially
> from you Filesystem experts.

Those are the basic tools.  Also useful to consider is compiling with
CONFIG_LOCKDEP, and with CONFIG_DEBUG_INFO or
CONFIG_DEBUG_INFO_REDUCED, and then using a tool such as addr2line[1].

[1] https://plus.google.com/117091380454742934025/posts/h8H9z4EopkS

Other tools include using xfstests run automatically from kvm and
having automated tools to parse the output of xfstests so you can see
test failures much more easily[2].

[2] https://git.kernel.org/cgit/fs/ext2/xfstests-bld.git/

And then when you get a test failure, knowing how to run the test from
xfstests by hand, with a fixed random number generator seed for better
reproducibility.   And of course, knowing how to use git bisect.

Beyond that, a huge amount of it is in experience in using the tools.
After all, there isn't that much difference the tools used by between
a master carpenter and a beginning journeyman.  They use the hammer,
screwdriver, saws, planes, etc.  The trick is in knowing how to best
use the tools.  :-)

Cheers,

					- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-05 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05  2:38 ways to debug Filesystem code jon ernst
2013-08-05 13:46 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).