Add more rcl tracepoints
This commit is contained in:
parent
d0aa25f205
commit
ccc06079e8
4 changed files with 76 additions and 1 deletions
|
@ -23,6 +23,21 @@ bool ros_trace_compile_status();
|
||||||
*/
|
*/
|
||||||
void ros_trace_rcl_init();
|
void ros_trace_rcl_init();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tp: rcl_node_init
|
||||||
|
*/
|
||||||
|
void ros_trace_rcl_node_init(const char * node_name, const char * namespace);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tp: rcl_publisher_init
|
||||||
|
*/
|
||||||
|
void ros_trace_rcl_publisher_init(const char * node_name, const char * namespace);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tp: rcl_subscription_init
|
||||||
|
*/
|
||||||
|
void ros_trace_rcl_subscription_init(const char * node_name, const char * topic_name);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,3 +8,42 @@ TRACEPOINT_EVENT(
|
||||||
TP_FIELDS(
|
TP_FIELDS(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
TRACEPOINT_EVENT(
|
||||||
|
ros2,
|
||||||
|
rcl_node_init,
|
||||||
|
TP_ARGS(
|
||||||
|
const char*, node_name_arg,
|
||||||
|
const char*, namespace_arg
|
||||||
|
),
|
||||||
|
TP_FIELDS(
|
||||||
|
ctf_string(node_name, node_name_arg)
|
||||||
|
ctf_string(namespace, namespace_arg)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
TRACEPOINT_EVENT(
|
||||||
|
ros2,
|
||||||
|
rcl_publisher_init,
|
||||||
|
TP_ARGS(
|
||||||
|
const char*, node_name_arg,
|
||||||
|
const char*, namespace_arg
|
||||||
|
),
|
||||||
|
TP_FIELDS(
|
||||||
|
ctf_string(node_name, node_name_arg)
|
||||||
|
ctf_string(namespace, namespace_arg)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
TRACEPOINT_EVENT(
|
||||||
|
ros2,
|
||||||
|
rcl_subscription_init,
|
||||||
|
TP_ARGS(
|
||||||
|
const char*, node_name_arg,
|
||||||
|
const char*, topic_name_arg
|
||||||
|
),
|
||||||
|
TP_FIELDS(
|
||||||
|
ctf_string(node_name, node_name_arg)
|
||||||
|
ctf_string(topic_name, topic_name_arg)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
# set up ust ros2 events
|
# set up ust ros2 events
|
||||||
for event in \
|
for event in \
|
||||||
ros2:rcl_init
|
ros2:rcl_init \
|
||||||
|
ros2:rcl_node_init \
|
||||||
|
ros2:rcl_publisher_init \
|
||||||
|
ros2:rcl_subscription_init
|
||||||
do
|
do
|
||||||
lttng enable-event -c ros2 -u $event
|
lttng enable-event -c ros2 -u $event
|
||||||
done
|
done
|
||||||
|
|
|
@ -18,3 +18,21 @@ void ros_trace_rcl_init() {
|
||||||
tracepoint(ros2, rcl_init);
|
tracepoint(ros2, rcl_init);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ros_trace_rcl_node_init(const char * node_name, const char * namespace) {
|
||||||
|
#ifdef WITH_LTTNG
|
||||||
|
tracepoint(ros2, rcl_node_init, node_name, namespace);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void ros_trace_rcl_publisher_init(const char * node_name, const char * namespace) {
|
||||||
|
#ifdef WITH_LTTNG
|
||||||
|
tracepoint(ros2, rcl_publisher_init, node_name, namespace);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void ros_trace_rcl_subscription_init(const char * node_name, const char * topic_name) {
|
||||||
|
#ifdef WITH_LTTNG
|
||||||
|
tracepoint(ros2, rcl_subscription_init, node_name, topic_name);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue