Commit Graph

3972 Commits

Author SHA1 Message Date
Steven Wu
a254dabcc8 Add logging for bubble UI events.
Bug: 123543171
Test: manual on local device using statsd_testdrive
Change-Id: I4d344d94e39f52fdd743b99390616c23c86a3a45
2019-01-31 14:32:47 -05:00
Alex Salo
4d35df367b Merge "Add screen timeout extension event to statsd" 2019-01-31 02:27:42 +00:00
Philip P. Moltmann
4ef7a11a67 Merge "Pull all current role holders into statsd" 2019-01-30 22:20:24 +00:00
Misha Wagner
5222946e1e Merge "Add more statistics on failure cases for value metrics" 2019-01-30 11:31:39 +00:00
Philip P. Moltmann
70b42ae8ee Pull all current role holders into statsd
Create a new atom RoleHolder that maps a uid -> role and add the
mappings that currently exist in RoleManagerService

Test: - ./out/host/linux-x86/bin/statsd_testdrive 10049
      - adb shell cmd stats pull-source 10049
Bug: 123594188
Change-Id: Ib0fa60b07a95c06a219f3e3b37d51f59b624a017
2019-01-29 21:04:49 -08:00
Alex Salo
d7c3eefece Add screen timeout extension event to statsd
Bug: 122960476
Test: tested locally on device using statsd_testdrive

Change-Id: I04342bc70ff4ef11c20836da52d9bfc5a6661aa2
2019-01-30 02:38:52 +00:00
Kevin Chyn
db77e13a45 Add require_confirmation to BiometricAuthenticated atom
Bug: 120161047
Bug: 117060268
Bug: 121072756
Bug: 121071984

Test: Builds
Change-Id: Id67a0063db75b77454e6ecbb5b85d65267351c67
2019-01-29 13:30:41 -08:00
Misha Wagner
1eee22107f Add more statistics on failure cases for value metrics
This adds to PulledAtomStats and creates a new stats atom AtomMetricStats.

Test: none
Bug: 123572169
Change-Id: Ifea682005210a6342a027643e162f8ce7785cb06
2019-01-29 16:44:30 +00:00
Misha Wagner
c066c93da8 Merge "Fix issue in ValueMetricProducer where values are not reported" 2019-01-29 09:36:17 +00:00
Jack He
1021a61081 Atom: Add more Bluetooth atoms
* BluetoothHciTimeoutReported is logged when Bluetooth controller
  failed to respond to an HCI command in time
* BluetoothQualityReportReported is logged when Bluetooth controller
  sends a link quality report event to Android host due to bad link
  quality
* BluetoothManufacturerInfoReported is logged when we learn about
  manufactuer defined metadata for a device such as manufactuer name
  model number, software version, and hardware version
* BluetoothRemoteVersionInfoReported is logged when we learn about
  the manufactuer and Bluetooth version of remote Bluetooth controller
  and stack
* BluetoothSdpAttributeReported is logged when we learn about services
  provided by the remote device and their metdata such as protocol
  version and feature bitmask. Only profiles that use 16-bit UUIDs are
  logged
* BluetoothBondStateChanged is logged when Bluetooth bonding state is
  changed a a macro level such as none -> bonding, bonding -> bonded,
  and user interaction events such as passkey confirmation
* BluetoothClassicPairingEventReported is logged from native layer
  when Bluetooth classic pairing state changed due to HCI command
  or events. This is a more verbose level logging compared to
  BluetoothBondStateChanged
* BluetoothSmpPairingEventReported is logged from native layer when
  Bluetooth Security Manager Protocol based pairing state changed due to
  SMP command sent or received. Pairing failure reason code is also
  logged as a pre-defined enum

Bug: 112969790
Test: test drive with statsd
Change-Id: I94d1530758f79ce6d5f119426b1379c76517afec
2019-01-28 13:56:33 -08:00
Jack He
c27040aea7 Atom: Add A2DP playback related atoms to StatsLog
* BluetoothA2dpPlaybackStateChanged:
  - Logged when A2DP playback state changed for individual devices
* BluetoothA2dpCodecConfigChanged
  - Logged when A2DP codec configuration changed for individual devices
* BluetoothA2dpCodecCapabilityChanged
  - Logged when A2DP codec capability changed for individual devices
* BluetoothActiveDeviceChanged
  - Logged when A2DP/HFP/HEARNING_AID active device changed
* BluetoothA2dpAudioOverrunReported
  - Logs when A2DP failed send encoded data to the remote device fast
    enough such that the transmit buffer queue is full and we have to
    drop data
* BluetoothA2dpAudioUnderrunReported
  - Logs when A2DP failed to read from PCM source
* BluetoothDeviceRssiReported
  - Logged when remote device's RSSI level is reported by the controller
* BluetoothDeviceFailedContactCounterReported
  - Logged when ACL transmit queue was flushed by the controller
  - This is normally disabled unless we set automatic flush timeout was
    set to a non-zero value
  - However, when this event is reported, the connection quality must
    be very bad
* BluetoothDeviceTxPowerLevelReported
  - Logged when transmit power level is reported for a particular
    connection

Bug: 112969790
Test: make, testdrive with statsd
Change-Id: I7deb85567630fae75be733df21b45f9c6bcf9e17
2019-01-28 13:55:54 -08:00
Kweku Adams
8845d01b72 Add logging to statsd for job constraint changes.
Bug: 117846754
Bug: 111423978
Bug: 120941744
Test: `make statsd_testdrive &&
./out/host/linux-x86/bin/statsd_testdrive 150` and check output

Change-Id: Iadfdb07171b8d4f99b8f57008cc7c1fc2865bb8e
2019-01-28 10:39:16 -08:00
Olivier Gaillard
908e048d73 Merge "Add gaillard@ to owners." am: 1e02188bfe am: 78d79c5d5f
am: d4aa9d051d

Change-Id: I2bf7c9529616dd1d703b5c8b97957f4affb2901f
2019-01-28 08:45:02 -08:00
Olivier Gaillard
d4aa9d051d Merge "Add gaillard@ to owners." am: 1e02188bfe
am: 78d79c5d5f

Change-Id: I3ae2a1953d9a6e22aa972552f7afc7abfb8d11d1
2019-01-28 08:30:48 -08:00
Treehugger Robot
1e02188bfe Merge "Add gaillard@ to owners." 2019-01-28 15:37:24 +00:00
Misha Wagner
26531761e2 Fix issue in ValueMetricProducer where values are not reported
If a value metric has N values, not having a diff base will mean that N
calls of `onMatchedLogEventInternalLocked` are needed to output all values.

Bug: 123177418
Test: Unit tests `ValueMetricProducerTest#TestSkipZeroDiffOutput` amended
Test: Manual inspection of `cmd stats dump-report` shows all eight values
for CpuTimePerThreadFreq metrics
Change-Id: I8857c294ade049a4a42ef411d3d995610e04daf4
2019-01-28 14:55:21 +00:00
TreeHugger Robot
367f068696 Merge "Change latency to int64" 2019-01-28 04:05:33 +00:00
Steven Wu
acef6bb4a7 Add a westworld atom for SystemUI bubbles logging.
Bug: 111236845
Test: manual
Change-Id: I94736afabd210ac32d430f17a8c5d71f4ada9b87
2019-01-27 16:06:43 -05:00
Kevin Chyn
1d19c69ac7 Change latency to int64
Bug: 120161047
Bug: 117060268
Bug: 121072756
Bug: 121071984

Test: Builds
Change-Id: I67a23128a35b76302dbde04b6838420b8731da61
2019-01-27 12:47:29 -08:00
Kevin Chyn
1741a07f4e Update Biometric Atoms
Framework will add logging in the next CL

Bug: 120161047
Bug: 117060268
Bug: 121072756
Bug: 121071984

Test: Builds

Change-Id: I673d8af8be78be11b5eac249c47847ebeca2cd2e
2019-01-26 21:53:00 -08:00
Tej Singh
bd37b5f8b3 Merge "APIs for registering config activation broadcasts" 2019-01-27 02:32:37 +00:00
Howard Ro
34521ced96 Merge "Add WatchdogRollbackOccurred atom" 2019-01-27 02:00:30 +00:00
TreeHugger Robot
3cf44ca734 Merge "Amend flagFlipUpdateOccurred atom" 2019-01-27 00:12:28 +00:00
Tej Singh
2c9ef2a92e APIs for registering config activation broadcasts
Creates a StatsManager API to register a pending intent that is invoked
whenever the active status of any of any config sent by that uid
changes.

ag/6112554 and further cls are needed to properly send back the pending
intent.

Bug: 123372077
Test: build success on blueline-eng. More thorough testing should be
done once ag/6112554 is submitted.

Change-Id: I36985c9820d4e7ac178064924190af88ea822254
2019-01-25 17:58:02 -08:00
Howard Ro
e103fe2ec9 Add WatchdogRollbackOccurred atom
This is going to be logged when a module is rolled back by watchdog for
causing any crash/problem.

Bug: 122808286
Test: not needed for now but will be tested when StatsLog.write is
triggered.

Change-Id: I1a7461b160206ab41e76621759e8dfb78ea0833b
2019-01-25 16:44:29 -08:00
Olivier Gaillard
18d4522058 Add pullers for debugging.
These pullers return deterministic values so we'll be able to confirm
to validate the data easily server side locally.

For instance,
- the diff of the elapsed_clock_millis field should always be equal to the bucket size
- the diff of pull_count should always be one unless we hit the cache

Test: manual
Change-Id: I4fab30df287e90f8691740d90d87b67022b9c420
2019-01-25 18:30:01 +00:00
Chenjie Yu
eeb75cd2bb Merge "rework BinaryPushStateChanged atom" 2019-01-25 04:07:07 +00:00
Chenjie Yu
8366c71ce8 rework BinaryPushStateChanged atom
Bug: 119685453
Test: will add gts
Change-Id: I60e83b2e0fcf63bab1ec695db90ed9f7a2846571
2019-01-24 15:26:15 -08:00
Jack Yu
808d5e1879 Merge "Define Nfc statistic data atoms" am: 961a43eae2
am: 20548152f7

Change-Id: Ie72691a9bbdc505497c4cc99a1feadcc088a1baa
2019-01-24 13:07:37 -08:00
Annie Meng
75350778e2 Merge "[Multi-user] Disable backup by default in non-system users" 2019-01-24 20:35:51 +00:00
Treehugger Robot
961a43eae2 Merge "Define Nfc statistic data atoms" 2019-01-24 20:25:57 +00:00
TreeHugger Robot
6302322fe9 Merge "idmap2: lock down write access to /data/resouce-cache" 2019-01-24 17:49:20 +00:00
Badhri Jagan Sridharan
a3a3012d16 Merge "Log USB contaminant status" 2019-01-24 15:21:49 +00:00
Annie Meng
bdb8848abe [Multi-user] Disable backup by default in non-system users
Key changes in this CL:
- Backup is now disabled by default in non-system users unless DPM
activates backup for this user AND the system user is activated. This
provides gating for the multi-user B&R feature.
- Activation is done via an 'activate' file that is per-user (but lives
in the system user directory to account for locked users).
- isBackupServiceActive() handles both locked and unlocked users.
- Added a bmgr command to expose isBackupServiceActive() for testing
purposes and enforce appropriate permissions.

Future CLs:
- Handle future migration to backup on by default for non-system users
- Change CTS tests to use the new bmgr command

Bug: 121306407
Test: 1) atest TrampolineTest
2) Start system user -> service started; run backup and restore
successfully
3) Start non-system user -> ignored;
4) adb shell bmgr --user 0 activate true -> security exception;
adb shell bmgr --user 10 activate true -> security exception (work
profile);
adb shell bmgr --user 11 activate true/false -> creates/deletes activate
file and starts/stops the service
Change-Id: Ic77db9b8b2e5170dcf89bef863dac4713730797a
2019-01-24 15:14:09 +00:00
Olivier Gaillard
661d053916 Add gaillard@ to owners.
Test: n/a
Change-Id: I6f04ee34319c780cd9d7e6c842c3a3e9c29d0b0c
2019-01-24 11:36:13 +00:00
Jack Yu
6d421bc5e5 Define Nfc statistic data atoms
Test: Manual
Bug:116641110

Change-Id: Ia7e56c159d64804049abf39717e3eeae43373a76
Merged-In: Ib521a9f2d4d098022d973fe6c775231a518f3f49
2019-01-24 15:16:20 +08:00
Chiachang Wang
a04bc57c2a Merge "Add NetworkStack to allowed log sources in statsd_testdrive" 2019-01-24 07:12:07 +00:00
TreeHugger Robot
dab8059a29 Merge "statsd implementation of vendor atom" 2019-01-24 07:00:08 +00:00
Tej Singh
e765dc6e5f Merge "Statsd uses ThermalService to pull temperatures" 2019-01-24 06:10:13 +00:00
Chiachang Wang
770a41298d Merge "Add NetworkStack into AidToUidMapping" am: a3dd0a5050 am: b64b24d127
am: cc272be339

Change-Id: I7ad88b03e5c41cb8096316699158b4c7ae2c587e
2019-01-23 21:08:31 -08:00
Chiachang Wang
cc272be339 Merge "Add NetworkStack into AidToUidMapping" am: a3dd0a5050
am: b64b24d127

Change-Id: I7275fb5693463680ff9e07ad15e81e90214c196b
2019-01-23 20:55:03 -08:00
Chiachang Wang
a3dd0a5050 Merge "Add NetworkStack into AidToUidMapping" 2019-01-24 04:26:44 +00:00
Badhri Jagan Sridharan
129c7297bb Log USB contaminant status
01-14 21:15:26.223   895  1046 I statsd  : { uid(1000) 1547529326000000000 235342687348 (117)0x10000->port0[S] 0x20000->2[I]  }
01-14 21:15:51.719   895  1046 I statsd  : { uid(1000) 1547529351000000000 260838630045 (117)0x10000->port0[S] 0x20000->3[I]  }
01-14 21:16:51.729   895  1046 I statsd  : { uid(1000) 1547529411000000000 320847794877 (117)0x10000->port0[S] 0x20000->2[I]  }
01-14 21:17:00.552   895  1046 I statsd  : { uid(1000) 1547529420000000000 329671167943 (117)0x10000->port0[S] 0x20000->3[I]  }
01-14 21:18:00.560   895  1046 I statsd  : { uid(1000) 1547529480000000000 389679730223 (117)0x10000->port0[S] 0x20000->2[I]  }

Bug: 119642987
Bug: 122595032
Test: Manually tested by running: adb shell cmd stats print-logs,
adb logcat | grep statsd | grep \(117\)

Change-Id: Idf98e4e5dfc44133112c48999eff7cccfd14550d
2019-01-23 18:41:10 -08:00
Maggie White
58174daebd statsd implementation of vendor atom
Bug: 122541417
Test: su 0 ./stats_client -v
Change-Id: I2508f6206b36ffe94c87308ab63ae1577b4b67d0
Signed-off-by: Maggie White <maggiewhite@google.com>
2019-01-23 17:46:29 -08:00
Carter Hsu
b8fd1e90f5 statsd: implement Speech DSP stat report
Bug: 122719904
Test: manual stats_client test and check the statsd logs
Change-Id: I3dac9f31f59e6f10393c97c6bd9ca0d0ccb11e23
Signed-off-by: Carter Hsu <carterhsu@google.com>
2019-01-24 09:12:38 +08:00
Michael Groover
d15f8b9ad5 Merge "Revoke 'always allow' adb grants after period of inactivity" 2019-01-23 16:47:48 +00:00
Chiachang Wang
d09275059c Add NetworkStack to allowed log sources in statsd_testdrive
Test: - atest statsd_test
      - manual test with statsd_testdrive
Bug: 123260425
Change-Id: Id23162efbdee6979cfa1da5862ff874eed825926
2019-01-23 15:48:34 +08:00
Jack Yu
4bb90eb246 Define Nfc statistic data atoms
Fix format of variable "packageName".

Test: Manual
Bug:116641110
Change-Id: I4f280e3f2540cf0fdce7c9c89393ce246e0825b2
2019-01-23 15:13:41 +08:00
Chiachang Wang
69e41313cc Add NetworkStack into AidToUidMapping
Package name of NetworkStack may be different or be updated
further. Use AID_NETWORK_STACK in statsd for better
maintenance.

Bug: 123260425
Test: atest statsd_test
Change-Id: I18d58f03642b4a4465c23197162d239206cb1df4
2019-01-23 15:07:36 +08:00
Tej Singh
0d1769559a Amend flagFlipUpdateOccurred atom
Amends atom to meet mainline requirements.

The API to log from apps is still in progress.

Test: build success on blueline.
Change-Id: Ia13ff519a40a3a6e5b2f3a7f9ebd896cef6e7f06
2019-01-22 22:26:39 -08:00