Commit Graph

2868 Commits

Author SHA1 Message Date
TreeHugger Robot
9371be3b88 Merge "Bmgr about running backups" 2018-02-28 14:26:34 +00:00
Steven Moreland
df7675f1cb Merge "Don't use cutils/Atomic.h" am: 07735797a2 am: a272d540d8
am: 0f4ca4a5c0

Change-Id: I4b9798b39d890537f888415b5ac283227970e4de
2018-02-28 14:13:52 +00:00
Steven Moreland
a272d540d8 Merge "Don't use cutils/Atomic.h"
am: 07735797a2

Change-Id: Ie56fadea498f35c7e820f9fadac1b64697565a78
2018-02-28 13:51:44 +00:00
Bernardo Rufino
760c1f552c Bmgr about running backups
Says that backups can be canceled if one already running. Put message
for running backups in dumpsys for checking.

Bug: 72484277
Test: Triggered backup, checked dumpsys and bmgr backupnow
Change-Id: I028cf663858e374389f50175aaf5a3e8c9d45e42
2018-02-28 12:11:26 +00:00
TreeHugger Robot
99e8972919 Merge "Add the option to match a whitelist of strings in FieldValueMatcher." 2018-02-28 04:50:17 +00:00
TreeHugger Robot
16b989fc0e Merge "Add incidentd to readproc group." 2018-02-28 04:13:20 +00:00
TreeHugger Robot
bb69f73a0c Merge "Atoms: Keygaurd and Bouncer" 2018-02-28 04:10:29 +00:00
TreeHugger Robot
f4405efb97 Merge "Add a comment to allocate field number above 100000 for OEMs to use and block them off from being used." 2018-02-28 03:15:46 +00:00
TreeHugger Robot
ec98448f15 Merge "Implement a new section to attach LAST_KMSG to incident report This section simply gzip a large file and stores result in GZippedFileProto" 2018-02-28 03:02:16 +00:00
yro
a1fe77c6bd Add a comment to allocate field number above 100000 for OEMs to use and block
them off from being used.

Bug: 72866543
Test: statsd_test, cts tests
Change-Id: I2074f53eb3360aa93a9bea4e596a8c295696312f
2018-02-27 16:59:49 -08:00
Yangster-mac
539288806f Duration tracker optimization.
* Avoid querying sliced condition for stop/stopAll events for duration metric.
* Avoid extracting the internal dimension key when it is identical to the what dimension.

Test: statsd test
Change-Id: I664e8d3b1a68960d05c9ce4789caefb60b1ab502
2018-02-27 15:31:57 -08:00
TreeHugger Robot
03b91d77c4 Merge "Alarm: wakes up statsd and notifies the subscribers." 2018-02-27 23:08:31 +00:00
TreeHugger Robot
82d7883f05 Merge "Return when invalid config ID was provided through adb command and change the separator of config_uid and config_id to underscore from dash to disambiguate negative config ids" 2018-02-27 23:07:27 +00:00
Tej Singh
dd7bd35f30 Atoms: Keygaurd and Bouncer
Logs changes in the state of the keyguard and the keyguard bouncer

Test: verified logs appear in adb logcat -b stats
Change-Id: I1ffdf72ab088318c883197b3e1eb283bec2b8b2a
2018-02-27 14:54:00 -08:00
Yao Chen
9b1140eecd Add the option to match a whitelist of strings in FieldValueMatcher.
+ This is useful when we want to build Anomaly detection on wakelocks, but want to whitelist
wakelocks held by some apps that are whitelisted. It reduces the number of matchers needed
in such a config.

+ Also added the ability to match an AID by string name.

Bug: 73897465
Test: unit tests added.
Change-Id: I19315ae4d7d27fc467655d3a29866049cd8c9a2b
2018-02-27 14:52:31 -08:00
Yangster-mac
932ececa16 Alarm: wakes up statsd and notifies the subscribers.
Test: manually tested it.
Change-Id: Id796a68976aeb1611183023ba4e9c6a8b8c44bb8
2018-02-27 13:30:48 -08:00
TreeHugger Robot
f3537c2054 Merge "Updates jank metrics in statsd to include uid." 2018-02-27 20:47:33 +00:00
Kweku Adams
391284396b Add incidentd to readproc group.
This allows it to get cpu info and ps data.

Bug: 72384374
Test: flash device and check incident.proto output
Change-Id: I09f6318861fbedbf4fae1a4325e6a7d12b32b10e
2018-02-27 12:26:13 -08:00
Yi Jin
1a11fa1097 Implement a new section to attach LAST_KMSG to incident report
This section simply gzip a large file and stores result in GZippedFileProto

This greatly improves the size, before gzip, the last kmsg size ~500KB,
after gzip the proto size is ~60KB.

Bug: 73354384
Test: atest incidentd_test and manual on device test
Change-Id: I9bfc2cf07384487671edbffb5f0bd8495608fea6
2018-02-27 11:36:29 -08:00
yro
255f72e73e Return when invalid config ID was provided through adb command and
change the separator of config_uid and config_id to underscore from dash
to disambiguate negative config ids

Bug: 73896814
Test: statsd_test
Change-Id: Ib0604e9f4c104560d570a64208a9e94d7526f8d6
2018-02-27 10:49:21 -08:00
TreeHugger Robot
dcd6ae8bc8 Merge "Atom: TemperatureReported" 2018-02-27 07:00:45 +00:00
Tej Singh
4029831e36 Atom: TemperatureReported
Makes the temperature reported atom pulled, and adds CPU, GPU, and SKIN
temperatures. Pulls information from the thermal hal.

Test: CTS test on cl in this topic
Change-Id: I0a8e2d1135bdd77e1cc510f24ff5214ce9e14ead
2018-02-26 20:55:26 -08:00
David Chen
77ef671c41 Updates jank metrics in statsd to include uid.
We need the uid to easily know which app to blame for producing the
frame with excessively long render time. Also updates the errors so
it's more obvious if the error is in parsing versus the other checks.

Test: Test that statsd builds and verified CTS test still passes.
Change-Id: Ib6518f2d9fe6f9c78d548b6dcbdb67a0f211ff5c
2018-02-26 17:18:20 -08:00
TreeHugger Robot
c4534e93e6 Merge "Fixes timebase used when dumping reports." 2018-02-26 23:18:57 +00:00
TreeHugger Robot
3b3d38d996 Merge "Avoid creating temporary objects in FiterValue()." 2018-02-24 10:13:19 +00:00
Yangster-mac
f520492279 Avoid creating temporary objects in FiterValue().
It reduces the cpu time from 1000ns to 750ns

Test: statsd test.
Change-Id: Ifa7e98e3368f8d55f85c7b09d05a6c416482981d
2018-02-23 20:53:23 -08:00
Steven Moreland
fb7952f57e Don't use cutils/Atomic.h
Test: builds
Change-Id: I74485a5cbecb8710714f7bf3e54da61dd787838f
2018-02-23 15:02:42 -08:00
David Chen
926fc7571a Fixes timebase used when dumping reports.
We should be using elapsed realtime for most timestamps in statsd
so that the times can only increase monotonically.

Test: Test that statsd builds and unit-tests passes.
Change-Id: I0bb23e89aa9a6dbf6d56a0c23eec77bdd053f29b
2018-02-23 14:36:06 -08:00
TreeHugger Robot
7509bb3f97 Merge "Use android reinterpret hash for float as it is faster." 2018-02-23 21:20:20 +00:00
Zhi An Ng
c9b2722cb8 Merge "Revert "Revert "Log the apk optimization state in the MetricsLogger""" 2018-02-23 21:15:32 +00:00
Yangster-mac
16b7ff735e Use android reinterpret hash for float as it is faster.
Test: statsd test
Change-Id: I593edac1d7dcd0c5e84195602b42b7c6c3072a38
2018-02-23 11:11:36 -08:00
TreeHugger Robot
193fe201da Merge "Statsd alerts can inform subscribers probabilistically" 2018-02-23 18:50:16 +00:00
Calin Juravle
759fbda51b Revert "Revert "Log the apk optimization state in the MetricsLogger""
This reverts commit 203a9ab766.

Reason for revert: Fix the original issue. There was a race with the
cleanup method which was resetting the app record to null.

Test: manual, adb logcat -b events | grep sysui_multi_action
      repeat steps from bugreport reporting the crash
Bug: 73102540

Change-Id: I6d9c6110a9d5dadeb9d4361592711d63563c958a
2018-02-22 16:53:48 -08:00
TreeHugger Robot
868688ed16 Merge "Add annotation to atoms that represent a state change in atoms.proto" 2018-02-22 05:36:45 +00:00
TreeHugger Robot
f9f44c954b Merge "Statsd anomaly output log fix" 2018-02-22 03:13:04 +00:00
TreeHugger Robot
0f8e6bd5b6 Merge "Fix the bug of timestamp encoding in event metric report." 2018-02-22 02:17:34 +00:00
TreeHugger Robot
2757d75780 Merge "Throttler for incidentd based on size putting into dropbox." 2018-02-22 01:11:00 +00:00
Yao Chen
9c1debe330 Add annotation to atoms that represent a state change in atoms.proto
+ A state change atom can have one exclusive state field, and any
  number of primary key fields.

  When there is primary key in the atom, it means the state belongs to the primary key.
  For example,
  message UidProcessStateChanged {
    optional int32 uid = 1 [(stateFieldOption).option = PRIMARY];
    optional android.app.ProcessStateEnum state = 2 [(stateFieldOption).option = EXCLUSIVE];
  }

  When there is no primary key fields in the atom, the state is global.
  For example,
  message ScreenStateChanged {
     optional android.view.DisplayStateEnum state = 1 [(stateFieldOption).option = EXCLUSIVE];
  }

+ The annotation is consumed by stats_log_api_gen to generate a static map from the state
  atoms to its primary fields, and exclusive fields

+ stats_log.proto is splitted into 2 proto files, because statsd needs proto lite, and c++
  lite proto library cannot properly ignore the field options which requires full proto.

 This CL doesn't change any logic in the statsd yet. A separate CL will use the field option
 information to correctly track the state.

Test: added unit tests in stats_log_api_gen_test. and statsd_test pases.
Change-Id: I9e8a979fe81ba60efd4d854bb7087ce4b2b147ec
2018-02-21 16:46:56 -08:00
Bookatz
32f2d4f320 Statsd anomaly output log fix
Alert.id() is signed, so the output line needs to be lld instead of llu.

Test: none
Change-Id: I7e3eeddac60931234285548b99a9c9cc78582716
2018-02-21 14:30:51 -08:00
Yangster
e1faa03b48 Fix the bug of timestamp encoding in event metric report.
Test: statsd cts tests
Change-Id: Id1d330f5d48d15ba026ae7c7e8cf4e1f6b460fba
2018-02-21 14:08:17 -08:00
TreeHugger Robot
5e589b7fec Merge "Add HighAtomic to pagetypeinfo, and don't fail if a header can't be found in proto definition." 2018-02-21 21:42:35 +00:00
Howard Ro
32bdf16288 Merge "Remove relevant configs when a uid (app) is uninstalled" 2018-02-21 21:12:41 +00:00
Robert Sesek
f9bd606fba Merge "Reparent the webview_zygote to be a child of the main app_process zygote." am: 1c81aa6375 am: 486190f87b
am: 0dd7cf0bb3

Change-Id: I9468ec63053f35814ec45b18572966d8adc93f3e
2018-02-21 02:47:07 +00:00
yro
019240235f Remove relevant configs when a uid (app) is uninstalled
Bug: 72267831
Test: statsd_test
Change-Id: I6ed29baba39b83f771629131af66b39ccc9cc130
2018-02-20 18:20:49 -08:00
Robert Sesek
486190f87b Merge "Reparent the webview_zygote to be a child of the main app_process zygote."
am: 1c81aa6375

Change-Id: I2af77c52ea7aca058ab1a1fc224968760e6c3ac5
2018-02-21 02:16:22 +00:00
TreeHugger Robot
3d7f2d40d4 Merge "Adds anomaly detection to max duration metrics." 2018-02-20 23:38:00 +00:00
Yi Jin
6bd2f25f19 Add HighAtomic to pagetypeinfo, and don't fail if a header can't be
found in proto definition.

Bug: 73656242
Test: atest incident_helper
Change-Id: Ib89b1a9189445a0598ec5da0c32046f75de3b0c5
2018-02-20 15:06:32 -08:00
TreeHugger Robot
81198c7332 Merge "Fix bug in edge case for statsd anomaly tracking." 2018-02-20 22:56:02 +00:00
Robert Sesek
602d1323ed Reparent the webview_zygote to be a child of the main app_process zygote.
This uses the new ZygoteProcess.startChildZygote() method to launch the
webview_zygote, rather than having init start it. This will share more
memory between the app_process and the webview_zygote, reducing the
overall system footprint.

Bug: 63749735
Test: m
Test: Launch "Third-party licenses" activity from Settings, and it
      renders correctly via the WebView.
Change-Id: I3e39cd8adb9c099c92ee34640428916d90cb2b8f
2018-02-20 17:00:41 -05:00
David Chen
2e414b99f4 Adds anomaly detection to max duration metrics.
Statsd supports anomaly detection for max duration, which is
conceptually like asking for an anomaly on the current duration.
There was a bug previously in the logic for max duration since we
recorded a duration every time a dimension went into pause. Now, we
only record a max duration when the dimension goes into stop.

When a dimension inside the MaxDurationTracker leaves the started
state, we need to check if we still need to keep an anomaly alarm
set. It's possible that we just immediately set an alarm with the
same timestamp as what was just deleted.

Test: Added some unit-tests and tested on marlin-eng.
Change-Id: I09c82cd266b4cc6e1c893ad166e602bf08baca0e
2018-02-20 13:45:25 -08:00