lkml.org 
[lkml]   [2009]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] convert to syscall tracepoints

* Jason Baron <jbaron@redhat.com> wrote:

>
> Implements syscall tracer via tracepoints and TRACE_EVENT(). Introduces
> a new tracing flag 'trace_syscalls', which must be toggled to enable this
> feature.
>
>
> Signed-off-by: Jason Baron <jbaron@redhat.com>
>
> ---
> arch/x86/kernel/ptrace.c | 8 +-
> include/asm-generic/syscall.h | 3 +
> include/trace/events/syscalls.h | 4202 +++++++++++++++++++++++++++++++++++++++
> include/trace/syscall.h | 6 +
> kernel/trace/Makefile | 1 -
> kernel/trace/trace.c | 101 +
> kernel/trace/trace_syscalls.c | 250 ---
> 7 files changed, 4317 insertions(+), 254 deletions(-)
> create mode 100644 include/trace/events/syscalls.h
> delete mode 100644 kernel/trace/trace_syscalls.c

the functionality is fine and very desired IMO, but the
implementation is pretty large and ugly, isnt it?

Wouldnt it be possible to compress this:

> +#ifdef __NR_setgroups
> +trace_event_syscall_enter(2, setgroups, int, gidsetsize, gid_t __user *, grouplist);
> +trace_event_syscall_exit(setgroups);
> +#define ENTERCASEsetgroups create_syscall_enter(2, setgroups, int, gid_t __user *);
> +#define EXITCASEsetgroups create_syscall_exit(setgroups);
> +#else
> +#define ENTERCASEsetgroups
> +#define EXITCASEsetgroups
> +#endif

down to some sane syntax? Do we really want to replicate all the
DEFINE_SYSCALL() information again in a separate header? Is there no
way to somehow define the tracepoint in-situ, where the
DEFINE_SYSCALL macro is present? That would eliminate
include/trace/events/syscalls.h altogether.

Ingo


\
 
 \ /
  Last update: 2009-06-07 15:33    [W:0.050 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site