Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142918
b: refs/heads/master
c: 47788c5
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Apr 9, 2009
1 parent e226d7c commit b9acc09
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f876d346e3807647b1de411de6a86c44821896ca
refs/heads/master: 47788c58e66c050982241d9a05eb690daceb05a9
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <linux/init.h>
#include <linux/list.h>

#include <trace/syscall.h>

#include <asm/cacheflush.h>
#include <asm/ftrace.h>
#include <asm/nops.h>
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/audit.h>
#include <linux/seccomp.h>
#include <linux/signal.h>
#include <linux/ftrace.h>

#include <asm/uaccess.h>
#include <asm/pgtable.h>
Expand All @@ -35,6 +34,8 @@
#include <asm/proto.h>
#include <asm/ds.h>

#include <trace/syscall.h>

#include "tls.h"

enum x86_regset {
Expand Down
29 changes: 0 additions & 29 deletions trunk/include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,33 +511,4 @@ static inline void trace_hw_branch_oops(void) {}

#endif /* CONFIG_HW_BRANCH_TRACER */

/*
* A syscall entry in the ftrace syscalls array.
*
* @name: name of the syscall
* @nb_args: number of parameters it takes
* @types: list of types as strings
* @args: list of args as strings (args[i] matches types[i])
*/
struct syscall_metadata {
const char *name;
int nb_args;
const char **types;
const char **args;
};

#ifdef CONFIG_FTRACE_SYSCALLS
extern void arch_init_ftrace_syscalls(void);
extern struct syscall_metadata *syscall_nr_to_meta(int nr);
extern void start_ftrace_syscalls(void);
extern void stop_ftrace_syscalls(void);
extern void ftrace_syscall_enter(struct pt_regs *regs);
extern void ftrace_syscall_exit(struct pt_regs *regs);
#else
static inline void start_ftrace_syscalls(void) { }
static inline void stop_ftrace_syscalls(void) { }
static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
#endif

#endif /* _LINUX_FTRACE_H */
2 changes: 1 addition & 1 deletion trunk/include/linux/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct old_linux_dirent;
#include <asm/signal.h>
#include <linux/quota.h>
#include <linux/key.h>
#include <linux/ftrace.h>
#include <trace/syscall.h>

#define __SC_DECL1(t1, a1) t1 a1
#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
Expand Down
35 changes: 35 additions & 0 deletions trunk/include/trace/syscall.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#ifndef _TRACE_SYSCALL_H
#define _TRACE_SYSCALL_H

#include <asm/ptrace.h>

/*
* A syscall entry in the ftrace syscalls array.
*
* @name: name of the syscall
* @nb_args: number of parameters it takes
* @types: list of types as strings
* @args: list of args as strings (args[i] matches types[i])
*/
struct syscall_metadata {
const char *name;
int nb_args;
const char **types;
const char **args;
};

#ifdef CONFIG_FTRACE_SYSCALLS
extern void arch_init_ftrace_syscalls(void);
extern struct syscall_metadata *syscall_nr_to_meta(int nr);
extern void start_ftrace_syscalls(void);
extern void stop_ftrace_syscalls(void);
extern void ftrace_syscall_enter(struct pt_regs *regs);
extern void ftrace_syscall_exit(struct pt_regs *regs);
#else
static inline void start_ftrace_syscalls(void) { }
static inline void stop_ftrace_syscalls(void) { }
static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
#endif

#endif /* _TRACE_SYSCALL_H */
2 changes: 1 addition & 1 deletion trunk/kernel/trace/trace_syscalls.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <trace/syscall.h>
#include <linux/kernel.h>
#include <linux/ftrace.h>
#include <asm/syscall.h>

#include "trace_output.h"
Expand Down

0 comments on commit b9acc09

Please sign in to comment.