IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 struct

TraceCategory

struct TraceCategory

An enum-like struct specifying the type of tracing to perform.

Fields​

  • ​value (Int): The integer value representing the trace category. Used for bitwise operations when determining if profiling is enabled for a specific category.

Implemented traits​

AnyType, Copyable, Equatable, ImplicitlyCopyable, ImplicitlyDeletable, Intable, Movable, RegisterPassable, TrivialRegisterPassable

comptime members​

ASYNCRT​

comptime ASYNCRT = TraceCategory(Int(1))

Asynchronous runtime trace events.

Kernel​

comptime Kernel = TraceCategory(Int(3))

Kernel execution trace events.

MAX​

comptime MAX = TraceCategory(Int(4))

MAX framework trace events.

MEM​

comptime MEM = TraceCategory(Int(2))

Memory-related trace events.

OTHER​

comptime OTHER = TraceCategory(Int(0))

Other or uncategorized trace events.

Methods​

__eq__​

def __eq__(self, rhs: Self) -> Bool

Compares for equality.

Args:

  • ​rhs (Self): The value to compare.

Returns:

Bool: True if they are equal.

__ne__​

def __ne__(self, rhs: Self) -> Bool

Compares for inequality.

Args:

  • ​rhs (Self): The value to compare.

Returns:

Bool: True if they are not equal.

__int__​

def __int__(self) -> Int

Converts the trace category to an integer.

Returns:

Int: The integer value of the trace category.