lkml.org 
[lkml]   [2008]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing/kmemtrace: normalize the raw tracer event to the unified tracing API
On Tue, Dec 30, 2008 at 09:49:24AM +0200, Pekka Enberg wrote:
> Hi Frederic,
>
> On Mon, 2008-12-29 at 23:09 +0100, Frederic Weisbecker wrote:
> > Pekka, note that I would be pleased to add statistical tracing on
> > this tracer, but I would need a hashtable, or an array, or a list, or whatever
> > iterable to insert the data into the stat tracing api.
> >
> > But I don't know your projects about this... whether you wanted to use a section
> > or something else...
>
> It really depends on what we're tracing. If we're interested in just the
> allocation hotspots, a section will do just fine. However, if we're
> tracing memory footprint, we need to take into store the object pointer
> returned from kmalloc() and kmem_cache_alloc() so we can update
> call-site statistics properly upon kfree().
>
> So I suppose we need both, a section for per call-site statistics and a
> hash table for the object -> call-site mapping.
>
> Pekka

Hi Frederic,

Thanks for doing this work.

kmemtrace-user currently shows two main views: per call-site and
per-allocation. For the former, it uses a hashtable to accumulate
statistics. There's also a hashtable for individual allocations (by ptr
address), which we use to check for consistency for example ("if this is
going to be freed, has it been allocated?"). Apart from those two views,
it also shows global statistics.


Thanks again,
Eduard



\
 
 \ /
  Last update: 2008-12-30 09:03    [W:0.100 / U:0.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site