Closed derkling closed 7 years ago
Maybe @joelagnel can be interested in having a look since I think he had a similar "issue" with some Android traces in the past.
The documentation says "the timestamp in
@bjackman the only reference I can find related to the "." format is related to the specific description of the function tracer, I'm looking at this file: https://www.kernel.org/doc/Documentation/trace/ftrace.txt ... thus it could be very well a post-processing formatting.
Moreover, the description of the trace_clock
parameter says that the boot
clock comes from
ktime_get_boot_fast_ns()
... which name suggests it should return a ns based timestamp. There is also an explicit reference to possible required post-processing.
Update:
As I understand it the timestamp format in a trace depends upon the configured trace_clock - it's perfectly possible and valid to use the nanosecond boot clock.
Update:
LGTM... Let's get it merged ASAP 😁😁
Merged.
FTrace can be configured to report events timestamp using different clock sources which can be selected via the trace_clock sysfs attribute as described in: https://www.kernel.org/doc/Documentation/trace/ftrace.txt
The global clock source reports time in [s] with a [us] resolution. Other sources instead, like for example the boot clock, uses [ns]. Thus, in these last cases we do not have decimals in the timestamp.
Let's update the special fields regexp to match both [s] and [ns] formatted times. This also update the base test to add a set of trace events which are expressed in [ns] resolution.
Signed-off-by: Patrick Bellasi patrick.bellasi@arm.com