[PATCH 4/4] cpu: cpufreq: show Turbo Boost with top _PSS value
Keng-Yu Lin
keng-yu.lin at canonical.com
Mon May 26 00:30:37 UTC 2014
On Fri, May 23, 2014 at 8:42 PM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> To clarify CPU _PSS top state, we can flag it as Turbo Boost just
> as some extra helpful information.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/cpu/cpufreq/cpufreq.c | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
> index 22e16ef..8b08146 100644
> --- a/src/cpu/cpufreq/cpufreq.c
> +++ b/src/cpu/cpufreq/cpufreq.c
> @@ -382,11 +382,20 @@ static void do_cpu(fwts_framework *fw, const int cpu)
> fwts_log_info(fw, "CPU %d: %i CPU frequency steps supported.", cpu, speedcount);
> fwts_log_info_verbatum(fw, " Frequency | Relative Speed | Bogo loops");
> fwts_log_info_verbatum(fw, "-----------+----------------+-----------");
> - for (i = 0; i < speedcount; i++)
> - fwts_log_info_verbatum(fw, "%10s | %5.1f %% | %9" PRIu64,
> + for (i = 0; i < speedcount; i++) {
> + char *turbo = "";
> +#ifdef FWTS_ARCH_INTEL
> + if ((i == 0) && (speedcount > 1) &&
> + (hz_almost_equal(freqs[i].Hz, freqs[i + 1].Hz)))
> + turbo = " (Turbo Boost)";
> +#endif
> +
> + fwts_log_info_verbatum(fw, "%10s | %5.1f %% | %9" PRIu64 "%s",
> hz_to_human(freqs[i].Hz),
> 100.0 * freqs[i].speed/cpu_top_speed,
> - freqs[i].speed);
> + freqs[i].speed,
> + turbo);
> + }
>
> if (number_of_speeds == -1)
> number_of_speeds = speedcount;
> --
> 2.0.0.rc0
>
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>
More information about the fwts-devel
mailing list