aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2025-05-30 08:09:28 +0800
committerLen Brown <len.brown@intel.com>2025-06-08 14:10:16 -0400
commit69078520fdf1525212a23a80dc79e1a75f2062f6 (patch)
tree9b5c21347d6437576d0b89ec951a4e305f7c167a /scripts/gdb/linux/utils.py
parenttools/power turbostat: Allow probing RAPL with platform_features->rapl_msrs cleared (diff)
downloadlinux-rng-69078520fdf1525212a23a80dc79e1a75f2062f6.tar.xz
linux-rng-69078520fdf1525212a23a80dc79e1a75f2062f6.zip
tools/power turbostat: Avoid probing the same perf counters
For the RAPL package energy status counter, Intel and AMD share the same perf_subsys and perf_name, but with different MSR addresses. Both rapl_counter_arch_infos[0] and rapl_counter_arch_infos[1] are introduced to describe this counter for different Vendors. As a result, the perf counter is probed twice, and causes a failure in in get_rapl_counters() because expected_read_size and actual_read_size don't match. Fix the problem by skipping the already probed counter. Note, this is not a perfect fix. For example, if different vendors/platforms use the same MSR value for different purpose, the code can be fooled when it probes a rapl_counter_arch_infos[] entry that does not belong to the running Vendor/Platform. In a long run, better to put rapl_counter_arch_infos[] into the platform_features so that this becomes Vendor/Platform specific. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions