From: Oleg Nesterov <oleg@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Christopher Covington <cov@codeaurora.org>,
Ingo Molnar <mingo@redhat.com>,
Tom Zanussi <tom.zanussi@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Vagin <avagin@openvz.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Vaibhav Nagarnaik <vnagarnaik@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RFC: Add signal command to trace events
Date: Thu, 26 Jun 2014 18:29:43 +0200 [thread overview]
Message-ID: <20140626162943.GA9970@redhat.com> (raw)
In-Reply-To: <20140626111749.3234d4d4@gandalf.local.home>
On 06/26, Steven Rostedt wrote:
>
> [ Added Oleg who is the guru of signals ;-) ]
Thanks,
I didn't see the patch, so I can only guess what it does,
> On Thu, 26 Jun 2014 09:57:21 -0400
> Christopher Covington <cov@codeaurora.org> wrote:
>
> > This stops a process after an event has been triggered a given
> > number of times. For example:
> >
> > [[ -d /sys/kernel/debug/tracing ]] || \
> > mount -t debugfs none /sys/kernel/debug
> > echo "p:myevent $(which myapp):0x700" > /sys/kernel/debug/tracing/uprobe_events
> > echo 1 > /sys/kernel/debug/tracing/events/uprobes/myevent/enable
> > echo 'signal:3' > /sys/kernel/debug/tracing/events/uprobes/myevent/trigger
> > myapp
> > myapp
> > myapp &
> >
> > Here, the 0x700 offset is the entry to main(). On the third
> > invocation of the program, the process is stopped.
> >
>
> Interesting trigger. I can see this being useful.
Yes. I thought about this too.
> > +//ifdef CONFIG_TRACER_SIGNAL
> > +static void
> > +signal_trigger(struct event_trigger_data *data)
> > +{
> > + force_sig(SIGSTOP, current);
Well, I don't like this. Imho, it would be nice to avoid signals here.
And SIGSTOP in particular. It can interfere with the "real" SIGSTOP
sent by user, with ptrace, with tty.
I think we need something else... "STOP" is actually simple, but we need
some interface which allows to wakeup a task sleeping in TASK_KILLABLE
after it hits ETT_FREEZE.
Oleg.
next prev parent reply other threads:[~2014-06-26 16:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 13:57 [PATCH] RFC: Add signal command to trace events Christopher Covington
2014-06-26 15:17 ` Steven Rostedt
2014-06-26 16:29 ` Oleg Nesterov [this message]
2014-06-26 16:45 ` Oleg Nesterov
2014-06-26 16:48 ` Steven Rostedt
2014-06-26 17:15 ` Oleg Nesterov
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=20140626162943.GA9970@redhat.com \
--to=oleg@redhat.com \
--cc=avagin@openvz.org \
--cc=cov@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tom.zanussi@linux.intel.com \
--cc=vnagarnaik@google.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