Skip to content

trace-cmd library: Add and use new helper functions

Steven Rostedt linux-trace-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9tracecmd: Use make variable instead of if statement for zlib testMakefile lib/trace-cmd/Makefile tracecmd/Makefile+5 -100 replies
2/9tracecmd library: Add tracecmd_iterate_events()include/trace-cmd/trace-cmd.h lib/trace-cmd/trace-input.c+77 -00 replies
3/9tracecmd utest: Add test to test using the libraries to readutest/Makefile utest/tracecmd-utest.c+55 -20 replies
4/9tracecmd library: Add tracecmd_iterate_events_multi()include/trace-cmd/trace-cmd.h lib/trace-cmd/trace-input.c+97 -00 replies
5/9trace-cmd library: Allow callers to save private data in tracecmd_input handlersinclude/trace-cmd/trace-cmd.h lib/trace-cmd/trace-input.c+15 -00 replies
6/9trace-cmd report: Use tracecmd_iterate_events_multi()tracecmd/trace-read.c+87 -1270 replies
7/9trace-cmd library: Add filtering logic for iterating eventsinclude/trace-cmd/trace-cmd.h lib/trace-cmd/Makefile lib/trace-cmd/include/trace-cmd-local.h +2 more+242 -20 replies
8/9trace-cmd report: Make filter arguments match their filestracecmd/trace-read.c+85 -340 replies
9/9trace-cmd report: Use library tracecmd_filter_*() logictracecmd/trace-read.c+10 -1650 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] trace-cmd library: Add and use new helper functions

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

Add the following functions to the libtracecmd library:

tracecmd_set_private() - set private data to tracecmd_input handle tracecmd_get_private() - get private data from tracecmd_input handle tracecmd_iterate_events() - iterate all events for a single buffer in a
trace.dat file (can filter on CPUs)
tracecmd_iterate_events_multi() - iterate all events from multiple buffers
in a trace.dat file. (Does not filter on CPUs).
tracecmd_filter_add() - Add a filter to a tracecmd_input handle that will
filter the iterator funtions.
tracecmd_filter_match() - Will test a record against a given filter to see
if it matches or not.

As change trace-cmd to use these functions instead of doing the same thing internally.

Steven Rostedt (Google) (9):
tracecmd: Use make variable instead of if statement for zlib test tracecmd library: Add tracecmd_iterate_events() tracecmd utest: Add test to test using the libraries to read tracecmd library: Add tracecmd_iterate_events_multi() trace-cmd library: Allow callers to save private data in
tracecmd_input handlers
trace-cmd report: Use tracecmd_iterate_events_multi() trace-cmd library: Add filtering logic for iterating events trace-cmd report: Make filter arguments match their files trace-cmd report: Use library tracecmd_filter_*() logic

 Makefile                                |   3 +
 include/trace-cmd/trace-cmd.h           |  29 ++
 lib/trace-cmd/Makefile                  |   7 +-
 lib/trace-cmd/include/trace-cmd-local.h |   5 +
 lib/trace-cmd/trace-filter.c            | 197 ++++++++++
 lib/trace-cmd/trace-input.c             | 197 ++++++++++
 tracecmd/Makefile                       |   6 +-
 tracecmd/trace-read.c                   | 466 ++++++++----------------
 utest/Makefile                          |   4 +-
 utest/tracecmd-utest.c                  |  53 ++-
 10 files changed, 650 insertions(+), 317 deletions(-)
 create mode 100644 lib/trace-cmd/trace-filter.c
Signature · 1 line
2.35.1