diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2010-08-25 07:55:09 -0400 |
---|---|---|
committer | Arjan van de Ven <arjan@linux.intel.com> | 2010-08-25 07:55:09 -0400 |
commit | 52f2156fbae183215205f8668a895e678413033c (patch) | |
tree | 686d8359f4573604ffa7e391afd48a17e59663fe /cpu | |
parent | 71d1aeac10baee6559ab5e1f5b34450709e86313 (diff) | |
download | powertop-52f2156fbae183215205f8668a895e678413033c.tar.gz |
use C++ strings not C strings to make memory management easier
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/intel_cpus.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpu/intel_cpus.cpp b/cpu/intel_cpus.cpp index c5b37a2..674cc32 100644 --- a/cpu/intel_cpus.cpp +++ b/cpu/intel_cpus.cpp @@ -11,6 +11,7 @@ #include <string.h> #include "../lib.h" +#include "../parameters/parameters.h" static int is_turbo(uint64_t freq, uint64_t max, uint64_t maxmo) { @@ -358,6 +359,15 @@ void nhm_package::measurement_end(void) } } total_stamp = 0; + + char buffer[256]; + + for (i = 0; i < pstates.size(); i ++) { + sprintf(buffer,"cpu-freq-%s", pstates[i]->human_name); + printf("registering %s \n", buffer); + register_parameter(buffer, 1); + } + } void nhm_package::account_freq(uint64_t freq, uint64_t duration) |