aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/intel_cpus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/intel_cpus.cpp')
-rw-r--r--src/cpu/intel_cpus.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
index 24465a0..f7b86bc 100644
--- a/src/cpu/intel_cpus.cpp
+++ b/src/cpu/intel_cpus.cpp
@@ -292,6 +292,11 @@ char * nhm_core::fill_pstate_line(int line_nr, char *buffer)
total_stamp = 1;
}
+ if (line_nr == LEVEL_HEADER) {
+ sprintf(buffer,_(" Core"));
+ return buffer;
+ }
+
if (line_nr >= (int)pstates.size() || line_nr < 0)
return buffer;
@@ -311,6 +316,12 @@ char * nhm_package::fill_pstate_line(int line_nr, char *buffer)
total_stamp = 1;
}
+
+ if (line_nr == LEVEL_HEADER) {
+ sprintf(buffer,_(" Package"));
+ return buffer;
+ }
+
if (line_nr >= (int)pstates.size() || line_nr < 0)
return buffer;
@@ -460,7 +471,7 @@ void nhm_package::calculate_freq(uint64_t time)
/* calculate the maximum frequency of all children */
for (i = 0; i < children.size(); i++)
- if (children[i]) {
+ if (children[i] && children[i]->has_pstates()) {
uint64_t f = 0;
if (!children[i]->idle) {
f = children[i]->current_frequency;
@@ -588,6 +599,11 @@ char * nhm_cpu::fill_pstate_line(int line_nr, char *buffer)
total_stamp = 1;
}
+ if (line_nr == LEVEL_HEADER) {
+ sprintf(buffer,_(" CPU %i"), number);
+ return buffer;
+ }
+
if (line_nr == LEVEL_C0) {
double F;
F = 1.0 * (tsc_after - tsc_before) * (aperf_after - aperf_before) / (mperf_after - mperf_before) / time_factor * 1000;