<div dir="ltr"><div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div>Then why bother to require to have the TP_ARGS in TRACEPOINT_EVENT_INSTANCE? </div><div><br></div><div>Yonghong</div><div><br></div></div></div></div></div><div class="gmail_quote"><div dir="ltr">On Thu, Dec 20, 2018 at 11:56 AM Philippe Proulx <<a href="mailto:eeppeliteloop@gmail.com">eeppeliteloop@gmail.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 Thu, Dec 20, 2018 at 11:47 AM Yonghong Yan <<a href="mailto:yanyh15@gmail.com" target="_blank">yanyh15@gmail.com</a>> wrote:<br>
><br>
> I am looking at the following example from lttng-ust manual. The same TP_ARGS ( ... ) are repeated in both the TRACEPOINT_EVENT_CLASS and TRACEPOINT_EVENT_INSTANCE definition. My understanding is that it actually allows using different arguments, even in this example it is the same. Am I right?<br>
<br>
No it does not: they need to match.<br>
<br>
See <<a href="https://github.com/lttng/lttng-ust/commit/c75c0422c64f33c0102e1778cecc812c58b700e5" rel="noreferrer" target="_blank">https://github.com/lttng/lttng-ust/commit/c75c0422c64f33c0102e1778cecc812c58b700e5</a>>.<br>
<br>
Phil<br>
<br>
><br>
> I also like the feature of having one TP_ARGS in the TRACEPOINT_EVENT_CLASS that declares the arguments for several TRACEPOINT_EVENT_INSTANCE so we do not need to have TP_ARGS in TRACEPOINT_EVENT_INSTANCE. Is that possible?<br>
><br>
> Thank you<br>
> Yonghong<br>
><br>
> TRACEPOINT_EVENT_CLASS(<br>
>     my_provider,<br>
>     my_tracepoint_class,<br>
>     TP_ARGS(<br>
>         int, my_integer_arg,<br>
>         struct app_struct *, app_struct_arg<br>
>     ),<br>
>     TP_FIELDS(<br>
>         ctf_integer(int, a, my_integer_arg)<br>
>         ctf_integer(unsigned long, b, app_struct_arg->b)<br>
>         ctf_string(c, app_struct_arg->c)<br>
>     )<br>
> )<br>
><br>
> TRACEPOINT_EVENT_INSTANCE(<br>
>     my_provider,<br>
>     my_tracepoint_class,<br>
>     event_instance1,<br>
>     TP_ARGS(<br>
>         int, my_integer_arg,<br>
>         struct app_struct *, app_struct_arg<br>
>     )<br>
> )<br>
><br>
> TRACEPOINT_EVENT_INSTANCE(<br>
>     my_provider,<br>
>     my_tracepoint_class,<br>
>     event_instance2,<br>
>     TP_ARGS(<br>
>         int, my_integer_arg,<br>
>         struct app_struct *, app_struct_arg<br>
>     )<br>
> )<br>
><br>
><br>
> _______________________________________________<br>
> lttng-dev mailing list<br>
> <a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
> <a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" rel="noreferrer" target="_blank">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</blockquote></div></div>