From: Sanjay Singh Rawat <sanjay.rawat at linaro.org>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH] devfreq: add devfreq devices stats support
Date: Fri, 10 Oct 2014 15:13:13 +0530 [thread overview]
Message-ID: <5437AA31.4050908@linaro.org> (raw)
In-Reply-To: 20141001202201.GA2236@sara.bahnhof.se
[-- Attachment #1: Type: text/plain, Size: 2541 bytes --]
On Thursday 02 October 2014 01:52 AM, Magnus Fromreide wrote:
> On Tue, Sep 30, 2014 at 12:04:54PM +0530, Sanjay Singh Rawat wrote:
>> add window to show frequency stats for devfreq devices
>>
>> Signed-off-by: Rajagopal Venkat <rajagopal.venkat(a)gmail.com>
>> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat(a)linaro.org>
>> ---
>>
>> v2 - Show devfreq window on support basis. Check for empty devfreq
>> directory.
>> - Free the open dirp while exiting.
>> ---
>> src/Makefile.am | 1 +
>> src/devices/devfreq.cpp | 367 ++++++++++++++++++++++++++++++++++++++++++++++
>> src/devices/devfreq.h | 75 ++++++++++
>> src/main.cpp | 9 ++
>> src/report/report-maker.h | 1 +
>> 5 files changed, 453 insertions(+)
>> create mode 100644 src/devices/devfreq.cpp
>> create mode 100644 src/devices/devfreq.h
>>
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index 311b75e..d2f1da7 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -39,6 +39,7 @@ powertop_SOURCES = \
>> devices/alsa.h \
>> devices/backlight.cpp \
>> devices/backlight.h \
>> + devices/devfreq.cpp \
>> devices/device.cpp \
>> devices/device.h \
>> devices/gpu_rapl_device.cpp \
>> diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
>> new file mode 100644
>> index 0000000..3eb63e5
>> --- /dev/null
>> +++ b/src/devices/devfreq.cpp
>> @@ -0,0 +1,367 @@
> ...
>> +/* todo: adapt to new report format */
>> +#if 0
> Do it, or at least do not commit big #if 0-blocks.
ack
>
>> + char buffer[512];
>> + unsigned int i, j;
>> +
>> + report.begin_section(SECTION_DEVFREQ);
>> + report.add_header("Device Frequency Report");
>> +
>> + report.begin_table(TABLE_WIDE);
>> + if (!all_devfreq.size()) {
>> + report.begin_row();
>> + report.add(" No devfreq devices available");
>> + return;
>> + }
>> +
>> + for (i = 0; i < all_devfreq.size(); i++) {
>> + buffer[0] = 0;
>> + class devfreq *df = all_devfreq[i];
>> +
>> + report.begin_row();
>> + report.begin_cell(CELL_CPU_PSTATE_HEADER);
>> + report.addf("%s", df->device_name());
>> +
>> + for (j = 0; j < df->dstates.size(); j++) {
>> + report.begin_row();
>> + report.begin_cell(CELL_CPU_STATE_VALUE);
>> + df->fill_freq_name(j, buffer);
>> + report.add(buffer);
>> + report.begin_cell(CELL_CPU_STATE_VALUE);
>> + df->fill_freq_utilization(j, buffer);
>> + report.add(buffer);
>> + }
>> + }
>> +#endif
> /MF
--
sanjay
next reply other threads:[~2014-10-10 9:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-10 9:43 Sanjay Singh Rawat [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-10-10 9:42 [Powertop] [PATCH] devfreq: add devfreq devices stats support Sanjay Singh Rawat
2014-10-01 20:22 Magnus Fromreide
2014-10-01 15:12 Sergey Senozhatsky
2014-10-01 14:52 Sergey Senozhatsky
2014-09-30 6:34 Sanjay Singh Rawat
2014-09-30 4:21 Sanjay Singh Rawat
2014-09-29 23:04 Alexandra Yates
2014-09-29 22:46 Alexandra Yates
2014-09-17 4:16 Sanjay Singh Rawat
2014-08-25 6:58 Sanjay Singh Rawat
2014-08-25 6:55 Sanjay Singh Rawat
2014-08-25 6:24 Sanjay Singh Rawat
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=5437AA31.4050908@linaro.org \
--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.