This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: full dwarf backtracing kernel to user


On Mon, 2011-09-26 at 13:09 +0200, Mark Wielaard wrote:
> There is one annoying bug/regression left. PR13210 "vma/vdso tracking is
> broken". This makes things much less useful since now we cannot unwind
> through the vdso, which is always used on i386 at least. I don't know
> when this regression was introduced. But I did add a testcase for it
> vma_vdso.exp, which checks a couple of ways of calling into the kernel
> and making sure the we always knows the "originating" vma. Currently
> this fails for the vdso vma. I am looking into this and it seems this is
> only because our build-id checking is not working correctly, since the
> vdso vma is detected, but then rejected.
> 
> > We should also introduce a full_backtrace function that gets/prints a full
> > kernel&user backtrace in one go (which people should use instead of a
> > print_backtrace(); print_ubacktrace() to save some work in the probe).
> > That last one should NOT be marked unprivileged since we don't do that
> > for kernel backtraces either.
> 
> I am not planning to add this anymore. Instead I'll introduce an
> optimization for a [print_]backtrace() and [print_]ubacktrace() done in
> the same probe.

Both these issues have been addressed now in git trunk.
So on i686 and x86_64 you should now almost always be able to get a
kernel and/or user backtrace from basically any probe point.

In the kernel case it will ultimately fall back to using the kernel
dump_trace() function if available (currently only x86 seems to have
this), which is the case for tracepoint probes for example. In the user
case it will use the (sanitized) results of _stp_current_pt_regs() if
kernel-to-user dwarf unwinding fails (possibly having a somewhat reduced
backtrace because of missing registers).

Please let me know if you play with this on x86 and are not getting the
backtraces you expect. I'll now try to get the dwarf unwinder and some
of the fallback code work for non-x86 arches. Any hints and tips
appreciated of course.

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]