Add logging to record whenever the 10 second guardrail for sending
active configs changed broadcast is met, so that we know when the
broadcast would not have been sent.
Add activation time for configs that are active when the device boots.
This will help determine whether or not statsd thinks configs are active
and will help debug issues like b/133809948
Bug: 133809948
Test: bit statsd_test:*
Test: manually rebooted to make sure activation time was logged
Change-Id: Ifa72202bc52485e4953e49d78dffea685cc3d1e7
The pulling code will be added in the next commit.
Bug: 130526489
Test: statsd_testdrive
Change-Id: I0fea4b6a7a8dbbdc574fb342c1e07aa0165bf797
(cherry picked from commit 77987ed47f)
We are planning to use this metric to detect leaks.
This CL also decouples the actual memory sampling from AM. This means:
- Less time locking the pid list (we used to lock and then read proc)
- Less serialization / deserialization for the parcel
- Simpler to evolve (e.g. removed the HWM-specific method in AM)
Change-Id: I87a7243156dd8c88cfa85038e7e6cf4963e271e1
Test: manual, MemoryStatUtilTest, UidAtomTests
Bug: b/135418017
libhwbinder symbols are being moved into libhidlbase in order to
optimize linking/memory usage. libhwbinder will no longer be
required in the future (however removing references to it will come
separately).
Bug: 134961554
Test: boot
Change-Id: Iab3cc1b3abf8e648254a903c89a4ab9e8eee68c8
Merged-In: I128a007749356d4a8d75eba3e2c678c0f66c59fe
In beta 4, activeEventActivation proto object does not have a state
field and assumed to be active if it is written to disk. In beta 5, we
add a state field to support persisting metric activation status across
a system server crash. However, if a device updated from beta 4 to 5, we
don't have any knowledge of the state when we read. Therefore, assume
the lack of the state field as the event activation should be active for
the provided ttl.
Bug: 134795027
Test: used flashstation to flash a device to beta 4. Then manually push
and activate a simple config. Then use vendor/google/tools/flashall to
update to qt-dev + this change. Manually ensure metric/config are still
active.
Test: gts-tradefed run gts-dev --module GtsStatsdHostTestCases
Test: bit statsd_test:*
Change-Id: I8594d04efaa2ae1f669113aaffd33e5fa5851e73
This set of patches adds a way for the perfetto command line client to
save a trace to a hardcoded location,
/data/misc/perfetto-traces/incident-trace, and call into incidentd to
start a report, which will include said trace in a new section.
This is not a long-term solution, and is structured to minimize changes
to perfetto and incidentd. The latter is currently architected in a way
where it can only pull pre-defined information out of the system, so
we're resorting to persisting the intermediate results in a hardcoded
location.
This will introduce at most two more linked files at the same time.
Bug: 130543265
Tested: manually on crosshatch-userdebug
Merged-In: Iaaa312d2d9da73ca329807211227a8c7a049102c
Change-Id: Iaaa312d2d9da73ca329807211227a8c7a049102c
(cherry picked from commit 09a847902f)
We used a whitelist to determine which atoms should have their
timestamps truncated to the nearest 5 minutes. This changes the logic
to a blacklist so that we can get fine grained timestamps from vendor and
mainline atoms. Also reserves a range for atoms that need to be
truncated in the future.
Bug: 134574701
Test: inspected generated statslog.cpp file to make sure it had the
correct blacklist
Test: testdrive on ScreenStateChanged to ensure timestamps are preserved
when they should be
Test: testdrive on CallStateChanged to ensure timestamps are truncated
when they should be.
Change-Id: Id3468542c830cdf41395a94c77f7df0b46cd11b7
Previously,we could only have one deactivation matcher for a given
metric. This meant that the same matcher could not be used to cancel
several (or all) event activations of a metric. This fixes that bug.
Test: bit statsd_test:*
Bug: 134185513
Change-Id: I9d74878c9e09bd1f58c8f3dcffe1092edf490329
A condition was reversed in code refactoring during previous code review.
Test: unit tests added for all 4 combination cases.
Bug: 134417583
Change-Id: Id79a827ec7a5404b9006769f9595de773b4724ef
Idmap now checks if the version of the vendor partition is greater than
or equal to 29 or a development codename to enable enforcement of
overlayable resources.
Bug: 119390857
Test: manual
Change-Id: Ica25800432993beb7464436d4fba7cb391e621ef
Treat metric activation like conditions as much as possible. Keep track
of condition changes even when metric is not active. Right now, we
ignore all condition changes if metric is not active.
This is a band-aid fix. Ideally, we should re-think how metric activation is
implemented and consider implementing it as a condition with a timebomb.
Bug: 130838341
Test: statsd_test
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t
android.cts.statsd.metric
Change-Id: I96bb7a7c6ee88359f310065e166f858be945eaff
All new code in LMS wrapped with try/catch and swallowing exceptions
to make sure new code never crashes LocationManagerService.
Bug: 133906682,133190291
Test: Tested with (statsd_testdrive + gnss test apk). Work as intended.
Change-Id: I989b1361c029e76d35861cf23d5c3d152f0bf81a
Look for bootanimation.zip in /apex/com.android.bootanimation/etc/.
This is needed to support download and install of customized bootanimations.
Bug: 116821733
Test:
1. Get a custom bootanimation.zip
2. Build a com.android.bootanimation.apex that contains the custom
bootanimation.
3. Build a product partition containing the public avb-key in
/product/etc/security/apex/ or a system partition containing the
public avb-key in /system/product/etc/security/apex/
4. Flash the partition that was built.
5. $ adb install com.android.bootanimation.apex
6. $ adb reboot
7. Verify that the custom bootanimation is used during boot.
Change-Id: I0b63e8dd2ba536a5077e34f63670025f6e9d791a
This reverts commit ee615d6ed5.
Reason for revert: We will be adding these in a later release.
Test: None
Change-Id: I7cee23d246b7677a79a9055976e27a10a55efb1c
Bug: 131921165
StatsService to update UID data and overflows kernel transfer buffer.
In this case, the IPC call silently fails. The issue was discovered in Android Automotive Embedded use case that employs multiuser setup. This causes more uid data being sent via one-way StatsCompanionService::informAllUidData call than usual and can trigger the issue. As the result, uid map on statsd side is empty and many metrics are not captured.
Bug: b/132444397
Fixes: b/132444397
Test: Did a clean build of master branch and flashed the device. adb
shell cmd stats print-uid-map returned without any result. Repeated the
steps after implementing the fix, print-uid-map returns the results now.
Change-Id: I1451c13b36696449c145c51618c68d10e29a596a
* changes:
Fix lookup of incident section by name to not crash.
Add command line utilites to set the reason field in incident report header
Add ProtoOutputStream.serializeToVector