Re: [RFC] Proposal for ptrace improvements

From: Tejun Heo
Date: Fri Mar 11 2011 - 03:13:31 EST


Hello, Steven.

On Thu, Mar 10, 2011 at 01:33:06PM -0500, Steven Rostedt wrote:
> > Use tracing for tracing.
>
> Hmm, what tracing utility exactly? If I want to trace a running task,
> that I have the debug info on it where I would have the ability to
> insert probes, which utility would you recommend?
>
> strace and gdb use ptrace

strace only monitors kernel events - syscalls, fork, exit and signals.
We'll probably need to beef up the tracepoints a bit to reach feature
parity but it shouldn't be too difficult and provides much better
insight into what happens inside the kernel.

> ftrace focuses on the kernel.
>
> I don't think perf has a good way to trace userspace yet.
>
> I haven't taken a good look at lttng, but I think it has some sort of
> library that is attached to the process. Is there a better way than
> attching a library to said task.
>
> systemtap may have ways too, but I think it depends on utrace which has
> pretty much been nak'd in the kernel.

I don't have much idea on how to do userland tracing but am pretty
sure ptrace is not the answer. ptrace involves switching to another
process context and back on each event. It just ain't gonna work and
none of Roland's suggestions changes anything about that.

Thanks.

--
tejun
--
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/