Skip to content

Commit

Permalink
tracing: Make syscall tracepoints conditional
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cuviper authored and fweisbec committed Aug 25, 2009
1 parent 6670000 commit 3d27d8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions include/trace/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <asm/ptrace.h>


#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS

extern void syscall_regfunc(void);
extern void syscall_unregfunc(void);

Expand All @@ -25,6 +27,8 @@ DECLARE_TRACE_WITH_CALLBACK(syscall_exit,
syscall_unregfunc
);

#endif

/*
* A syscall entry in the ftrace syscalls array.
*
Expand Down
2 changes: 1 addition & 1 deletion kernel/tracepoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ __initcall(init_tracepoints);

#endif /* CONFIG_MODULES */

#ifdef CONFIG_FTRACE_SYSCALLS
#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS

static DEFINE_MUTEX(regfunc_mutex);
static int sys_tracepoint_refcount;
Expand Down

0 comments on commit 3d27d8c

Please sign in to comment.