-
Notifications
You must be signed in to change notification settings - Fork 43
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
Allow enabling syscalls through ros2 trace
or the Trace action
#137
Allow enabling syscalls through ros2 trace
or the Trace action
#137
Conversation
Signed-off-by: Christophe Bedard <[email protected]>
11d4ab5
to
c105689
Compare
@mjcarroll would you be willing to review this? |
There's something wrong with the GitHub CI binary jobs: https://github.com/ros2/ros2_tracing/actions/runs/11205771796/job/31145663869?pr=137#step:4:1989. I see the same failures in the nightly GitHub CI binary jobs. Not really related to these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall, lgtm with green CI. had a couple of comments.
485dca3
to
e12b804
Compare
Sorry, I realized that the way I had written the decorator meant it was evaluated during test collection, at the very beginning. This means that, if no session daemon was running before the test was run, then the test would not be allowed to try to spawn a session daemon and therefore the test would definitely be skipped. I modified the decorator so that it's evaluated before running the test: https://github.com/ros2/ros2_tracing/compare/485dca3ac871e2a26d603b2916ac3aa6281ebf28..e12b8044bfd1b8a15209df44c10e0f1e47bcf5b0. Can you take another look? |
Argh this isn't even completely working. |
Signed-off-by: Christophe Bedard <[email protected]>
e12b804
to
2f0c39a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for the explanation. lgtm with green CI.
Thanks for the review @fujitatomoya! CI looks good. |
This adds support for enabling syscall tracing with the
ros2 trace
command or theTrace
launch action.While system calls are separate from kernel events, both can be traced using the LTTng kernel tracer: https://lttng.org/docs/v2.13/#doc-tracing-the-linux-kernel. Kernel events are "tracepoints" while system calls are their own kind of trace event. This explains why this PR adds a separate option for syscalls instead of just using the kernel events option. See the changes to
lttngpy::enable_events
inlttngpy/src/lttngpy/event.cpp
.How to use:
ros2 trace
command:syscalls
argNote that, when enabling a syscall, e.g.,
openat
, the resulting trace has syscall entry and exit events:syscall_entry_openat
andsyscall_exit_openat
.