mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tim Bird <tim.bird@am.sony.com>, Tom Zanussi <tzanussi@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Chase Douglas <chase.douglas@canonical.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: request to add trace off and trace on with events
Date: Mon, 19 Apr 2010 19:59:26 -0400	[thread overview]
Message-ID: <1271721566.10448.162.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20100419230438.GA11493@nowhere>

On Tue, 2010-04-20 at 01:04 +0200, Frederic Weisbecker wrote:

> > # ls event/sched/sched_switch/triggers/tracing_off
> > filter   enable
> > 
> > ?
> 
> 
> That would be perhaps an overkill.

Perhaps, but I was also thinking of having triggers in the system level.
That way all events below it can trigger.

> Having a filter inside means it's on, otherwise it's off.
> 
> 
> 
> > 
> > > 
> > > > 
> > > > This could also allow a user to do:
> > > > 
> > > > echo "(a > 100)" > tracing_on
> > > > echo "(a < 100)" > tracing_off
> > > 
> > > 
> > > Yeah :)
> > > But if the scope of the "tracing off" is only for this event, then
> > > rather use:
> > > 
> > > echo "(a < 100)" > filter
> > > 
> > > You could have tracing_off/on that have this event scope and
> > > tracing_off/on_all for a global tracing scope.
> > 
> > The two are not equivalent. In fact, just enabling a trigger does not
> > mean that the event itself will be traced.
> 
> 
> Yeah, the enable file would first need to be activated before any
> trigger to take effect on the event, just like filters.
> 
> In fact I was thinking of tracing_on/tracing_off as kinds of
> local pause/resume.
> 
> And tracing_on_global/tracing_off_global would act like what does
> /debug/tracing/tracing_on: something that disables every tracing.
> 
> But of course, before any of these conditional triggers to be
> evaluated, you need to enable the corresponding event.

We could have a "trace_event_on" and "trace_event_off" trigger that only
enables the event when hit.

Actually, we can have these triggers enable other events, or make
dynamic triggers:

echo "enable_sched_switch" > events/sched/sched_wakeup/trigger/activate

or something similar.

-- Steve




  reply	other threads:[~2010-04-19 23:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19 20:04 Steven Rostedt
2010-04-19 20:39 ` Tim Bird
2010-04-19 20:44   ` Steven Rostedt
2010-04-19 20:56     ` Tim Bird
2010-04-19 21:10       ` Steven Rostedt
2010-04-19 21:32         ` Tim Bird
2010-04-19 21:29     ` Frederic Weisbecker
2010-04-19 21:37       ` Steven Rostedt
2010-04-19 22:04         ` Frederic Weisbecker
2010-04-19 22:13           ` Steven Rostedt
2010-04-19 23:04             ` Frederic Weisbecker
2010-04-19 23:59               ` Steven Rostedt [this message]
2010-04-20  6:52                 ` Tom Zanussi
2010-04-20  5:07 ` Tom Zanussi

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=1271721566.10448.162.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=chase.douglas@canonical.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=tim.bird@am.sony.com \
    --cc=tzanussi@gmail.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

all inboxes | Powered by JetHome®