* [lttng-dev] Limit on the number of arguments in TP_ARGS
@ 2024-08-07 14:03 Shahar Hochma via lttng-dev
2024-08-07 15:28 ` Kienan Stewart via lttng-dev
0 siblings, 1 reply; 2+ messages in thread
From: Shahar Hochma via lttng-dev @ 2024-08-07 14:03 UTC (permalink / raw)
To: lttng-dev
[-- Attachment #1.1: Type: text/plain, Size: 618 bytes --]
Hi,
I've been using LTTNG traces and I was trying to create events with more
than 10 arguments. But, I'm having an issue where this seems to fail in
compilation with a cryptic error when I define more than 10 arguments in
TP_ARGS.
I assume the issue is that there are some macros that are only defined up
to 10 arguments. I didn't see any documentation of this limit or any
mention of this anywhere, and I wanted to know if there is maybe a way to
get around this.
Of course I can combine arguments to struts or define 2 events instead of
one. But I wanted to know if there is a native way to resolve this.
Thanks.
[-- Attachment #1.2: Type: text/html, Size: 773 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [lttng-dev] Limit on the number of arguments in TP_ARGS
2024-08-07 14:03 [lttng-dev] Limit on the number of arguments in TP_ARGS Shahar Hochma via lttng-dev
@ 2024-08-07 15:28 ` Kienan Stewart via lttng-dev
0 siblings, 0 replies; 2+ messages in thread
From: Kienan Stewart via lttng-dev @ 2024-08-07 15:28 UTC (permalink / raw)
To: Shahar Hochma, lttng-dev
Hi Shahar,
On 8/7/24 10:03 AM, Shahar Hochma via lttng-dev wrote:
> Hi,
> I've been using LTTNG traces and I was trying to create events with more
> than 10 arguments. But, I'm having an issue where this seems to fail in
> compilation with a cryptic error when I define more than 10 arguments in
> TP_ARGS. >
> I assume the issue is that there are some macros that are only defined
> up to 10 arguments. I didn't see any documentation of this limit or any
> mention of this anywhere, and I wanted to know if there is maybe a way
> to get around this.
That's correct the macros are only defined for up to 10 arguments. This
was initially due to a desire to maintain compatibility with SDT, which
also had a 10 argument limit. That limit is now slightly higher (12) in
recent versions of SDT.
The limit is documented here[1]. There's also previous mailing list
threads[2], and here is the relevant portion[3] of the source code.
>
> Of course I can combine arguments to struts or define 2 events instead
> of one. But I wanted to know if there is a native way to resolve this.
>
The canonical way to do this is to use a structure. Using two events
would also work, but I think it's slightly more desirable to use fewer
events (especially if you want to keep the data together).
> Thanks.
thanks,
kienan
[1]: https://lttng.org/man/3/lttng-ust/v2.13/#doc-tracepoint-event
[2]: https://lists.lttng.org/pipermail/lttng-dev/2023-November/030673.html
[3]:
https://github.com/lttng/lttng-ust/blob/5d10459b6b5182fcbc98240d9dace026c87a5037/include/lttng/tracepoint.h#L76
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-07 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07 14:03 [lttng-dev] Limit on the number of arguments in TP_ARGS Shahar Hochma via lttng-dev
2024-08-07 15:28 ` Kienan Stewart 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;
as well as URLs for NNTP newsgroup(s).