Memory profiling tools for Linux Kernel

Kumar Amit Mehta gmate.amit at gmail.com
Fri Apr 4 08:06:53 EDT 2014


On Fri, Apr 04, 2014 at 10:34:54AM +0200, Vegard Nossum wrote:
> On 4 April 2014 02:45, Kumar Amit Mehta <gmate.amit at gmail.com> wrote:
> > I was looking for some tools for memory profiling for Linux Kernel. I
> > I wish to analyze the memory usage statistics by comparing the results
> > (with and without the usage of Lookaside caches) by the consumer (Say
> > a certain driver).I found some tools such as kmemcheck[1] and KEDR [2]
> > but before I go further and explore these tools, I was wondering if
> > somebody has already used these tools to acquire similar statistics
> > or I should try out some other tool.
> >
> > [1] https://www.kernel.org/doc/Documentation/kmemcheck.txt
> > [2] http://kedr.berlios.de/
> 
> Hi,
> 
> kmemcheck will probably not help you with memory usage statistics. It
> may help you find certain programming errors (use after free, use of
> uninitialised memory, etc.).
> 
> The slab allocator exports some information about memory allocations
> that may or may not give you what you need. Try e.g. 'sudo slabtop'.

Thank you for the information, I'll try that out. My main objective is
to find out the performance gain a consumer might achieve by using
lookaside caches, memory pool etc than by doing normal memory allocation
primitives(kmalloc/vmalloc).

Thanks,
Kumar



More information about the Kernelnewbies mailing list