lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Feb 2009 08:07:29 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Theodore Tso <tytso@....edu>,
	Arjan van de Ven <arjan@...radead.org>,
	Pekka Paalanen <pq@....fi>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Jason Baron <jbaron@...hat.com>,
	Martin Bligh <mbligh@...gle.com>,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Jens Axboe <jens.axboe@...cle.com>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 4/4] tracing: make event directory structure



On Wed, 25 Feb 2009, Frederic Weisbecker wrote:

> On Tue, Feb 24, 2009 at 09:56:12PM -0500, Steven Rostedt wrote:
> > From: Steven Rostedt <srostedt@...hat.com>
> > 
> > This patch adds the directory /debug/tracing/events/ that will contain
> > all the registered trace points.
> > 
> >  # ls /debug/tracing/events/
> > sched_kthread_stop      sched_process_fork  sched_switch
> > sched_kthread_stop_ret  sched_process_free  sched_wait_task
> > sched_migrate_task      sched_process_wait  sched_wakeup
> > sched_process_exit      sched_signal_send   sched_wakeup_new
> > 
> >  # ls /debug/tracing/events/sched_switch/
> > enable
> > 
> >  # cat /debug/tracing/events/sched_switch/enable
> > 1
> > 
> >  # cat /debug/tracing/set_event
> > sched_switch
> 
> 
> Do you plan to add other things inside these events directory?

That's actually the plan. We might want to trigger a stack trace or 
something on that event. The idea will be to add attributes to each 
individual event, and it should be pretty easy to implement since each 
event has its own structure.

> I mean, if you plan to only put an enable file on each of 
them, > it would be better to have just one file:
> 
> cat /debug/tracing/events/sched_switch
> 1
> 
>  
> > Signed-off-by: Steven Rostedt <srostedt@...hat.com>
> > ---
> >  kernel/trace/trace_events.c |  137 +++++++++++++++++++++++++++++++++++++++++--
> >  kernel/trace/trace_events.h |    7 ++-
> >  2 files changed, 137 insertions(+), 7 deletions(-)
> > 
> > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> > index 05bc80e..3bcb9df 100644
> > --- a/kernel/trace/trace_events.c
> > +++ b/kernel/trace/trace_events.c
> > @@ -12,6 +12,11 @@
> >  
> >  #include "trace_events.h"
> >  
> > +#define events_for_each(event)						\
> > +	for (event = __start_ftrace_events;				\
> > +	     (unsigned long)event < (unsigned long)__stop_ftrace_events; \
> > +	     event++)
> > +
> 
> 
> The name for_each_events seems to me more intuitive, but it's just
> a matter of taste.

I like that better too. But I was trying to be more consistent with the 
kernel. "list_for_each", "hlist_for_each".

But come to think about it, we do have "for_each_cpu_mask". Hmm?

But it is local to the file. Not something to worry about now ;-)

-- Steve

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ