All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <zwisler@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH] libtraceeval: Add traceeval_stat_max/min_timestamp() API
Date: Tue, 17 Oct 2023 12:47:36 -0600	[thread overview]
Message-ID: <20231017184736.GB3977037@google.com> (raw)
In-Reply-To: <20231011190917.1d57a7e9@gandalf.local.home>

On Wed, Oct 11, 2023 at 07:09:17PM -0400, Steven Rostedt wrote:
> On Wed, 11 Oct 2023 16:21:00 -0600
> Ross Zwisler <zwisler@google.com> wrote:
> 
> > On Thu, Oct 05, 2023 at 06:14:48PM -0400, Steven Rostedt wrote:
> > > From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> > > 
> > > If a value field is flagged as a TIMESTAMP, and another field is flagged
> > > as a STAT, have the statistics for the STAT field automatically keep track
> > > of when the max and min happened (what the TIMESTAMP field was at those
> > > instances).  
> > 
> > I'm confused as to why we have TRACEEVAL_FL_TIMESTAMP and a separate data
> > entry with that flag, instead of only storing the timestamp in the entry
> > metadata, as we do with the other STATs?
> 
> Actually, I may remove this part entirely, as it's pretty much superseded
> by the TRACEEVAL_TYPE_DELTA, which I moved to, and haven't needed the
> separate val marked for the timestamp.
> 
> > 
> > >From the description above where we have one TIMESTAMP and one STAT, I would  
> > expect to see structures defined like this
> > (from [PATCH v2] libtraceeval: Add wake-lat sample code):
> > 
> > +struct traceeval_type sched_vals[] = {
> > +       {
> > +               .name           = "timestamp",
> > +               .flags          = TRACEEVAL_FL_TIMESTAMP,
> > +               .type           = TRACEEVAL_TYPE_NUMBER_64,
> > +       },
> > +       {
> > +               .name           = "delta",
> > +               .flags          = TRACEEVAL_FL_STAT,
> > +               .type           = TRACEEVAL_TYPE_NUMBER_64,
> > +       }
> > 
> > where the timestamp is sync'd with the STAT min and max, right?
> 
> The new type is done like:
> 
> 	{
> 		.name		= "delta",
> 		.type		= TRACEEVAL_TYPE_DELTA,
> 	}
> 
> Which will automatically be marked as STAT flag, and is set with:
> 
> 	TRACEEVAL_SET_DELTA(vals, delta, timestamp);
> 
> Is that what you are thinking about?

Yep, I think so.  I'll take a harder look at TRACEEVAL_TYPE_DELTA.

      reply	other threads:[~2023-10-17 18:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 22:14 [PATCH] libtraceeval: Add traceeval_stat_max/min_timestamp() API Steven Rostedt
2023-10-11 22:21 ` Ross Zwisler
2023-10-11 23:09   ` Steven Rostedt
2023-10-17 18:47     ` Ross Zwisler [this message]

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=20231017184736.GB3977037@google.com \
    --to=zwisler@google.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.