From: Steven Rostedt <rostedt@goodmis.org>
To: Bharath Ravi <rbharath@google.com>
Cc: Vaibhav Nagarnaik <vnagarnaik@google.com>,
David Sharp <dhsharp@google.com>,
Laurent Chavey <chavey@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] tracing: Replace usage of trace_flags with new accessors.
Date: Fri, 25 Apr 2014 14:46:56 -0400 [thread overview]
Message-ID: <20140425144656.5fc07e54@gandalf.local.home> (raw)
In-Reply-To: <1395684826-22931-2-git-send-email-rbharath@google.com>
On Mon, 24 Mar 2014 11:13:44 -0700
Bharath Ravi <rbharath@google.com> wrote:
> The trace_flags global variable stores various trace options that are
> shared across all ftrace instances. This patch adds accessors function
> for trace_flags - a getter and a setter - and replaces usages of
> trace_flags with these.
>
> This is in preparation for replacing the global trace_flags with
> instance specific (local) trace_flags, allowing each instance to set
> trace_flags independently.
>
> Signed-off-by: Bharath Ravi <rbharath@google.com>
> ---
> kernel/trace/blktrace.c | 3 +-
> kernel/trace/ftrace.c | 4 +--
> kernel/trace/trace.c | 64 ++++++++++++++++++++++--------------
> kernel/trace/trace.h | 2 ++
> kernel/trace/trace_events.c | 2 +-
> kernel/trace/trace_functions_graph.c | 10 +++---
> kernel/trace/trace_irqsoff.c | 4 +--
> kernel/trace/trace_kdb.c | 6 ++--
> kernel/trace/trace_output.c | 8 ++---
> kernel/trace/trace_printk.c | 8 ++---
> kernel/trace/trace_sched_wakeup.c | 3 +-
> kernel/trace/trace_syscalls.c | 2 +-
> 12 files changed, 68 insertions(+), 48 deletions(-)
>
> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> index b418cb0..dd5112a 100644
> --- a/kernel/trace/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -1368,7 +1368,7 @@ static enum print_line_t print_one_line(struct trace_iterator *iter,
>
> t = te_blk_io_trace(iter->ent);
> what = t->action & ((1 << BLK_TC_SHIFT) - 1);
> - long_act = !!(trace_flags & TRACE_ITER_VERBOSE);
> + long_act = !!(global_trace_flags() & TRACE_ITER_VERBOSE);
Instead of having a global_trace_flags() function, use the trace_array
that each tracer has. For here:
tr->trace_flags;
As if you look at my for-next branch, several tracers can now be called
by instance not just by the top directory.
-- Steve
> log_action = classic ? &blk_log_action_classic : &blk_log_action;
>
> if (t->action == BLK_TN_MESSAGE) {
> @@ -1429,6 +1429,7 @@ static enum print_line_t blk_tracer_print_line(struct trace_iterator *iter)
>
> static int blk_tracer_set_flag(u32 old_flags, u32 bit, int set)
> {
> + unsigned long trace_flags = global_trace_flags();
> /* don't output context-info for blk_classic output */
> if (bit == TRACE_BLK_OPT_CLASSIC) {
> if (set)
next prev parent reply other threads:[~2014-04-25 18:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-24 18:13 [PATCH 0/3] Allow instances to independently set trace options Bharath Ravi
2014-03-24 18:13 ` [PATCH 1/3] tracing: Replace usage of trace_flags with new accessors Bharath Ravi
2014-04-25 18:46 ` Steven Rostedt [this message]
2014-03-24 18:13 ` [PATCH 2/3] tracing: Allow instances to have independent trace flags/trace options Bharath Ravi
2014-03-24 18:13 ` [PATCH 3/3] tracing: Allow instances to independently set trace_overwrite Bharath Ravi
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=20140425144656.5fc07e54@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=chavey@google.com \
--cc=dhsharp@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rbharath@google.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
all inboxes | Powered by JetHome®