From: "ext Kanigeri, Hari" <h-kanigeri2@xxxxxx> Subject: RE: [PATCH 1/1] DSPBRIDGE: expose DSP_TRACEBUF as kernel config option Date: Sat, 25 Jul 2009 02:43:41 +0200 > Hiroshi, > > > The problem here is that now all TRACEBUF code is always compiled in > > in spite of setting "DEBUG". It doesn't print anything, but just > > wastes some memory > > That's not true. DSP_TRACEBUF is used to print the traces from DSP. This is used by Socket node developers to print their traces from DSP to console. > If you enable DT=1 GT trace, then you get all the prints from DSP, which is extremely useful for DSP Developers. I understand that DSP_TRACEBUF is useful. But now DSP_TRACEBUF is always complied in and it cannot print anything without defining GT_TRACE, IOW, without defining CONFIG_DSP_DEBUG. This is the matter of dependency of those DEFINEs, DSP_TRACEBUF and DEBUG. Kconfig can describe those dependency. I am proposing to set the dependency of DSP_TRACEBUF on CONFIG_DSP_DEBUG, to save some memory instead of keeping unused code(ex: PrintDSPDebugTrace()) in this driver. Without defining "GT_TRACE", "DSP_TRACEBUF" won't print anything because "PrintDSPDebugTrace()" uses GT_0trace to print and GT_?trace() is set as below, arch/arm/plat-omap/include/dspbridge/gt.h: ... #ifndef GT_TRACE #define GT_TRACE 0 /* 0 = "trace compiled out"; 1 = "trace active" */ #endif ... #if GT_TRACE == 0 ... #define GT_0trace(mask, class, format) do {} while (0) #define GT_1trace(mask, class, format, arg1) do {} while (0) ... And "GT_TRACE" depends on "CONFIG_BRIDGE_DEBUG" as below, drivers/dsp/bridge/Kbuild: ... ifeq ($(CONFIG_BRIDGE_DEBUG),y) ccflags-y += -DGT_TRACE -DDEBUG endif ... -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html