<div dir="ltr"><div dir="ltr"><div>Yeah, as far as I know, perf [1] is successfully using libunwind to provide callstacks. Probably, LTTng team should think about it too, if there are no serious obstacles.</div><div><br></div><div>[1]: <a href="https://perf.wiki.kernel.org/index.php/Main_Page" target="_blank">https://perf.wiki.kernel.org/index.php/Main_Page</a></div><div dir="ltr"><br></div><div dir="ltr"><br clear="all"><div><div dir="ltr"><div>Best regards,</div><div>Valentin Grigorev</div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 26, 2020 at 11:53 PM Milian Wolff <<a href="mailto:milian.wolff@kdab.com" target="_blank">milian.wolff@kdab.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Donnerstag, 26. März 2020 20:41:17 CET Mathieu Desnoyers via lttng-dev <br>
wrote:<br>
> ----- On Mar 26, 2020, at 1:39 PM, lttng-dev <<a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a>> <br>
wrote:<br>
> > Hello!<br>
> > <br>
> > Currently, callstack collection in LTTng is only available for<br>
> > kernel-space<br>
> > events with context fields callstack-kernel and callstack-user .<br>
> > <br>
> > Is it expected that callstack collection for LTTng-UST will be added too?<br>
> > And if it is expected, then how soon?<br>
> <br>
> Hi Valentin,<br>
> <br>
> It is something that would be interesting and useful, but a lot of work<br>
> would be needed to have stack-walking this is fast enough and reentrant wrt<br>
> signal handlers. Unfortunately, the backtrace(3) functions do not meet<br>
> those requirements.<br>
> <br>
> Also, for gathering user-space callstacks from the kernel tracer, it only<br>
> works if all user-space is compiled with frame pointers. This is also a<br>
> limitation that would require a lot of work to overcome neatly.<br>
> <br>
> None of those features are currently on any roadmap due to lack of customers<br>
> showing interest in getting this done.<br>
<br>
libunwind [1] should meet the requirements you need. It is high performance <br>
thanks to extensive caching, signal safe and does not rely on frame pointers.<br>
<br>
[1]: <a href="https://github.com/libunwind/libunwind" rel="noreferrer" target="_blank">https://github.com/libunwind/libunwind</a><br>
<br>
-- <br>
Milian Wolff | <a href="mailto:milian.wolff@kdab.com" target="_blank">milian.wolff@kdab.com</a> | Senior Software Engineer<br>
KDAB (Deutschland) GmbH, a KDAB Group company<br>
Tel: +49-30-521325470<br>
KDAB - The Qt, C++ and OpenGL Experts</blockquote></div></div></div>