From: Steven Rostedt <rostedt@goodmis.org>
To: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Jean-Jacques Hiblot <jjhiblot@traphandler.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing/kprobes: Add trace event trigger invocations
Date: Mon, 6 Jan 2014 11:10:55 -0500 [thread overview]
Message-ID: <20140106111055.2cf828f7@gandalf.local.home> (raw)
In-Reply-To: <1388283848.3048.1.camel@empanada>
On Sat, 28 Dec 2013 20:24:08 -0600
Tom Zanussi <tom.zanussi@linux.intel.com> wrote:
> Add code to the kprobe/kretprobe event functions that will invoke any
> event triggers associated with a probe's ftrace_event_file.
>
> The code to do this is very similar to the invocation code already
> used to invoke the triggers associated with static events and
> essentially replaces the existing soft-disable checks with a superset
> that preserves the original behavior but adds the bits needed to
> support event triggers.
>
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> ---
> kernel/trace/trace_kprobe.c | 42 ++++++++++++++++++++++++++++++++++++------
> 1 file changed, 36 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index dae9541..1ee13eb 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -812,12 +812,20 @@ __kprobe_trace_func(struct trace_probe *tp, struct pt_regs *regs,
> struct ring_buffer *buffer;
> int size, dsize, pc;
> unsigned long irq_flags;
> + unsigned long eflags;
> + enum event_trigger_type __tt = ETT_NONE;
What's the significance of the "__" in the variable?
Looks as if you copied it from the ftrace_raw_event_* macro. The "__"
there is usually recommended because it is a macro and we try to avoid
namespace collisions by adding the "__".
This is a proper function, please remove the "__" from it.
Thanks,
-- Steve
> struct ftrace_event_call *call = &tp->call;
>
> WARN_ON(call != ftrace_file->event_call);
>
> - if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &ftrace_file->flags))
> - return;
> + eflags = ftrace_file->flags;
> +
> + if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) {
> + if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE)
> + event_triggers_call(ftrace_file, NULL);
> + if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED)
> + return;
> + }
>
> local_save_flags(irq_flags);
> pc = preempt_count();
next prev parent reply other threads:[~2014-01-06 16:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-29 2:24 Tom Zanussi
2014-01-06 1:16 ` Masami Hiramatsu
2014-01-06 16:10 ` Steven Rostedt [this message]
2014-01-06 19:44 ` 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=20140106111055.2cf828f7@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=jjhiblot@traphandler.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=tom.zanussi@linux.intel.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®