Skip to content

histograms: Fix memory leak, logic bugs, legibility

Stevie Alvarez linux-trace-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 8 repliesIn review
  2. v35 of 6 patches 12 repliesSuperseded
  3. v25 patches 11 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches18 repliesSuperseded

Changes in v4 from the cover letter

* Reorder enum traceeval_data_type numeric types for algorithmic access.
* Reorder union traceeval_data numeric fields for legibility.
* Remove parenthesis from function name in kerneldocs.
* Optimize logic in type_alloc().
* Distinguish internal vs public interfaces within include statements.
* Rework copy_traceeval_data() logic for legibility.
* Rework comparator return types to fix query and insert bugs.
* update_entry() frees the entries old values to avoid a memory leak.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5histograms: Initial histograms interfaceinclude/traceeval-hist.h+130 -01 reply
2/5histograms: Add traceeval initialize and releaseMakefile include/traceeval-hist.h src/Makefile +1 more+324 -11 reply
3/5histograms: Add traceeval compareinclude/traceeval-test.h src/histograms.c+230 -00 replies
4/5histograms: Add traceeval queryinclude/traceeval-hist.h src/histograms.c+167 -02 replies
5/5histograms: Add traceeval insertinclude/traceeval-hist.h src/histograms.c+118 -01 reply

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRoss Zwisler
SeriesR-b
1/5
2/5
3/5
4/5
5/5

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

Read the v4 thread

Cover letter [PATCH v4 0/5] histograms: Fix memory leak, logic bugs, legibility

From: Stevie Alvarez (Google) <[email protected]>

Changes in v4:
* Reorder enum traceeval_data_type numeric types for algorithmic access.
* Reorder union traceeval_data numeric fields for legibility.
* Remove parenthesis from function name in kerneldocs.
* Optimize logic in type_alloc().
* Distinguish internal vs public interfaces within include statements.
* Rework copy_traceeval_data() logic for legibility.
* Rework comparator return types to fix query and insert bugs.
* update_entry() frees the entries old values to avoid a memory leak.

Steven, I didn't get around to adding in the cstring field to traceeval_data, as I wasn't able to completely grasp what you were looking for. My apologies.

---
v3 discussion: https://lore.kernel.org/linux-trace-devel/20230808180156.GA1300@3xKetch/T/#t

Stevie Alvarez (Google) (5):
histograms: Initial histograms interface
histograms: Add traceeval initialize and release
histograms: Add traceeval compare
histograms: Add traceeval query
histograms: Add traceeval insert

 Makefile                 |   2 +-
 include/traceeval-hist.h | 147 +++++++
 include/traceeval-test.h |  16 +
 src/Makefile             |   1 +
 src/histograms.c         | 804 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 969 insertions(+), 1 deletion(-)
 create mode 100644 include/traceeval-hist.h
 create mode 100644 include/traceeval-test.h
 create mode 100644 src/histograms.c
Signature · 1 line
2.41.0