All of lore.kernel.org
 help / color / mirror / Atom feed
* Memory profiling tools for Linux Kernel
@ 2014-04-04  0:45 Kumar Amit Mehta
  2014-04-04  8:34 ` Vegard Nossum
  0 siblings, 1 reply; 6+ messages in thread
From: Kumar Amit Mehta @ 2014-04-04  0:45 UTC (permalink / raw)
  To: kernelnewbies

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/

Thanks,
Kumar

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Memory profiling tools for Linux Kernel
  2014-04-04  0:45 Memory profiling tools for Linux Kernel Kumar Amit Mehta
@ 2014-04-04  8:34 ` Vegard Nossum
  2014-04-04  8:49   ` aaditya.gavandalkar at yahoo.com
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vegard Nossum @ 2014-04-04  8:34 UTC (permalink / raw)
  To: kernelnewbies

On 4 April 2014 02:45, Kumar Amit Mehta <gmate.amit@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Memory profiling tools for Linux Kernel
  2014-04-04  8:34 ` Vegard Nossum
@ 2014-04-04  8:49   ` aaditya.gavandalkar at yahoo.com
  2014-04-04 12:09     ` Kumar Amit Mehta
  2014-04-04 11:56   ` Pietro Paolini
  2014-04-04 12:06   ` Kumar Amit Mehta
  2 siblings, 1 reply; 6+ messages in thread
From: aaditya.gavandalkar at yahoo.com @ 2014-04-04  8:49 UTC (permalink / raw)
  To: kernelnewbies

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140404/11301375/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Memory profiling tools for Linux Kernel
  2014-04-04  8:34 ` Vegard Nossum
  2014-04-04  8:49   ` aaditya.gavandalkar at yahoo.com
@ 2014-04-04 11:56   ` Pietro Paolini
  2014-04-04 12:06   ` Kumar Amit Mehta
  2 siblings, 0 replies; 6+ messages in thread
From: Pietro Paolini @ 2014-04-04 11:56 UTC (permalink / raw)
  To: kernelnewbies

On 4 April 2014 02:45, Kumar Amit Mehta <gmate.amit@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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Memory profiling tools for Linux Kernel
  2014-04-04  8:34 ` Vegard Nossum
  2014-04-04  8:49   ` aaditya.gavandalkar at yahoo.com
  2014-04-04 11:56   ` Pietro Paolini
@ 2014-04-04 12:06   ` Kumar Amit Mehta
  2 siblings, 0 replies; 6+ messages in thread
From: Kumar Amit Mehta @ 2014-04-04 12:06 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Memory profiling tools for Linux Kernel
  2014-04-04  8:49   ` aaditya.gavandalkar at yahoo.com
@ 2014-04-04 12:09     ` Kumar Amit Mehta
  0 siblings, 0 replies; 6+ messages in thread
From: Kumar Amit Mehta @ 2014-04-04 12:09 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Apr 04, 2014 at 01:49:05AM -0700, aaditya.gavandalkar at 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 :(

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-04 12:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04  0:45 Memory profiling tools for Linux Kernel Kumar Amit Mehta
2014-04-04  8:34 ` Vegard Nossum
2014-04-04  8:49   ` aaditya.gavandalkar at yahoo.com
2014-04-04 12:09     ` Kumar Amit Mehta
2014-04-04 11:56   ` Pietro Paolini
2014-04-04 12:06   ` Kumar Amit Mehta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.