All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Viktor Rosendahl <Viktor.Rosendahl@bmw.de>
Cc: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: Adding latency tracking to trace-cmd
Date: Wed, 24 Feb 2021 11:54:08 -0500	[thread overview]
Message-ID: <20210224115408.1c76ee3f@gandalf.local.home> (raw)

Hi Viktor,

While doing some tests to trace-cmd, I found that the trace-cmd record was
broken for latency tracers, and has been for some time. That's probably
because nobody has been using it for such.

That is, trace-cmd record is mostly used for "flyrecord" which is the
constant recording of tracing. But if the user records one of the latency
tracers (preemptirqsoff, wakeup_rt, etc), then it switches to "latency"
mode and only takes a snapshot at the end of the recording. This is what I
found to be broken, because it reset the tracing before taking the
snapshot and lost whatever it was recording. Nobody seemed to complain
about it, so I guess nobody cared.

The fix is simple, and I was about to do so, but then I thought about your
latency-collector tool, and thought that should be exactly what trace-cmd
should do for such tracers. That is, instead of just taking a snapshot of
the latency at the end of the recording (which it was suppose to do now),
it should act like your latency-collector tool, and take snapshots
every time there's a new latency.

My question to you is, would you like to work on adding that feature to
trace-cmd?

  git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git

(which requires the libtracefs and libtracevent libraries).

I'm thinking if someone were to do:

 trace-cmd record -p wakeup_rt 

It would then act just like the latency-collector and record every new
instance of a latency into the trace.dat file, where:

 trace-cmd report

would then nicely format that data for the user.

Thoughts?

-- Steve

             reply	other threads:[~2021-02-24 16:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 16:54 Steven Rostedt [this message]
2021-02-24 19:22 ` Adding latency tracking to trace-cmd Viktor.Rosendahl
2021-02-24 20:10   ` Steven Rostedt
2021-04-06 17:38   ` Steven Rostedt
2021-04-06 20:03     ` Viktor.Rosendahl
2021-04-06 20:24       ` Viktor.Rosendahl
2021-04-06 20:42       ` Steven Rostedt
2021-04-08 21:01         ` Viktor Rosendahl
2021-04-08 21:17           ` 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=20210224115408.1c76ee3f@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=Viktor.Rosendahl@bmw.de \
    --cc=linux-trace-devel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.