]> git.baikalelectronics.ru Git - kernel.git/commit
kmemleak: add clear command support
authorLuis R. Rodriguez <lrodriguez@Atheros.com>
Sat, 5 Sep 2009 00:44:51 +0000 (17:44 -0700)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 8 Sep 2009 15:36:08 +0000 (16:36 +0100)
commit7d045d1806f8e9adf615419458e1c5d4d5ae4cde
tree84200b02f8230f3706744512bf4ba68341d9b889
parent33b3a3884ef6f14a1d174233246a6a174fdf3f72
kmemleak: add clear command support

In an ideal world your kmemleak output will be small, when its
not (usually during initial bootup) you can use the clear command
to ingore previously reported and unreferenced kmemleak objects. We
do this by painting all currently reported unreferenced objects grey.
We paint them grey instead of black to allow future scans on the same
objects as such objects could still potentially reference newly
allocated objects in the future.

To test a critical section on demand with a clean
/sys/kernel/debug/kmemleak you can do:

echo clear > /sys/kernel/debug/kmemleak
        test your kernel or modules
echo scan > /sys/kernel/debug/kmemleak

Then as usual to get your report with:

cat /sys/kernel/debug/kmemleak

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Documentation/kmemleak.txt
mm/kmemleak.c