[ltt-dev] Marker and trace point API with compound data types

Mathieu Desnoyers compudj at krystal.dyndns.org
Mon Mar 21 21:51:53 EDT 2011


* Venkatesh Babu Chitlur Srinivasa (vchitlur) (vchitlur at cisco.com) wrote:
> CTF v1.7 which was published earlier talks about compound data types
> (struct, variant, array, sequence, strings) in section 4.2. What are the
> APIs to specify these compound data types with markers and trace points
> ? Since markers relies on the format string to specify the data type, it
> may not be possible. So is it only supported with trace points as these
> compound data types can be passed as function arguments ?

Hi Venkatesh,

As you noticed, there is nothing part of the Markers that allows
recording compound data types, and nothing is planned in this respect.
Markers are more of a "debug-only" type of interface.

However, Tracepoints and TRACE_EVENT macros sitting on top of
Tracepoints are currently able to serialize dynamic arrays (sequences)
and statically-sized arrays (arrays). They will eventually also be able
to serialize structures received as parameter into an event field. The
way I envision supporting structure serialization within TRACE_EVENT is
by wrapping the structure declaration in a macro, and allowing the
tracer to gather the textual C-code description of the structure. Given
that CTF metadata is C99-compatible, we should be able to read and
understand the C structure from its C declaration copied into the CTF
metadata.

For now, variants will be mainly used to serialize the event header in a
very compact way, which is internal to the tracer. Maybe we'll find a
way to add support for it to TRACE_EVENT field types eventually.

Please don't hesitate to ask if you have more questions, your feedback
is very much appreciated,

Thanks,

Mathieu

> 
> Regards,
> 
>   VBabu
> 

> _______________________________________________
> 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




More information about the lttng-dev mailing list