Commit Graph

2662 Commits

Author SHA1 Message Date
TreeHugger Robot
3f9a1a5426 Merge "Fix deadlock for write-disk cmd." 2018-01-24 19:51:22 +00:00
TreeHugger Robot
adb4fc73b0 Merge "Avoid processing log event when there is no uid field." 2018-01-24 18:18:24 +00:00
TreeHugger Robot
1a68be0f0d Merge "Simplify the memory metrics atoms." 2018-01-24 16:49:15 +00:00
TreeHugger Robot
60c9ef4c98 Merge "Do not output empty metric reports." 2018-01-24 16:44:40 +00:00
Jiyong Park
d84a8d8cf4 Use stubs libs for android.test.base/runner/mock
android.test.base/runner/mock libraries are shared libraries that are
built without SDK, but with framework interanl libraries (framework.jar,
etc). Apps or libs that are built with SDK (LOCAL_SDK_VERSION is set)
shouldn't use them, but instead the stubs version of the test framework
libraries, which are built using SDK.

This is because, the build system does not allow a module built with SDK
to depend on another module built without SDK. This has been
exceptionally allowed with warnings, but will soon be errors.

In order to prevent the expected build breakage, direct reference to the
shared libraries are all changed to the stubs libraries.

Note: no one has been using these shared libs statically. So, it is
guaranteed that they won't encounter a problem due to missing
<uses-library name="android.test.runner"/> even after this change.

Bug: 69899800
Test: m -j checkbuild
Change-Id: Ib7e2bbecdc8c9327010aa772e820e9ae84e46518
2018-01-24 15:30:13 +09:00
Yangster-mac
635b4b3721 Do not output empty metric reports.
Test: statsd unit test passed.

Change-Id: I296edbe621eaea72ad2e1dfe656698302614c0f3
2018-01-23 20:30:46 -08:00
TreeHugger Robot
a65f508748 Merge "Fix the crash when parsing empty config." 2018-01-24 03:13:12 +00:00
Rajeev Kumar
27572b9a19 Simplify the memory metrics atoms.
Implement suggestions made in go/android-p-memory-metrics

Bug: 72177881
Change-Id: I8260a7053620d143f16600a852d808a3dbbe56f2
2018-01-23 17:39:08 -08:00
Yangster-mac
8617950962 Fix deadlock for write-disk cmd.
Test: manual tested.
Change-Id: I6c1e1f10bbb3830c932b3d7b57df8d4960c13977
2018-01-23 15:51:17 -08:00
Yi Jin
e458afd334 Merge "Enable incidentd.rc also add dump and usage_stats permission to statsd so it bypass incidentd's permission check" 2018-01-23 22:38:21 +00:00
TreeHugger Robot
7e004f96dd Merge "Atom: WifiMulticastLockStateChanged" 2018-01-23 18:09:20 +00:00
Yangster-mac
68985805f2 Avoid processing log event when there is no uid field.
Test: all statsd unit test passed

Change-Id: Id434d86586950a485b30a244f3c030e8202c1c6d
2018-01-23 16:43:07 +00:00
Yangster
b84e8b1fcf Sync statsd google3 protos to aosp.
Test: statsd unit tests passed
Change-Id: I66b05478b7c5b0f9fdd6386b2e2ba7c38a3f9b88
2018-01-23 16:42:24 +00:00
Yangster-mac
bbd056ac4a Fix the crash when parsing empty config.
Test: statsd test passed.
Change-Id: Ice4bcb7368ba416a9ffe6e9c89129b307302980e
2018-01-23 16:41:52 +00:00
Tej Singh
4503e10b59 Atom: WifiMulticastLockStateChanged
Add WifiMulticastLockStateChanged to atoms.proto
Add log lines

Test: CTS test in accompanying CL
Change-Id: I9b4b861a2de5254c9b7f41c15ab0fbb76af4ff6e
2018-01-23 00:41:49 -08:00
TreeHugger Robot
ec8c24862b Merge "Handle return value 0 from android_logger_list_read" 2018-01-23 07:46:23 +00:00
TreeHugger Robot
a92805d2cf Merge "Revert "Revert "Enable init.rc for statsd to start statsd by default in boot time""" 2018-01-23 07:46:23 +00:00
TreeHugger Robot
26466e44b7 Merge "add system uptime and free disk space atoms and pullers" 2018-01-23 06:03:21 +00:00
TreeHugger Robot
9683b889d9 Merge "add atom and logging for Picture-in-Picture feature" 2018-01-23 05:34:29 +00:00
Chenjie Yu
937d74294e add system uptime and free disk space atoms and pullers
Test: will add cts later
Change-Id: I0b906fab82fca89b85bc0c7fbe06078115d43eec
2018-01-22 20:06:52 -08:00
TreeHugger Robot
be982d72fe Merge "Fix flaky crashes caused during LogEvent destroy" 2018-01-23 01:47:25 +00:00
TreeHugger Robot
74fde1cd08 Merge "Avoid processing the log event when there is no config." 2018-01-22 23:14:53 +00:00
Chenjie Yu
3ca368318a Fix flaky crashes caused during LogEvent destroy
Test: cts tested
Change-Id: I0329a64506b5838d2572cda0d1b86ad78bae4253
2018-01-22 15:10:54 -08:00
Yao Chen
b00cce84d9 Revert "Revert "Enable init.rc for statsd to start statsd by default in boot time""
This reverts commit 5f3dc878dc.

Change-Id: I8d59dcd075d9b84ad44187e7744d125e79400c4c
2018-01-22 22:54:26 +00:00
Yao Chen
2ee4371cb7 Handle return value 0 from android_logger_list_read
This fixes the bug that sometimes statsd is running at 99% cpu.
Connection to logd can be reset for various reasons, and android_logger_list_read
will return 0 when that happens. We didn't handle 0 before, and that leads to reading
empty logs and processing them in a infinite loop.

Bug: 71833883
Test: manual test by killing logd, forcing return 0.
Change-Id: I5a9c89fc58959d6593028a14f70a8fe8d10b40f1
2018-01-22 14:44:37 -08:00
Yi Jin
974e56f141 Enable incidentd.rc also add dump and usage_stats permission to statsd
so it bypass incidentd's permission check

Test: manual
Change-Id: I65b501fe46f66f9f62fedfcfc75aa17f29fc1076
2018-01-22 14:41:19 -08:00
TreeHugger Robot
960e72e87f Merge "Atom: ScheduledJobStateChanged" 2018-01-22 21:19:23 +00:00
Chenjie Yu
52cacc6c1a add atom and logging for Picture-in-Picture feature
Test: manual test
Change-Id: I883b56ef5e922e513f218309b57d7df5753996c0
2018-01-22 10:23:21 -08:00
TreeHugger Robot
b5253b65a4 Merge "Add more information to incident header. Especially add config keys to check if the report is uploadable." 2018-01-22 09:20:52 +00:00
Yi Jin
437aa6e8ad Add more information to incident header. Especially add config keys
to check if the report is uploadable.

Move incidentheader.proto to libincident so statds is able to include a lite
proto class for incident header.

Change IncidentReportArgs to add the proto object instead of serialized
bytes to prevent caller gives meaningless data.

Bug: 70241842
Test: push config to statsd and verify incidentd generate the report
with correct header.

Change-Id: If95b655be71047b019b229e5903a08f3c21a1f29
2018-01-21 22:36:01 -08:00
Yao Chen
9bcda3e072 Make StatsdDogfood build again.
Test: manual
Change-Id: I14614c060cf0bfb49809315b3ef0482d8a64a1a5
2018-01-21 13:01:17 -08:00
Chenjie Yu
9da105bb32 add atoms for cpu power calculation
Test: will add cts tests for them
Change-Id: Ifefa3697ff64e8c484f79d08caf053bfc712b794
2018-01-19 22:14:26 -08:00
Rajeev Kumar
0fd0659f76 Merge "Add atoms to log memory metrics." 2018-01-20 04:30:53 +00:00
TreeHugger Robot
f7157470a3 Merge "Statsd -> Perfetto integration" 2018-01-20 02:34:40 +00:00
Rajeev Kumar
508a9bfe33 Add atoms to log memory metrics.
Test: Manual
Bug: 72177881
Change-Id: I0e77c6651d10e6592e6bbd34c55186e5e49a70e9
2018-01-19 16:57:52 -08:00
Primiano Tucci
e4d44919aa Statsd -> Perfetto integration
This CL invokes the perfetto client utility to start the
collection of a trace when an anomaly that subscribed to
Perfetto is detected. The code simply spawns the
/system/bin/perfetto client and passes the trace config via
stdin. The client takes care of the dropbox upload.
The CollectPerfettoTraceAndUploadToDropbox() function does
NOT wait for the full trace collection (in order to avoid
blocking statsd) and instead returns immediately after having
spawned perfetto.

Change-Id: I4f02067bad7a46ede7b6e4841cdcf381c1a4e2a7
Bug: 71795552
2018-01-19 23:50:07 +00:00
Yi Jin
d1238e7b50 Merge "Fix permissions problems of incidentd." 2018-01-19 23:27:32 +00:00
TreeHugger Robot
edaf9811ad Merge "fix bug in CpuTimePerUidFreqPuller to pull the correct file" 2018-01-19 21:33:22 +00:00
Chenjie Yu
0ed268b1ec similar to the samplers in batterystats, when we do diff,
if the value is not monotically increasing, we should take
the absolute value as the diff.

Test: unit tested
Change-Id: Idd8a248b4092b1863eb8e50539f8f14b3ac9af9e
2018-01-19 10:11:58 -08:00
Yangster-mac
8282d5b8bc Avoid processing the log event when there is no config.
Test: statsd unit test passed
Change-Id: If9840283accdeaa36d956213a1a9fec44204e77d
2018-01-19 10:10:04 -08:00
TreeHugger Robot
5e1f854620 Merge "Rename the dimension_in_what/condition as fields_in_what/condition in MetricConditionLink proto." 2018-01-19 17:39:57 +00:00
TreeHugger Robot
56dc5fdd00 Merge "Revert the field number change to make statsd_config proto backward-compatible." 2018-01-19 05:03:27 +00:00
TreeHugger Robot
bfff5d705a Merge "Fix bug in statsd with uid memory guardrail" 2018-01-19 03:31:56 +00:00
TreeHugger Robot
3f1f2bc986 Merge "Put statsd on system-background cpu set." 2018-01-19 02:53:30 +00:00
TreeHugger Robot
8410675cc6 Merge "condition dimension query." 2018-01-19 01:26:21 +00:00
Yangster-mac
6622e942de Revert the field number change to make statsd_config proto backward-compatible.
Test: statsd unit test passed.
Change-Id: I28b28c0706d35da3617ec9dba4c5bfeb2527befc
2018-01-18 16:40:57 -08:00
TreeHugger Robot
0137f81faf Merge "Update the dimension_in_what/condition field number." 2018-01-19 00:37:42 +00:00
Yao Chen
2346a22e78 Put statsd on system-background cpu set.
Bug: 72176997
Test: manual
Change-Id: Ic160dc8ffea8fd349185ad8b583e6c02dc7defa6
2018-01-18 16:37:10 -08:00
Yao Chen
d03c598b93 Merge "Revert "Enable init.rc for statsd to start statsd by default in boot time"" 2018-01-19 00:27:36 +00:00
Yangster-mac
2c6dc474ac Rename the dimension_in_what/condition as fields_in_what/condition in MetricConditionLink proto.
Test: statsd cts tests passed.
Change-Id: I4c21b0da3d153c8d0c368a78647c44699a3161a5
2018-01-18 16:17:43 -08:00