tud-zih-energy / lo2s

Linux OTF2 Sampling - A Lightweight Node-Level Performance Monitoring Tool
https://tu-dresden.de/zih/forschung/projekte/lo2s?set_language=en
GNU General Public License v3.0
46 stars 13 forks source link

Collecting C-state residency counters on sapphire rapids #329

Closed tilsche closed 6 months ago

tilsche commented 6 months ago

Those are listed in lo2s --list-events:

  cstate_core/c1-residency/ #
  cstate_core/c6-residency/ #
  cstate_pkg/c2-residency/ #
  cstate_pkg/c6-residency/ #
# lo2s -E cstate_core/c1-residency/ -E cstate_core/c6-residency/ -E cstate_pkg/c2-residency/ -E cstate_pkg/c6-residency/ -- sleep 300
[522928293338619][pid: 1584395][tid: 1584395][ERROR]: perf_event_open for counter failed
[522928293485479][pid: 1584395][tid: 1584395][ERROR]: failed to add counter 'cstate_core/c1-residency/': Invalid argument
[522928293499300][pid: 1584395][tid: 1584395][ERROR]: opening 4 counters at once might exceed the hardware limit of simultaneously openable counters.
[522928295170290][pid: 1584395][tid: 1584395][ WARN]: Could not start measurement for thread 1584399: Invalid argument

Same for

# lo2s -E cstate_core/c1-residency/ -E cstate_core/c6-residency/ -E cstate_pkg/c2-residency/ -E cstate_pkg/c6-residency/ -- sleep 300
# lo2s -E cstate_core/c1-residency/ -- sleep 300
# lo2s -E cstate_pkg/c2-residency/ -E cstate_pkg/c6-residency/ -- sleep 300
# lo2s -E cstate_pkg/c2-residency/ -E cstate_pkg/c6-residency/ --metric-frequency 1 -- sleep 300

perf works:

# perf stat -e cstate_core/c1-residency/ -e cstate_core/c6-residency/ -e cstate_pkg/c2-residency/ -e cstate_pkg/c6-residency/ -- sleep 60
perf stat -A -e cstate_core/c1-residency/ -e cstate_core/c6-residency/ -e cstate_pkg/c2-residency/ -e cstate_pkg/c6-residency/ -- sleep 60
cvonelm commented 6 months ago

This is a duplicate of #259. #330 is a simple PR that implements the cpumask parsing part, but not the "If an event is only supported in per-CPU mode, open it in per-CPU mode even when we are using lo2s per-process" part.

tilsche commented 6 months ago

Thanks for finding that, closed as duplicate