15 Commits

Author SHA1 Message Date
Darren Hsu
529b618a7c powerstats: Add config support for AdaptiveDvfs data provider
Bug: 273415531
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I48bd1ec622680a3c93d15b571fbf21579f0e21ed
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2023-03-14 14:40:47 +08:00
Darren Hsu
5f32222576 powerstats: introduce AdaptiveDvfsStateResidency data provider
This is a new data provider to get state residency from fvp_stats,
which is similar with DVFS data provider. But the difference is that
CPU frequency table is read from cpufreq sysfs and not predefined in
the config.

Bug: 272642210
Bug: 267638537
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I22451b55dee5dfb0a1b36497533c2063984d5483
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2023-03-13 11:43:03 +08:00
Darren Hsu
02b8df5191 powerstats: include sleep duration for core down state
Bug: 263276734
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ia9c1ed8c7ca68d03e73da35674ac299d7cf22045
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2023-02-13 23:05:23 +08:00
Darren Hsu
d094ba620f powerstats: fix buffer underflow issue in CPUPM data provider
Bug: 267827563
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I569a20f250c7ca3586f71084918022f04d6693d4
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2023-02-07 18:09:39 +08:00
Darren Hsu
a3792b2a2f powerstats: Introduce CpupmStateResidencyDataProvider
Bug: 263276734
Bug: 264728626
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I0887dde159d6f6ed1f5c470464eaf817ecc7b4eb
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2023-01-09 09:16:21 +00:00
Darren Hsu
7885d61cd4 powerstats: add OWNERS for power stats
Bug: 264815906
Test: N/A
Change-Id: I7962429126547b974bdc3133b00b49624a94959c
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2023-01-09 10:43:10 +08:00
Darren Hsu
2756ac31ff powerstats: add new parameter to provide aoc clock
AoC power stats are reported in ticks that are different frequency
in different SoC.

Bug: 233923713
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I047d7ae163941c2168dcd8a0ea34da73ab4a8477
Merged-In: I047d7ae163941c2168dcd8a0ea34da73ab4a8477
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-06-17 12:45:53 +00:00
Sam Dubey
33552445b8 Revert "Use libaoc to provide consistent timestamp calculations"
Revert "Allow libaoc to be used in more contexts"

Revert submission 18605412-b-233923713

Reason for revert: Completely broke master-without-vendor

Bug: 235533674

Reverted Changes:
Iacd541815:Use libaoc to provide consistent timestamp calcula...
Id31ee3439:Allow libaoc to be used in more contexts

Change-Id: I3345d0e4baa8d5dce22be20f0213ad1421ce1a90
2022-06-10 03:23:56 +00:00
Craig Dooley
9f4ac2c565 Use libaoc to provide consistent timestamp calculations
Bug: 233923713
Change-Id: Iacd541815f40adef879e05d9bd8ded056e9a760d
2022-06-04 05:11:46 +00:00
Darren Hsu
391f601be6 powerstats: Introduce AoC timed data provider
Reading data from an AoC sysfs node by getline takes 1 second. In total
there are 17 AoC sysfs nodes that must be read. The worst case is taking
17 seconds long that is greater than dumpsys timeout. Therefore, we need
the timeout mechanism to ignore the AoC power stats reporting when AoC
latency exceeds the allowed time.

Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ic5c2a0b36728153fd2e2593599a8f2bcdb50ace4
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-05-03 03:30:42 +00:00
Kelly Rossmoyer
20b039192d Revert "powerstats: timeout mechanism for AoC data provider"
Revert submission 17800080-power-stats-aoc-timeout

Reason for revert: Causing crashes due to improper thread sync
Reverted Changes:
I71a9e6817:powerstats: timeout mechanism for AoC data provide...
I725c00745:powerstats: set time limit as timeout for AoC
I5b290a53d:powerstats: set time limit as timeout for AoC

Change-Id: I6844a141739f93154d10debc29c7565f92349d25
2022-04-24 23:22:49 +00:00
Darren Hsu
df08a31b76 powerstats: timeout mechanism for AoC data provider
Reading data from an AoC sysfs node by getline takes 1 second. In total
there are 17 AoC sysfs nodes that must be read. The worst case is taking
17 seconds long that is greater than dumpsys timeout. Therefore, we need
the timeout mechanism to ignore the AoC power stats reporting when AoC
latency exceeds the allowed time.

Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I71a9e681780471f31141599c53bb516aef445add
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-04-20 07:45:56 +00:00
Kelly Rossmoyer
2433fcf62e Revert "powerstats: timeout mechanism for AoC data provider"
Revert submission 17442015-powerstats-aoc-timeout

Reason for revert: Causes PowerStatsHAL crashes (b/227578192)
Reverted Changes:
I9a9eb27fa:powerstats: set time limit as timeout for AoC
Ib70000580:powerstats: timeout mechanism for AoC data provide...
Ied599054c:Revert "powerstats: disable AoC power stats report...
Iaf5af43eb:powerstats: set time limit as timeout for AoC

Change-Id: I53e280871197aaf003d9ef3e5e0cb4c79f486cc8
2022-04-01 20:28:24 +00:00
Darren Hsu
aee3d1a322 powerstats: timeout mechanism for AoC data provider
Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ib70000580f9515b3cb73968dd190f99ae8af178f
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-03-29 15:02:55 +08:00
Darren Hsu
673d3b0ab7 powerstats: add common data providers in gs common
Bug: 206576142
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Iee66356150a8bdfcd1e0b3fe8b8d5ec9f601f543
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-01-03 20:09:27 +08:00