aboutsummaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2010-08-19 20:47:23 -0700
committerArjan van de Ven <arjan@linux.intel.com>2010-08-19 20:47:23 -0700
commit55192047f4a61c1c346ed009c3b887cff17631cf (patch)
treec7bbcb64f0a3c5c42c93d37df32dd701dc6dcaf4 /cpu
parent6fa33512fab2565935bbb358fde71fff8c08fdd0 (diff)
downloadpowertop-55192047f4a61c1c346ed009c3b887cff17631cf.tar.gz
progress... adding better tracking
Diffstat (limited to 'cpu')
-rw-r--r--cpu/cpu.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpu/cpu.cpp b/cpu/cpu.cpp
index 76ccdd9..852f3c8 100644
--- a/cpu/cpu.cpp
+++ b/cpu/cpu.cpp
@@ -7,6 +7,7 @@
#include "cpu.h"
#include "../perf/perf_bundle.h"
+#include "../lib.h"
static class abstract_cpu system_level;
@@ -55,7 +56,7 @@ static class abstract_cpu * new_core(int core, int cpu, char * vendor, int famil
static class abstract_cpu * new_cpu(int number, char * vendor, int family, int model)
{
- class abstract_cpu * ret;
+ class abstract_cpu * ret = NULL;
if (strcmp(vendor, "GenuineIntel") == 0) {
if (family == 6 && model == 26)
@@ -185,6 +186,7 @@ void enumerate_cpus(void)
model = strtoull(c, NULL, 10);
}
handle_one_cpu(number, vendor, family, model);
+ set_max_cpu(number);
}
}