Linux-Trace-Devel Archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: Ross Zwisler <zwisler@google.com>,
	"Steven Rostedt (Google)" <rostedt@goodmis.org>
Subject: [PATCH v3 0/2] libtraceeval: Add delta interface
Date: Sun,  8 Oct 2023 22:53:52 -0400	[thread overview]
Message-ID: <20231009025354.1577934-1-rostedt@goodmis.org> (raw)

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

-- 
2.40.1


             reply	other threads:[~2023-10-09  2:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09  2:53 Steven Rostedt [this message]
2023-10-09  2:53 ` [PATCH v3 1/2] libtraceeval: Add traceeval_delta_start/continue/stop() API Steven Rostedt
2023-10-09  2:53 ` [PATCH v3 2/2] libtraceeval: Add traceeval_iterator_delta_start_get() Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231009025354.1577934-1-rostedt@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=zwisler@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).