diff options
author | Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> | 2024-12-12 20:59:25 +0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2025-01-27 20:35:22 +0300 |
commit | 4265a86582eaa224d171328be0c71e2a7ccd194f (patch) | |
tree | f53be7f4cde9f74c8f063467958b74a43408508c /tools/perf/scripts/python | |
parent | 089134cb0502ba962bce9402ce96e0875876d401 (diff) | |
download | linux-4265a86582eaa224d171328be0c71e2a7ccd194f.tar.xz |
tools/power turbostat: Add PMT directory iterator helper
PMT directories exposed in sysfs use the following pattern:
telem%u
for example:
telem0, telem2, telem3, ..., telem15, telem16
This naming scheme preserves the ordering from the PCIe discovery, which
is important to correctly map the telemetry directory to the specific
domain (cpu, core, package etc).
Because readdir() traverses the entries in alphabetical order, causing
for example "telem13" to be traversed before "telem3", it is necessary
to use scandir() with custom compare() callback to preserve the PCIe
ordering.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions