Add callback start/end tracepoints
This commit is contained in:
parent
7e215289d7
commit
cd75a0a2e1
4 changed files with 51 additions and 1 deletions
|
@ -38,6 +38,16 @@ void ros_trace_rcl_publisher_init(const char * node_name, const char * node_name
|
||||||
*/
|
*/
|
||||||
void ros_trace_rcl_subscription_init(const char * node_name, const char * topic_name);
|
void ros_trace_rcl_subscription_init(const char * node_name, const char * topic_name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tp: rclcpp_callback_start
|
||||||
|
*/
|
||||||
|
void ros_trace_rclcpp_callback_start(const void * callback, const bool is_intra_process);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tp: rclcpp_callback_end
|
||||||
|
*/
|
||||||
|
void ros_trace_rclcpp_callback_end(const void * callback);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -49,3 +49,27 @@ TRACEPOINT_EVENT(
|
||||||
ctf_string(topic_name, topic_name_arg)
|
ctf_string(topic_name, topic_name_arg)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
TRACEPOINT_EVENT(
|
||||||
|
ros2,
|
||||||
|
rclcpp_callback_start,
|
||||||
|
TP_ARGS(
|
||||||
|
const void*, callback_arg,
|
||||||
|
int, is_intra_process_arg
|
||||||
|
),
|
||||||
|
TP_FIELDS(
|
||||||
|
ctf_integer_hex(const void*, callback, callback_arg)
|
||||||
|
ctf_integer(int, is_intra_process, is_intra_process_arg)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
TRACEPOINT_EVENT(
|
||||||
|
ros2,
|
||||||
|
rclcpp_callback_end,
|
||||||
|
TP_ARGS(
|
||||||
|
const void*, callback_arg
|
||||||
|
),
|
||||||
|
TP_FIELDS(
|
||||||
|
ctf_integer_hex(const void*, callback, callback_arg)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
|
@ -5,7 +5,9 @@ for event in \
|
||||||
ros2:rcl_init \
|
ros2:rcl_init \
|
||||||
ros2:rcl_node_init \
|
ros2:rcl_node_init \
|
||||||
ros2:rcl_publisher_init \
|
ros2:rcl_publisher_init \
|
||||||
ros2:rcl_subscription_init
|
ros2:rcl_subscription_init \
|
||||||
|
ros2:rclcpp_callback_start \
|
||||||
|
ros2:rclcpp_callback_end
|
||||||
do
|
do
|
||||||
lttng enable-event -c ros2 -u $event
|
lttng enable-event -c ros2 -u $event
|
||||||
done
|
done
|
||||||
|
|
|
@ -41,3 +41,17 @@ void ros_trace_rcl_subscription_init(const char * node_name, const char * topic_
|
||||||
tracepoint(ros2, rcl_subscription_init, node_name, topic_name);
|
tracepoint(ros2, rcl_subscription_init, node_name, topic_name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ros_trace_rclcpp_callback_start(const void * callback, const bool is_intra_process)
|
||||||
|
{
|
||||||
|
#ifdef WITH_LTTNG
|
||||||
|
tracepoint(ros2, rclcpp_callback_start, callback, (is_intra_process ? 1 : 0));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void ros_trace_rclcpp_callback_end(const void * callback)
|
||||||
|
{
|
||||||
|
#ifdef WITH_LTTNG
|
||||||
|
tracepoint(ros2, rclcpp_callback_end, callback);
|
||||||
|
#endif
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue