Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a bit of a workaround for newer Intel CPUs that, in addition to the traditional "package-<n>" entries in /sys/class/powercap/, also contain a "psys" entry that controls the platform domain (see, e.g., https://lkml.kernel.org/lkml/1458516392-2130-3-git-send-email-srinivas.pandruvada@linux.intel.com/). PAPI currently assumes that entries starting with "intel-rapl:0" correspond to socket 0 and "intel-rapl:1" to socket 1. With "psys" around that unfortunately need not be the case; on at least one system relevant to DOE (I can't post the details as it's not public yet) intel-rapl:0 corresponds to socket 0, intel-rapl:1 corresponds to *psys*, and intel-rapl:2 corresponds to socket 1 (what a mess!). What currently happens is that PAPI entirely misses the counters for socket 1. This PR works around the problem by exhaustively searching for the right "intel-rapl:<n>" directory. It preserves the current PAPI assumption that ZONE0 events correspond to socket 0 and ZONE1 to socket 1. On the other hand, it completely ignores the "psys" entry, while one could argue that the data it contains should ideally be made available as well...
- Loading branch information