diff options
author | Aaron Schulman <aschulman@google.com> | 2015-02-25 08:37:09 -0800 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-05-07 09:23:23 -0700 |
commit | cbe13ef59b25b6df226c09b9351f0f615bc68dda (patch) | |
tree | 4b2e096662807bd9f4e9da89773d93fd73e89492 /cmds | |
parent | 79e287890da9de37a834cceebdefe32a7d3ac0ac (diff) | |
download | frameworks_native-cbe13ef59b25b6df226c09b9351f0f615bc68dda.zip frameworks_native-cbe13ef59b25b6df226c09b9351f0f615bc68dda.tar.gz frameworks_native-cbe13ef59b25b6df226c09b9351f0f615bc68dda.tar.bz2 |
Added Voltage and Current regulator ftrace events to atrace
Cherry-pick of c2c6ecd1195481f5813a721a7d20a73c0795c135 from AOSP
Tracing the state of the voltage and current regulators enables a developer
to attribute power consumption measurements to specific perhipherals and
cores. Unlike other indirect methods of tracing when peripherals and cores
are toggled, the regulator ftrace event indicates the exact point in time
when the kernel switches on or off the device. For example, in the following
trace, a developer can see exactly when the krait2 core starts receiving
power, and and when the voltage is set for voltage scaling.
mpdecision-2172 [000] ...1 1566.665481: regulator_enable: name=krait2
mpdecision-2172 [000] ...1 1566.665493: regulator_enable_delay: name=krait2
mpdecision-2172 [000] ...1 1566.665495: regulator_enable_complete: name=krait2
<...>-4133 [002] ...1 1566.666891: regulator_set_voltage: name=krait2 (1075000-1100000)
Change-Id: Ia322206ef74496daf1d9baa03545d8e89e398487
Signed-off-by: Aaron Schulman <aschulman@google.com>
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/atrace/atrace.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp index 515d761..4100fa3 100644 --- a/cmds/atrace/atrace.cpp +++ b/cmds/atrace/atrace.cpp @@ -137,6 +137,9 @@ static const TracingCategory k_categories[] = { { REQ, "/sys/kernel/debug/tracing/events/vmscan/mm_vmscan_kswapd_wake/enable" }, { REQ, "/sys/kernel/debug/tracing/events/vmscan/mm_vmscan_kswapd_sleep/enable" }, } }, + { "regulators", "Voltage and Current Regulators", 0, { + { REQ, "/sys/kernel/debug/tracing/events/regulator/enable" }, + } }, }; /* Command line options */ |