summaryrefslogtreecommitdiff
path: root/powerstats
AgeCommit message (Collapse)Author
2022-05-31ODPM: change ODPM VSYS_PWR_MMWAVE to S9MLLDO3 on sub6 deviceSam Ou
Bug: 231463665 Change-Id: Ia02a781e6d27d83a90d04a473e204e97bd6e0482 Signed-off-by: Sam Ou <samou@google.com>
2022-02-14Add atrace to read energy valueWei Wang
Bug: 219608590 Test: boot Signed-off-by: Wei Wang <wvw@google.com> Change-Id: I9bf67d6a5e6d5fb9d3bff5bea0e8f00884093224
2021-09-14Merge "powerstats: Showing default EnergyConsumer when attribution not ↵Thierry Strudel
available" into sc-qpr1-dev am: c625c67554 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/pixel/+/15733978 Change-Id: Ie3557c200f3f91604e45ef75d397946653b76ced
2021-09-01powerstats: Showing default EnergyConsumer when attribution not availablesamou
Bug: 197924985 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: If761609aac1ab59fb63a47251b871f44085a35b8
2021-08-18Remove ndk_platform backend. Use the ndk backend.Jiyong Park
The ndk_platform backend will soon be deprecated because the ndk backend can serve the same purpose. This is to eliminate the confusion about having two variants (ndk and ndk_platform) for the same ndk backend. Bug: 161456198 Test: m Merged-In: I14a1c57bd06f1f2aa52491f779c7030d4de03547 Change-Id: I14a1c57bd06f1f2aa52491f779c7030d4de03547
2021-05-26Merge "powerstats: Remove std::stoi, std::stol, std::stoul" into sc-devBenjamin Schwartz
2021-05-25powerstats: Remove std::stoi, std::stol, std::stoulBenjamin Schwartz
When parsing fails these functions will return an exception, but exceptions are disabled in Android. Instead they immediately result in a crash. Replacing these with ParseInt from android-base library will allow us to return logs on error. Also removing samplingRate code entirely from IioEnergyMeterDataProvider since this is completely unused. Bug: 189139597 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: Ie554a77bf50f5c268ed9a9e8f3b13bc35941bc4d
2021-05-21Freeze AIDL APIs for SCJiyong Park
Bug: 188713899 Test: m Change-Id: Iab0e28cb32a1752b318ab4436f1951b170313f85
2021-04-23Merge "powerstats: Move init_rc and vintf_fragments to cc_defaults" into sc-devTreeHugger Robot
2021-04-16powerstats: Fix dumpsys formattingBenjamin Schwartz
Bug: 185617256 Test: dumpsys android.hardware.power.stats.IPowerStats/default delta Change-Id: Id0508539587a66dcdb0d1f62342350e2df547724
2021-04-06powerstats: Move init_rc and vintf_fragments to cc_defaultsBenjamin Schwartz
Bug: 183052760 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I2ab5a4571e3d2dab0d7accd143bc7a67420971eb
2021-04-06powerstats: Add init_rc and vintf_fragments to pixel implBenjamin Schwartz
Also removed log tags as they will be set by the service or parent library Bug: 183052760 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I90d782d1fc9832fefe83d5a0cddbb4c1f987bdc1 Merged-In: I90d782d1fc9832fefe83d5a0cddbb4c1f987bdc1
2021-04-02Merge "powerstats: Remove logspam" into sc-devBenjamin Schwartz
2021-04-01powerstats: Index the state residency data providersBenjamin Schwartz
Data providers that provided data for multiple entities were being added to the data structure as nullptr due to move semantics. Now they will only be added once (ensuring no more nullptr entries) and an index will map each power entity id to its corresponding data provider. Bug: 184290936 Test: Verified no more crashing Change-Id: I24821e0dcfffd9420ac2461f5fd6ac74ae2a33c8
2021-04-01powerstats: Remove logspamBenjamin Schwartz
Bug: 184290149 Test: adb logcat Change-Id: I6e28ecc945225dcb78555649fa5f38e990f7d753
2021-03-29powerstats: Add host_supported for aidl interfaceBenjamin Schwartz
Bug: 183946279 Test: build Change-Id: Iac1bdd9c8e3e6dbe46cebb915dc7cd229dd81553
2021-03-17powerstats: Use unique_ptr to store data providersBenjamin Schwartz
Pixel implementation of Power Stats HAL employs the use of data providers. The software model is such that the HAL has sole ownership of the various data providers. However the implementation was using shared_ptrs for the various data providers, which suggests multiple ownership. Moving to using unique_ptr enforces the ownership semantics that were intended in the design of the HAL implementation and will also hopefully prevent any bugs associated with multiple ownership gone awry. Bug: 183051413 Test: dumpsys android.hardware.power.stats.IPowerStats/default Test: atest VtsHalPowerStatsTargetTest Change-Id: I95bc9123b5002f1b9a035d7ec2725eae5b80eacf
2021-03-16powerstats: Remove inheritance from android::ThreadBenjamin Schwartz
The DisplayStateResidencyDataProvider class is unique among the other IStateResidencyDataProvider in that it also inherits from android::Thread. My hunch is that somehow it is the inheritance from android::Thread that is causing this crash when I attempt to construct sp<DisplayStateResidencyDataProvider> The power stats AIDL service also has a DisplayStateResidencyDataProvider that uses std::thread instead of android::thread and to the best of my knowledge it is not crashing in this way Bug: 176254913 Test: lshal debug android.hardware.power.stats@1.0::IPowerStats/default Change-Id: I401b7653bf954d22ed36bcfa9eacbe963720f8b6
2021-03-15DO NOT MERGE resolve merge conflicts of ↵Bob Badour
0c82fe16a1f5f956cc4906e55230fa8921644a52 to sc-dev Change-Id: Ia4cbb3e2b746c9c19a3084085c4f2c4fbc8297ca
2021-03-12[LSC] Add LOCAL_LICENSE_KINDS to hardware/google/pixelBob Badour
Added SPDX-license-identifier-Apache-2.0 to: atrace/Android.bp bootctrl/Android.bp dynamic_partitions/Android.bp fastboot/Android.bp health/Android.bp kernel_headers/Android.bp misc_writer/Android.bp mm/Android.bp perfstatsd/Android.bp pixelstats/Android.bp power-libperfmgr/Android.bp power-libperfmgr/libperfmgr/Android.bp powerstats/Android.bp powerstats/aidl/Android.bp pwrstats_util/Android.bp radio/Android.bp radio/gril_carrier_nv_headers/Android.bp recovery/Android.bp usb/Android.bp vibrator/Android.bp vibrator/common/Android.bp vibrator/common/bench/Android.bp vibrator/cs40l25/Android.bp vibrator/cs40l25/bench/Android.bp vibrator/cs40l25/diag/Android.bp vibrator/cs40l25/tests/Android.bp vibrator/drv2624/Android.bp vibrator/drv2624/bench/Android.bp vibrator/drv2624/tests/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: Android.bp thermal/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I58efe8db7cc3f22a585c6e3a80bef41c48b49c8d Merged-in: I58efe8db7cc3f22a585c6e3a80bef41c48b49c8d
2021-03-11powerstats: Return exception codes on errorBenjamin Schwartz
Bug: 182406354 Test: Presubmit Change-Id: I59ed60855d76fa51df38cb5dd97b5bc7d7e15057
2021-03-09Revert^2 "powerstats: Create vendor state residency provider"Benjamin Schwartz
8b5e4744b55c14e4d57cdbe31383f51a91c25ec2 Change-Id: I1b199ea53ca52cd5b82823f87f1d899ff3c40719
2021-03-09Revert "powerstats: Create vendor state residency provider"Benjamin Schwartz
Revert submission 13807923-pixel provider Reason for revert: caused build breakage Reverted Changes: I6b0c1d350:bthal/1.1: Use PixelStateResidencyProvider Ia028e589b:powerstats: Create vendor state residency provider... Id99e6d2a9:powerstats: Add PixelStateResidencyDataProvider Change-Id: I42fd10828e1447bc3c85ecee86b34562e9fe8534
2021-03-08powerstats: Create vendor state residency providerBenjamin Schwartz
Needed to change ::android::sp to shared_ptr in order to use the aidl interface ndk_platform backend. Bug: 167218032 Bug: 168834034 Test: adb shell dumpsys android.hardware.power.stats.IPowerStats/default Test: killed power.stats and bluetooth services and verified that providers are re-registered. Change-Id: Ia028e589b29b0163cd53e3f8b4f8bb764b1a11f2
2021-02-03powerstats: Renamed energy meter apiBenjamin Schwartz
Bug: 135067502 Test: build Change-Id: Ia99635e54b3bd62c5fdcf4f64fb558fb36d4ef43
2021-02-02power/stats: Supporting EnergyAttribution in EnergyConsumersamou
Bug: 172576334 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I37a6979f1558344c90c68b17923db47526c54496
2021-01-28powerstats: Fix possible oob access in display providerBenjamin Schwartz
Bug: 177701484 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: Ia8b3274a21d68e6f21d56db9ff7ce3282e378e6d
2021-01-28Merge "Specify version for aidl_interface explicitly" into sc-devTreeHugger Robot
2021-01-28Specify version for aidl_interface explicitlyJeongik Cha
Bug: 150578172 Test: m Change-Id: I4a9bf218b92252403e9ebbe8f89b10ee1899283f
2021-01-26powerstats: Add subsystem field to energy meterBenjamin Schwartz
Bug: 178115561 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I6bb61dd0f1f4280da6409e01e657e96d3ee06891
2021-01-25powerstats: Update Pixel implementationBenjamin Schwartz
Updated the Energy consumer API and renamed some types. Bug: 176117316 Test: atest VtsHalPowerStatsTargetTest Change-Id: Icd500da14bacc86ea0b7f3f3e6e877b742d6441a
2021-01-12powerstats: Add rail selection to powerstats 2.0Stephane Lee
Test: dumpsys android.hardware.power.stats.IPowerStats/default Bug: 168831752 Change-Id: I0dc31e4ac4092c671c5e20c34797594569bd551a
2020-12-22powerstats: Add parsing for odpm in powerstats 2.0Stephane Lee
Bug: 168831752 Test: dumpsys android.hardware.power.stats.IPowerStats/default. Ensure rail energy displays as expected. Change-Id: I70d06cc4dd7d17aa8e9b46d007db4ebe0ea864f7
2020-11-04Add flexibility to power entity parsingSujee Rajayogam
When a power entity header is shared across multiple consecutive power entities, do not search forward into the file. Bug: b/155112485 Test: Manual Change-Id: I99d13dd152e1f685990799e9260920ef236bbf2b
2020-11-04Add features to PowerStatsHAL to support AoC statsSujee Rajayogam
PowerStatsHAL was extended to support the following: 1. Merge states for the power entity from different sysfs nodes Bug: b/140217482 Test: Manual on Change-Id: I66f8906cf9cf80ab04f9657606639475d33863ec
2020-10-15powerstats: Add PowerStatsEnergyConsumerBenjamin Schwartz
This allows for the creation of energy consumers that combine data from the energy meter and state residencies. Bug: 170345932 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I81983bba7791c9d4ba1bde8a846694c7ad0c0ef6
2020-10-08powerstats: Implement EnergyConsumer APIBenjamin Schwartz
Bug: 170345932 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I1362fc8239776eafef1c0fb98edde822d1c76d84
2020-10-06powerstats: PowerStats HAL has been renamedBenjamin Schwartz
Bug: 169864180 Test: m Change-Id: I5491e93004ebabfe12a73d397b5b996d1dfffffa
2020-10-03powerstats: Clean up PowerStats HAL 2.0 implBenjamin Schwartz
Bug: 169864180 Test: dumpsys android.hardware.powerstats.IPowerStats/default Change-Id: Ia067e46ba166e4fee30a2b871ea60332546a178c
2020-10-01powerstats: Implement EnergyConsumer APIBenjamin Schwartz
Also update API and type names for rest of the implementation Bug: 168831183 Test: dumpsys android.hardware.powerstats.IPowerStats/default Change-Id: I47de1161a171df37ab0ade60dd8dece1f7edbc0c
2020-09-17powerstats: Create general purpose rail energy data providerBenjamin Schwartz
Bug: 167218032 Test: dumpsys android.hardware.powerstats.IPowerStats/default Change-Id: If62d46d2efc5ffd0936f9f64f5e79633f7cdaf8d
2020-09-14powerstats: Create display data providerBenjamin Schwartz
Bug: 167218032 Test: m Change-Id: Ice38963ce9832e5bd61feab9af9ca43234593dd8
2020-09-14powerstats: Change elapsed time to use boot_clockBenjamin Schwartz
std::chrono::stead_clock uses CLOCK_MONOTONIC which may not take into account time that the system is suspended. Bug: 167218032 Test: m Change-Id: Ib8a9b1cf6a826450fdf1d803259fe18b9d4c444f
2020-09-14powerstats: Create wlan data providerBenjamin Schwartz
Bug: 167218032 Test: dumpsys android.hardware.powerstats.IPowerStats/default Change-Id: Icfb37c022d3ac1962e6f1b50734d771a0e205da7
2020-09-14powerstats: Create generic data providerBenjamin Schwartz
Bug: 167218032 Test: dumpsys android.hardware.powerstats.IPowerStats/default Change-Id: Ieb9c1a81a7dc6f9e645cd05bcc93c032bc58b525
2020-09-13Add display stats data providerBenjamin Schwartz
This data provider polls on a file descriptor for changes to display state in order to construct accumulated time spent in each state. Bug: 163420392 Test: lshal debug android.hardware.power.stats@1.0::IPowerStats/default Merged-In: I0c31ea721f6cb964ece4ae989f63538f3ad7e1cb Change-Id: I0c31ea721f6cb964ece4ae989f63538f3ad7e1cb
2020-09-10Merge "powerstats: Implement dump for state residency data"Benjamin Schwartz
2020-09-08powerstats: Implement dump for state residency dataBenjamin Schwartz
Bug: 167218032 Test: dumpsys android.hardware.powerstats.IPowerStats/default Change-Id: I81ae26d07aecc5bdd848781ab92ca20b12b2dae3
2020-09-08powerstats: Fix infinite recursion bugBenjamin Schwartz
On targets that have no power entities registered it is possible for getPowerEntityStateResidencyData to recurse indefinitely. Fix: 167981140 Test: dumpsys android.hardware.powerstats.IPowerStats/default Change-Id: I1bee331c5014776692b14118499d9368cf1be23c
2020-09-03powerstats: Implement state residencyBenjamin Schwartz
Bug: 167218032 Test: dumpsys android.hardware.powerstats.IPowerStats/default Change-Id: I69b6ab25ff2da10abb5b1cda7285d443efc64f8c