[lttng-dev] Writing .tp files for lttng-gen-tp
Thibault, Daniel
Daniel.Thibault at drdc-rddc.gc.ca
Tue Oct 21 09:53:25 EDT 2014
-----Message d'origine-----
Envoyé : 20 octobre 2014 16:08
Question: why is it required to give the the arguments to TRACEPOINT_EVENT_INSTANCE since all tracepoints from the same
class use the same arguments and same field layout ?
-----Fin du message d'origine-----
Simply put, the arguments are part of the signature of the functions that implement the tracepoint. You can simplify things like this:
[...]
#define thorium_event_args TP_ARGS( \
struct thorium_message *, message \
)
TRACEPOINT_EVENT_CLASS(
thorium_message,
thorium_event_template,
thorium_event_args,
TP_FIELDS(
ctf_integer(int, message_number, message->number) ctf_integer(int, message_action, message->action) ctf_integer(int, message_count, message->count) ctf_integer(int, message_source_actor, message->source_actor) ctf_integer(int, message_destination_actor, message->destination_actor) ctf_integer(int, message_source_node, message->source_node) ctf_integer(int, message_destination_node, message->destination_node)
)
)
TRACEPOINT_EVENT_INSTANCE(
thorium_message,
thorium_event_template,
actor_send,
thorium_event_args
)
TRACEPOINT_EVENT_INSTANCE(
thorium_message,
thorium_event_template,
node_send,
thorium_event_args
)
[...]
Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
RDDC - Centre de recherches de Valcartier | DRDC - Valcartier Research Centre
2459 route de la Bravoure
Québec QC G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>
More information about the lttng-dev
mailing list