mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Doug Anderson <dianders@chromium.org>,
	Ingo Molnar <mingo@redhat.com>,
	Jason Wessel <jason.wessel@windriver.com>,
	kgdb-bugreport@lists.sourceforge.net,
	Brian Norris <briannorris@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 2/3] tracing: Add trace_total_entries() / trace_total_entries_cpu()
Date: Tue, 19 Mar 2019 15:56:52 +0000	[thread overview]
Message-ID: <20190319155652.xssfwjfeitas6udd@holly.lan> (raw)
In-Reply-To: <20190319105525.7686763b@gandalf.local.home>

On Tue, Mar 19, 2019 at 10:55:25AM -0400, Steven Rostedt wrote:
> On Tue, 19 Mar 2019 07:45:38 -0700
> Doug Anderson <dianders@chromium.org> wrote:
> 
> > > > +unsigned long trace_total_entries_cpu(struct trace_array *tr, int cpu)
> > > > +{
> > > > +     unsigned long total, entries;
> > > > +
> > > > +     if (!tr)
> > > > +             tr = &global_trace;  
> > >
> > > This function is only ever called with tr set to NULL which means tr is
> > > an argument looking for a user.
> > >
> > > I wouldn't mind except if this was following copying prior art to keep
> > > the API feel the same but I can't find any other trace function where
> > > the trace_array can be substituted for NULL. AFAICT all the existing
> > > sites where global_trace is used will use it unconditionally.  
> 
> I'm in the process of making everything work better with tracing
> instances. Which means, making all the APIs use the tr pointer (which is
> the descriptor for the instance).
> 
> All new APIs added to the tracing infrastructure should reference a "tr"
> pointer, and not use the global_trace directly. We can default it if tr
> is NULL.
> 
> There are currently lots of cases in the code that do so, but I'm
> trying to get rid of them.

I see. So this API style will align with the rest of the family when
that works lands.

Fine for me.


Daniel.

  reply	other threads:[~2019-03-19 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 20:47 [PATCH v5 1/3] tracing: kdb: The skip_lines parameter should have been skip_entries Douglas Anderson
2019-03-18 20:47 ` [PATCH v5 2/3] tracing: Add trace_total_entries() / trace_total_entries_cpu() Douglas Anderson
2019-03-18 21:18   ` Steven Rostedt
2019-03-19 11:30     ` Daniel Thompson
2019-03-19 11:25   ` Daniel Thompson
2019-03-19 14:45     ` Doug Anderson
2019-03-19 14:55       ` Steven Rostedt
2019-03-19 15:56         ` Daniel Thompson [this message]
2019-03-18 20:47 ` [PATCH v5 3/3] tracing: kdb: Allow ftdump to skip all but the last few entries Douglas Anderson
2019-03-18 21:18 ` [PATCH v5 1/3] tracing: kdb: The skip_lines parameter should have been skip_entries Steven Rostedt

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=20190319155652.xssfwjfeitas6udd@holly.lan \
    --to=daniel.thompson@linaro.org \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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

all inboxes | Powered by JetHome®