dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/kernel/trace
Heiko Carstens a22506347d ftrace: preemptoff selftest not working
Impact: fix preemptoff and preemptirqsoff tracer self-tests

I was wondering why the preemptoff and preemptirqsoff tracer selftests
don't work on s390. After all its just that they get called from
non-preemptible context:

kernel_init() will execute all initcalls, however the first line in
kernel_init() is lock_kernel(), which causes the preempt_count to be
increased. Any later calls to add_preempt_count() (especially those
from the selftests) will therefore not result in a call to
trace_preempt_off() since the check below in add_preempt_count()
will be false:

        if (preempt_count() == val)
                trace_preempt_off(CALLER_ADDR0, get_parent_ip(CALLER_ADDR1));

Hence the trace buffer will be empty.

Fix this by releasing the BKL during the self-tests.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-11-18 21:54:50 +01:00
..
Kconfig trace: rename unlikely profiler to branch profiler 2008-11-12 22:27:58 +01:00
Makefile ftrace: rename trace_unlikely.c file 2008-11-12 22:28:40 +01:00
ftrace.c ftrace: make filtered functions effective on setting 2008-11-16 07:37:46 +01:00
ring_buffer.c Merge branches 'tracing/fastboot', 'tracing/ftrace' and 'tracing/urgent' into tracing/core 2008-11-16 07:28:46 +01:00
trace.c ftrace: preemptoff selftest not working 2008-11-18 21:54:50 +01:00
trace.h tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_boot.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_branch.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_functions.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_functions_return.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_irqsoff.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_mmiotrace.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_nop.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_sched_switch.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_sched_wakeup.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_selftest.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00
trace_selftest_dynamic.c ftrace: fix dynamic ftrace selftest 2008-05-23 21:13:23 +02:00
trace_stack.c ftrace: insert in the ftrace_preempt_disable()/enable() functions 2008-11-04 10:09:49 +01:00
trace_sysprof.c tracing/ftrace: change the type of the init() callback 2008-11-16 07:55:23 +01:00