[PATCH] libtracefs sql: Rename TIMESTAMP_USECS_DELTA to TIMESTAMP_DELTA_USECS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux