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 trait

TraceBuf

Trace-buffer interface. Implementations: NullTrace, GmemTrace.

Implemented traits​

AnyType, Copyable, Deinitable, DevicePassable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable

Required methods​

store​

def store(self, offset: Int, val: UInt64)

Stores a timestamp at a slot in the trace buffer.

Args:

  • ​offset (Int): Slot index. Callers typically encode roles as block_idx * events_per_block + role.
  • ​val (UInt64): Timestamp value (ns from global_perf_counter_ns).

Was this page helpful?