Get Powertop2.0 to work on ARM

Registered by Amit Kucheria

A new version of powertop has been released at git clone git://git.kernel.org/pub/scm/status/powertop/powertop.git

This is a complete rewrite of powertop. We need to make sure it is packaged and supported on ARM

Blueprint information

Status:
Complete
Approver:
Amit Kucheria
Priority:
Medium
Drafter:
Amit Kucheria
Direction:
Approved
Assignee:
Amit Daniel Kachhap
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2011.08
Started by
Amit Kucheria
Completed by
Mounir Bsaibes

Related branches

Sprints

Whiteboard

Status:
DONE

Powertop2.0 along with ARM specific support is staged in linaro git as,
git://git.linaro.org/tools/powertop.git
branch:linaro

To setup the compilation environment for powetop2.0, some library dependencies need to be resolved.
They can be done as,
apt-get install pkg-config, libnl-dev, ncurses-dev.

Additionally libraries like zlib and libpci needs to be compiled and installed.
wget http://zlib.net/zlib-1.2.5.tar.gz
tar -xf zlib-1.2.5.tar.gz; cd zlib-1.2.5; ./configure; make; make install
git clone git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
cd pciutils; make install-lib

Powertop needs support of perf and trace subsystem, so enable following configurations in kernel,
  CONFIG_PERF_EVENTS, CONFIG_PERF_COUNTERS, CONFIG_TRACEPOINTS and CONFIG_TRACING

Android support for powertop is added and can be accessed from
git://git.linaro.org/tools/powertop.git(branch- linaro)
The android library dependencies are ,
1) android libnl library can be found from,
 git://git.linaro.org/people/amitdanielk/library/libnl.git(branch libnl_android)
2) ncurses android library can be found from,
   git://git.linaro.org/people/amitdanielk/library/ncurses.git(branch linaro)

The following work items as moved to https://blueprints.launchpad.net/linaro-powertop/+spec/powertop-new-features
[amitdanielk] Verify the functional level correctness of the parameters like any per core parameters is not averaged: TODO
[amitdanielk] Follow up with upstream to get android ARM patches integrated: BLOCKED
[amitdanielk] Add autotools support to powertop as requested by maintainer: TODO

(?)

Work Items

Work items for 2011.07:
[amitdanielk] Port powertop2.0 for ARM: DONE
[amitdanielk] Compiled and executed powertop2.0 for ARM: DONE
[amitdanielk] Investigated the cause of C states and P states not appearing: DONE
[amitdanielk] Fixed the assumption of model field of /proc/cpuinfo always present: DONE
[amitdanielk] Fixed the assumption of package id always initialised: DONE
[amitdanielk] Stage the working powertop2.0 in linaro git for all partner vendors to test: DONE
[amitdanielk] Investigated and fixed the issue of changed frequency value not appearing in case of power_frequency events: DONE
[amitdanielk] Compared the behaviour of powertop and perf tools for extraction of power event values: DONE
[amitdanielk] Upstreamed all the modifications in power mailing list where the equivalent modifications added by the maintainer: DONE
[amitdanielk] Verify the correctness of the data exposed by powertop tool like C state, P state, number and cause of wakeups: DONE
[amitdanielk] Port all dependent libraries (libnl, pciutils, zlib, libslang) for android or use if it is already available: DONE
[amitdanielk] Creating android makefile for powertop2.0: DONE
[amitdanielk] Periodically sink the linaro powertop git and make sure that it continues to work on ARM platforms: DONE
[amitdanielk] Submitted a patch for fixing padding issue of power frequency events: DONE
[amitdanielk] Port powertop2.0 for android platform(use pandaboard as android builds are available): DONE
[amitdanielk] Compile powertop 2.0 using Linaro's Android build on Panda and get it integrated there: DONE
[amitdanielk] Create android support for ncurses library: DONE
[amitdanielk] Copied android support for powertop and dependent libraries to gerrit(git://android.git.linaro.org/platform/external/*): DONE

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.