aboutsummaryrefslogtreecommitdiff
path: root/daemon/KMod.cpp
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2014-07-16 12:00:00 -0700
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:54:51 -0800
commit8b39b6c50a01bcfa280151b43079dab428cbab45 (patch)
tree66294093e2cd51c0df7afa6d119ec78f65274515 /daemon/KMod.cpp
parent020278c1a682ea75ddb63fe4e0d373116935199f (diff)
downloadgator-5.19.tar.gz
gator: Version 5.195.19
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'daemon/KMod.cpp')
-rw-r--r--daemon/KMod.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/daemon/KMod.cpp b/daemon/KMod.cpp
index 9300002..73e123d 100644
--- a/daemon/KMod.cpp
+++ b/daemon/KMod.cpp
@@ -58,10 +58,15 @@ void KMod::setupCounter(Counter &counter) {
return;
}
+ int value = 0;
snprintf(text, sizeof(text), "%s/key", base);
- int key = 0;
- DriverSource::readIntDriver(text, &key);
- counter.setKey(key);
+ DriverSource::readIntDriver(text, &value);
+ counter.setKey(value);
+
+ snprintf(text, sizeof(text), "%s/cores", base);
+ if (DriverSource::readIntDriver(text, &value) == 0) {
+ counter.setCores(value);
+ }
snprintf(text, sizeof(text), "%s/event", base);
DriverSource::writeDriver(text, counter.getEvent());