offer function-level control over tracing (#5194)
* wiggle: fix compilation with async functions when tracing is off Fixes #5202 * switch tracing config from a boolean to a struct This will enable more complex tracing rules in the future * rename AsyncConfField to FunctionField It is going to be reused for cases other than just async functions * add support for disabling tracing per-function This adds a `disable_for` syntax after the `tracing` boolean. For example: ``` wiggle::from_witx!( tracing: true disable_for { module1::foo, module2::{bar, baz}, } ) ```
This commit is contained in:
@@ -15,6 +15,9 @@ pub enum RichError {
|
||||
// Define an errno with variants corresponding to RichError. Use it in a
|
||||
// trivial function.
|
||||
wiggle::from_witx!({
|
||||
tracing: true disable_for {
|
||||
one_error_conversion::foo,
|
||||
},
|
||||
witx_literal: "
|
||||
(typename $errno (enum (@witx tag u8) $ok $invalid_arg $picket_line))
|
||||
(typename $s (record (field $f1 (@witx usize)) (field $f2 (@witx pointer u8))))
|
||||
|
||||
Reference in New Issue
Block a user