Skip to content

Commit

Permalink
Add tracepoint for publish_serialized_publish (#1136)
Browse files Browse the repository at this point in the history
* Add tracepoint for publish_serialized_publish

Signed-off-by: h-suzuki <[email protected]>

* Add: tracepoint for rcl_take_serialized_message

Signed-off-by: h-suzuki <[email protected]>

---------

Signed-off-by: h-suzuki <[email protected]>
  • Loading branch information
h-suzuki-isp committed Apr 1, 2024
1 parent 1c42509 commit b7ed9ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions rcl/src/rcl/publisher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions rcl/src/rcl/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b7ed9ab

Please sign in to comment.