mbox series

[v3,0/2] libtraceeval: Add delta interface

Message ID 20231009025354.1577934-1-rostedt@goodmis.org (mailing list archive)
Headers show
Series libtraceeval: Add delta interface | expand

Message

Steven Rostedt Oct. 9, 2023, 2:53 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

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/20231006160252.009f9560@gandalf.local.home/

- 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