-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: USDT probes for tokio task events #7717
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
base: master
Are you sure you want to change the base?
Conversation
tokio/src/util/usdt.rs
Outdated
| fn task__terminate(task_id: u64) {} | ||
|
|
||
| fn task__waker__clone(task_id: u64) {} | ||
| fn task__waker__wake(task_id: u64) {} |
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.
Nice idea to represent waker as wake + drop and remove the need for wake_by_ref.
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.
I actually wasn't sure if I liked that 😅
638f594 to
3eb3cde
Compare
3eb3cde to
e3a7a09
Compare
|
Musings regarding usdt performance: oxidecomputer/usdt#490 |
|
I think I'm going to vendor the minimal subset of the code needed to support USDT on the platforms supported by the usdt crate. Removing any extra dependencies in the process. I'd like to work with the oxide devs to improve this but currently usdt brings in a lot of unnecessary dependencies, and it also doesn't allow cross compilation. Lastly I want to rework the generated code to reduce any performance impact. Because I will remove all dependencies, I'll move it back to a cfg tokio_usdt and remove the feature |
Motivation
As discussed on discord:
Solution
Using Userspace Statically Defined Tracing (USDT) we expose lightweight probes that can be attached to at runtime with tools like bpftrace or dtrace. This is inspired by https://github.com/oxidecomputer/usdt.
The new functionality is behind a new unstable feature flag. Currently it only exposes some basic task events and not yet any resource events.
See USDT in the wild: