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

* Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> wrote:

> On Tue, Dec 30, 2008 at 09:16:00AM +0100, Ingo Molnar wrote:
> > 3)
> >
> > the most lowlevel (and hence most allocation-footprint sensitive) object
> > to track would be the memory object itself. I think the best approach
> > would be to do a static, limited size hash that could track up to N memory
> > objects.
> >
> > The advantage of such an approach is that it does not impact allocation
> > patterns at all (besides the one-time allocation cost of the hash itself
> > during tracer startup).
>
> kmemtrace-user handles this by analysing offline :). I presume you could
> get around this by discarding every hash collision in a well-sized
> hashtable. The hashing algo in kmemtrace-user performs okay, considering
> it fills the hashtable almost entirely, but I presume you're doing that
> in-kernel and using other available code.

yeah - this is not a replacement for kmemtrace-user - analyzing raw trace
events offline is still possible of course.

> > And this too would be driven from ftrace mainly - the SLAB code would
> > only offer the alloc+free callbacks with the object IDs. [ and this
> > means that we could detect memory leaks by looking at the hash table
> > and print out the age of entries :-) ]
>
> Some time ago I dropped timestamps because they were not providing a
> good way to reorder packets in userspace. We're currently relying on a
> sequence number to do that. You could take that as 'age', but it's not
> temporally-meaningful.

yeah - ftrace entries generally have a timestamp so it should be rather
easy.

Ingo


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