Skip to content

libtraceeval: Add delta interface

Steven Rostedt linux-trace-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v21 patch 0 repliesSuperseded
  3. v11 patch 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libtraceeval: Add traceeval_delta_start/continue/stop() APIinclude/traceeval.h samples/task-eval.c samples/wake-lat.c +4 more+765 -4220 replies
2/2libtraceeval: Add traceeval_iterator_delta_start_get()include/traceeval.h samples/task-eval.c src/delta.c +2 more+219 -350 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/2] libtraceeval: Add delta interface

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

The first iteration of libtraceeval sought out to facilitate timings between events. For instance, the time between waking up and scheduling in of a task (the wake up latency). But that code API quickly became unusable, as there were several use cases that did not need the timings, and it was awkward using it.

The libtraceeval was redesigned to be simple histograms that could be queried for the last instance, and easily have them be joined. This worked well.

Now this adds a new interface to only require a single traceeval again, but with a attached simple "delta" traceeval internally. This internal traceeval keeps track of the timestamps and calculates a delta to be used to insert.

Man pages will come later.

Changes since v2: https://lore.kernel.org/all/[email protected]/

- This is a basic redesign. Instead of creating a traceeval_delta instance, which when playing with it I found it to be too limiting in its use (although it was simple). This design is to just add a way to create a new key mapping for the start and stop events. This also allows the start to pass values to the stop (much like how the ftrace synthetic events work), and then these values can be used to insert into the main traceeval.

Steven Rostedt (Google) (2):
libtraceeval: Add traceeval_delta_start/continue/stop() API
libtraceeval: Add traceeval_iterator_delta_start_get()

 include/traceeval.h |  59 ++++
 samples/task-eval.c | 649 ++++++++++++++++++++++----------------------
 samples/wake-lat.c  |  61 ++---
 src/Makefile        |   1 +
 src/delta.c         | 431 +++++++++++++++++++++++++++++
 src/eval-local.h    |  21 ++
 src/histograms.c    | 137 ++++++----
 7 files changed, 943 insertions(+), 416 deletions(-)
 create mode 100644 src/delta.c
Signature · 1 line
2.40.1