On Thu, 3 Aug 2023 18:53:58 -0400 Stevie Alvarez <stevie.6strings@xxxxxxxxx> wrote: > From: "Stevie Alvarez (Google)" <stevie.6strings@xxxxxxxxx> > > Changes in v2: > * Renamed interface from histograms.h to traceeval-hist.h. > * Internal traceeval_type arrays terminated by size rather than type. > * type_alloc() guarantees traceeval_type name field is a valid pointer. > * traceeval_release() sets released pointers to NULL. > * Conditional simplifications and fixes across the board. > * Removed function stubs and their interface definitions. > * Added a timestamp flag. > * Added typedefs for traceeval_dynamic helper function signatures. > * Documentation follows established conventions (kernel docs, line comments). > * Documentation moved from interface to source code. > * Internal testing interface. > * General documentation spell checking. > > Since the addition of the traceeval_dynamic function signature typedefs, > warnings pertaining to these function signatures and traceeval_type have > popped up. Steven, Ross, and anyone else, any ideas on why these > warnings are showing up? > > Warning from function signatures in include/traceeval-hist.h, line 65 and 69: > warning: ‘struct traceeval_type’ declared inside parameter list will > not be visible outside of this definition or declaration > > struct traceeval_type *); This is because the typedef is before the declaration. Just add: struct traceeval_type; above it. > > Warning from dyn_release call in src/histograms.c line 258: > warning: passing argument 2 of > ‘(defs + (sizetype)(i * 48))->dyn_release’ from incompatible > pointer type > > defs[i].dyn_release(data[i].dyn_data, &defs[i]); Try passing in: defs + i I'll review these later today. -- Steve > > note: expected ‘struct traceeval_type *’ but argument is of type > ‘struct traceeval_type *’ > > Warning from dyn_cmp call in src/histograms.c line 409: > warning: passing argument 3 of ‘type->dyn_cmp’ from incompatible > pointer type > > return type->dyn_cmp(orig->dyn_data, copy->dyn_data, type); > > note: expected ‘struct traceeval_type *’ but argument is of type > ‘struct traceeval_type *’ > > --- > v1 discussion: https://lore.kernel.org/linux-trace-devel/20230731212542.3fb668b1@xxxxxxxxxxxxxxxxxx/T/ > > Stevie Alvarez (Google) (5): > histograms: Initial histograms interface > histograms: Add traceeval initialize > histograms: Add traceeval release > histograms: Add traceeval compare > histograms: Initial unit tests > > Makefile | 2 +- > include/traceeval-hist.h | 135 ++++++++++ > include/traceeval-test.h | 15 ++ > src/Makefile | 1 + > src/histograms.c | 522 +++++++++++++++++++++++++++++++++++++++ > utest/.gitignore | 1 + > utest/Makefile | 35 +++ > utest/eval-test.h | 13 + > utest/eval-utest.c | 28 +++ > utest/traceeval-utest.c | 217 ++++++++++++++++ > 10 files changed, 968 insertions(+), 1 deletion(-) > create mode 100644 include/traceeval-hist.h > create mode 100644 include/traceeval-test.h > create mode 100644 src/histograms.c > create mode 100644 utest/.gitignore > create mode 100644 utest/Makefile > create mode 100644 utest/eval-test.h > create mode 100644 utest/eval-utest.c > create mode 100644 utest/traceeval-utest.c >
![]() |