Include tracetools version string as an arg for rcl_init

This commit is contained in:
Christophe Bedard 2019-06-17 10:25:25 +02:00
parent 8704f0591d
commit bcc8540fe8
3 changed files with 7 additions and 2 deletions

View file

@ -8,6 +8,8 @@
#define TRACEPOINT(event_name, ...) \
(ros_trace_ ## event_name)(__VA_ARGS__)
#define TRACETOOLS_VERSION "0.0.1"
#ifdef __cplusplus
extern "C"
{

View file

@ -4,10 +4,12 @@ TRACEPOINT_EVENT(
ros2,
rcl_init,
TP_ARGS(
const void *, context_handle_arg
const void *, context_handle_arg,
const char *, version_arg
),
TP_FIELDS(
ctf_integer_hex(const void *, context_handle, context_handle_arg)
ctf_string(version, version_arg)
)
)

View file

@ -24,7 +24,8 @@ void TRACEPOINT(
CONDITIONAL_TP(
ros2,
rcl_init,
context_handle);
context_handle,
TRACETOOLS_VERSION);
}
void TRACEPOINT(