- Trigger audio power usage logging when
1. endAudioIntervalGroup event for track/record
2. setMode to NORMAL for telephony
- Aggregate audio usage by type and device
- Send audiousage data every 24hrs by default, using property
persist.media.audio_power_metrics.interval_hr to config the interval
- Add property persist.media.audio_power_metrics.disable to disable
audio power metrics
Bug: 121318157
Bug: 140909217
Test: atest mediametrics_tests
Test: adb shell dumpsys media.metrics --all
Change-Id: I94ff00a5609a49c96a14827d3260d481c1310abe
Signed-off-by: Robert Lee <lerobert@google.com>
Compute summary statistics based on the current device
rather than the entire AudioTrack or AudioRecord duration.
Test: adb shell dumpsys media.metrics
Bug: 149850236
Change-Id: Ia3a5707c43c4530f5a6ac90f52901bd2e0bd0bab
And also to AudioRecord.
Then log the callerName using MediaMetrics from the destructor.
This can be used to tell whether AAudio or OpenSL ES
or Java created the object.
Bug: 154543374
Test: adb shell dumpsys media.metrics --clear
Test: Run an app that uses audio.
Test: adb shell dumpsys media.metrics
Test: Look for "callerName" in the dump.
Change-Id: I000346e72f581d2e40ef4fd0410b579d2a1224e2
Log events from service.
Log start, stop, disconnect and other events.
Log underruns and bufferSize.
Bug: 154543374
Test: adb shell dumpsys media.metrics --clear
Test: run an app that uses MMAP, like OboeTester
Test: adb shell dumpsys media.metrics
Test: Expect to see lots of "audio.stream" events.
Change-Id: I690e5226b695d53d038d644f4438c759e08f9fbb
The duplicate log allowed suffix ! (e.g. "event!") looked more like
"not equals" so changing from ! to #.
Test: adb shell dumpsys media.metrics
Bug: 138583596
Change-Id: I642334770ed8f5ff0d1f1e187e25eca596603252
Remove extraneous right brace in Time Machine dump.
Do not suppress repeated EVENT properties in the Time Machine.
Use "--" prefix instead of "-" for long dumpsys argv options.
Test: atest mediametrics_tests
Test: adb shell dumpsys media.metrics
Bug: 138583596
Change-Id: I874be909ac08641b14dd12fb2c83de7a276a1796
Previously, it assumed that the user had included other header files.
Now you can use it on its own, which is important for an API ("include
what you use").
Test: builds OK
Change-Id: Ib64eec20576dcf5a5dffe1ed670465cb590ef9e3
As the dumpsys no longer needs to be parseable by a program
convert to a more human readable form.
1) Make default time REALTIME consistently.
2) Dump time as a human readable string.
3) Remove dumpsys versioning code.
4) Delimiter changes.
Test: atest mediametrics_tests
Test: adb shell dumpsys media.metrics
Bug: 138583596
Change-Id: I6ee7d81a18e0e220b258c722d232c05805118abb
Factor out common analytics code from audio specifics.
Allow for saving and clearing analytics state if audioserver crashes.
Test: atest mediametrics_tests
Test: instrumented check on audioserver restart
Bug: 138583596
Change-Id: I1073f3ef95f44a383a7f14b0c2ea6f978a84ee24
This is a helper which assists logging on exit of a method.
Test: atest mediametrics_tests
Bug: 138583596
Change-Id: I73c0e7e469dc9fd1b29934ef308f9d2f15146bec
Move methods into Prop class.
Use const for getters.
Test: mediametrics_tests and dumpsys media.metrics
Change-Id: I76cdcce4f966ce74c44d4db019b4ce0096e567de
Remove the unused session id to improve speed and clarity.
Test: dumpsys media.metrics sanity, mediametrics_tests
Change-Id: Ide5e9218811e110997fed19f43eb6a5fdc5812ec
Use symbol_file property to make only the public symbols of
libmediametrics are checked for ABI compatibility.
Bug: 138219814
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py -libs libmediametrics -ref-dump-dir prebuilts/abi-dumps/platform
Change-Id: I329b961d2d02e0c6d298562769324eeb5e49c9e3
It's not an LLNDK library, but has # apex APIs which need to be kept
stable.
Bug: 138219814
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py -libs libmediametrics -ref-dump-dir prebuilts/abi-dumps/platform
Change-Id: I93b494c13a46817719002e0028f4f80f0a55d512
C interface is more stable across upgrades than C++
and simplifies cross-package interfaces in upgradeable components.
Bug: 119675363
Test: parallel metrics generation from nuplayer
Change-Id: I36beeade82a208be64af0860eb6f175a2801b27f
Remove diagnostics mode from CFI across the board. This should reduce
performance overhead and also allows the minimal runtime to work when
other ubsan sanitizers are enabled. CFI stack dumps should include a
cfi related function, so it should be apparent when a crash is CFI-related.
Bug: 117417735
Test: make -j
Change-Id: Id2cb6cb64425c4c89c031d93156fb1a20be5fa7b
code was clearing a pointer without having checked & reclaimed the
referenced memory.
Bug: 79352137
Test: adb shell dumpsys meminfo --unreachable system
Change-Id: I2b8faa806ac99d8e6390880d67b5bc090ef7c19b
the 'finalized' concept didn't pan out -- remove references to it.
Simplifies the code flow.
Also purged some uses of generateSessionID().
Bug: 71874686
Test: logcat/dumpsys
Change-Id: I39e48526a5696158d8195f47154881ca6ecda266