Re: Memory profiling tools for Linux Kernel

2014-04-04 Thread Vegard Nossum
On 4 April 2014 02:45, Kumar Amit Mehta gmate.a...@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'.


Vegard

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Memory profiling tools for Linux Kernel

2014-04-04 Thread aaditya.gavandal...@yahoo.com
Hi,

You can you a heap profiler to check heap usage for example massif.

Massif is a tool under valgrind package. You can research on valgrind more for 
other helpful tools as well. Memcheck is bydefault in usage in valgrind.

Massif gives data in form of a graph which can be printed using ms_print 
command. Graph tells about various allocations done from heap and at what time.

Hope this helps

Kind regards,
Aaditya Gavandalkar

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: Memory profiling tools for Linux Kernel

2014-04-04 Thread Pietro Paolini
On 4 April 2014 02:45, Kumar Amit Mehta gmate.a...@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'.


I have got one question regarding that, how can I understand which function is 
asking for memory in the size-*
cache names present in the output of /proc/slabinfo/ slabtop ?

Pietro.


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Memory profiling tools for Linux Kernel

2014-04-04 Thread Kumar Amit Mehta
On Fri, Apr 04, 2014 at 10:34:54AM +0200, Vegard Nossum wrote:
 On 4 April 2014 02:45, Kumar Amit Mehta gmate.a...@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

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Memory profiling tools for Linux Kernel

2014-04-04 Thread Kumar Amit Mehta
On Fri, Apr 04, 2014 at 01:49:05AM -0700, aaditya.gavandal...@yahoo.com wrote:
 Hi,
 
 You can you a heap profiler to check heap usage for example massif.
 
 Massif is a tool under valgrind package. You can research on valgrind more 
 for other helpful tools as well. Memcheck is bydefault in usage in valgrind.
 
 Massif gives data in form of a graph which can be printed using ms_print 
 command. Graph tells about various allocations done from heap and at what 
 time.
 
 Hope this helps

Unfortunately, valgrind won't work for Linux Kernel :(

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies