Accuracy and Limitations
Measurement Scopes
Events can be measured at different execution scopes but Joule Profiler only support per-process counters.
| Scope | Description |
|---|---|
| Per-thread | Counts events generated by a single thread. |
| Per-process | Aggregates events across all threads of a process. |
| Per-CPU | Counts events occurring on a specific CPU core. |
| System-wide | Aggregates events across all CPUs. |
Important
Some events like RAPL power counters are always system-wide and cannot be scoped to individual processes or threads.
Multiplexing and Accuracy
Hardware has limited performance counters (typically 4-8 per CPU core). When measuring more events than available counters, the kernel multiplexes them by rotating access, which can introduce overhead.
Multiplexed counters produce scaled estimates: scaled_value = value * (time_enabled / time_running), introducing measurement error. The more the ratio is close to one, the more the counters are accurate.