Code

Turbostat: frequency add Averange, rename Buzy
authorVincent Brillault <git@lerya.net>
Thu, 12 Feb 2015 18:50:29 +0000 (19:50 +0100)
committerVincent Brillault <git@lerya.net>
Sat, 28 Feb 2015 06:35:42 +0000 (07:35 +0100)
Partial backport of fc04cc67ea8f44124f048832a745a24bc2fa12fa
from Len Brown <len.brown@intel.com>

Add Avg_MHz column, which is the frequency that many
users expect to see -- the total number of cycles executed
over the measurement interval.

People found the previous GHz to be confusing, since
it was the speed only over the non-idle interval.
That measurement has been re-named Bzy_MHz.

src/turbostat.c

index cd2cf434bc7d5594d2fabaf431b5014095628562..fef1b1e35e6e54e3dba7fc6443f14df5b57f1e80 100644 (file)
@@ -580,9 +580,10 @@ submit_counters(struct thread_data *t, struct core_data *c, struct pkg_data *p)
        if (!aperf_mperf_unstable)
                turbostat_submit(name, "percent", "c1", 100.0 * t->c1/t->tsc);
 
-       /* GHz */
+       turbostat_submit("Average", "frequency", name, 1.0 / 1000000 * t->aperf / interval_float);
+
        if ((!aperf_mperf_unstable) || (!(t->aperf > t->tsc || t->mperf > t->tsc)))
-               turbostat_submit(NULL, "frequency", name, 1.0 * t->tsc / 1000000000 * t->aperf / t->mperf / interval_float);
+               turbostat_submit("Buzy", "frequency", name, 1.0 * t->tsc / 1000000 * t->aperf / t->mperf / interval_float);
 
        /* SMI */
        turbostat_submit(NULL, "current", name, t->smi_count);