Re: How to display a ktime value as trace timestamp in trace output?
From: Steven Rostedt <rostedt@goodmis.org>
Date: 2024-02-29 22:03:05
From: Steven Rostedt <rostedt@goodmis.org>
Date: 2024-02-29 22:03:05
On Wed, 31 Jan 2024 14:47:31 +0000 David Howells [off-list ref] wrote:
Hi Steven,
Hi David, Sorry, I just noticed this email as it was buried in other unread emails :-p
I have a tracepoint in AF_RXRPC that displays information about a timeout I'm going to set. I have the timeout in a ktime_t as an absolute time. Is there a way to display this in the trace output such that it looks like a trace timestamp and can be (roughly) correlated with the displayed timestamps?
Have you tried the other clocks?
{ ktime_get_mono_fast_ns, "mono", 1 },
{ ktime_get_raw_fast_ns, "mono_raw", 1 },
{ ktime_get_boot_fast_ns, "boot", 1 },
The above are the functions used for the tracing timestamps.
-- Steve
I tried subtracting ktime_get_read() - ktime_get_boottime() from it and displaying the result, but it looked about one and a bit seconds out from the trace timestamp.