Skip to content

libtraceeval: Even more updates!

Steven Rostedt linux-trace-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest11 patches 10 repliesIn review
  2. v19 patches 15 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11libtraceeval: Add check for updates to know to recreate iter arraysrc/eval-local.h src/histograms.c+74 -190 replies
2/11libtraceeval: Add traceeval_iterator_query()include/traceeval-hist.h samples/task-eval.c src/histograms.c+33 -10 replies
3/11libtraceeval: Add traceeval_iterator_results_release()include/traceeval-hist.h src/histograms.c+25 -01 reply
4/11libtraceeval: Add traceeval_iterator_stat()include/traceeval-hist.h samples/task-eval.c src/histograms.c+43 -120 replies
5/11libtraceeval: Add traceeval_iterator_remove()include/traceeval-hist.h src/histograms.c+46 -41 reply
6/11libtraceeval histogram: Add type to traceeval_data and make it a structureinclude/traceeval-hist.h samples/task-eval.c src/eval-local.h +1 more+153 -1504 replies
7/11libtraceveal: Add type checks to traceeval_data vals and keyssamples/task-eval.c src/histograms.c+18 -11 reply
8/11libtraceeval: Add size checks to insert and query functionsinclude/traceeval-hist.h src/histograms.c+25 -100 replies
9/11libtraceeval: Make traceeval_remove() check size of keys arrayinclude/traceeval-hist.h src/histograms.c+10 -41 reply
10/11libtraceeval: Make traceeval_stat() check size of keys arrayinclude/traceeval-hist.h src/histograms.c+14 -61 reply
11/11libtraceeval: Only do stats on values marked with the STAT flaginclude/traceeval-hist.h samples/task-eval.c src/histograms.c+22 -191 reply

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchRoss Zwisler
1/11R-b
2/11R-b
3/11R-b
4/11R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b
9/11R-b
10/11R-b
11/11R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/11] libtraceeval: Even more updates!

From: "Steven Rostedt (Google)" <[email protected]>

More updates to libtraceeval

- As the results and stats are often needed in the iterator loops, add helper functions to quickly retrieve them. The iterator has a handle on the current entry, no need to do a key lookup to find it.

- The iterator can be used to search for items to remove or update. Add a helper function to remove the current iterator item. This will also update the iterator so that other functions called are still safe, even if the removed entry is the current one.

- Convert traceeval_data into a proper structure with a "type" field and a union data portion. This will allow for checking the type of data being passed into the functions to make sure they match their corresponding types.

- Add checks to make sure that the data matches the types.

- Make traceeval_insert() and traceeval_query() into macros and add a traceeval_query_size() and traceeval_insert_size() that take the size of the list of data being passed into it. The macros work when the arrays are defined.

- Add checks to make sure the array sizes passed in match the sizes internally.

- Add back the STATS flag, and only do STATS on values that are numeric and have this set. This should speed things up, and also allow for optimizations in the future.

Changes since v1: https://lore.kernel.org/linux-trace-devel/[email protected]/

- Use of ARRAY_SIZE() macro to make some other macro logic simpler.

- Fix TRACEEVAL_FL_STAT (was a duplicate of 3 not 4) (Ross Zwisler)

- Add traceeval_remove_size() to check traceeval_remove()

- Add traceeval_query_size() to check traceeval_query()

- Add traceeval_stat_size() to check traceeval_stat()

- Add traceeval_iterator_results_release()

- Use TRACEEVAL_SET_NUMBER() on keys in task-eval.c (Ross Zwisler)

- Use is_stat_type() in copy_traceeval_data() (Ross Zwisler)

- Add type test to update_entry() (Ross Zwisler)

- Folded checking patch into size check patches (Ross Zwisler)

- Free entry on traceeval_remove() and trace_iterator_remove (Ross Zwisler)

- Fix added tab of return -1 (Ross Zwisler)

- Fix comment of traceeval_iterator_query() (Ross Zwisler)

- Fix comment of traceeval_iterator_remove() (Ross Zwisler)

Steven Rostedt (Google) (11):
libtraceeval: Add check for updates to know to recreate iter array
libtraceeval: Add traceeval_iterator_query()
libtraceeval: Add traceeval_iterator_results_release()
libtraceeval: Add traceeval_iterator_stat()
libtraceeval: Add traceeval_iterator_remove() libtraceeval histogram: Add type to traceeval_data and make it a
structure
libtraceveal: Add type checks to traceeval_data vals and keys
libtraceeval: Add size checks to insert and query functions
libtraceeval: Make traceeval_remove() check size of keys array
libtraceeval: Make traceeval_stat() check size of keys array
libtraceeval: Only do stats on values marked with the STAT flag

 include/traceeval-hist.h | 118 +++++++++----
 samples/task-eval.c      | 148 +++++++----------
 src/eval-local.h         |   6 +-
 src/histograms.c         | 349 +++++++++++++++++++++++++++++++--------
 4 files changed, 429 insertions(+), 192 deletions(-)
Signature · 1 line
2.40.1