Skip to content

linux/kernel/trace/trace.c

Imported from _research/manual-study-linux/file-notes/linux__kernel__trace__trace.c.md.

File Notes: kernel/trace/trace.c

Status: reviewed.

Purpose: tracing core implementation.

Review target: event capture, buffers, runtime controls, and AI-readable telemetry architecture.

Evidence

  • The file identifies itself as a ring-buffer-based tracer near the top.
  • Tracer registration data appears around line 95.
  • tracing_set_tracer() appears around line 213.
  • The global trace array appears around line 523.
  • Trace type and ring-buffer notes appear around lines 738-758.
  • Tracing on/off controls appear around lines 828-928.

Design Notes

Tracing is a runtime event pipeline, not a printf strategy. A Rust/AI-native system should prefer typed events, bounded buffers, explicit loss semantics, and cheap disabled instrumentation.