diff mbox series

libtracefs sql: Rename TIMESTAMP_USECS_DELTA to TIMESTAMP_DELTA_USECS

Message ID 20240108215504.27208750@gandalf.local.home (mailing list archive)
State Accepted
Commit b2dc3e0da66fa2d7989a56c71391a99927ef4bb9
Headers show
Series libtracefs sql: Rename TIMESTAMP_USECS_DELTA to TIMESTAMP_DELTA_USECS | expand

Commit Message

Steven Rostedt Jan. 9, 2024, 2:55 a.m. UTC
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 mbox series

Patch

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"