diff options
Diffstat (limited to 'tools/gator/daemon/PmuXML.cpp')
-rw-r--r-- | tools/gator/daemon/PmuXML.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/gator/daemon/PmuXML.cpp b/tools/gator/daemon/PmuXML.cpp index 68599920afad..4a4575e34446 100644 --- a/tools/gator/daemon/PmuXML.cpp +++ b/tools/gator/daemon/PmuXML.cpp @@ -135,4 +135,18 @@ void PmuXML::writeToKernel() { } DriverSource::writeDriver("/dev/gator/pmu_init", "1"); + + // Was any CPU detected? + bool foundCpu = false; + for (GatorCpu *gatorCpu = GatorCpu::getHead(); gatorCpu != NULL; gatorCpu = gatorCpu->getNext()) { + snprintf(buf, sizeof(buf), "/dev/gator/events/%s_cnt0", gatorCpu->getPmncName()); + if (access(buf, X_OK) == 0) { + foundCpu = true; + break; + } + } + + if (!foundCpu) { + logCpuNotFound(); + } } |