-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declare a dependency on the (Linux-only) LTTng userspace tracer #1177
Comments
@clalancette friendly ping 😃 I see that you self-assigned this. Is there any way I can help push this forward? |
@clalancette friendly ping |
I think that having the tracepoints available by default is a reasonable request. The value of being able to trace without rebuilding large portions of the workspace is helpful for users trying to diagnose performance issues. The overhead of the user-space trace points seems minimal compared to the value of having the tracepoints in. The only concern I can think of would be the availability of lttng-ust on our supported platforms which is currently: RHEL 9: (2.12?) @cottsay I may need your input on RHEL, it appears to be 2.12, but I'm not sure I was using the correct package listing. |
Also of note, the users who are deeply concerned with performance (on the level of lttng serspace tracepoints being an issue) are likely not using our pre-compiled binaries and are instead compiling themselves. |
It is indeed 2.12.0:
|
I can work on the main
This is kind of related to ros2/ros2_tracing#16. If all current Linux platforms have LTTng-UST >= 2.12, we should be fine, but things could still be improved. |
Yes, 2.12 is going to be the least common denominator for rolling. I think we would have no intention of backporting this into released distributions. |
Agreed |
One thing I will note is that RHEL-9 is aspirational for Rolling at this time. We may or may not get it in before Iron, so Iron may end up supporting RHEL-8 still. I'm fine if we end up disabling tracing by default on RHEL-8, but we should keep that in mind. |
The PRs have been merged, so I'm closing this. |
Feature request
Feature description
This is a follow-up to #957 and relates to ros2/ros2_tracing#23
I would like to discuss declaring a dependency on the LTTng userspace tracer (LTTng-UST) on Linux. I'd like to make sure that this change would be welcomed. My goal would be for this to be implemented a fair amount of time before the next release (Humble).
Core ROS 2 packages are instrumented with calls to functions provided by the
tracetools
package. These functions contain:tracetools
is re-compiled/overlayedand
-DTRACETOOLS_DISABLED=ON
This LTTng dependency isn't declared. This was initially for simplicity (especially since this is a platform-specific dependency) and because of some concerns about overhead.
This means that this feature currently isn't available out-of-the-box; users need to manually install LTTng and build from source (or at least just
tracetools
), since it's not installed when installing debians or runningrosdep install
. This has led to some questions and issues:As mentioned in #957 (comment), the LTTng userspace tracer is less "invasive" than the kernel tracer. I don't think we need to declare a dependency on the kernel tracer. Users could install it manually if they want to record kernel data for their analyses.
Also, in practice, the overhead is really negligible if tracepoints are not explicitly enabled: https://github.com/lttng/lttng-ust/blob/1f8a8ec9581af89d98aec47de9ad9e25087cd54a/include/lttng/tracepoint.h#L53-L62. Users/companies that do not want to ship a ROS 2-based product with LTTng can completely disable/remove it by setting the right CMake option (see item 5 above) and building from source, which I assume is something they are already doing.
Some references:
Implementation considerations
New dependencies for
tracetools
:liblttng-ust-dev
: LTTng-USTlttng-tools
: LTTng CLI (not strictly necessary, but recommended to be able to actually use the tracepoints)These would of course need to be installed on the Linux ci.ros2.org executors.
If the tracing tests turn out to create problems on ci.ros2.org, skipping them could be an option, but I think it would probably be fine.
ros2_tracing
README currently recommends installing both kernel and userspace tracers: https://github.com/ros2/ros2_tracing#building. Some logic would need to change in the package supporting theros2 trace
command and theTrace
action so that it doesn't assume that it's either all (kernel+userspace tracers) or nothing.Any other platform-related considerations?
Pull requests
The text was updated successfully, but these errors were encountered: