Re: How to test kernel drivers for memory leaks

From: Pekka Enberg
Date: Wed Oct 06 2010 - 07:14:56 EST


On Wed, Oct 6, 2010 at 1:13 PM, Elvis Dowson <elvis.dowson@xxxxxxx> wrote:
>> Kmemleak is an in-kernel memory leak detector. See
>> Documentation/kmemleak.txt for details.
>
> Thanks for that info, I just read it and it looks useful.
>
> Do you know of any other tools that can be used for full static and dynamic analysis, and observations of variables while it is running on the target?
>
> I used to use Rational Test-Real-Time with a JTAG emulator probe before. Are there any other equivalent tools that can do good static and dynamic analysis of kernel modules, while it is running on the target, with a good interface?
>
> I want to setup a full kernel profiling and debug environment, to be able to debug linux kernel (android-2.6.32) running on a TI OMAP 3503 target platform (Gumstix Overo Earth), to optimize performance and improve the stability of the system (e.g. running for more than 1 year, without requiring a reboot).

I have never tried it myself but there's an in-kernel debugger in
mainline these days:

http://kernel.org/pub/linux/kernel/people/jwessel/kdb/

For profiling, I suggest you take a look at tools/perf in the mainline
source tree.

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/