Re: [RFC][PATCH 2/2] tracing/x86: basic implementation of syscalltracing for x86-64

From: Frederic Weisbecker
Date: Sun Mar 15 2009 - 11:17:19 EST


On Sun, Mar 15, 2009 at 05:44:05AM +0100, Ingo Molnar wrote:
>
> * Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx> wrote:
>
> > * Ingo Molnar (mingo@xxxxxxx) wrote:
> > >
> > > * Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx> wrote:
> > >
> > > > * Frederic Weisbecker (fweisbec@xxxxxxxxx) wrote:
> > > >
> > > > > Provide the ptrace hooks and arch specific syscall numbers
> > > > > to ftrace arch indepedant syscall numbers. For now it only
> > > > > supports 4 syscalls to provide an example.
> > > > >
> > > >
> > > > Hi Frederic,
> > > >
> > > > I already have the equivalent TIF_KERNEL_TRACE flag in my
> > > > LTTng tree added to every Linux architecture. You might want
> > > > to re-use this work rather than re-doing this. I don't mind
> > > > changing the flag name.
> > >
> > > Yeah. Note that the TIF bits are just one part - there are other
> > > bits needed for HAVE_FTRACE_SYSCALLS arch support.
> > >
> > > Also, i'd eventually expect the TIF bits to be converted to a
> > > tracehook callback, not spread it to other architectures.
> > >
> >
> > The nice part about the TIF bit is that it permits adding this
> > syscall tracing feature without increasing the size of the
> > thread_info struct nor adding any extra tests in entry.S. Does
> > the tracehook callback have these features ?
>
> yes. Tracehook just factors out common interfacing points - with
> one specific implementation for now: ptrace. For syscall tracing
> that means it wraps TIF_SYSCALL_TRACE in essence.
>
> Ingo


Since I didn't want to experience conflicts against ptrace, I haven't
played with the tracehooks.

But anyway, I wrote this low level part of syscall tracing having in mind
the fact that utrace does this work very much better. That's why I wrote it
to be very basic and simple enough to do the job, but waiting for a better
code that is already written somewhere else.

So now there is some code which does that on both utrace and Lttng.

I would be pleased to see these patches which handle these flags properly
on LKML :-)

Frederic.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/