For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo module
tracing
Provides tracing utilities.
comptime valuesβ
logβ
comptime log = Logger(stderr, prefix=String("[OP] "), source_location=False)
Logger instance for operation tracing with INFO level and [OP] prefix.
Structsβ
- β
Trace: An object representing a specific trace. - β
TraceCategory: An enum-like struct specifying the type of tracing to perform. - β
TraceLevel: An enum-like struct specifying the level of tracing to perform.
Functionsβ
- β
get_current_trace_id: Returns the id of last created trace entry on the current thread. - β
get_safe_task_id: Safely extract task_id from DeviceContext, returning None if null/invalid. - β
is_profiling_disabled: Returns False if the profiling is enabled for that specific type and level and True otherwise. - β
is_profiling_enabled: Returns True if the profiling is enabled for that specific type and level and False otherwise. - β
trace_arg: Helper to stringify the type and shape of a kernel argument for tracing.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!