lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing/lockdep: turn lock->name into an array
On Tue, Apr 14, 2009 at 12:27:54PM +0200, Ingo Molnar wrote:
>
> * Peter Zijlstra <peterz@infradead.org> wrote:
>
> > On Tue, 2009-04-14 at 00:42 +0200, Frederic Weisbecker wrote:
> > > > +#define LOCK_NAME_SIZE 25
> > >
> > >
> > >
> > > This constant may look a bit weird.
> > > I just started with the assumption that a full lock name
> > > will rarely exceed this length.
> > >
> > > If you agree with it, I will expand the conversion of lockdep
> > > TRACE_FORMAT to TRACE_EVENTS with the same assumption.
> > > So that we will be able to use filters with locks events.
> >
> > I really really hate this.
> >
> > if you pick a size on the top end so that all lock->name's fit in,
> > you're wasting heaps of space, if you pick a median length,
> > everything will get truncated.
> >
> > If you're going to do a copy, just do the print into the buffer by
> > using _FORMAT and be done with it.
>
> what i suggested was a variable length field. That solves the size
> issue. The ring-buffer supports variable size records anyway.
>
> Ingo



Indeed. That's how I plan to change it.
It can become the main new __string() field concept
that we talked about.



\
 
 \ /
  Last update: 2009-04-14 23:25    [W:0.042 / U:2.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site