diff --git a/rclcpp/include/rclcpp/publisher.hpp b/rclcpp/include/rclcpp/publisher.hpp index 14b2f333c1..f3fbc34faa 100644 --- a/rclcpp/include/rclcpp/publisher.hpp +++ b/rclcpp/include/rclcpp/publisher.hpp @@ -40,6 +40,8 @@ #include "rclcpp/type_support_decl.hpp" #include "rclcpp/visibility_control.hpp" +#include "tracetools/tracetools.h" + namespace rclcpp { @@ -279,6 +281,10 @@ class Publisher : public PublisherBase void do_inter_process_publish(const MessageT & msg) { + TRACEPOINT( + rclcpp_publish, + static_cast(publisher_handle_.get()), + static_cast(&msg)); auto status = rcl_publish(publisher_handle_.get(), &msg, nullptr); if (RCL_RET_PUBLISHER_INVALID == status) {