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

* Frederic Weisbecker <fweisbec@gmail.com> 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.

there would be a couple of natural objects to group events by:

1) callsite [IP] of kmalloc()/kfree()/etc.

2) slab cache

3) slab object

for 1) callsite based histograms, i think ftrace should have a built-in
mechanism for that. kmemtrace tracepoints already pass in a call_site
argument that can be used to drive it.

for 2) slab cache based histograms (counts) - we need some knowledge about
the affected slab caches, and we need some space as well. The tracepoints
could be extended with a kmem_cache argument perhaps. A callback is needed
at cache creation time (which could be in the form of a tracepoint) that
gives kernel/tracing/kmemtrace.c the right place to allocate the per slab
histogram. (so that the other tracepoints dont have to do it implicitly -
which would be fragile as we are in the SLAB code, often with spinlocks
taken, so we cannot allocate)

i think 3) is the hardest so lets skip it for now ;-)

Ingo


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