08 Sep, 2009
1 commit
-
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/kmemleakThen as usual to get your report with:
cat /sys/kernel/debug/kmemleak
Signed-off-by: Luis R. Rodriguez
Signed-off-by: Catalin Marinas
27 Aug, 2009
1 commit
-
By writing dump= to the kmemleak file, kmemleak will look up an
object with that address and dump the information it has about it to
syslog. This is useful in debugging memory leaks.Signed-off-by: Catalin Marinas
27 Jun, 2009
3 commits
-
Since there is a kernel thread for automatically scanning the memory, it
makes sense for the debug/kmemleak file to only show its findings. This
patch also adds support for "echo scan > debug/kmemleak" to trigger an
intermediate memory scan and eliminates the kmemleak_mutex (scan_mutex
covers all the cases now).Signed-off-by: Catalin Marinas
-
Because of false positives, the memory scanning thread may print too
much information. This patch changes the scanning thread to only print
the number of newly suspected leaks. Further information can be read
from the /sys/kernel/debug/kmemleak file.Signed-off-by: Catalin Marinas
-
This is to reduce the number of false positives reported.
Signed-off-by: Catalin Marinas
25 Jun, 2009
1 commit
-
(feature suggested by Sergey Senozhatsky)
Kmemleak needs to track all the memory allocations but some of these
happen before kmemleak is initialised. These are stored in an internal
buffer which may be exceeded in some kernel configurations. This patch
adds a configuration option with a default value of 400 and also removes
the stack dump when the early log buffer is exceeded.Signed-off-by: Catalin Marinas
Acked-by: Sergey Senozhatsky
12 Jun, 2009
1 commit
-
This patch adds the Documentation/kmemleak.txt file with some
information about how kmemleak works.Signed-off-by: Catalin Marinas