From b7ed9ab378fe135984dc37bb747c97f5d7a27bee Mon Sep 17 00:00:00 2001 From: h-suzuki-isp <146712054+h-suzuki-isp@users.noreply.github.com> Date: Tue, 2 Apr 2024 02:11:25 +0900 Subject: [PATCH] Add tracepoint for publish_serialized_publish (#1136) * Add tracepoint for publish_serialized_publish Signed-off-by: h-suzuki * Add: tracepoint for rcl_take_serialized_message Signed-off-by: h-suzuki --------- Signed-off-by: h-suzuki --- rcl/src/rcl/publisher.c | 1 + rcl/src/rcl/subscription.c | 1 + 2 files changed, 2 insertions(+) diff --git a/rcl/src/rcl/publisher.c b/rcl/src/rcl/publisher.c index d440fb8e5..1c8479319 100644 --- a/rcl/src/rcl/publisher.c +++ b/rcl/src/rcl/publisher.c @@ -297,6 +297,7 @@ rcl_publish_serialized_message( return RCL_RET_PUBLISHER_INVALID; // error already set } RCL_CHECK_ARGUMENT_FOR_NULL(serialized_message, RCL_RET_INVALID_ARGUMENT); + TRACETOOLS_TRACEPOINT(rcl_publish, (const void *)publisher, (const void *)serialized_message); rmw_ret_t ret = rmw_publish_serialized_message( publisher->impl->rmw_handle, serialized_message, allocation); if (ret != RMW_RET_OK) { diff --git a/rcl/src/rcl/subscription.c b/rcl/src/rcl/subscription.c index 19a87648f..7e6f7c236 100644 --- a/rcl/src/rcl/subscription.c +++ b/rcl/src/rcl/subscription.c @@ -644,6 +644,7 @@ rcl_take_serialized_message( } RCUTILS_LOG_DEBUG_NAMED( ROS_PACKAGE_NAME, "Subscription serialized take succeeded: %s", taken ? "true" : "false"); + TRACETOOLS_TRACEPOINT(rcl_take, (const void *)serialized_message); if (!taken) { return RCL_RET_SUBSCRIPTION_TAKE_FAILED; }