1
0
Fork 0
alistair23-linux/kernel/trace
Steven Rostedt (VMware) 12ad0cb212 tracing: Use trace_clock_local() for looping in preemptirq_delay_test.c
The preemptirq_delay_test module is used for the ftrace selftest code that
tests the latency tracers. The problem is that it uses ktime for the delay
loop, and then checks the tracer to see if the delay loop is caught, but the
tracer uses trace_clock_local() which uses various different other clocks to
measure the latency. As ktime uses the clock cycles, and the code then
converts that to nanoseconds, it causes rounding errors, and the preemptirq
latency tests are failing due to being off by 1 (it expects to see a delay
of 500000 us, but the delay is only 499999 us). This is happening due to a
rounding error in the ktime (which is totally legit). The purpose of the
test is to see if it can catch the delay, not to test the accuracy between
trace_clock_local() and ktime_get(). Best to use apples to apples, and have
the delay loop use the same clock as the latency tracer does.

Cc: stable@vger.kernel.org
Fixes: f96e8577da ("lib: Add module for testing preemptoff/irqsoff latency tracers")
Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-10-17 15:35:33 -04:00
..
Kconfig Masami found an off by one bug in the code that keeps "notrace" functions 2018-08-23 13:07:00 -07:00
Makefile tracing: Allow gcov profiling on only ftrace subsystem 2018-08-21 09:11:49 -04:00
blktrace.c for-4.19/post-20180822 2018-08-22 13:38:05 -07:00
bpf_trace.c tracing: Add SPDX License format to bpf_trace.c 2018-08-16 19:07:36 -04:00
ftrace.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
power-traces.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
preemptirq_delay_test.c tracing: Use trace_clock_local() for looping in preemptirq_delay_test.c 2018-10-17 15:35:33 -04:00
ring_buffer.c ring-buffer: Allow for rescheduling when removing pages 2018-09-17 18:15:11 -04:00
ring_buffer_benchmark.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
rpm-traces.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.c Updates for v4.19: 2018-08-20 18:32:00 -07:00
trace.h tracing: Fix SPDX format headers to use C++ style comments 2018-08-16 19:08:06 -04:00
trace_benchmark.c rcu: Rename cond_resched_rcu_qs() to cond_resched_tasks_rcu_qs() 2018-05-15 10:27:29 -07:00
trace_benchmark.h tracing: Fix SPDX format headers to use C++ style comments 2018-08-16 19:08:06 -04:00
trace_branch.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_clock.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_entries.h tracing: Fix SPDX format headers to use C++ style comments 2018-08-16 19:08:06 -04:00
trace_event_perf.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_events.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_events_filter.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_events_filter_test.h tracing: Fix SPDX format headers to use C++ style comments 2018-08-16 19:08:06 -04:00
trace_events_hist.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_events_trigger.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_export.c tracing: Add trigger file for trace_markers tracefs/ftrace/print 2018-05-29 08:28:53 -04:00
trace_functions.c tracing: Update stack trace skipping for ORC unwinder 2018-01-23 15:57:00 -05:00
trace_functions_graph.c tracing: Fix missing return symbol in function_graph output 2018-07-03 18:47:11 -04:00
trace_hwlat.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_irqsoff.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_kdb.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_kprobe.c Masami found an off by one bug in the code that keeps "notrace" functions 2018-08-23 13:07:00 -07:00
trace_kprobe_selftest.c selftest/ftrace: Move kprobe selftest function to separate compile unit 2018-07-30 18:41:04 -04:00
trace_kprobe_selftest.h tracing: Fix SPDX format headers to use C++ style comments 2018-08-16 19:08:06 -04:00
trace_mmiotrace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_nop.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_output.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_output.h tracing: Fix SPDX format headers to use C++ style comments 2018-08-16 19:08:06 -04:00
trace_preemptirq.c tracing: More reverting of "tracing: Centralize preemptirq tracepoints and unify their usage" 2018-08-10 15:12:00 -04:00
trace_printk.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_probe.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_probe.h tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_sched_switch.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_sched_wakeup.c Merge branch 'linus' into sched/core, to pick up fixes 2017-11-08 10:17:15 +01:00
trace_selftest.c Tracing updates for 4.15: 2017-11-17 14:58:01 -08:00
trace_selftest_dynamic.c ftrace: Mark function tracer test functions noinline/noclone 2018-01-23 15:57:29 -05:00
trace_seq.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
trace_stack.c tracing: Fix the file mode of stack tracer 2018-05-03 11:58:05 -04:00
trace_stat.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_stat.h tracing: Fix SPDX format headers to use C++ style comments 2018-08-16 19:08:06 -04:00
trace_syscalls.c Tracing updates for 4.15: 2017-11-17 14:58:01 -08:00
trace_uprobe.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
tracing_map.c tracing: Add SPDX License format tags to tracing files 2018-08-16 19:08:06 -04:00
tracing_map.h tracing: Fix SPDX format headers to use C++ style comments 2018-08-16 19:08:06 -04:00