From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: [PATCH] libtracefs sql: Rename TIMESTAMP_USECS_DELTA to TIMESTAMP_DELTA_USECS
Date: Mon, 8 Jan 2024 21:55:04 -0500 [thread overview]
Message-ID: <20240108215504.27208750@gandalf.local.home> (raw)
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
The few times I used the TIMESTAMP_USECS_DELTA I kept writing it as
TIMESTAMP_DELTA_USECS. It makes more sense to add the USECS afterward, and
it's just converting the TIMESTAMP_DELTA to use USECS.
That is, we have:
TIMESTAMP and TIMESTAMP_USECS
We should then have
TIMSTAMP_DELTA and TIMESTAMP_DELTA_USECS
which is just converting the TIMESTAMP_DELTA into microseconds from
nanoseconds like TIMESTAMP_USECS converts TIMESTAMP into microseconds from
nanoseconds.
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
Documentation/libtracefs-sql.txt | 4 ++--
src/tracefs-sqlhist.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/libtracefs-sql.txt b/Documentation/libtracefs-sql.txt
index 7921509f3825..806fbe466658 100644
--- a/Documentation/libtracefs-sql.txt
+++ b/Documentation/libtracefs-sql.txt
@@ -134,12 +134,12 @@ Because it is so common to have:
(end.TIMESTAMP_USECS - start.TIMESTAMP_USECS)
--
-The above can be represented with *TIMESTAMP_USECS_DELTA* or if nanoseconds are OK, you can
+The above can be represented with *TIMESTAMP_DELTA_USECS* or if nanoseconds are OK, you can
use *TIMESTAMP_DELTA*. That is, the previous select can also be represented by:
[source,c]
--
-select start.pid, TIMESTAMP_USECS_DELTA as lat from sched_waking as start JOIN sched_switch as end ON start.pid = end.next_pid
+select start.pid, TIMESTAMP_DELTA_USECS as lat from sched_waking as start JOIN sched_switch as end ON start.pid = end.next_pid
--
diff --git a/src/tracefs-sqlhist.c b/src/tracefs-sqlhist.c
index e7a4158d1dc2..ecf09ce562ce 100644
--- a/src/tracefs-sqlhist.c
+++ b/src/tracefs-sqlhist.c
@@ -40,7 +40,7 @@ enum field_type {
for (expr = (table)->fields; expr; expr = (field)->next)
#define TIMESTAMP_COMPARE "TIMESTAMP_DELTA"
-#define TIMESTAMP_USECS_COMPARE "TIMESTAMP_USECS_DELTA"
+#define TIMESTAMP_USECS_COMPARE "TIMESTAMP_DELTA_USECS"
#define EVENT_START "__START_EVENT__"
#define EVENT_END "__END_EVENT__"
#define TIMESTAMP_NSECS "TIMESTAMP"
--
2.43.0
reply other threads:[~2024-01-09 2:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240108215504.27208750@gandalf.local.home \
--to=rostedt@goodmis.org \
--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 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).