trace-cmd library: Have clock source TAI parse to seconds
PATCH 1/1 trace-cmd library: Have clock source TAI parse to seconds
From: "Steven Rostedt (Google)" <[email protected]>
Tell trace-cmd that the "tai" clock source should be displayed in seconds and needs to be parsed as such.
Instead of:
sleep-2084 [001]1651097314396951318: function: __mutex_unlock_slowpath
sleep-2084 [001]1651097314396951516: function: ktime_get_mono_fast_ns
sleep-2084 [001]1651097314396951773: function: ktime_get_mono_fast_ns
sleep-2084 [001]1651097314396951773: function: rcu_read_lock_sched_held
sleep-2084 [001]1651097314396951949: function: ktime_get_mono_fast_ns
sleep-2084 [001]1651097314396952359: function: ktime_get_mono_fast_nsDisplay as:
sleep-2084 [001] 1651097314.396951: function: __mutex_unlock_slowpath
sleep-2084 [001] 1651097314.396952: function: ktime_get_mono_fast_ns
sleep-2084 [001] 1651097314.396952: function: ktime_get_mono_fast_ns
sleep-2084 [001] 1651097314.396952: function: rcu_read_lock_sched_held
sleep-2084 [001] 1651097314.396952: function: ktime_get_mono_fast_ns
sleep-2084 [001] 1651097314.396952: function: ktime_get_mono_fast_nsSigned-off-by Steven Rostedt (Google) <[email protected]>
--- lib/trace-cmd/trace-input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/trace-cmd/trace-input.c +2 -1
@@ -3868,7 +3868,8 @@ static void extract_trace_clock(struct tracecmd_input *handle, char *line)/* Clear usecs if not one of the specified clocks */ if (strcmp (clock,"local" ) &&strcmp (clock,"global" ) &&strcmp (clock,"uptime" ) &&strcmp (clock,"perf" ) && -strncmp (clock,"mono" ,4 ) &&strcmp (clock,TSCNSEC_CLOCK )) +strncmp (clock,"mono" ,4 ) &&strcmp (clock,TSCNSEC_CLOCK ) && +strcmp (clock,"tai" )) handle->flags &= ~TRACECMD_FL_IN_USECS ; }
Signature · 1 line
2.35.1