Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] Enumerated types in lttng-ust traces?
@ 2012-06-21  1:30 John Steele Scott
  2012-06-21  4:00 ` Mathieu Desnoyers
  0 siblings, 1 reply; 2+ messages in thread
From: John Steele Scott @ 2012-06-21  1:30 UTC (permalink / raw)


It seems that the CTF supports enumerations, and babeltrace has support for pretty-printing them. But how do you get lttng-ust to emit them? Is this possible?

Right now I'm just using ctf_integer, but it seems like there should be way to show human-readable enumeration names in the trace.

cheers,

John




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

* [lttng-dev] Enumerated types in lttng-ust traces?
  2012-06-21  1:30 [lttng-dev] Enumerated types in lttng-ust traces? John Steele Scott
@ 2012-06-21  4:00 ` Mathieu Desnoyers
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers @ 2012-06-21  4:00 UTC (permalink / raw)


* John Steele Scott (toojays at toojays.net) wrote:
> It seems that the CTF supports enumerations, and babeltrace has
> support for pretty-printing them. But how do you get lttng-ust to emit
> them? Is this possible?
> 
> Right now I'm just using ctf_integer, but it seems like there should
> be way to show human-readable enumeration names in the trace.

Hi John,

You are right, CTF supports enumerations. Currently, neither
lttng-modules nor lttng-ust allow emitting those enumerations from
tracepoints (it's just not been implemented yet).

We'd have to add that to LTTng-UST tracepoints, e.g., something
resembling to:

TRACEPOINT_ENUM(enum_name,
        TP_ENUM_V(SOMENAMEA)            /* value 0 */
        TP_ENUM_V(SOMENAMEB)            /* value 1 */
        TP_ENUM_V(SOMENAMEC, 5)         /* value 5 */
        TP_ENUM_V(SOMENAMED)            /* value 6 */
        TP_ENUM_R(SOMENAMEE, 8, 10)     /* range 8 to 10 (inclusive) */
        TP_ENUM_V(SOMENAMEF)            /* value 11 */
)

then:

TRACEPOINT_EVENT(prog_module, event,
        TP_ARGS(int, someint),
        TP_FIELDS(
                ctf_enum(enum_name, int, fieldname, someint)
        )
)

where ctf_enum would be:

ctf_enum(name of enumeration,
        type of enumeration container,
        name of the field,
        name of the TP_ARGS entry to use as source
)

I did early experiments with this in lttng-modules (code unfinished and
unused at this stage). You can dig it up in the files:

probes/lttng-type-list.h
probes/lttng-types.h

of lttng-modules. Please keep in mind that these are unfinished and
might need a lot of changes to get straight.

Thoughts ?

Thanks,

Mathieu

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



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

end of thread, other threads:[~2012-06-21  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-21  1:30 [lttng-dev] Enumerated types in lttng-ust traces? John Steele Scott
2012-06-21  4:00 ` Mathieu Desnoyers

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