From 5b9fdca5351eccb5417b83a53cd9dae08a16285e Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Mon, 15 Mar 2021 17:44:43 -0400 Subject: [PATCH] Add publishing instrumentation Signed-off-by: Christophe Bedard --- rclcpp/include/rclcpp/publisher.hpp | 6 ++++++ 1 file changed, 6 insertions(+) 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) {