From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew.McDermott@windriver.com (McDermott, Andrew) Date: Wed, 24 Oct 2012 11:21:55 +0000 Subject: [lttng-dev] registering user-defined properties on tracepoints Message-ID: <7F632A9222059A42AF70FCB7965774AA2086527B@ALA-MBB.corp.ad.wrs.com> 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.