Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Until now, kernel debugging was been limited to structured logging through
log
and while that is great and more than sufficient for release-build logging, for debugging purposes and especially for performance work we need something more sophisticated.To this end #185 introduced the concept time & initial support for monotonic and wall-time clocks into the kernel, so that we can actually measure things.
This PR lays the groundwork for more sophisticated debugging by bringing
tracing
support to the kernel.tracing
is a standard Rust crate that - in addition to events thatlog
deals with - knows about spans which represent spans of execution between two points in time. Since tracing has been built with asynchronous Rust in mind, spans can also be paused and resumed an arbitrary amount of time (calledentering
andexiting
) which is convenient for tracking execution time in all kinds of multitasking setups.tracing
also features a host of convenient macros to emit these spans.