aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-14Fix build errors for android NougatHEADmasterYongqin Liu
since there is no glob.h in android, copied them from hardware/bsp/intel/peripheral/libmraa/src/glob also remove the definition of strchrnul in android_stubs.h, since it's already implemented in bionic Change-Id: I757a8773e196ae86191a55cfada0c6b4b45c5727 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2016-09-15Get rid of __DATE__ useBernhard Rosenkränzer
clang 4.0 warns about __DATE__ resulting in non-reproducable builds - and we build powertop with -Werror Change-Id: I872a207b35595bb9f775ee7fc5348a3e99090a30 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2016-08-08src/Makefile.am: Add usb.h and usb.cpp files to powertop_SOURCESLisa Nguyen
Resolve this error: In function `one_measurement(int, char*)': undefined reference to `create_all_usb_devices()' devices/powertop-device.o: In function `create_all_devices()': undefined reference to `create_all_usb_devices()' by adding devices/usb.h and devices/usb.cpp files to the powertop_SOURCES list. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Update Android.mk to run powertop on Android MLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Update android_stubs.h fileLisa Nguyen
Update android_stubs.h file to resolve stlport build issues. Changes were originally made by Bernhard Rosenkränzer. Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Update Android.mkLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Add the ctype libraryLisa Nguyen
Fix this error: external/powertop/src/tuning/tuningusb.cpp:138:33: error: 'isdigit' was not declared in this scope if (!isdigit(entry->d_name[0])) Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Updates to support Android platformRajagopal Venkat
This patch adds following minor changes to prepare powertop to support Android platform. - Add missing HAVE_CONFIG_H conditional check. - remove un-used ethtool_cmd_speed_set and ethtool_cmd_speed functions. - Minimize dependency on exception handling in catch blocks. These changes will not affect powertop functionality. Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
2016-08-08android.mk: change src files in makefile for compilationSanjay Singh Rawat
making Android.mk changes to include/exclude source files for building powertop module for android
2016-08-08Remove devices/usb entries from Makefile.amLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Android: Remove src/tuning/usb.cpp from LOCAL_SRC_FILESLisa Nguyen
The src/tuning/usb.cpp file doesn't exist anymore. Remove the reference to that file in Android.mk. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Android: Add LOCAL_CFLAGS and update LOCAL_CPPFLAGS in Android.mkLisa Nguyen
Update the values of LOCAL_CPPFLAGS and add LOCAL_CFLAGS in Android.mk. Also, disable PCI support by default. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Android: Add LOCAL_CPPFLAGS entry to Android.mkLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Android: Remove *.h files from LOCAL_SRC_FILESLisa Nguyen
Remove references to header files in Android.mk. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Adding Android workaroundsLisa Nguyen
The changes were based from Daniel Leung's patch. Signed-off-by: Daniel Leung <daniel.leung@linux.intel.com> Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Android: Add opal-sensors.cpp to LOCAL_SRC_FILESLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Make sure powertop builds when we build systemimageVishal Bhoj
Signed-off-by: Vishal Bhoj <vishal.bhoj@hackbox.linaro.org>
2016-08-08Fix Compiler errors on AndroidVishal Bhoj
Signed-off-by: Vishal Bhoj <vishal.bhoj@hackbox.linaro.org>
2016-08-08Add stubs to support Android platformRajagopal Venkat
This patch adds stubs for features that are not supported by Andriod. An header file which defines all stubs is included only for Android builds. Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
2016-08-08Add missing virtual destructor for intel_util classLisa Nguyen
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2016-08-08Prevent seg faults in AndroidDaniel Leung
The mbsrtowcs() in Android seems to change the content of source pointer to 0x00. So save a copy of the source string so we can manipulate it later, preventing segfaults. This fix by Daniel resolves this bug: https://bugs.linaro.org/show_bug.cgi?id=1273 Signed-off-by: Daniel Leung <daniel.leung@linux.intel.com>
2016-08-08Android: disable C++ exceptionsDaniel Leung
Android native C++ libraries do not support C++ exceptions. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-08-08enumerate cpu based on parsing different string patternSanjay Singh Rawat
in current arm kernel cpuinfo bogomips number is not calculated, using an alternative sting which is used to enumerate the cpu. Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
2016-08-04po: regenerate with new POT and stringsJoe Konno
Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-08-04powertop.pot: xgettext refresh, attribution fixJoe Konno
Refresh contents of powertop.pot with latest changes to AC_REVISION (configure.ac) and POTFILES.in. Also, use correct copyright attribution in the generated template. Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-08-04POTFILES.in: refresh files with stringsJoe Konno
Renamed output from scripts/regenerate-potfiles-in to po/POTFILES.in. This will enable more string translation possibilities. Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-08-04scripts: add regenerate-potfiles-in scriptJoe Konno
This is a convenience script for maintainers or translators. POTFILES.in is input into gettext for string translation. Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-08-04Makevars: align more closely to generated .templateJoe Konno
Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-08-04.gitignore: ignnore m4/pkg.m4Joe Konno
With ACLOCAL_AMFLAGS += --install, an additional m4 script is copied in at configure time from the host's gettext installation. Let's not track it. Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-08-04gettext: run gettextize-0.18.2Joe Konno
Ran gettextize from gettext-0.18.2 to clean up some annoying configuration warnings. Also, allow m4 and po changelogs to be created, especially to help folks concerned with the particulars of string translation. Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-08-04Makefile.am: add --install to ACLOCAL_AMFLAGSJoe Konno
This is supported by >=automake-1.10, so let's use it to ensure all requisite m4 scripts are assembled at configure and build time. Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-08-03configure.ac: bump version to 2.9-preJoe Konno
Once we get things ready for pre-release testing, AC_REVISION will change to "-rcX" and a version tag will be pushed. For now, executing a local build with "--version" will give some indication it's something you built and not something provided by your package manager. Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-08-03Adding PID to process description.eSyr
Currently, multiple processes shown in overview and consumers list are indistinguishable in case they have the same command line. This commit prepends PID enclosed in square brackets to the beginning of description line, similarly to the interrupt ID in interrupt description. * src/process/process.cpp (process::process): printing PID to desc, adding process description after it. Acked-by: Joe Konno <joe.konno@intel.com>
2016-08-03Checking whether librt is needed for clock_gettime().eSyr
Commit ef79e28 introduced usage of clock_gettime() function, which, unfortunately, breaks build on some systems, namely Debian Wheezy, due to the fact it should be linked with librt. This commit adds configure check whether additional library is needed in order to use aforementioned function. * configure.ac: using AC_SEARCH_LIBS() for checking whether librt is needed for clock_gettime(). Acked-by: Joe Konno <joe.konno@intel.com>
2016-07-21Calculate the number of joules consumed over timeDaniel Black
The *joules_consumed functions where returning power so renamed to reflect this. Calculate the joules used at intervals by multipling the instantaneous power by the time interval since the last measurement. Signed-off-by: Daniel Black <daniel.black@au1.ibm.com> v2: (Joe) Resolved a trivial hunk rejection in main.cpp +514 with 6696d4e5f2e ("enable --auto-tune without debugfs"); Acked-by added Acked-by: Joe Konno <joe.konno@intel.com>
2016-07-21powertop changes the frequency set by the userspace governor to the minimum ↵Thomas Ilsche
available frequency. This is caused by abstract_cpu::wiggle that touches the {min,max}_freq. By doing so, it also narrows down the scaling_setspeed setting within the min-max-range, but it is not reset upon restoring max_freq. To illustrate what is happening behind the scenes: $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_{min,max,cur}_freq 1200000 2901000 2000000 $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_{governor,setspeed} userspace 2000000 $ echo 1200000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1200000 $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 1200000 (Tested with Linux 4.4.0-21 Ubuntu) Attached is a patch that resets the setspeed value if it was set to a numeric value before the wiggle.
2016-07-21MSR is valid for x86_32/x86_64 onlyDaniel Black
As such we compile guard the portions of code related to msr modprobing, reads and writes. Signed-off-by: Daniel Black <daniel.black@au1.ibm.com>
2016-07-21enable --auto-tune without debugfsBoris ARZUR
2016-07-21Fix misaligned curly braceOleg Drokin
This brace makes it look like the wrong block is beign closed causing some confusion for the reader. Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
2016-07-21Show idle processes holding devices at full powerOleg Drokin
Even if process did not spend any time running but holds a device open, it deserves its line on the "Wall of Shame". Otherwise we get erratic "now we show it, now we don't" behavior which is confusing. Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
2016-07-21Add support for usbdevfsOleg Drokin
Similar to ALSA, usb devices could be held at full power by opening them via usbdevfs, so it's good to track such processes and attribute the power to them. Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
2016-07-21intel_cpus: no pstate Idle pct with intel_pstateJoe Konno
Do not display "percent Idle" in the Frequency Stats tab when the intel_pstate kernel driver is loaded. This is because Idle time is inferred through kernel PM trace events, which may be insufficient for proper computation in certain scenarios. Therefore, best to display no data than potentially inaccurate data. End-users are encouraged to use the Idle Stats tab in the UI or report to analyze their system's idle time. When the intel_pstate kernel driver is loaded, the Frequency Stats tab will only present the end-user with the average frequency of each logical core. Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-07-21intel_cpus: frequency: clarify average clock speedJoe Konno
Depending on the sample time (-t sample_time_in_secs), on Intel CPUs the average frequency is computed for the sample time. Therefore, let's change the label to "Average" so as not to confuse the end-user. Previously, the UI and report printed the "actual" frequency-- at least, that's how it was labeled. This is not strictly true, as the actual cpu frequency of the platform may change at any point during the sample time for a variety of reasons. Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-07-21.gitignore: ignore vim swap, cscope, ctagsJoe Konno
Signed-off-by: Joe Konno <joe.konno@intel.com>
2016-07-21Widen ppc64 paths for sysfs fileDaniel Black
hwmon0 was assumed to be the only hwmon directory used by POWER however hwmon4 was observered on different hardware. Here we use the process_glob function to retrieve all measurement locations. The opal_sensors_power_meter class now stores the full path. Signed-off-by: Daniel Black <daniel.black@au1.ibm.com>
2016-07-21Add process_glob similar to process_directory.Daniel Black
This enables a glob to be specified to grab sysfs files in subdirectories for setting up measurement or anything else the callback function does.
2016-07-21Makefile.am need reference to m4 directoryDaniel Black
Running autoreconf (autconf-2.69/automake-1.15/libtoolize-2.4.6) without the m4 directory specified in the Makefile.am file generates the following warning: ./autogen.sh autoreconf: Entering directory `.' autoreconf: running: autopoint autoreconf: running: aclocal autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. autoreconf: running: /usr/bin/autoconf autoreconf: running: /usr/bin/autoheader autoreconf: running: automake --add-missing --copy --no-force configure.ac:26: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged. configure.ac:26: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead, configure.ac:26: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files. autoreconf: Leaving directory `.' v3: (Joe) The irony. 'Real' submission fixing all nits from v2. v2: (Joe) Re-submission due to a whitespace -ism, added Acked-by Acked-by: Joe Konno <joe.konno@intel.com>
2016-04-29Throw error message when system cmd returns Non-zero value.Madper Xie
hciconfig returns 0 when succeed. Signed-off-by: Madper Xie <madper.xie@canonical.com>
2016-03-24Fixed bug when all PCI devices usage is shown as 00%Yaroslav Isakov
2016-03-24Detect all audio cards in the system (not only card0)Yaroslav Isakov