Skip to content

Commit

Permalink
Add tracing instrumentation for rcl_take (#930)
Browse files Browse the repository at this point in the history
* Add tracing instrumentation for rcl_take

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>

* Remove redundant publisher field in rcl_publish tracepoint

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>

* Re-add publisher handle field in rcl_publish tracepoint

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
  • Loading branch information
christophebedard authored Aug 12, 2021
1 parent da4f1b9 commit 4296dd1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rcl/src/rcl/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ rcl_take(
}
RCUTILS_LOG_DEBUG_NAMED(
ROS_PACKAGE_NAME, "Subscription take succeeded: %s", taken ? "true" : "false");
TRACEPOINT(rcl_take, (const void *)ros_message);
if (!taken) {
return RCL_RET_SUBSCRIPTION_TAKE_FAILED;
}
Expand Down

4 comments on commit 4296dd1

@JanStaschulat
Copy link

@JanStaschulat JanStaschulat commented on 4296dd1 Aug 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christophebedard . In the PR ros2/rclc#144 the github CI job for rcl on Rolling fails because of this commit:

   In file included from /__w/rclc/rclc/ros_ws/src/rcl/rcl/src/rcl/subscription.c:29:
  /__w/rclc/rclc/ros_ws/src/rcl/rcl/src/rcl/subscription.c: In function ‘rcl_take’:
  /__w/rclc/rclc/ros_ws/src/rcl/rcl/src/rcl/subscription.c:224:3: error: ‘ros_trace_rcl_take’ undeclared (first use in this function); did you mean ‘ros_trace_rcl_init’?
    224 |   TRACEPOINT(rcl_take, (const void *)ros_message);

Same error in CI-job on Galactic.

What do we have to do?

@christophebedard
Copy link
Member Author

@christophebedard christophebedard commented on 4296dd1 Aug 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JanStaschulat you are building rcl from source but using tracetools from apt. You can:

If you want to keep using binary dependencies, you probably should use the pre-release repository.

As for Galactic, you probably shouldn't use Galactic binaries with rcl @ master (you should use galactic here: https://github.com/ros2/rclc/blob/a540329f97e8910efd0151c8528f40d53ade9e9e/dependencies.repos#L4).

@JanStaschulat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christophebedard Thanks for your advice. I updated for rolling configuration use-ros2-testing=true and updated for Galactic to use rcl@galactic.

How often is a Rolling sync?

@christophebedard
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's every few weeks/every month or so. That's why using the pre-release repo is a better solution!

Please sign in to comment.