Skip to content

Added tracepoint for rclcpp_take event when message loaning is used#3103

Open
nightduck wants to merge 1 commit intoros2:rollingfrom
nightduck:tracing_rclcpp_take_zero_copy
Open

Added tracepoint for rclcpp_take event when message loaning is used#3103
nightduck wants to merge 1 commit intoros2:rollingfrom
nightduck:tracing_rclcpp_take_zero_copy

Conversation

@nightduck
Copy link
Copy Markdown

Description

It's difficult to fully trace a system when using zero-copy because the rclcpp_take tracepoint is not invoked. This corrects for that.

Is this user-facing behavior change?

No

Did you use Generative AI?

No

Additional Information

@nightduck nightduck marked this pull request as draft March 18, 2026 09:24
@jmachowinski
Copy link
Copy Markdown
Collaborator

I would rather add the tracepoint to rcl_take_loaned_message, as the tracepoint for rcl_take is also in rcl.
This would also fix rclpy tracing as well.

@nightduck
Copy link
Copy Markdown
Author

nightduck commented Mar 18, 2026

When a message take is performed, there's 3 trace points called: rclcpp_take, rcl_take, and rmw_take. I'm already working on the last 2 with PRs in other packages. But rclcpp_take doesn't get triggered when subscription->can_loan_messages() is true

@nightduck nightduck marked this pull request as ready for review March 18, 2026 15:41
Copy link
Copy Markdown
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

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

LGTM.

@christophebedard
Copy link
Copy Markdown
Member

@Mergifyio rebase

Signed-off-by: Oren Bell <oren.bell@autonomous-teaming.ai>
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 31, 2026

rebase

✅ Branch has been successfully rebased

@christophebedard christophebedard force-pushed the tracing_rclcpp_take_zero_copy branch from 958f282 to 1248b50 Compare March 31, 2026 00:13
@christophebedard
Copy link
Copy Markdown
Member

christophebedard commented Mar 31, 2026

Pulls: #3103
Gist: https://gist.githubusercontent.com/christophebedard/ccae62050901f0a4df3b5fcf935bb255/raw/d8261a9291ede3e844d81bb8a37fca171aa81105/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp test_tracetools
TEST args: --packages-above rclcpp test_tracetools
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18739

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@christophebedard
Copy link
Copy Markdown
Member

Yeah, there are multiple tracepoints, at different layers: rclcpp, rcl, and rmw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants