Skip to content

Conversation

@christophebedard
Copy link
Member

@christophebedard christophebedard commented Mar 24, 2023

Part of ros2/ros2#1177

Requires ros2/ros2_tracing#31

Since tracepoints are currently not included in a normal ROS 2 installation, #2877 added a guide that shows how to build ROS 2 to get the tracepoints.

ros2/ros2#1177 aims to include tracing instrumentation and the LTTng tracer by default in Linux installations of ROS 2. Therefore, this PR flips the existing guide into one that shows how to build ROS 2 without the instrumentation and/or tracepoints. See ros2/ros2_tracing#31.

Note: this only applies to Rolling & Iron (and later distros), so this should not be backported to previous distros.

@christophebedard christophebedard force-pushed the christophebedard/update-ros2-tracing-guide-tracepoints-by-default branch from 59e12f4 to 680a9d4 Compare April 3, 2023 17:10
Tracing instrumentation is included in the ROS 2 source code, and Linux installations of ROS 2 include the LTTng tracer as a dependency.
Therefore, ROS 2 can be traced out-of-the-box on Linux.

However, ROS 2 can be built from source to remove the tracepoints or completely remove the instrumentation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

@christophebedard just out of curiosity. some people (including us) would do that because of performance overhead for tracing, right? In that case, do you happen to have some data how much overhead it possibly produces? I believe that overhead would be really small that we cannot even see or care most likely when it is not enabled?

Copy link
Member Author

@christophebedard christophebedard Apr 3, 2023

Choose a reason for hiding this comment

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

Yeah, if you don't enable the tracepoints at runtime (i.e., if you don't do anything), the overhead is actually almost negligible. See one of the paragraphs talking about this here: ros2/ros2#1177

Even if the overhead is negligible, I know some people want to get rid of it + remove the dependency on LTTng if they don't actually need it, so this option is available.

@christophebedard christophebedard force-pushed the christophebedard/update-ros2-tracing-guide-tracepoints-by-default branch from 680a9d4 to ae876bd Compare April 3, 2023 18:35
@clalancette clalancette merged commit ee73fb7 into ros2:rolling Apr 3, 2023
@christophebedard christophebedard deleted the christophebedard/update-ros2-tracing-guide-tracepoints-by-default branch April 3, 2023 19:09
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