Skip to content

Commit 3d27d8c

Browse files
cuviperfweisbec
authored andcommitted
tracing: Make syscall tracepoints conditional
The syscall enter/exit tracepoints are only supported on archs that HAVE_SYSCALL_TRACEPOINTS, so the declarations should be #ifdef'ed. Also, the definition of syscall_regfunc and syscall_unregfunc should depend on this same config, rather than the ftrace-specific one. Signed-off-by: Josh Stone <jistone@redhat.com> Cc: Jason Baron <jbaron@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Jiaying Zhang <jiayingz@google.com> Cc: Martin Bligh <mbligh@google.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> LKML-Reference: <1251150194-1713-3-git-send-email-jistone@redhat.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
1 parent 6670000 commit 3d27d8c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎include/trace/syscall.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <asm/ptrace.h>
99

1010

11+
#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
12+
1113
extern void syscall_regfunc(void);
1214
extern void syscall_unregfunc(void);
1315

@@ -25,6 +27,8 @@ DECLARE_TRACE_WITH_CALLBACK(syscall_exit,
2527
syscall_unregfunc
2628
);
2729

30+
#endif
31+
2832
/*
2933
* A syscall entry in the ftrace syscalls array.
3034
*

‎kernel/tracepoint.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ __initcall(init_tracepoints);
576576

577577
#endif /* CONFIG_MODULES */
578578

579-
#ifdef CONFIG_FTRACE_SYSCALLS
579+
#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
580580

581581
static DEFINE_MUTEX(regfunc_mutex);
582582
static int sys_tracepoint_refcount;

0 commit comments

Comments
 (0)