Re: [RFC 1/2] kernel patch for dump user space stack tool

From: Yanmin Zhang
Date: Tue Apr 24 2012 - 22:44:37 EST


On Tue, 2012-04-24 at 12:11 +0200, Peter Zijlstra wrote:
> On Tue, 2012-04-24 at 09:30 +0800, Yanmin Zhang wrote:
> > Would you like to point out the workable userspace stack walker?
> > If there is, we would check if we could reuse it.
> >
> >
> arch/x86/kernel/cpu/perf_event.c:perf_callchain_user(), it also deals
> with compat stuffs.
Yes, it does. But it just collects the user stack call chain of
_current_ task.

When Xiaobing worked out the patch, we did think over if we could implement
it based on perf. We also checked ftrace. Both ftrace and perf collect
user stack of _current_ task.

Xiaobing wrote a similar tool based on ptrace one year ago and gave it up
as it was slow.

I was thinking if we could use the powerful symbol parsing capability of
perf to do the user space parse. I was busy and Xiaobing just changed
his old codes to work out a prototype quickly as other developers pushed hard
for the tool.

Yanmin


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