public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Zhaolei <zhaolei@cn.fujitsu.com>,
	Tom Zanussi <tzanussi@gmail.com>, Li Zefan <lizf@cn.fujitsu.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing/lockdep: turn lock->name into an array
Date: Tue, 14 Apr 2009 12:25:33 +0200	[thread overview]
Message-ID: <20090414102533.GG3558@elte.hu> (raw)
In-Reply-To: <1239693611.21985.6694.camel@twins>


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Tue, 2009-04-14 at 08:53 +0200, Ingo Molnar wrote:
> > * KOSAKI Motohiro <kosaki.motohiro@jp.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

  reply	other threads:[~2009-04-14 10:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-13 22:36 [PATCH] tracing/lockdep: turn lock->name into an array Frederic Weisbecker
2009-04-13 22:42 ` Frederic Weisbecker
2009-04-13 22:58   ` Ingo Molnar
2009-04-14  7:48   ` Peter Zijlstra
2009-04-14 10:27     ` Ingo Molnar
2009-04-14 21:22       ` Frederic Weisbecker
2009-04-13 23:01 ` Ingo Molnar
2009-04-14  0:24   ` Frederic Weisbecker
2009-04-14  6:35 ` KOSAKI Motohiro
2009-04-14  6:53   ` Ingo Molnar
2009-04-14  6:56     ` KOSAKI Motohiro
2009-04-14  7:20     ` Peter Zijlstra
2009-04-14 10:25       ` Ingo Molnar [this message]
2009-04-17 17:25     ` Jeremy Fitzhardinge
2009-04-17 17:27       ` Peter Zijlstra
2009-04-17 17:36         ` Steven Rostedt
2009-04-17 20:29           ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090414102533.GG3558@elte.hu \
    --to=mingo@elte.hu \
    --cc=fweisbec@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tzanussi@gmail.com \
    --cc=zhaolei@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox