From fe67b92f9d801a16fc191a706944b1c3468d55c6 Mon Sep 17 00:00:00 2001 From: Hardik Kaurani Date: Mon, 19 Oct 2026 16:02:35 +0530 Subject: [PATCH] pcm-power, pcm-memory: clarify unsupported client CPU error message and reference FAQ (#812) When running pcm-power or pcm-memory on client CPUs without server uncore PMU hardware (hasPCICFGUncore() == false), the tools print 'Unsupported processor model' and exit. This commonly leads users to assume the model simply lacks driver/software implementation rather than hardware PMU support. Provide an informative message explaining that server uncore PMU hardware is required and is unavailable on client processors. Direct users to the main 'pcm' utility for power, C-state, and memory bandwidth metrics on client hardware, and reference doc/FAQ.md#q5 and #q6. Addresses #812. --- doc/FAQ.md | 4 ++-- src/pcm-memory.cpp | 1 + src/pcm-power.cpp | 2 ++ tests/pcm-memory-fuzz.cpp | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/FAQ.md b/doc/FAQ.md index 88a0266d..9f984b66 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -27,13 +27,13 @@ Answer: yes, it does. An example of how to run PCM inside a docker container is pcm-power reports "Unsupported processor model". Can you add support for pcm-power for my CPU? -Answer: most likely you have a client CPU which does not have required hardware performance monitoring units. PCM-power can not work without them. +Answer: most likely you have a client CPU which does not have required hardware performance monitoring units. PCM-power can not work without them. For basic power and C-state metrics on client processors, please use the main `pcm` utility. ## Q6 pcm-memory reports that the CPU is not supported. Can you add support for pcm-memory for my CPU? -Answer: most likely you have a client CPU which does not have required hardware performance monitoring units. PCM-memory can not work without them. +Answer: most likely you have a client CPU which does not have required hardware performance monitoring units. PCM-memory can not work without them. For processor-level memory bandwidth statistics on client processors, please use the main `pcm` utility. ## Q7 diff --git a/src/pcm-memory.cpp b/src/pcm-memory.cpp index ab6a63fc..e38b0ee8 100644 --- a/src/pcm-memory.cpp +++ b/src/pcm-memory.cpp @@ -1546,6 +1546,7 @@ int mainThrows(int argc, char * argv[]) if (!m->hasPCICFGUncore()) { cerr << "Unsupported processor model (0x" << std::hex << cpu_family_model << std::dec << ").\n"; + cerr << "pcm-memory requires server uncore PMU hardware which is not available on client or unsupported processors (see doc/FAQ.md#q6).\n"; if (m->memoryTrafficMetricsAvailable()) cerr << "For processor-level memory bandwidth statistics please use 'pcm' utility\n"; exit(EXIT_FAILURE); diff --git a/src/pcm-power.cpp b/src/pcm-power.cpp index 77104d56..fc53312b 100644 --- a/src/pcm-power.cpp +++ b/src/pcm-power.cpp @@ -640,6 +640,8 @@ int mainThrows(int argc, char * argv[]) if (!(m->hasPCICFGUncore())) { cerr << "Unsupported processor model (0x" << std::hex << cpu_family_model << std::dec << ").\n"; + cerr << "pcm-power requires server uncore PMU hardware which is not available on client or unsupported processors (see doc/FAQ.md#q5).\n"; + cerr << "For basic power and C-state metrics on this processor, please use the main 'pcm' utility.\n"; exit(EXIT_FAILURE); } diff --git a/tests/pcm-memory-fuzz.cpp b/tests/pcm-memory-fuzz.cpp index c042d24f..6a9ba53a 100644 --- a/tests/pcm-memory-fuzz.cpp +++ b/tests/pcm-memory-fuzz.cpp @@ -61,6 +61,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if (!m->hasPCICFGUncore()) { cerr << "Unsupported processor model (0x" << std::hex << cpu_family_model << std::dec << ").\n"; + cerr << "pcm-memory requires server uncore PMU hardware which is not available on client or unsupported processors (see doc/FAQ.md#q6).\n"; if (m->memoryTrafficMetricsAvailable()) cerr << "For processor-level memory bandwidth statistics please use 'pcm' utility\n"; return 0;