<div dir="ltr">Hi,<div><br></div><div>I did the same thing a while ago, i.e., trigger tracepoints on malloc/free/etc. using liblttng-ust-libc-wrapper and collect userspace callstack information (so that the indirect calls to malloc/free can be removed from an application).</div><div><br></div><div>There is a userspace callstack context implementation here for lttng-ust 2.10, see the last 3 commits: <a href="https://github.com/tahini/lttng-ust-1/commits/ust-callstack-2.10/">https://github.com/tahini/lttng-ust-1/commits/ust-callstack-2.10/</a>. Here's the corresponding lttng-tools 2.10 branch needed to enable the userspace callstack context: <a href="https://github.com/tahini/lttng-tools/commits/ust-context-callstack/">https://github.com/tahini/lttng-tools/commits/ust-context-callstack/</a>.</div><div><br></div><div>I've rebased it on 2.11 here: <a href="https://github.com/ApexAI/lttng-ust/commits/ust-callstack-2.11/">https://github.com/ApexAI/lttng-ust/commits/ust-callstack-2.11/</a>. lttng-tools: <a href="https://github.com/ApexAI/lttng-tools/commits/ust-callstack-2.11/">https://github.com/ApexAI/lttng-tools/commits/ust-callstack-2.11/</a>. It shouldn't be too hard to rebase it all on a newer version.</div><div><br></div><div>Hope that helps,</div><div><br></div><div>Christophe</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Dec 2, 2024 at 8:32 AM Alexander Krabler via lttng-dev <<a href="mailto:lttng-dev@lists.lttng.org">lttng-dev@lists.lttng.org</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">Hello,<br>
<br>
we want to record stacktraces at specific userspace events like e.g. calls to malloc and free using liblttng-ust-libc-wrapper.so.<br>
There is the callstack-user context to achieve this in general, however, it seems like tracing of userspace stacktraces is only available in the kernel tracing domain.<br>
<br>
Is there already a solution to achieve this goal?<br>
If not, what would need to be done to achieve this?<br>
<br>
Thanks,<br>
Alexander</blockquote></div>