* Call stack context for user space trace points
@ 2025-10-06 2:50 Sunku, Sai via lttng-dev
2025-10-06 17:22 ` Christophe Bédard via lttng-dev
0 siblings, 1 reply; 2+ messages in thread
From: Sunku, Sai via lttng-dev @ 2025-10-06 2:50 UTC (permalink / raw)
To: lttng-dev
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
Hello,
I have a complex, multithreaded benchmark that emits LTTng trace points at various stages. I am trying to trace all malloc calls made by this benchmark. I'm specifically trying to get malloc trace points also through LTTng so that I can identify when the malloc call was made relative to other trace points from the benchmark. I also want to see the stack trace for each malloc call so that I can identify where in the benchmark the malloc call is coming from.
If I preload the lttng libc wrapper with `LD_PRELOAD=liblttng-ust-libc-wrapper.so`, I'm able to see the trace points from malloc calls.
But when I try to add the callstack-user context with this command `lttng add-context --userspace --channel 1 --type callstack-user`, I get an error saying "Error: callstack-user: UST invalid context"
I've successfully added user space stack traces for kernel trace points with a similar command `lttng add-context --kernel --type callstack-user`
Is the callstack-user context only available for kernel trace points? Is there another way to get the call stack for malloc calls?
Thank you,
Sai Sunku
[-- Attachment #2: Type: text/html, Size: 2865 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Call stack context for user space trace points
2025-10-06 2:50 Call stack context for user space trace points Sunku, Sai via lttng-dev
@ 2025-10-06 17:22 ` Christophe Bédard via lttng-dev
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Bédard via lttng-dev @ 2025-10-06 17:22 UTC (permalink / raw)
To: Sunku, Sai; +Cc: lttng-dev
[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]
Hi,
The userspace callstack context is only available for the kernel domain.
There are potential workarounds and solutions; take a look at the
discussion in this mailing list thread from last year (hit "Next message"):
https://lists.lttng.org/pipermail/lttng-dev/2024-December/030881.html
Regards,
Christophe
On Mon, Oct 6, 2025 at 5:37 AM Sunku, Sai via lttng-dev <
lttng-dev@lists.lttng.org> wrote:
> Hello,
>
>
>
> I have a complex, multithreaded benchmark that emits LTTng trace points at
> various stages. I am trying to trace all malloc calls made by this
> benchmark. I'm specifically trying to get malloc trace points also through
> LTTng so that I can identify when the malloc call was made relative to
> other trace points from the benchmark. I also want to see the stack trace
> for each malloc call so that I can identify where in the benchmark the
> malloc call is coming from.
>
>
>
> If I preload the lttng libc wrapper with
> `LD_PRELOAD=liblttng-ust-libc-wrapper.so`, I'm able to see the trace points
> from malloc calls.
>
>
>
> But when I try to add the callstack-user context with this command `lttng
> add-context --userspace --channel 1 --type callstack-user`, I get an error
> saying "Error: callstack-user: UST invalid context"
>
>
>
> I've successfully added user space stack traces for kernel trace points
> with a similar command `lttng add-context --kernel --type callstack-user`
>
>
>
> Is the callstack-user context only available for kernel trace points? Is
> there another way to get the call stack for malloc calls?
>
>
>
> Thank you,
>
> Sai Sunku
>
>
>
[-- Attachment #2: Type: text/html, Size: 2831 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-06 17:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-06 2:50 Call stack context for user space trace points Sunku, Sai via lttng-dev
2025-10-06 17:22 ` Christophe Bédard via lttng-dev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox