From: Chris Ferron <chris.e.ferron at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] Display all P-states in HTML-report
Date: Tue, 17 Jul 2012 15:08:57 -0700 [thread overview]
Message-ID: <5005E279.2020601@linux.intel.com> (raw)
In-Reply-To: 4FFD199A.2020409@samsung.com
[-- Attachment #1: Type: text/plain, Size: 2424 bytes --]
On 07/10/2012 11:13 PM, Igor Zhbanov wrote:
> Hello!
>
> On Arm processors there are more than 10 P-states. On my device there
> are 12
> p-states with different frequency. But PowerTOP displays only 10. And it
> doesn't display states (11 and 12) where the phone spends most of the
> time.
>
> I suppose that was because of console mode of PowerTOP, when there are
> limited
> number of lines on the console. But in the case of HTML-report this
> should
> not be a problem.
>
> Here is the patch that counts the number of found P-states and
> displays all
> of them.
>
> --8<--Cut
> here----------------------------------------------------------------
> diff -purN -X dontdiff-powertop powertop-intel/config.h powertop/config.h
> diff -purN -X dontdiff-powertop powertop-intel/src/cpu/cpu.cpp
> powertop/src/cpu/cpu.cpp
> --- powertop-intel/src/cpu/cpu.cpp 2012-07-05 13:06:16.000000000 +0400
> +++ powertop/src/cpu/cpu.cpp 2012-07-05 18:43:19.704809327 +0400
> @@ -618,6 +618,11 @@ void report_display_cpu_pstates(void)
> unsigned int package, core, cpu;
> int line;
> class abstract_cpu *_package, * _core, * _cpu;
> + unsigned int i, pstates_num;
> +
> + for (i = 0, pstates_num = 0; i< all_cpus.size(); i++)
> + if (all_cpus[i]&& all_cpus[i]->pstates.size()> pstates_num)
> + pstates_num = all_cpus[i]->pstates.size();
>
> if ((!reportout.csv_report)&&(!reportout.http_report))
> return;
> @@ -644,7 +649,7 @@ void report_display_cpu_pstates(void)
> if (!_core)
> continue;
>
> - for (line = LEVEL_HEADER; line< 10; line++) {
> + for (line = LEVEL_HEADER; line< (int)pstates_num; line++) {
> int first = 1;
>
> if (!_package->has_pstate_level(line))
> --8<--------------------------------------------------------------------------
>
>
> The same issue may affect the function report_display_cpu_cstates()
> but I'm not sure that CPUs with more than 10 C-states exists.
>
> The same code is in the function impl_w_display_cpu_states(), but that
> function is used in console mode only.
>
> Thank you.
>
>
>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
Your patch has been merged.
Thank you,
next reply other threads:[~2012-07-17 22:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-17 22:08 Chris Ferron [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-07-12 0:57 [Powertop] Display all P-states in HTML-report Sergey Senozhatsky
2012-07-12 0:54 Sergey Senozhatsky
2012-07-11 8:40 Igor Zhbanov
2012-07-11 6:13 Igor Zhbanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5005E279.2020601@linux.intel.com \
--to=powertop@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.