Skip to main content

Crate ktrace_macro

Crate ktrace_macro 

Source

Macrosยง

begin_scope
Creates a scope guard (Option<KTraceScope>) that captures the given arguments at the beginning of a scope when the given category is enabled, and emits the duration complete event when dropped or ended via end_scope!. The complete event is associated with the current thread.
begin_scope_cond
Similar to begin_scope!, but checks the given runtime_condition, in addition to the given category, to determine whether to emit the event.
category_enabled
Returns true if the given trace category is currently enabled.
complete
Writes a duration complete event associated with the current thread when the given category is enabled.
context_switch
Writes a context switch record for the given threads when the given trace category is enabled.
counter
Writes a counter event associated with the current thread when the given category is enabled.
counter_timestamp
Similar to counter!, but accepts an expression to use for the event timestamp.
cpu_begin_scope
Similar to begin_scope!, but associates the event with the current CPU instead of the current thread.
cpu_begin_scope_cond
Similar to begin_scope_cond!, but associates the event with the current CPU instead of the current thread.
cpu_complete
Similar to complete!, but associates the event with the current CPU instead of the current thread.
cpu_counter
Similar to counter!, but associates the event with the current CPU instead of the current thread.
cpu_counter_timestamp
Similar to cpu_counter!, but accepts an expression to use for the event timestamp.
cpu_duration_begin
Similar to duration_begin!, but associates the event with the current CPU instead of the current thread.
cpu_duration_end
Similar to duration_end!, but associates the event with the current CPU instead of the current thread.
cpu_flow_begin
Similar to flow_begin!, but associates the event with the current CPU instead of the current thread.
cpu_flow_end
Similar to flow_end!, but associates the event with the current CPU instead of the current thread.
cpu_flow_step
Similar to flow_step!, but associates the event with the current CPU instead of the current thread.
cpu_instant
Similar to instant!, but associates the event with the current CPU instead of the current thread.
duration_begin
Writes a duration begin event associated with the current thread when the given category is enabled.
duration_begin_timestamp
Similar to duration_begin!, but accepts an expression to use for the event timestamp.
duration_end
Writes a duration end event associated with the current thread when the given category is enabled.
duration_end_timestamp
Similar to duration_end!, but accepts an expression to use for the event timestamp.
end_scope
Ends a trace scope created by a begin scope macro with additional key-value argument pairs.
flow_begin
Writes a flow begin event associated with the current thread when the given category is enabled.
flow_begin_timestamp
Similar to flow_begin!, but accepts an expression to use for the event timestamp.
flow_end
Writes a flow end event associated with the current thread when the given category is enabled.
flow_end_timestamp
Similar to flow_end!, but accepts an expression to use for the event timestamp.
flow_step
Writes a flow step event associated with the current thread when the given category is enabled.
flow_step_timestamp
Similar to flow_step!, but accepts an expression to use for the event timestamp.
instant
Writes an instant event associated with the current thread when the given category is enabled.
kernel_object
Writes a kernel object record when the given trace category is enabled.
kernel_object_always
Writes a kernel object record unconditionally. Useful for generating the initial set of object info records before tracing is enabled.
resolve_category
Resolves a category parameter to a reference to an InternedCategory. If a string literal is provided, it is declared as an external category.
resolve_string
Resolves a string parameter to a reference to an InternedString. If a string literal is provided, it is statically interned at compile-time.
thread_wakeup
Writes a thread wakeup record for the given thread when the given trace category is enabled.