Re: [RFC PATCH 4/9] perf: Don't record frame pointer based userstacktraces if we dump stack and regs

From: Frederic Weisbecker
Date: Fri Oct 15 2010 - 20:19:37 EST


On Wed, Oct 13, 2010 at 09:23:06AM +0200, Peter Zijlstra wrote:
> On Wed, 2010-10-13 at 07:06 +0200, Frederic Weisbecker wrote:
> > User and kernel stack might be selected for other uses than callchain
> > in the future, this probably shouldn't mess with the regular callchain
> > code. Instead we should probably have an exclude_callchain_user
> > attribute, that could be also useful to filter out user callchains
> > when people don't want them.
>
> Probably ;-)


There is another solution that would solve my vdso problem
in the meantime.

The problem with vdso is that if we entered the kernel with
a syscall, the first user entry in the callchain will be a
vdso address. But vdso doesn't have dwarf informations so we
can't unwind further.

One solution would be having max_callchain_user as an attribute.
If we do a normal frame pointer based callchain, set it to -1
and you won't have limitations in your callchain. Or you
can set it to n so that your callchains are bound to a maximum
depth.
If you don't want user callchains, set it to 0.
If you do a dwarf based callchain, set it to 2, so that if userspace
was in a vdso, we just deref the frame pointer to find what called
the vdso, and then we can start the dwarf unwinding from there.

I think I'll try that.

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