From: Alexander Krabler via lttng-dev <lttng-dev@lists.lttng.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: [lttng-dev] Record stacktraces at userspace tracing domain
Date: Thu, 12 Dec 2024 16:52:11 +0000 [thread overview]
Message-ID: <VI1PR01MB6845126CAEA7354042BA5E8B823F2@VI1PR01MB6845.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <8b3dc807-e512-4ea9-be7b-39abae58d886@efficios.com>
Hi Mathieu,
On 2024-12-11 10:43, Mathieu Desnoyers via lttng-dev wrote:
> Another approach then is to add tracepoints within your C++ standard
> library functions. Then you can use the caller ip of _those_ functions
> and pass them to the tracepoint as "ip" context override.
That's difficult, as this would require to modify very much code locations and may also be difficult due to inlining.
Also it would just add one extra level, but I think that's not enough.
I'm rather thinking of something similar to this:
LTTNG_UST_TRACEPOINT_EVENT(
ust,
malloc_callstack,
LTTNG_UST_TP_ARGS(
unsigned int, callstack_length,
int*, callstack
),
LTTNG_UST_TP_FIELDS(
lttng_ust_field_sequence_hex(int, callstack, callstack, unsigned int, callstack_length)
)
)
And then use backtrace/libunwind to retrieve the required information and put it into the tracepoint.
Thanks,
Alexander
next prev parent reply other threads:[~2024-12-12 16:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 16:29 Alexander Krabler via lttng-dev
2024-12-02 21:17 ` Christophe Bédard via lttng-dev
2024-12-10 16:41 ` Kienan Stewart via lttng-dev
2024-12-11 10:32 ` AW: " Alexander Krabler via lttng-dev
2024-12-11 15:43 ` Mathieu Desnoyers via lttng-dev
2024-12-12 16:52 ` Alexander Krabler via lttng-dev [this message]
2024-12-12 16:56 ` Dirk Eibach via lttng-dev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VI1PR01MB6845126CAEA7354042BA5E8B823F2@VI1PR01MB6845.eurprd01.prod.exchangelabs.com \
--to=lttng-dev@lists.lttng.org \
--cc=Alexander.Krabler@kuka.com \
--cc=mathieu.desnoyers@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox