* [lttng-dev] registering user-defined properties on tracepoints
@ 2012-10-24 11:21 McDermott, Andrew
0 siblings, 0 replies; only message in thread
From: McDermott, Andrew @ 2012-10-24 11:21 UTC (permalink / raw)
Is it possible to add /other/ user-defined attributes to an event
definition. What I'm trying to do is associate other related
properties/attributes to the event itself and on each field in the
event.
In this example I'm choosing to encode my attributes using a JSON-like
syntax, but the point is that this is really user-defined.
TRACEPOINT_EVENT(foo, some_event,
TP_ARGS(int, value),
TP_ATTRIBUTES("{ icon:some_event.png, helpIndex:docs/help/0001.html ... }")
TP_FIELDS(ctf_integer(int, foo, foo, "{java_formatter:com.windriver.SomeEventFormatter, leftAdjust:1, mask:64, ... }"))
)
I could create an associated event:
TRACEPOINT_EVENT(foo, some_event_metadata,
TP_ARGS(char *, str),
TP_FIELDS(ctf_string(char *, str))
)
and have some rules based on the event names to bind the two together
but it seems "nicer" to keep them together. My motivation is keeping
this kind of auxiliary information available with the trace itself as
opposed to some side-files which have the tendency to get out of sync.
Or perhaps this is another way of achieving this. Any hints gratefully
received...
Thanks,
Andy.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-24 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-24 11:21 [lttng-dev] registering user-defined properties on tracepoints McDermott, Andrew
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox