[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1265380207.22001.654.camel@laptop>
Date: Fri, 05 Feb 2010 15:30:07 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: rostedt@...dmis.org
Cc: Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Paul Mackerras <paulus@...ba.org>,
Hitoshi Mitake <mitake@....info.waseda.ac.jp>,
Li Zefan <lizf@...fujitsu.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Masami Hiramatsu <mhiramat@...hat.com>,
Jens Axboe <jens.axboe@...cle.com>,
Johannes Berg <johannes@...solutions.net>
Subject: Re: [PATCH 03/11] tracing: Inject lock_class_init events on
registration
On Fri, 2010-02-05 at 09:13 -0500, Steven Rostedt wrote:
> On Wed, 2010-02-03 at 10:14 +0100, Frederic Weisbecker wrote:
>
> > static inline void lockdep_off(void)
> > diff --git a/include/trace/events/lock.h b/include/trace/events/lock.h
> > index 90af03c..6999f16 100644
> > --- a/include/trace/events/lock.h
> > +++ b/include/trace/events/lock.h
> > @@ -9,7 +9,7 @@
> >
> > #ifdef CONFIG_LOCKDEP
> >
> > -TRACE_EVENT(lock_class_init,
> > +TRACE_EVENT_INJECT(lock_class_init,
> >
> > TP_PROTO(struct lock_class *class),
> >
> > @@ -30,7 +30,14 @@ TRACE_EVENT(lock_class_init,
> > __entry->class_id = (void *)class->name;
> > ),
> >
> > - TP_printk("%p %s", __entry->class_id, __get_str(class_name))
> > + TP_printk("%p %s", __entry->class_id, __get_str(class_name)),
> > +
> > + /*
> > + * On activation, we want to send an event for each lock
> > + * classes that have been recorded by lockdep, so that we
> > + * catch up with the existing class:name mappings.
> > + */
> > + lock_class_init_inject_events
> > );
> >
>
> I also suggested this type of registering:
>
> register_event_callback("event", "command", command_func,
> command_enable_func,
> command_disable_func);
>
> Where command_func, command_enable_func and command_disable_func can all
> be a function pointer or NULL.
>
> command_func gets called every time the event is hit while enabled.
>
> command_enable_func gets called when the event is enabled
>
> command_disable_func gets called when the event is disabled.
Well, that will solve johill's polling thing, but not work nicely with
the proposed collection iteration stuff.
--
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