Re: [PATCH] tracing/kmemtrace: normalize the raw tracer event tothe unified tracing API

From: Frederic Weisbecker
Date: Tue Dec 30 2008 - 09:32:36 EST


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
>

BTW. By looking on your needs, the statistical branch tracer and the rcu stat one,
it looks like these tracers often (if not always) need several stat files, not only
one.

Actually what I should do with stat tracing is to build a directory inside
/debugfs/tracing devoted to the several stat output a tracer need.

Which means I have to make trace_stat.c completely reentrant and some other
things....plus the fact that multiple tracers should be enable to run concurrently
for 2.6.30... which means one directory of stat tracing for each running tracer.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/