Commit Graph

5877 Commits

Author SHA1 Message Date
TreeHugger Robot
d41c119656 Merge "Fix the the proto definition for app startup and fully drawn events." into rvc-qpr-dev 2021-02-09 00:38:05 +00:00
Calin Juravle
6b232cc058 Fix the the proto definition for app startup and fully drawn events.
ActivityMetricsLoggers build the proto with the compilation reason first
and then the compilation filter. Instead of changing the logging code,
we prefer to change the proto field order: this will facilitate the
speed up the resolution without the need to purge data or wait for
further release builds.

It is ok, because both fields are in fact int32 proto values so the ABI
does not change.

Test: m
Bug: 178108751

(cherry picked from commit cf676e8028c2611461dc3e009dd9fe771f44bdb2)

Merged-In: I36ec354d273dceace5245d7634c68ac63dc5a8cd
Change-Id: I03c701efe2181ae7796547267902f884007593eb
2021-02-08 23:24:20 +00:00
TreeHugger Robot
666deabeb8 Merge "Fix thread safety issue on clearing cache" into rvc-qpr-dev 2021-02-03 00:25:15 +00:00
Muhammad Qureshi
60b00ec30f [RESTRICT AUTOMERGE] Fix potential out of bounds writes in LogEvent. am: 53251a491f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13321771

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1da4a9159e5611d80c618913f728defb5399d927
2021-01-30 02:30:06 +00:00
Tej Singh
db097214b1 Fix thread safety issue on clearing cache
Historically, we havent held a lock on ForceClearCache and
ClearCacheIfNecessary. This is not thread safe because kAllPullAtomInfo
must be accessed in a lock, especially now that pullers can be
registered/unregistered.

Test: atest statsd_test, wrote a repro cl.
Bug: 168156854
Bug: 173552790
Change-Id: I47d53a6d9d274bca4c78dbfd87e0097091b7b8cb
Merged-In: I47d53a6d9d274bca4c78dbfd87e0097091b7b8cb
Merged-In: I8bee7a0a6acecc1274d5acc0adb44c5dde8862e4
(cherry picked from commit f9a4bb18ff)
2021-01-21 08:31:02 +00:00
Muhammad Qureshi
53251a491f [RESTRICT AUTOMERGE] Fix potential out of bounds writes in LogEvent.
mUidFieldIndex, mExclusiveStateFieldIndex,
mAttributionChain{Start|End}Index are stored using int8_t.
These values can overflow when mValues.size() exceeds INT8_MAX.
Add proper bounds checking to ensure these values don't exceed
INT8_MAX.

Bug: 174488848
Bug: 174485572
Test: m
Test: statsd_test
Test: TreeHugger
Change-Id: I416e2de06ca2935017e15d4e91000652831e6b6c
2021-01-15 12:58:50 -08:00
Robert Luo
23ccad79a7 Migrate media output switcher metrics - 1/n
Bug: 172181610
Test: (1) run statsd_testdrive 277, and check the
metric output correctness after content switching.
(2) run statsd_testdrive 90, and check the metric
output correctness after launching the output dialog
via Sound Setting / Volume Rocker / Media Object Chip.
(3) atest MediaOutputControllerTest
(4) atest MediaOutputDialogTest
(5) atest MediaOutputBaseDialogTest

Change-Id: I4094a510b5483a456522da9d0d8a6eee1526f687
Merged-In: I0fea0c59afcb44fc1d22920036107524f221a7be
2020-12-09 15:40:52 +08:00
Riddle Hsu
26d715daca Add ART optimization dimension to reportFullyDrawn
Bug: 170310046
Test: adb shell cmd stats print-logs
      adb logcat | grep statsd | grep "(50)"
Change-Id: I1d33ff4639c85d2b1f57f2fef72d883c3eed7f00
Merged-In: I1d33ff4639c85d2b1f57f2fef72d883c3eed7f00
(cherry picked from commit ec2e3ee704)
2020-11-30 13:24:21 +08:00
Maryam Karimzadehgan
8c95065cb7 Add package_name to log for debugging the back gesture model.
Test: manual.
Bug: 150170384
Change-Id: I94efa3ec6af62b485c45f9bf17861722b73ecca3
Merged-In: I94efa3ec6af62b485c45f9bf17861722b73ecca3
2020-11-16 18:56:18 +00:00
Maryam Karimzadehgan
832d060168 Add log entries for the results for the ML model for
the back gesture.

Test: manual
Bug: 150170384
Change-Id: Ic08bdea27fea085bcbb425dbac6682a88d29aa8a
Merged-In: Ic08bdea27fea085bcbb425dbac6682a88d29aa8a
2020-11-16 18:56:08 +00:00
Santiago Seifert
f347c9537c Add MediaMetrics support to MediaParser
Includes:
- Java changes to collect the metrics.
- JNI changes to plumb metrics to the MediaMetrics service.
- statsd atoms.proto changes for data transmission.

Bug: 158742256
Test: atest CtsMediaParserTestCases
Test: atest CtsMediaParserHostTestCases
Test: Manually using dumpsys.
Change-Id: If51ee018da3056231910cd9c18f1b938a5c0e343
Merged-In: If51ee018da3056231910cd9c18f1b938a5c0e343
2020-10-31 11:27:18 +00:00
TreeHugger Robot
f1d26a395f Merge "Fix out of bound error of IncidentService" into rvc-qpr-dev 2020-10-08 05:12:35 +00:00
Ioannis Ilkos
7717083f3c Additional LMK diagnostic information
Add free memory / swap as well as the kill reason to better understand
and diagnose lmkd behaviour in the field

Test: build with corresponding lmkd change
Bug: 168117803
Merged-In: I190f70758daa442b8605e17960c74574676fa3ae
Change-Id: I190f70758daa442b8605e17960c74574676fa3ae
2020-09-16 15:39:45 +00:00
Howard Ro
e592700068 Fix out of bound error of IncidentService
Before this change, it was possible for the code to suffer an out of
bound error.

Bug: 150706572
Test: make
Change-Id: I3e8d37f2ee3c942bc9b176edee043557b005c757
(cherry picked from commit 8ff5315e98)
2020-09-10 23:41:44 +00:00
Philip P. Moltmann
9334f7aba7 Do not log package name on privacy-indicator logs
as requested by privacy review.

Bug: 162547999
Test: Built
Change-Id: I9333facfdc39cc7a344c5671f487928977f5d82e
2020-08-11 23:50:14 +00:00
Colin Cross
48666a1abb Merge "Use -target 8 for android_uiautomator" into rvc-dev 2020-08-04 16:30:51 +00:00
Colin Cross
51387a027d Use -target 8 for android_uiautomator
android_uiautomator is distributed as part of the SDK and should use
-target 8 for compatibility with old JDKs.

Bug: 150153790
Bug: 162522383
Test: javap -v -cp out/target/common/obj/JAVA_LIBRARIES/android_uiautomator_intermediates/classes.jar com.android.uiautomator.core.Configurator | grep "major version"
Change-Id: I6871ab5436232ad3bffff6bd26adf2de6b3c06ff
2020-08-03 18:03:40 -07:00
junyulai
472144c35a Report NR connected state to provide resolution of 5G NSA mode
Test: adb shell cmd stats pull-source 10082
Test: atest UidAtomTests#testDataUsageBytesTransfer
Bug: 160727498

Change-Id: I7d98ab425852ffa064c68f5dc50bd1f5a4a49ab9
Merged-In: I7d98ab425852ffa064c68f5dc50bd1f5a4a49ab9
(cherry-picked from ag/12167625)
2020-07-16 15:40:38 +08:00
Hall Liu
f75aef41e3 Merge "Add telecom command to stop block suppression" into rvc-dev 2020-07-08 22:15:43 +00:00
Hall Liu
b5d4decf24 Add telecom command to stop block suppression
Add a Telecom command to stop the number blocking suppression that
happens after an emergency call.

Bug: 158798240
Fixes: 160667708
Test: atest CtsTelecomTestCases
Change-Id: I122de1962fb6aa48a3092c2aa323dcbdcbb8f42e
2020-07-08 11:09:26 -07:00
Shafik Nassar
b1951ee22d Merge "Add atom for general external storage access stats" into rvc-dev 2020-07-01 16:24:18 +00:00
TreeHugger Robot
ac2c18c314 Merge "Fix edge case in statsd alarms" into rvc-dev 2020-06-26 20:05:04 +00:00
shafik
bb206054d5 Add atom for general external storage access stats
Define a new pulled atom which will be logged in MediaProvider.
The atom collects general access stats for external storage:
* Total number of accesses
* Total number of file path accesses
* Total number of secondary storage accesses
* List of accesses mime types

Test: build
Test: make statsd_testdrive ; ./out/host/linux-x86/bin/statsd_testdrive \
      -p com.google.android.providers.media.module 10085
Bug: 149669087
Change-Id: Ic0ebb040a05ec06603f1a617f290af6a2f21916d
2020-06-26 19:02:26 +00:00
Sudheer Shanka
9cd29ba6d6 Merge "Add COUNT_LIMIT_EXCEEDED as reason for BlobCommitted/Leased." into rvc-dev 2020-06-26 18:35:18 +00:00
Tej Singh
f5cd94b4d0 Fix edge case in statsd alarms
Right now, if an alarm fires exactly on time (within 1 second), or
exactly on a multiple of its period, statsd will reset the alarm for the
same time, which can result a loop of statsd setting an alarm, the alarm
firing, statsd setting an alarm at the same time, etc.

The fix is that if an alarm fires on time, we should move to the next
period.

Test: atest statsd_test (added to a test, which would fail without the
code change)
Bug: 159098080

Change-Id: I150538cb1d3d5a2b943df2a32d92f8f84bb96626
2020-06-25 22:38:03 -07:00
TreeHugger Robot
ae135c8108 Merge "Inroduce UNIFORM_OPS sampling." into rvc-dev 2020-06-25 15:58:20 +00:00
Stanislav Zholnin
cb726cbdd2 Inroduce UNIFORM_OPS sampling.
Introduce strategy which uniformly samples OPs, without biasing in
favour of specific ops.
Use this strategy half of the time.

Test: atest RuntimeMessageCollectionTest && statsd_testdrive 10069
Bug: 143519689
Change-Id: I481d3a9ef9c66f04577b57432cecdf2c02055e58
2020-06-25 13:28:10 +00:00
Richard Gaywood
78c3f99268 Add shard ID to statsd atom for procstats collection
Without this, RANDOM_ONE_SAMPLE would result in statsd dropping all bar the
first shard. Adding the shard id as a dimension field preserves all the
data.

Bug: 158294266
Test: manual build & test
Change-Id: I94ffb610ef3651f460600e3df6b32c87fc430594
2020-06-24 19:50:14 +01:00
Sudheer Shanka
5ed8d50f74 Add COUNT_LIMIT_EXCEEDED as reason for BlobCommitted/Leased.
Bug: 144155167
Bug: 159754450
Test: atest android.cts.statsd.atom.UidAtomTests
Change-Id: Ic6a7d81833f98ea88e7543ac9c1710871ed7582b
2020-06-23 19:01:37 -07:00
Muhammad Qureshi
271cbbd708 Merge "Remove libstatsmetadata" into rvc-dev 2020-06-23 01:21:42 +00:00
Maryam
de784e569a Log IME Touches. Design document: https://docs.google.com/document/d/1e7JrjjEVvjrUxSDuPWdsdKcGziNQbW11bdCPlCdA2Wk/edit?ts=5ed57c93#heading=h.ixy3934b5ag
bug: 159343582
Test: manual test
Change-Id: I263f9810592dcd0fc05913875dd31154d041455a
2020-06-22 12:22:16 -07:00
Muhammad Qureshi
741d31898a Remove libstatsmetadata
Remove kWhitelistedAtoms usage in MetricsManager and remove:
- atoms_info references from statsd
- libstatsmetadata usages from statsd
- libstatsmetadata library
- atoms_info_writer.h/.cpp
- references to atoms_info in rest of stats-log-api-gen
- allow_from_any_uid annotation

Fixes: 147600720
Fixes: 154856835
Fixes: 148993016

Test: m stats-log-api-gen
Test: m stats-log-api-gen-test &&
out/host/linux-x86/nativetest/stats-log-api-gen-test/stats-log-api-gen-test
Test: m statsd

Change-Id: I2e0579609ff257da934b95cdda397f3ca0ffa1f0
2020-06-18 18:59:12 -07:00
Jeffrey Huang
caa0c3758d Merge "Add pullTimeoutDurations to statsdstats" into rvc-dev 2020-06-18 19:11:46 +00:00
Jeffrey Huang
3b6aa146ef Add pullTimeoutDurations to statsdstats
Bug: 156790145
Test: atest statsd_test
Change-Id: Iaf6ceb94bb8729cb73e5e067b15f369dca1f52d8
2020-06-18 10:44:57 -07:00
lifr
8abf3a7c23 Adding Network Tethering Metrics/atoms
Test: Run statsd_testdrive
Bug: 153942334
Change-Id: Ia0dc1dd45e006348c3856b483972a4ccd6048d05
2020-06-18 10:36:07 +08:00
Hasini Gunasinghe
dde631ac52 Merge "Add KeystoreKeyEventReported atom for keystore logging." into rvc-dev 2020-06-17 18:03:05 +00:00
Ruchir Rastogi
eac39c521b Merge "Fix TestSubscriberDimensionWrite" into rvc-dev 2020-06-17 15:49:25 +00:00
Hasini Gunasinghe
7c336a66d9 Add KeystoreKeyEventReported atom for keystore logging.
This is for migrating keystore logging to use statsd.

Test: Adding tests for logging is yet to be decided.
Change-Id: I66fbc2b8ed98a34f243387f8550b6523b13cb9a2
Bug: 157664923
2020-06-17 14:17:55 +00:00
Tingting Wang
6d4e262aa8 Merge "Add CP2 general usage counters to westworld logs." into rvc-dev 2020-06-17 03:30:01 +00:00
Ruchir Rastogi
197107c007 Fix TestSubscriberDimensionWrite
Test: m statsd_test && adb sync data && adb shell
data/nativetest64/statsd_test/statsd_test64
Bug: 148954476
Change-Id: I3d2112f85460701d49103a5bfdc8cf0829ea091a

Change-Id: I07813393c6226252ee839ab16f411f9f92442ada
2020-06-16 17:06:23 -07:00
Nikita Ioffe
663727472a Merge "Start OP_NO_ISOLATED_STORAGE on am instrument --no-isolated-storage" into rvc-dev 2020-06-16 20:17:29 +00:00
Tingting Wang
b4ecadb54a Add CP2 general usage counters to westworld logs.
Bug: 158875840
Test: Together with ag/11419187, run $make statsd_testdrive &
./out/host/linux-x86/bin/statsd_testdrive
-p com.android.providers.contacts 301

Change-Id: Icf6a17ab410e581a445342e829d130d6d705e71b
2020-06-16 18:46:26 +00:00
TreeHugger Robot
97d794084d Merge "Mark bucket as condition_unknown properly" into rvc-dev 2020-06-15 21:22:24 +00:00
TreeHugger Robot
a80c586d4f Merge "Add back missing tidy_checks, since tidy_checks_as_errors isn't enough" into rvc-dev 2020-06-13 22:39:03 +00:00
TreeHugger Robot
893cb7835b Merge "Use tidy_checks_as_errors list instead of -warnings-as-errors=*" into rvc-dev 2020-06-13 22:38:57 +00:00
Tej Singh
756541526a Mark bucket as condition_unknown properly
Previously, if the condition was unknown for the entire bucket, the
bucket would be annotated with a NO_DATA rather than being dropped
because CONDITION_UNKNOWN. This updates all the buckets to be dropped
due to CONDITION_UNKNOWN. Note that this will make the condition unknown
problem appear worse, when in reality it is making our bucket drop
reasons more correct and should not have any impact on the true
CONDITION_UNKNOWN.

Also fix an issue where a test was failing due to a previous test
leaving data persisted to disk. This fix is a hack for now, and should
be properly fixed later.

Bug: 158897179
Test: atest statsd_test
Change-Id: Ic703600d37aa1873ec67cb1a279dcf349d48fc9f
2020-06-13 03:50:59 -07:00
Michael Wachenschwanz
38da493ae4 Merge "Add BlobStore atoms" into rvc-dev 2020-06-13 09:17:54 +00:00
TreeHugger Robot
5c4b92a1b9 Merge "Fix testValueMetric flake" into rvc-dev 2020-06-13 06:38:22 +00:00
TreeHugger Robot
ecb9cfe093 Merge "Fix testMultipleConditions flake" into rvc-dev 2020-06-13 02:42:54 +00:00
TreeHugger Robot
298dd714eb Merge "Incident dump does not include current bucket" into rvc-dev 2020-06-13 02:07:02 +00:00