Skip to main content

Module profiler

Module profiler 

Source
Expand description

Brick-phase profiler for GPU sharing operations (GPU-SHARE-005).

Follows the StepProfiler pattern from KAIZEN-047.

§Contract C-GPUPROF-001

Zero-overhead when disabled: all begin/end calls are no-ops with zero Instant::now() calls.

§Phases

  1. lock_acq — flock(LOCK_EX) acquisition time
  2. ledger_rd — JSON read + deserialize + PID prune
  3. vram_qry — cuMemGetInfo / NVML call
  4. ledger_wr — Atomic write (temp + rename)
  5. lock_rel — flock release (close fd)
  6. wait_poll — Single poll iteration

Structs§

GpuProfiler
Brick-phase profiler for GPU sharing operations.

Constants§

LEDGER_RD
LEDGER_WR
LOCK_ACQ
Phase indices.
LOCK_REL
VRAM_QRY
WAIT_POLL