From: Frederic Weisbecker <fweisbec@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: mingo@elte.hu, rostedt@goodmis.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv5 3/4] tracing: graph output support for irqsoff tracer
Date: Thu, 1 Apr 2010 19:32:58 +0200 [thread overview]
Message-ID: <20100401173251.GC5153@nowhere> (raw)
In-Reply-To: <1270136229-15263-4-git-send-email-jolsa@redhat.com>
On Thu, Apr 01, 2010 at 05:37:08PM +0200, Jiri Olsa wrote:
> +static int start_irqsoff_tracer(struct trace_array *tr, int graph)
> {
> - register_ftrace_function(&trace_ops);
> - if (tracing_is_enabled())
> + int ret = 0;
> +
> + if (!graph)
> + ret = register_ftrace_function(&trace_ops);
> +#ifdef CONFIG_FUNCTION_GRAPH_TRACER
> + else
> + ret = register_ftrace_graph(&irqsoff_graph_return,
> + &irqsoff_graph_entry);
> +#endif
Please rather define static inline stubs for register_ftrace_graph
in linux/ftrace.h if !CONFIG_FUNCTION_GRAPH_TRACER
> +
> + if (!ret && tracing_is_enabled())
> tracer_enabled = 1;
> else
> tracer_enabled = 0;
> +
> + return ret;
> }
>
> -static void stop_irqsoff_tracer(struct trace_array *tr)
> +static void stop_irqsoff_tracer(struct trace_array *tr, int graph)
> {
> tracer_enabled = 0;
> - unregister_ftrace_function(&trace_ops);
> +
> + if (!graph)
> + unregister_ftrace_function(&trace_ops);
> +#ifdef CONFIG_FUNCTION_GRAPH_TRACER
> + else
> + unregister_ftrace_graph();
> +#endif
Same here.
Thanks.
next prev parent reply other threads:[~2010-04-01 16:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 15:37 [PATCHv5 0/4] tracing: function graph output for preempt/irqs-off tracers Jiri Olsa
2010-04-01 15:37 ` [PATCHv5 1/4] tracing: adding ftrace events for graph tracer Jiri Olsa
2010-04-01 15:37 ` [PATCHv5 2/4] tracing: graph tracer - adding support for passing flags to ouput functions Jiri Olsa
2010-04-01 15:37 ` [PATCHv5 3/4] tracing: graph output support for irqsoff tracer Jiri Olsa
2010-04-01 17:32 ` Frederic Weisbecker [this message]
2010-04-01 15:37 ` [PATCHv5 4/4] tracing: graph output support for preemptirqsoff/preemptoff tracers Jiri Olsa
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=20100401173251.GC5153@nowhere \
--to=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/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