[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090414102533.GG3558@elte.hu>
Date: Tue, 14 Apr 2009 12:25:33 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Peter Zijlstra <peterz@...radead.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Zhaolei <zhaolei@...fujitsu.com>,
Tom Zanussi <tzanussi@...il.com>,
Li Zefan <lizf@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing/lockdep: turn lock->name into an array
* Peter Zijlstra <peterz@...radead.org> wrote:
> On Tue, 2009-04-14 at 08:53 +0200, Ingo Molnar wrote:
> > * KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com> wrote:
> >
> > > Hi
> > >
> > > > Impact: allow filtering by lock name / fix module tracing
> > > >
> > > > Currently, the "lock acquired" event is traced using a TRACE_EVENT.
> > > > But we can't use the char * type for the name without risking to
> > > > dereference a freed pointer. A lock name can come from a module
> > > > towards lockdep and it is risky to only store its address because we
> > > > defer its name printing.
> > >
> > > When released lockdep string table? I guess it only happend at
> > > module unloading. if so, we should consider to make delayed string
> > > table freeing at module unloading.
> > >
> > > My point is, module unloading is rare event. thus meking pointer
> > > safe mechanism widely avoid string copy.
> > >
> > > IOW, if not, ringbuffer is filled tons string. it kill the merit
> > > of binary buffer and current design.
> >
> > We could zap all pending trace entries on module unload (it is a
> > rare operation). That would indeed make a whole category of
> > symbol-alike string pointers safe to be passed by value.
>
> Except that might make debugging a module unload bug rather
> hard...
yes. Never needed to do that personally though. Plus more specific
tracers like function tracer without event-tracing embellishments
could still be used in such situations too, without flushing.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists