linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harald Seiler <hws@denx.de>
To: Steven Rostedt <rostedt@goodmis.org>, linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH 0/6] libtracefs: Fixes for sqlhist
Date: Tue, 07 Jun 2022 12:01:56 +0200	[thread overview]
Message-ID: <7f97718f4f23603c08baba8f801a688d5a41448b.camel@denx.de> (raw)
In-Reply-To: <20220606192953.334315-1-rostedt@goodmis.org>

Hi,

On Mon, 2022-06-06 at 15:29 -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> 
> At Kernel Recipes, I demonstrated sqlhist and how to use it. Along the way,
> I discovered several bugs. This series addresses those bugs that were found.

For the whole series:

Tested-by: Harald Seiler <hws@denx.de>

As a sanity check I accumulated offcpu time for a process:

	sqlhist -e -n 'offcpu' 'SELECT start.prev_comm AS comm, (end.TIMESTAMP_USECS - start.TIMESTAMP_USECS) as lat FROM sched_switch as start JOIN sched_switch as end ON start.prev_pid == end.next_pid WHERE start.prev_comm == "ping"'
	echo "hist:keys=comm:vals=lat:sort=lat" >/sys/kernel/tracing/events/synthetic/offcpu/trigger

And then verified the collected time is consistent by comparing with
getrusage(2) values for the process (as returned by time(1)).

And indeed,

	wall_time == ru_utime + ru_stime + lat

So it is measuring exactly what I want.

Thanks again for getting this working!

> Steven Rostedt (Google) (6):
>   libtracefs: Fix make sqlhist when built again
>   libtracefs: Add libtracefs.a to dependency of sqlhist
>   libtracefs: Differentiate FROM and JOIN events if they are the same
>     event
>   libtracefs: Use unique names for sql field variables
>   libtracefs: Differentiate WHERE clause when FROM and TO events are the
>     same
>   libtracefs sqlhist: Report errors executing the commands
> 
>  Documentation/libtracefs-sql.txt |  18 ++++--
>  include/tracefs-local.h          |   4 ++
>  samples/Makefile                 |   4 +-
>  src/sqlhist-parse.h              |   3 +-
>  src/tracefs-hist.c               | 105 ++++++++++++++++++++++++++++---
>  src/tracefs-sqlhist.c            |  44 +++++++++----
>  6 files changed, 150 insertions(+), 28 deletions(-)
> 

-- 
Harald

      parent reply	other threads:[~2022-06-07 10:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 19:29 [PATCH 0/6] libtracefs: Fixes for sqlhist Steven Rostedt
2022-06-06 19:29 ` [PATCH 1/6] libtracefs: Fix make sqlhist when built again Steven Rostedt
2022-06-06 19:29 ` [PATCH 2/6] libtracefs: Add libtracefs.a to dependency of sqlhist Steven Rostedt
2022-06-06 19:29 ` [PATCH 3/6] libtracefs: Differentiate FROM and JOIN events if they are the same event Steven Rostedt
2022-06-06 19:29 ` [PATCH 4/6] libtracefs: Use unique names for sql field variables Steven Rostedt
2022-06-06 19:29 ` [PATCH 5/6] libtracefs: Differentiate WHERE clause when FROM and TO events are the same Steven Rostedt
2022-06-06 19:29 ` [PATCH 6/6] libtracefs sqlhist: Report errors executing the commands Steven Rostedt
2022-06-07 10:01 ` Harald Seiler [this message]

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=7f97718f4f23603c08baba8f801a688d5a41448b.camel@denx.de \
    --to=hws@denx.de \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.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 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 NNTP newsgroup(s).