Skip to content

Commit

Permalink
Add: tracepoint for subscribe serialized_message (#145)
Browse files Browse the repository at this point in the history
* Add: tracepoint for take_serialized_message

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

* Fix: TRACETOOLS_TRACEPOINT args

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

* Update rmw_connextdds_common/src/common/rmw_subscription.cpp

Co-authored-by: Christophe Bedard <[email protected]>
Signed-off-by: h-suzuki-isp <[email protected]>

* Update rmw_connextdds_common/src/common/rmw_subscription.cpp

Co-authored-by: Christophe Bedard <[email protected]>
Signed-off-by: h-suzuki-isp <[email protected]>

---------

Signed-off-by: h-suzuki <[email protected]>
Signed-off-by: h-suzuki-isp <[email protected]>
Co-authored-by: Christophe Bedard <[email protected]>
  • Loading branch information
h-suzuki-isp and christophebedard authored Apr 1, 2024
1 parent 98fc0e9 commit b8c410c
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions rmw_connextdds_common/src/common/rmw_subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,16 @@ rmw_api_connextdds_take_serialized_message(
RMW_Connext_Subscriber * const sub_impl =
reinterpret_cast<RMW_Connext_Subscriber *>(subscription->data);

return sub_impl->take_serialized(serialized_message, nullptr, taken);
rmw_ret_t rc = sub_impl->take_serialized(serialized_message, nullptr, taken);

TRACETOOLS_TRACEPOINT(
rmw_take,
subscription,
serialized_message,
0LL,
*taken);

return rc;
}


Expand All @@ -413,7 +422,16 @@ rmw_api_connextdds_take_serialized_message_with_info(
RMW_Connext_Subscriber * const sub_impl =
reinterpret_cast<RMW_Connext_Subscriber *>(subscription->data);

return sub_impl->take_serialized(serialized_message, message_info, taken);
rmw_ret_t rc = sub_impl->take_serialized(serialized_message, message_info, taken);

TRACETOOLS_TRACEPOINT(
rmw_take,
subscription,
serialized_message,
(message_info ? message_info->source_timestamp : 0LL),
*taken);

return rc;
}


Expand Down

0 comments on commit b8c410c

Please sign in to comment.