Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] LTTng-UST tracepoint API updates
@ 2011-11-12 18:13 Mathieu Desnoyers
  2011-11-13 19:12 ` Mathieu Desnoyers
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Desnoyers @ 2011-11-12 18:13 UTC (permalink / raw)


Hi,

I introduced the following API changes for LTTng-UST, after receiving
very appropriate feedback:

    Tracepoint API change: rename TRACEPOINT_SYSTEM to TRACEPOINT_PROVIDER
    
    Eliminates the confusion between the first TRACEPOINT_EVENT "provider"
    argument and the "TRACEPOINT_SYSTEM", which need to be the same thing.
    
and made sure TRACEPOINT_PROVIDER always match TRACEPOINT_SYSTEM by
adding a compiler warning:

    Tracepoints: add provider mismatch check
    
Finally, rename TP_ARGS to TP_VARS, in preparation for combining
TP_PROTO and TP_ARGS:

    tracepoint API change: rename TP_ARGS to TP_VARS
    
    In preparation of folding of both TP_PROTO and TP_ARGS into TP_ARGS.

Hopefully I'll succeed to getting both TP_PROTO and TP_VARS combined
into TP_ARGS, but even if this does not work out, TP_VARS seems much
more appropriate than TP_ARGS here.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] LTTng-UST tracepoint API updates
  2011-11-12 18:13 [ltt-dev] LTTng-UST tracepoint API updates Mathieu Desnoyers
@ 2011-11-13 19:12 ` Mathieu Desnoyers
  2011-11-14 21:23   ` Matthew Khouzam
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Desnoyers @ 2011-11-13 19:12 UTC (permalink / raw)


* Mathieu Desnoyers (mathieu.desnoyers at efficios.com) wrote:
> Hi,
> 
> I introduced the following API changes for LTTng-UST, after receiving
> very appropriate feedback:
> 
>     Tracepoint API change: rename TRACEPOINT_SYSTEM to TRACEPOINT_PROVIDER
>     
>     Eliminates the confusion between the first TRACEPOINT_EVENT "provider"
>     argument and the "TRACEPOINT_SYSTEM", which need to be the same thing.
>     
> and made sure TRACEPOINT_PROVIDER always match TRACEPOINT_SYSTEM by
> adding a compiler warning:
> 
>     Tracepoints: add provider mismatch check
>     
> Finally, rename TP_ARGS to TP_VARS, in preparation for combining
> TP_PROTO and TP_ARGS:
> 
>     tracepoint API change: rename TP_ARGS to TP_VARS
>     
>     In preparation of folding of both TP_PROTO and TP_ARGS into TP_ARGS.
> 
> Hopefully I'll succeed to getting both TP_PROTO and TP_VARS combined
> into TP_ARGS, but even if this does not work out, TP_VARS seems much
> more appropriate than TP_ARGS here.

The API change is completed by the following commit:

commit 63ef26930fe613a266cc69f5089cf643dd59b012
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date:   Sun Nov 13 14:07:57 2011 -0500

    Tracepoint API change: combine TP_PROTO and TP_VARS into TP_ARGS, remove _NOARGS macros
    
    New API for tracepoints, combining the TP_PROTO and TP_VARS arguments
    into a single "TP_ARGS" macro. It takes up to 10 parameters (from 0 to
    10). The "_NOARGS" special-case is not needed anymore: it can be
    achieved simply by passing an empty TP_ARGS:
    
      TP_ARGS(),
    
    to the standard tracepoint event declarations.
    
    Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>

Best regards,

Mathieu

> 
> Thanks,
> 
> Mathieu
> 
> -- 
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] LTTng-UST tracepoint API updates
  2011-11-13 19:12 ` Mathieu Desnoyers
@ 2011-11-14 21:23   ` Matthew Khouzam
  2011-11-14 22:09     ` Mathieu Desnoyers
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Khouzam @ 2011-11-14 21:23 UTC (permalink / raw)


To clarify:
A tracepoint event now takes
provider name /*a string no spaces, starts with a letter, alpha numeric
+ _. */
the event name /* same as above */
TP_ARGS( type , arg , ... ) /* every odd element is the type of the
argument in the next place, must be a c type, not void... that's looking
for trouble */
                                         /* every even element is the
name of the argument */
                                         /* theres always an even number
of args */
TP_FIELDS( ctf_type( type, fieldname, arg) ... ));

I like the improvements... I don't know if it's just me, but this makes
TP_ARGS and ctf_type much more harmonized, IMO.
Why is ctf_type not CTF_TYPE, it is a macro and can be clearer to the
user that the args need not be declared, they can be strings without
quotes or types? I'm sure you have a well thought out answer. :)

I really like that TP_ARGS() works.





On 11-11-13 02:12 PM, Mathieu Desnoyers wrote:
> * Mathieu Desnoyers (mathieu.desnoyers at efficios.com) wrote:
>> Hi,
>>
>> I introduced the following API changes for LTTng-UST, after receiving
>> very appropriate feedback:
>>
>>     Tracepoint API change: rename TRACEPOINT_SYSTEM to TRACEPOINT_PROVIDER
>>     
>>     Eliminates the confusion between the first TRACEPOINT_EVENT "provider"
>>     argument and the "TRACEPOINT_SYSTEM", which need to be the same thing.
>>     
>> and made sure TRACEPOINT_PROVIDER always match TRACEPOINT_SYSTEM by
>> adding a compiler warning:
>>
>>     Tracepoints: add provider mismatch check
>>     
>> Finally, rename TP_ARGS to TP_VARS, in preparation for combining
>> TP_PROTO and TP_ARGS:
>>
>>     tracepoint API change: rename TP_ARGS to TP_VARS
>>     
>>     In preparation of folding of both TP_PROTO and TP_ARGS into TP_ARGS.
>>
>> Hopefully I'll succeed to getting both TP_PROTO and TP_VARS combined
>> into TP_ARGS, but even if this does not work out, TP_VARS seems much
>> more appropriate than TP_ARGS here.
> The API change is completed by the following commit:
>
> commit 63ef26930fe613a266cc69f5089cf643dd59b012
> Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> Date:   Sun Nov 13 14:07:57 2011 -0500
>
>     Tracepoint API change: combine TP_PROTO and TP_VARS into TP_ARGS, remove _NOARGS macros
>     
>     New API for tracepoints, combining the TP_PROTO and TP_VARS arguments
>     into a single "TP_ARGS" macro. It takes up to 10 parameters (from 0 to
>     10). The "_NOARGS" special-case is not needed anymore: it can be
>     achieved simply by passing an empty TP_ARGS:
>     
>       TP_ARGS(),
>     
>     to the standard tracepoint event declarations.
>     
>     Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
>
> Best regards,
>
> Mathieu
>
>> Thanks,
>>
>> Mathieu
>>
>> -- 
>> Mathieu Desnoyers
>> Operating System Efficiency R&D Consultant
>> EfficiOS Inc.
>> http://www.efficios.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] LTTng-UST tracepoint API updates
  2011-11-14 21:23   ` Matthew Khouzam
@ 2011-11-14 22:09     ` Mathieu Desnoyers
  2011-11-14 22:14       ` Matthew Khouzam
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Desnoyers @ 2011-11-14 22:09 UTC (permalink / raw)


* Matthew Khouzam (matthew.khouzam at ericsson.com) wrote:
> To clarify:
> A tracepoint event now takes
> provider name /*a string no spaces, starts with a letter, alpha numeric
> + _. */
> the event name /* same as above */
> TP_ARGS( type , arg , ... ) /* every odd element is the type of the
> argument in the next place, must be a c type, not void... that's looking
> for trouble */

yep. Although we might be able to deal with TP_ARGS(void) without much
problem, but I'd need to adapt the code to support it.

>                                          /* every even element is the
> name of the argument */
>                                          /* theres always an even number
> of args */
> TP_FIELDS( ctf_type( type, fieldname, arg) ... ));
> 
> I like the improvements... I don't know if it's just me, but this makes
> TP_ARGS and ctf_type much more harmonized, IMO.

agreed.

> Why is ctf_type not CTF_TYPE, it is a macro and can be clearer to the
> user that the args need not be declared, they can be strings without
> quotes or types? I'm sure you have a well thought out answer. :)

too much CAPS makes my eyes hurt ;)

> I really like that TP_ARGS() works.


:)

Mathieu
> 
> 
> 
> 
> 
> On 11-11-13 02:12 PM, Mathieu Desnoyers wrote:
> > * Mathieu Desnoyers (mathieu.desnoyers at efficios.com) wrote:
> >> Hi,
> >>
> >> I introduced the following API changes for LTTng-UST, after receiving
> >> very appropriate feedback:
> >>
> >>     Tracepoint API change: rename TRACEPOINT_SYSTEM to TRACEPOINT_PROVIDER
> >>     
> >>     Eliminates the confusion between the first TRACEPOINT_EVENT "provider"
> >>     argument and the "TRACEPOINT_SYSTEM", which need to be the same thing.
> >>     
> >> and made sure TRACEPOINT_PROVIDER always match TRACEPOINT_SYSTEM by
> >> adding a compiler warning:
> >>
> >>     Tracepoints: add provider mismatch check
> >>     
> >> Finally, rename TP_ARGS to TP_VARS, in preparation for combining
> >> TP_PROTO and TP_ARGS:
> >>
> >>     tracepoint API change: rename TP_ARGS to TP_VARS
> >>     
> >>     In preparation of folding of both TP_PROTO and TP_ARGS into TP_ARGS.
> >>
> >> Hopefully I'll succeed to getting both TP_PROTO and TP_VARS combined
> >> into TP_ARGS, but even if this does not work out, TP_VARS seems much
> >> more appropriate than TP_ARGS here.
> > The API change is completed by the following commit:
> >
> > commit 63ef26930fe613a266cc69f5089cf643dd59b012
> > Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> > Date:   Sun Nov 13 14:07:57 2011 -0500
> >
> >     Tracepoint API change: combine TP_PROTO and TP_VARS into TP_ARGS, remove _NOARGS macros
> >     
> >     New API for tracepoints, combining the TP_PROTO and TP_VARS arguments
> >     into a single "TP_ARGS" macro. It takes up to 10 parameters (from 0 to
> >     10). The "_NOARGS" special-case is not needed anymore: it can be
> >     achieved simply by passing an empty TP_ARGS:
> >     
> >       TP_ARGS(),
> >     
> >     to the standard tracepoint event declarations.
> >     
> >     Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> >
> > Best regards,
> >
> > Mathieu
> >
> >> Thanks,
> >>
> >> Mathieu
> >>
> >> -- 
> >> Mathieu Desnoyers
> >> Operating System Efficiency R&D Consultant
> >> EfficiOS Inc.
> >> http://www.efficios.com
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] LTTng-UST tracepoint API updates
  2011-11-14 22:09     ` Mathieu Desnoyers
@ 2011-11-14 22:14       ` Matthew Khouzam
  2011-11-15  1:04         ` Mathieu Desnoyers
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Khouzam @ 2011-11-14 22:14 UTC (permalink / raw)




On 11-11-14 05:09 PM, Mathieu Desnoyers wrote:
> * Matthew Khouzam (matthew.khouzam at ericsson.com) wrote:
>> To clarify:
>> A tracepoint event now takes
>> provider name /*a string no spaces, starts with a letter, alpha numeric
>> + _. */
>> the event name /* same as above */
>> TP_ARGS( type , arg , ... ) /* every odd element is the type of the
>> argument in the next place, must be a c type, not void... that's looking
>> for trouble */
> yep. Although we might be able to deal with TP_ARGS(void) without much
> problem, but I'd need to adapt the code to support it.
>
>>                                          /* every even element is the
>> name of the argument */
>>                                          /* theres always an even number
>> of args */
>> TP_FIELDS( ctf_type( type, fieldname, arg) ... ));
>>
>> I like the improvements... I don't know if it's just me, but this makes
>> TP_ARGS and ctf_type much more harmonized, IMO.
> agreed.
>
>> Why is ctf_type not CTF_TYPE, it is a macro and can be clearer to the
>> user that the args need not be declared, they can be strings without
>> quotes or types? I'm sure you have a well thought out answer. :)
> too much CAPS makes my eyes hurt ;)
>
>> I really like that TP_ARGS() works.
>
> :)

To better clarify, I really like that tp_args_noargs has been banished.
>
> Mathieu
>>
>>
>>
>>
>> On 11-11-13 02:12 PM, Mathieu Desnoyers wrote:
>>> * Mathieu Desnoyers (mathieu.desnoyers at efficios.com) wrote:
>>>> Hi,
>>>>
>>>> I introduced the following API changes for LTTng-UST, after receiving
>>>> very appropriate feedback:
>>>>
>>>>     Tracepoint API change: rename TRACEPOINT_SYSTEM to TRACEPOINT_PROVIDER
>>>>     
>>>>     Eliminates the confusion between the first TRACEPOINT_EVENT "provider"
>>>>     argument and the "TRACEPOINT_SYSTEM", which need to be the same thing.
>>>>     
>>>> and made sure TRACEPOINT_PROVIDER always match TRACEPOINT_SYSTEM by
>>>> adding a compiler warning:
>>>>
>>>>     Tracepoints: add provider mismatch check
>>>>     
>>>> Finally, rename TP_ARGS to TP_VARS, in preparation for combining
>>>> TP_PROTO and TP_ARGS:
>>>>
>>>>     tracepoint API change: rename TP_ARGS to TP_VARS
>>>>     
>>>>     In preparation of folding of both TP_PROTO and TP_ARGS into TP_ARGS.
>>>>
>>>> Hopefully I'll succeed to getting both TP_PROTO and TP_VARS combined
>>>> into TP_ARGS, but even if this does not work out, TP_VARS seems much
>>>> more appropriate than TP_ARGS here.
>>> The API change is completed by the following commit:
>>>
>>> commit 63ef26930fe613a266cc69f5089cf643dd59b012
>>> Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
>>> Date:   Sun Nov 13 14:07:57 2011 -0500
>>>
>>>     Tracepoint API change: combine TP_PROTO and TP_VARS into TP_ARGS, remove _NOARGS macros
>>>     
>>>     New API for tracepoints, combining the TP_PROTO and TP_VARS arguments
>>>     into a single "TP_ARGS" macro. It takes up to 10 parameters (from 0 to
>>>     10). The "_NOARGS" special-case is not needed anymore: it can be
>>>     achieved simply by passing an empty TP_ARGS:
>>>     
>>>       TP_ARGS(),
>>>     
>>>     to the standard tracepoint event declarations.
>>>     
>>>     Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
>>>
>>> Best regards,
>>>
>>> Mathieu
>>>
>>>> Thanks,
>>>>
>>>> Mathieu
>>>>
>>>> -- 
>>>> Mathieu Desnoyers
>>>> Operating System Efficiency R&D Consultant
>>>> EfficiOS Inc.
>>>> http://www.efficios.com
>> _______________________________________________
>> ltt-dev mailing list
>> ltt-dev at lists.casi.polymtl.ca
>> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>>




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] LTTng-UST tracepoint API updates
  2011-11-14 22:14       ` Matthew Khouzam
@ 2011-11-15  1:04         ` Mathieu Desnoyers
  0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Desnoyers @ 2011-11-15  1:04 UTC (permalink / raw)


* Matthew Khouzam (matthew.khouzam at ericsson.com) wrote:
> 
> 
> On 11-11-14 05:09 PM, Mathieu Desnoyers wrote:
> > * Matthew Khouzam (matthew.khouzam at ericsson.com) wrote:
> >> To clarify:
> >> A tracepoint event now takes
> >> provider name /*a string no spaces, starts with a letter, alpha numeric
> >> + _. */
> >> the event name /* same as above */
> >> TP_ARGS( type , arg , ... ) /* every odd element is the type of the
> >> argument in the next place, must be a c type, not void... that's looking
> >> for trouble */
> > yep. Although we might be able to deal with TP_ARGS(void) without much
> > problem, but I'd need to adapt the code to support it.

TP_ARGS(void) is now supported too:

commit 992abe1193e04da4c224f74fbe0e5c3aeb9bfeb5
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date:   Mon Nov 14 20:01:36 2011 -0500

    tracepoint: support TP_ARGS(void)
    
    Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>

Thanks,

Mathieu

> >
> >>                                          /* every even element is the
> >> name of the argument */
> >>                                          /* theres always an even number
> >> of args */
> >> TP_FIELDS( ctf_type( type, fieldname, arg) ... ));
> >>
> >> I like the improvements... I don't know if it's just me, but this makes
> >> TP_ARGS and ctf_type much more harmonized, IMO.
> > agreed.
> >
> >> Why is ctf_type not CTF_TYPE, it is a macro and can be clearer to the
> >> user that the args need not be declared, they can be strings without
> >> quotes or types? I'm sure you have a well thought out answer. :)
> > too much CAPS makes my eyes hurt ;)
> >
> >> I really like that TP_ARGS() works.
> >
> > :)
> 
> To better clarify, I really like that tp_args_noargs has been banished.
> >
> > Mathieu
> >>
> >>
> >>
> >>
> >> On 11-11-13 02:12 PM, Mathieu Desnoyers wrote:
> >>> * Mathieu Desnoyers (mathieu.desnoyers at efficios.com) wrote:
> >>>> Hi,
> >>>>
> >>>> I introduced the following API changes for LTTng-UST, after receiving
> >>>> very appropriate feedback:
> >>>>
> >>>>     Tracepoint API change: rename TRACEPOINT_SYSTEM to TRACEPOINT_PROVIDER
> >>>>     
> >>>>     Eliminates the confusion between the first TRACEPOINT_EVENT "provider"
> >>>>     argument and the "TRACEPOINT_SYSTEM", which need to be the same thing.
> >>>>     
> >>>> and made sure TRACEPOINT_PROVIDER always match TRACEPOINT_SYSTEM by
> >>>> adding a compiler warning:
> >>>>
> >>>>     Tracepoints: add provider mismatch check
> >>>>     
> >>>> Finally, rename TP_ARGS to TP_VARS, in preparation for combining
> >>>> TP_PROTO and TP_ARGS:
> >>>>
> >>>>     tracepoint API change: rename TP_ARGS to TP_VARS
> >>>>     
> >>>>     In preparation of folding of both TP_PROTO and TP_ARGS into TP_ARGS.
> >>>>
> >>>> Hopefully I'll succeed to getting both TP_PROTO and TP_VARS combined
> >>>> into TP_ARGS, but even if this does not work out, TP_VARS seems much
> >>>> more appropriate than TP_ARGS here.
> >>> The API change is completed by the following commit:
> >>>
> >>> commit 63ef26930fe613a266cc69f5089cf643dd59b012
> >>> Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> >>> Date:   Sun Nov 13 14:07:57 2011 -0500
> >>>
> >>>     Tracepoint API change: combine TP_PROTO and TP_VARS into TP_ARGS, remove _NOARGS macros
> >>>     
> >>>     New API for tracepoints, combining the TP_PROTO and TP_VARS arguments
> >>>     into a single "TP_ARGS" macro. It takes up to 10 parameters (from 0 to
> >>>     10). The "_NOARGS" special-case is not needed anymore: it can be
> >>>     achieved simply by passing an empty TP_ARGS:
> >>>     
> >>>       TP_ARGS(),
> >>>     
> >>>     to the standard tracepoint event declarations.
> >>>     
> >>>     Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> >>>
> >>> Best regards,
> >>>
> >>> Mathieu
> >>>
> >>>> Thanks,
> >>>>
> >>>> Mathieu
> >>>>
> >>>> -- 
> >>>> Mathieu Desnoyers
> >>>> Operating System Efficiency R&D Consultant
> >>>> EfficiOS Inc.
> >>>> http://www.efficios.com
> >> _______________________________________________
> >> ltt-dev mailing list
> >> ltt-dev at lists.casi.polymtl.ca
> >> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >>
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-15  1:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-12 18:13 [ltt-dev] LTTng-UST tracepoint API updates Mathieu Desnoyers
2011-11-13 19:12 ` Mathieu Desnoyers
2011-11-14 21:23   ` Matthew Khouzam
2011-11-14 22:09     ` Mathieu Desnoyers
2011-11-14 22:14       ` Matthew Khouzam
2011-11-15  1:04         ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox