Code

Turbostat: remove 'units' variable, only used once
authorVincent Brillault <git@lerya.net>
Fri, 22 Aug 2014 22:42:49 +0000 (00:42 +0200)
committerVincent Brillault <git@lerya.net>
Sat, 28 Feb 2015 06:35:40 +0000 (07:35 +0100)
src/turbostat.c

index 5022c5689a012ae5aa6b269cd21df933ea887001..46f74a74dd91fe27396fca548362ae97d0e5d1e6 100644 (file)
@@ -69,7 +69,6 @@ static unsigned int do_c8_c9_c10;
 static unsigned int do_slm_cstates;
 static unsigned int has_aperf;
 static unsigned int has_epb;
-static unsigned int units = 1000000000;        /* Ghz etc */
 static unsigned int genuine_intel;
 static unsigned int has_invariant_tsc;
 static unsigned int do_nehalem_platform_info;
@@ -831,7 +830,7 @@ submit_counters(struct thread_data *t, struct core_data *c,
 
        /* GHz */
        if (has_aperf && ((!aperf_mperf_unstable) || (!(t->aperf > t->tsc || t->mperf > t->tsc))))
-               turbostat_submit(NULL, "frequency", name, 1.0 * t->tsc / units * t->aperf / t->mperf / interval_float);
+               turbostat_submit(NULL, "frequency", name, 1.0 * t->tsc / 1000000000 * t->aperf / t->mperf / interval_float);
 
        /* SMI */
        if (do_smi)