path: root/tools/testing/selftests/ftrace/ftracetest
diff options
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>2016-12-09 15:19:38 +0100
committerSteven Rostedt <rostedt@goodmis.org>2016-12-12 21:21:43 -0500
commitd4d7ccc834fe2401084e01fb043ad70ac410b19d (patch)
tree137ef8ce9233754ae09aa1e808e26fc70760c67e /tools/testing/selftests/ftrace/ftracetest
parenttracing/kprobes: Add a helper method to return number of probe hits (diff)
kprobes/trace: Fix kprobe selftest for newer gcc
Commit 265a5b7ee3eb ("kprobes/trace: Fix kprobe selftest for gcc 4.6") has added __used attribute to kprobe_trace_selftest_target to ensure that the method is listed in kallsyms table. However, even though the method remains in the kernel image, the actual call is optimized away as there are no side effects and the return value is never checked. Add a return value check and a 'noinline' attribute to ensure that an inlined copy of the method is not used by the caller. Also add checks that verify that the kprobe was really hit, as at the moment the tests show positive results despite the test method being optimized away. Finally, add __init annotations to find_trace_probe_file() and kprobe_trace_selftest_target() as they are only called from within an __init method. Link: http://lkml.kernel.org/r/1481293178-3128-2-git-send-email-marcin.nowakowski@imgtec.com Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions