From 1338ab9feef6eb7f54066704486e0c384f0428cb Mon Sep 17 00:00:00 2001 From: Vincent Brillault Date: Wed, 11 Feb 2015 22:06:45 +0100 Subject: [PATCH] Turbostat: Add (back) sanity check This new gauge contains TSC / interval_float. If TSC and interval_float are behaving correctly, this is supposed to be constant. Otherwise, other measurements can be wrong --- src/turbostat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/turbostat.c b/src/turbostat.c index fef1b1e3..6cd39a18 100644 --- a/src/turbostat.c +++ b/src/turbostat.c @@ -585,6 +585,9 @@ submit_counters(struct thread_data *t, struct core_data *c, struct pkg_data *p) if ((!aperf_mperf_unstable) || (!(t->aperf > t->tsc || t->mperf > t->tsc))) turbostat_submit("Buzy", "frequency", name, 1.0 * t->tsc / 1000000 * t->aperf / t->mperf / interval_float); + /* Sanity check (should stay stable) */ + turbostat_submit("TSC", "gauge", name, 1.0 * t->tsc / 1000000 / interval_float); + /* SMI */ turbostat_submit(NULL, "current", name, t->smi_count); -- 2.30.2