Re: [RFC PATCH 25/26] UBIFS: add debugging stuff

From: Pekka Enberg
Date: Tue Apr 01 2008 - 05:00:50 EST


Hi Artem,

On Tue, Apr 1, 2008 at 11:32 AM, Artem Bityutskiy
<Artem.Bityutskiy@xxxxxxxxx> wrote:
> I am not sure what you mean. I would not want to delve into a general
> discussion of the debugging stuff. I would better talk about specific
> things. I'll just point you examples of debugging stuff in the kernel
> in other subsystems which exists and does not hurt anyone. And I believe
> it is helpful. It is compiled out by default and is enable when it is
> needed to hunt a bug.
>
> fs/ext2: ea_idebug(), EXT2FS_DEBUG
> fs/xfs: #ifdef DEBUG, XFS_LOUD_RECOVERY and so on
> fs/ocfs2: OCFS2_DEBUG_FS
> fs/jfs: CONFIG_JFS_DEBUG, assert(), etc
> fs: DEBUG_EPOLL, #ifdef DEBUG
> fs/jbd2: assert_spin_locked(), CONFIG_JBD2_DEBUG, etc
> mm: CONFIG_SLUB_DEBUG, SLABDEBUG, CONFIG_DEBUG_VM, and so on

But they're totally different kind of thing! They're not for disabling
hundreds of debug-only printks sprinkled around the kernel. Instead,
they let you disable well-defined debugging checks for kernel speed
and/or size optimizations. And btw, CONFIG_SLUB_DEBUG is only a kernel
size optimization for CONFIG_EMBEDDED. The SLUB debugging code can be
turned on and off at run-time.

Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/