Commit Graph

4429 Commits

Author SHA1 Message Date
TreeHugger Robot
26b6ef7904 Merge "StatsdStats: improve activation time logging" into qt-dev 2019-06-28 02:03:40 +00:00
Tej Singh
16ca28fc8e StatsdStats: improve activation time logging
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
2019-06-25 13:52:58 -07:00
Rafal Slawik
6d44d6dafa Add atom for per-process system ion heap size
The pulling code will be added in the next commit.

Bug: 130526489
Test: statsd_testdrive
Change-Id: I0fea4b6a7a8dbbdc574fb342c1e07aa0165bf797
(cherry picked from commit 77987ed47f)
2019-06-24 09:54:42 +00:00
Ioannis Ilkos
9af8d15783 Merge "Add anon RSS + swap metric" into qt-dev 2019-06-24 08:46:40 +00:00
Stanislav Zholnin
32a89c15a7 Add logging atom for PermissionApps fragment views
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 218
Bug: 133401502
Bug: 134581123
Change-Id: I8f41d72c8f96a004911ef68491de8a214da4db24
Add logging to PermissionAppsFragment
2019-06-21 16:39:52 +01:00
Stanislav Zholnin
dc3e2b35fb Add atom for logging of AppPermissionsFragment views.
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 217
Bug: 133401502
Bug: 134581123
Change-Id: I60e500e99a13a4f2dea6d7141fc87f5b8422c3a7
2019-06-21 16:26:08 +01:00
Stanislav Zholnin
c9dda9ecdf Add atom for logging views in AppPermissionFragment
Test: ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 216
Bug: 133401502
Bug: 134581123
Change-Id: I099de3a5ecd7ecf68df618b9738a0428e5792c98
2019-06-21 15:20:44 +00:00
Ioannis Ilkos
466ad6c3e0 Add anon RSS + swap metric
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
2019-06-21 11:10:19 +01:00
Stanislav Zholnin
3e0f9bcce0 Add logging atoms to record user actions in AppPermissionFragment
(handheld devices only)

Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 215
Bug:133401502
Bug:134581123

Change-Id: I2a0b15dfdd6398707a762c48602f970f14534b51
2019-06-21 05:23:33 +01:00
Stanislav Zholnin
375e2ab781 Add logging atoms to record user actions in LocationAccessCheck
(handheld devices only)

Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 214
Bug:133401502
Bug:134581123
Change-Id: I9f35d2b06cf953441e0986ab23cb842cd155144d
2019-06-20 23:59:59 +00:00
Steven Moreland
303a891220 Merge changes from topic "combine-libhidlbase-libhwbinder" into qt-dev
* changes:
  libhwbinder users use libhidlbase
  libmedia2_jni: remove libhwbinder_noltopgo ref
2019-06-20 19:09:01 +00:00
Steven Moreland
6c65bb208e libhwbinder users use libhidlbase
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
2019-06-18 17:20:06 -07:00
Stanislav Zholnin
bdf620b5bd Adding atom for logging GrantPermissionsActivity buttons presented and pressed.
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 213
Bug:133401502
Bug:134581123
Change-Id: I4c74d590266f89b192605be6f94d038bc2e1bd5a
2019-06-18 11:11:33 +01:00
Stanislav Zholnin
247d1b75cd Atoms for logging permission grants during system upgrade.
Test: manually verified
Bug:133401502
Bug:134581123
Change-Id: I004704e39c8936de91300b6f98e722d925142c14
2019-06-14 13:13:35 +01:00
Ryan Savitski
cfff472c8e Merge "userdebug: support perfetto traces as a section in incident reports" into qt-dev 2019-06-13 23:42:09 +00:00
TreeHugger Robot
15ae30124d Merge "Add atom for logging of ReviewPermissionsFragment actions." into qt-dev 2019-06-13 20:15:35 +00:00
TreeHugger Robot
12ae95987b Merge "Persist metric activation across beta4/5 ota" into qt-dev 2019-06-08 14:38:06 +00:00
Tej Singh
cbf2c64024 Persist metric activation across beta4/5 ota
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
2019-06-07 17:56:24 -07:00
Ryan Savitski
cc7d9973c6 userdebug: support perfetto traces as a section in incident reports
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)
2019-06-07 18:13:56 +01:00
Stanislav Zholnin
3d215df180 Add atom for logging of ReviewPermissionsFragment actions.
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 211
Bug: 133401502
Bug: 134581123
Change-Id: I326731e70221c1a28568573a241592006d1bb59e
2019-06-07 14:33:42 +00:00
TreeHugger Robot
85a3a4689c Merge "Blacklist truncated atoms instead of whitelistnig" into qt-dev 2019-06-07 02:35:51 +00:00
TreeHugger Robot
de7e1ccb0c Merge "Allow same matcher to cancel >1 event activation" into qt-dev 2019-06-06 06:15:55 +00:00
Tej Singh
29ac601429 Blacklist truncated atoms instead of whitelistnig
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
2019-06-05 18:10:12 -07:00
Joe Onorato
f7c2bceafe Do not include specific_mention sections in bugreports either.
Test: adb bugreport & manually verify
Bug: 134583922
Change-Id: I6b4df17fc729f78e70e126882bce611a33c8ef9a
2019-06-05 11:57:39 -07:00
Tej Singh
ee4495e6e2 Allow same matcher to cancel >1 event activation
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
2019-06-04 13:03:38 -07:00
TreeHugger Robot
9fe4ba7a43 Merge "Fix atoi build errors" into qt-dev 2019-06-04 15:06:08 +00:00
Ryan Mitchell
7f08644bd7 Fix atoi build errors
Use strtol instead of atoi to check vendor partition version.

Bug: 119390857
Test: manual
Change-Id: I49c5963d8bbc5a803b3ccc0dd41d7bd7f2a42226
2019-06-04 06:05:31 +00:00
Yao Chen
6d647b78d3 Merge "Fix a bug in saving local history of the metrics report." into qt-dev 2019-06-04 03:31:15 +00:00
Yao Chen
5c10cb48a9 Fix a bug in saving local history of the metrics report.
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
2019-06-03 15:02:30 -07:00
TreeHugger Robot
f5671d390d Merge "Remove stopship for idmap2 vendor sdk checking" into qt-dev 2019-06-03 20:31:59 +00:00
Ryan Mitchell
56db15b843 Remove stopship for idmap2 vendor sdk checking
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
2019-06-03 11:22:36 -07:00
TreeHugger Robot
d0ffaeb4b5 Merge "Handle condition changes when metric is not active." into qt-dev 2019-06-01 05:31:14 +00:00
Muhammad Qureshi
18e469298e Handle condition changes when metric is not active.
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
2019-05-31 15:38:36 -07:00
TreeHugger Robot
36e3da7920 Merge "Look for bootanimation in apex-module" into qt-dev 2019-05-30 20:37:19 +00:00
Hongyi Zhang
700137e637 Add Usage info for LocationManager's APIs
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
2019-05-30 03:41:17 +00:00
Anders Fridlund
e0b4d23708 Look for bootanimation in apex-module
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
2019-05-29 13:45:19 -07:00
Andrew Nguyen
33ec4cc349 Revert "Add VehicleMapServicePacketReported and"
This reverts commit ee615d6ed5.

Reason for revert: We will be adding these in a later release.

Test: None
Change-Id: I7cee23d246b7677a79a9055976e27a10a55efb1c
Bug: 131921165
2019-05-28 16:30:45 +00:00
Hyunyoung Song
2f6110f832 Merge "Add live wallpaper metrics to atoms.proto" into qt-dev 2019-05-24 22:43:04 +00:00
Tao Bao
731490a142 Merge "Write system property persist.sys.provisioned" into qt-dev 2019-05-24 14:06:15 +00:00
Stanislav Zholnin
d904cb583b Merge "Add PermissionFlags field to DangerousPermissionState atom." into qt-dev 2019-05-24 10:43:54 +00:00
Stanislav Zholnin
75c3fd1ef5 Add PermissionFlags field to DangerousPermissionState atom.
Bug:133401502

Change-Id: I0072ab374b85609636c1f32e55154badf7bf9dc0
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive 10050
2019-05-24 10:43:34 +00:00
TreeHugger Robot
51f286c974 Merge "Testdrive: allow multiple atoms in pulled atoms" into qt-dev 2019-05-24 06:29:14 +00:00
Kunhung Li
286c52f8c2 Add live wallpaper metrics to atoms.proto
Resue StyleUIChanged message to append live wallpaper events.

Test: make statsd_testdrive && statsd_testdrive 179
Bug: 133209268
Bug: 127745228
Change-Id: I864d8e35bd071f7bcd2249ef20446a42a680dc6d
2019-05-24 01:42:15 +00:00
TreeHugger Robot
585422a5d2 Merge "Fixes the bug that can occur when StatsCompanionService calls StatsService to update UID data and overflows kernel transfer buffer." into qt-dev 2019-05-24 00:26:19 +00:00
Yao Chen
318296726d Increase the size limit of incident reports.
Bug: 133425862
Test: incidentd_test
Change-Id: I323878958a93e0280b782de1745ed59e44f79b0b
2019-05-23 21:31:25 +00:00
Max Dashouk
11e0d40bbe Fixes the bug that can occur when StatsCompanionService calls
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
2019-05-23 20:53:58 +00:00
TreeHugger Robot
42fb4bb1e9 Merge "Statsd: Add watchdog rollback to experiment ids" into qt-dev 2019-05-23 19:25:43 +00:00
Ben Murdoch
a2fcdafa41 Merge "Add worksource AAB bucket to WakeupAlarmOccurred WW atom." into qt-dev 2019-05-23 16:54:14 +00:00
TreeHugger Robot
b3c874492f Merge "Add adb command for setting and getting SIMs" into qt-dev 2019-05-22 05:06:04 +00:00
Joe Onorato
f581d1b92f Merge changes from topic "b_132890298" into qt-dev
* 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
2019-05-22 03:16:44 +00:00