From: Steven Rostedt <rostedt@goodmis.org>
To: Stevie Alvarez <stevie.6strings@gmail.com>
Cc: linux-trace-devel@vger.kernel.org, Ross Zwisler <zwisler@google.com>
Subject: Re: [PATCH v4 2/5] histograms: Add traceeval initialize and release
Date: Wed, 9 Aug 2023 15:04:31 -0400 [thread overview]
Message-ID: <20230809150403.109d6c49@gandalf.local.home> (raw)
In-Reply-To: <20230809175340.3066-3-stevie.6strings@gmail.com>
On Wed, 9 Aug 2023 13:53:35 -0400
Stevie Alvarez <stevie.6strings@gmail.com> wrote:
> From: Stevie Alvarez (Google) <stevie.6strings@gmail.com>
>
> traceeval_init() creates a new struct traceeval instance with regards
> to the struct traceeval_type array arguments keys and vals. These arrays
> define the structure of the histogram, with each describing the expected
> structure of inserted arrays of union traceeval_data. The keys and vals
> arguments are copied on the heap to ensure that the struct traceeval
> instance has access to the definition regardless of how the user
> initialized keys and vals.
>
> traceeval_init() uses traceeval_release() and it's helper functions to
> clean up on error.
>
> traceeval_release() deconstructs a given struct traceeval instance. It
> frees any data allocated to the heap within the entries to the histogram,
> and the names allocated for the struct traceeval_type key-value
> definitions.
>
> Signed-off-by: Stevie Alvarez (Google) <stevie.6strings@gmail.com>
> ---
> Makefile | 2 +-
> include/traceeval-hist.h | 7 +
> src/Makefile | 1 +
> src/histograms.c | 315 +++++++++++++++++++++++++++++++++++++++
> 4 files changed, 324 insertions(+), 1 deletion(-)
> create mode 100644 src/histograms.c
>
> diff --git a/Makefile b/Makefile
> index 4a24d5a..3ea051c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -172,7 +172,7 @@ libs: $(LIBRARY_A) $(LIBRARY_SO)
>
> VALGRIND = $(shell which valgrind)
> UTEST_DIR = utest
> -UTEST_BINARY = trace-utest
> +UTEST_BINARY = eval-utest
>
I forgot to mention this in previous reviews. I'm assuming this was a
leftover from previous versions?
Rest of this patch looks good.
-- Steve
> test: force $(LIBRARY_STATIC)
> ifneq ($(CUNIT_INSTALLED),1)
> diff --git a/include/traceeval-hist.h b/include/traceeval-hist.h
> index 3565756..63e8b0e 100644
> --- a/include/traceeval-hist.h
> +++ b/include/traceeval-hist.h
> @@ -127,4 +127,11 @@ struct traceeval_iterator;
>
next prev parent reply other threads:[~2023-08-09 19:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 17:53 [PATCH v4 0/5] histograms: Fix memory leak, logic bugs, legibility Stevie Alvarez
2023-08-09 17:53 ` [PATCH v4 1/5] histograms: Initial histograms interface Stevie Alvarez
2023-08-09 18:53 ` Steven Rostedt
2023-08-09 17:53 ` [PATCH v4 2/5] histograms: Add traceeval initialize and release Stevie Alvarez
2023-08-09 19:04 ` Steven Rostedt [this message]
2023-08-09 17:53 ` [PATCH v4 3/5] histograms: Add traceeval compare Stevie Alvarez
2023-08-09 17:53 ` [PATCH v4 4/5] histograms: Add traceeval query Stevie Alvarez
2023-08-09 19:57 ` Steven Rostedt
2023-08-11 2:00 ` Steven Rostedt
2023-08-09 17:53 ` [PATCH v4 5/5] histograms: Add traceeval insert Stevie Alvarez
2023-08-10 2:57 ` Steven Rostedt
2023-08-09 18:30 ` [PATCH v4 0/5] histograms: Fix memory leak, logic bugs, legibility Steven Rostedt
2023-08-10 21:16 ` Ross Zwisler
2023-08-17 22:08 ` 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=20230809150403.109d6c49@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=stevie.6strings@gmail.com \
--cc=zwisler@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;
as well as URLs for NNTP newsgroup(s).