mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
b725dfea24
Fix the following sparse warnings: CHECK kernel/tracepoint.c kernel/tracepoint.c:184:18: warning: incorrect type in assignment (different address spaces) kernel/tracepoint.c:184:18: expected struct tracepoint_func *tp_funcs kernel/tracepoint.c:184:18: got struct tracepoint_func [noderef] <asn:4>*funcs kernel/tracepoint.c:216:18: warning: incorrect type in assignment (different address spaces) kernel/tracepoint.c:216:18: expected struct tracepoint_func *tp_funcs kernel/tracepoint.c:216:18: got struct tracepoint_func [noderef] <asn:4>*funcs kernel/tracepoint.c:392:24: error: return expression in void function CC kernel/tracepoint.o kernel/tracepoint.c: In function tracepoint_module_going: kernel/tracepoint.c:491:6: warning: symbol 'syscall_regfunc' was not declared. Should it be static? kernel/tracepoint.c:508:6: warning: symbol 'syscall_unregfunc' was not declared. Should it be static? Link: http://lkml.kernel.org/r/1397049883-28692-1-git-send-email-mathieu.desnoyers@efficios.com Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
73 lines
1.4 KiB
C
73 lines
1.4 KiB
C
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM raw_syscalls
|
|
#define TRACE_INCLUDE_FILE syscalls
|
|
|
|
#if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_EVENTS_SYSCALLS_H
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
#include <asm/ptrace.h>
|
|
#include <asm/syscall.h>
|
|
|
|
|
|
#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
|
|
|
|
TRACE_EVENT_FN(sys_enter,
|
|
|
|
TP_PROTO(struct pt_regs *regs, long id),
|
|
|
|
TP_ARGS(regs, id),
|
|
|
|
TP_STRUCT__entry(
|
|
__field( long, id )
|
|
__array( unsigned long, args, 6 )
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->id = id;
|
|
syscall_get_arguments(current, regs, 0, 6, __entry->args);
|
|
),
|
|
|
|
TP_printk("NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)",
|
|
__entry->id,
|
|
__entry->args[0], __entry->args[1], __entry->args[2],
|
|
__entry->args[3], __entry->args[4], __entry->args[5]),
|
|
|
|
syscall_regfunc, syscall_unregfunc
|
|
);
|
|
|
|
TRACE_EVENT_FLAGS(sys_enter, TRACE_EVENT_FL_CAP_ANY)
|
|
|
|
TRACE_EVENT_FN(sys_exit,
|
|
|
|
TP_PROTO(struct pt_regs *regs, long ret),
|
|
|
|
TP_ARGS(regs, ret),
|
|
|
|
TP_STRUCT__entry(
|
|
__field( long, id )
|
|
__field( long, ret )
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->id = syscall_get_nr(current, regs);
|
|
__entry->ret = ret;
|
|
),
|
|
|
|
TP_printk("NR %ld = %ld",
|
|
__entry->id, __entry->ret),
|
|
|
|
syscall_regfunc, syscall_unregfunc
|
|
);
|
|
|
|
TRACE_EVENT_FLAGS(sys_exit, TRACE_EVENT_FL_CAP_ANY)
|
|
|
|
#endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */
|
|
|
|
#endif /* _TRACE_EVENTS_SYSCALLS_H */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|
|
|