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@vger.kernel.org,
	Stevie Alvarez <stevie.6strings@gmail.com>
Subject: Re: [PATCH 0/2] libtraceeval: Remove the need of TRACEEVAL_TYPE_NONE
Date: Mon, 2 Oct 2023 15:07:49 -0600	[thread overview]
Message-ID: <20231002210749.GN1532181@google.com> (raw)
In-Reply-To: <20230929100025.1018258-1-rostedt@goodmis.org>

On Fri, Sep 29, 2023 at 06:00:23AM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> 
> The use of macros to determine the size of the keys and vals arrays made
> me think a bit more about how we initialize the traceeval. The more I'm
> using the library, the less I like having to add the TRACEEVAL_TYPE_NONE
> to the end of the keys and vals array.
> 
> Instead, use the same macro trick of TRACEEVAL_ARRAY_SIZE() to determine
> the number of elements. Still allow the use of using the
> TRACEEVAL_TYPE_NONE to determine the size (if the number passed in is
> still bigger), so that most applications that still use that still work.
> 
> I made the change separate than updating the sample code to test that
> the old way still works. Then I updated the sample to make sure the new
> way works. Perhaps when we add unit tests back in, we'll test both
> cases.

Looks good, you can add:
Reviewed-by: Ross Zwisler <zwisler@google.com>

> Steven Rostedt (Google) (2):
>   libtraceeval: Remove need to use TRACEEVAL_TYPE_NONE in keys and vals
>   libtraceeval samples: Remove adding TRACEEVAL_TYPE_NONE to keys and
>     vals
> 
>  include/traceeval-hist.h | 11 +++++++++--
>  samples/task-eval.c      | 18 ------------------
>  src/histograms.c         | 11 +++++++----
>  3 files changed, 16 insertions(+), 24 deletions(-)
> 
> -- 
> 2.40.1
> 

  parent reply	other threads:[~2023-10-02 21:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29 10:00 [PATCH 0/2] libtraceeval: Remove the need of TRACEEVAL_TYPE_NONE Steven Rostedt
2023-09-29 10:00 ` [PATCH 1/2] libtraceeval: Remove need to use TRACEEVAL_TYPE_NONE in keys and vals Steven Rostedt
2023-09-29 10:00 ` [PATCH 2/2] libtraceeval samples: Remove adding TRACEEVAL_TYPE_NONE to " Steven Rostedt
2023-10-02 21:07 ` Ross Zwisler [this message]
2023-10-02 21:18   ` [PATCH 0/2] libtraceeval: Remove the need of TRACEEVAL_TYPE_NONE Ross Zwisler
2023-10-03 13:48     ` 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=20231002210749.GN1532181@google.com \
    --to=zwisler@google.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=stevie.6strings@gmail.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 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.