libtracefs sql: Rename TIMESTAMP_USECS_DELTA to TIMESTAMP_DELTA_USECS
PATCH 1/1 libtracefs sql: Rename TIMESTAMP_USECS_DELTA to TIMESTAMP_DELTA_USECS
From: "Steven Rostedt (Google)" <[email protected]>
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) <[email protected]>
--- Documentation/libtracefs-sql.txt | 4 ++-- src/tracefs-sqlhist.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/libtracefs-sql.txt +2 -2
@@ -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 --
src/tracefs-sqlhist.c +1 -1
@@ -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"
Signature · 1 line
2.43.0