From: Andrew.McDermott@windriver.com (McDermott, Andrew)
Subject: [lttng-dev] registering user-defined properties on tracepoints
Date: Wed, 24 Oct 2012 11:21:55 +0000 [thread overview]
Message-ID: <7F632A9222059A42AF70FCB7965774AA2086527B@ALA-MBB.corp.ad.wrs.com> (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.
reply other threads:[~2012-10-24 11:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7F632A9222059A42AF70FCB7965774AA2086527B@ALA-MBB.corp.ad.wrs.com \
--to=andrew.mcdermott@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox