npx skills add ...
npx skills add nvidia/omniperf --skill profiling-api
Add profiling zones, metrics, and annotations to Kit-based C++ and Python code. Covers Carbonite macros (CARB_PROFILE_ZONE, CARB_PROFILE_FUNCTION, GPU zones), Python profiler API (decorators, begin/end), profiler masks, channels, Tracy plot data, event annotations, and automatic Kit Python function capture (CARB_PROFILING_PYTHON). Use when a developer asks how to add profiling spans to Kit/Carbonite code, configure masks/channels, record custom Tracy plots, or annotate traces with event markers. NOT for capturing traces (use profiling), analyzing traces (use nsys-analyze), or non-Kit Python function tracing (use nvtx-python).
npx skills add nvidia/omniperf --skill profiling-api
How to add profiling zones, metrics, and annotations to C++ and Python code in the Carbonite/Kit ecosystem.
For capturing traces, see the profiling skill. For analyzing them, see nsys-analyze.
Source: carb/profiler/Profile.h
Parameters: (maskOrChannel, zoneName, ...variadic_args)
ProfileZoneStatic (pre-registered, faster)ProfileZoneDynamic (printf formatting)Prefer RAII style (CARB_PROFILE_ZONE) over manual begin/end.
Kit's RTX renderer uses query-based GPU zone capture:
Enable GPU zones in Tracy:
Types:
64-bit bitmask controlling which zones are captured: (zone_mask & capture_mask) != 0
If a zone uses mask 0, Carbonite treats it as kCaptureMaskDefault (1).
Workflow: Start with --/app/profilerMask=1 (major spans only, minimal overhead). If more detail needed, remove the arg (defaults to ALL). Always start coarse, then zoom in.
Higher-level abstraction over masks, toggled at runtime via settings:
Commonly disabled during benchmarks (too noisy):
Memory channels:
Record time-series values displayed as graphs in Tracy's Plot view.
Display as Tracy messages (recommended):
The omni.kit.command_macro.core extension auto-inserts [command_macro][Measurement] Start/End - <tag> events around benchmark measurements.
Capture all Python function calls without per-function instrumentation:
Or programmatically:
Performance warning: Significant overhead. Tracy file size ~4x larger (measured: 275MB → 1.2GB). Never use during benchmark measurement — only in the TRACY analysis phase.
| Backend | Plugin | Output | Best For |
|---|---|---|---|
| CPU (ChromeTrace) | carb.profiler-cpu.plugin | .json/.gz | Offline analysis, targeted captures |
| Tracy | carb.profiler-tracy.plugin | .tracy (live capture) | Real-time flame graphs, GPU context, stats |
| NVTX | carb.profiler-nvtx.plugin | .nsys-rep (via nsys) | GPU kernels, CUDA/Vulkan analysis |
CPU backend can be toggled on/off at runtime for targeted capture: