diff options
author | Radhakrishna Sripada <radhakrishna.sripada@intel.com> | 2015-09-23 17:13:09 -0700 |
---|---|---|
committer | Alexandra Yates <alexandra.yates@linux.intel.com> | 2015-09-25 14:31:26 -0700 |
commit | 0b9387287fd0055f29786d17ba61f8a5c6099bea (patch) | |
tree | a179f04d0d2d41bea60055fdf400a98443c70229 | |
parent | 4c081b18279f8e7c4af3fbfa544bde5bfb3cb21e (diff) | |
download | powertop-2.0-0b9387287fd0055f29786d17ba61f8a5c6099bea.tar.gz |
Assign line level based on linux name
Powertop Idle Stats only show the statistics of C1E-SKL and not C1-SKL while
intel_idle driver exposes both the states. Parsing the human names of the
states, the same line level '1' gets assigned to both C1-SKL and C1E-SKL. The
statistics of C1-SKL are always overwritten by the statistics of C1E-SKL. To
eliminate this parsing linux name would assign different line levels to
different cstates irrespective of their human names.
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
-rw-r--r-- | src/cpu/abstract_cpu.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp index 17acb71..12dcb7d 100644 --- a/src/cpu/abstract_cpu.cpp +++ b/src/cpu/abstract_cpu.cpp @@ -210,7 +210,7 @@ void abstract_cpu::insert_cstate(const char *linux_name, const char *human_name, state->line_level = -1; - c = human_name; + c = linux_name; while (*c) { if (strcmp(linux_name, "active")==0) { state->line_level = LEVEL_C0; @@ -223,15 +223,6 @@ void abstract_cpu::insert_cstate(const char *linux_name, const char *human_name, c++; } - /* some architectures (ARM) don't have good numbers in their human name.. fall back to the linux name for those */ - c = linux_name; - while (*c && state->line_level < 0) { - if (*c >= '0' && *c <='9') { - state->line_level = strtoull(c, NULL, 10); - break; - } - c++; - } if (level >= 0) state->line_level = level; |