Commit Graph

2647 Commits

Author SHA1 Message Date
Yangster
b84e8b1fcf Sync statsd google3 protos to aosp.
Test: statsd unit tests passed
Change-Id: I66b05478b7c5b0f9fdd6386b2e2ba7c38a3f9b88
2018-01-23 16:42:24 +00: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
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
Yao Chen
5f3dc878dc Revert "Enable init.rc for statsd to start statsd by default in boot time"
This reverts commit 56967528d7.

Change-Id: I4b76bf5783f0df43603e82168009f33296d1f840
2018-01-19 00:12:18 +00:00
David Chen
c0f6f63e27 Fix bug in statsd with uid memory guardrail
Previously unsigned a negative number to unsigned type, so the int
comparison didn't work as planned.

Test: Manually tested and observed log messages.
Change-Id: Ic72c4dbde5e560288fd64ca11c4bcc81021fb1a9
2018-01-18 16:02:42 -08:00
Yangster-mac
5503f5caae condition dimension query.
Test: Modified the metric link test to query a subset of the predicate/condition dimensions.

Change-Id: I693f14e0b11693fc8ee0bf4fc550977c20d31f71
2018-01-18 14:51:51 -08:00
Yangster-mac
16fc72f006 Update the dimension_in_what/condition field number.
Test: statsd unit test passed.

Change-Id: I11aa8a5cfc3bce703cf5ed0d9696d1949df449f0
2018-01-18 14:13:21 -08:00
Tej Singh
d5747a6d70 Atom: ScheduledJobStateChanged
Rename the possible states in ScheduleJobStateChanged
from ON and OFF to SCHEDULED, STARTED, and FINISHED.
Added the log line in JobSchedulerService for SCHEDULE.
STARTED corresponds to what previously was the ON event.
FINISHED corresponds to what previously was the OFF event.

Test: accompanying CTS test
Change-Id: I779dd58092e8fdee58561b8e8e74be5404f3ed93
2018-01-18 13:21:55 -08:00
Yao Chen
67462296b1 Merge "Add StatsdStats in statsd's dumpsys" 2018-01-18 20:09:06 +00:00
Howard Ro
2c41460bc8 Merge "Reinstate configs from disk across boots by fixing bugs" 2018-01-18 19:38:38 +00:00
TreeHugger Robot
14b9335393 Merge "consolidate subsystem sleep state atoms" 2018-01-18 17:56:39 +00:00
Yangster-mac
468ff04fd4 Proto change for dimension from condition.
Test: all statsd unit tests and cts tests passed.

Change-Id: I955143aca7c76e2e22a10d7ba42eb797bd32e147
2018-01-17 21:19:45 -08:00
Yi Jin
4bab3a191a Fix permissions problems of incidentd.
Test: manual
Change-Id: I4ee0d1f2349ee1a25a422cabf1b5b87c612710d2
2018-01-17 19:16:49 -08:00
Yao Chen
f5acabe946 Add StatsdStats in statsd's dumpsys
Bug: 72123656
Test: manual + statsd_test

Change-Id: I8ad9bb3abfa94ee099aa5fc3f28ad9b6fb7340f7
2018-01-17 18:38:09 -08:00
yro
6e304ec690 Reinstate configs from disk across boots by fixing bugs
- Update configName to configID in StorageManager reflecting ag/3410772
- Fix a bug of using strtok destructivelyand correctly parse file name
- Fix a unit test to call StartupForTest of config manager

Bug: 70667694
Test: statsd, statsd_test
Change-Id: If32c02982d1f0c509bdd4e6f445924257bbc074b
2018-01-17 13:44:34 -08:00
TreeHugger Robot
3b9567187e Merge "Update the AID -> UID mapping." 2018-01-17 20:53:35 +00:00
Chenjie Yu
c8b7f2277c consolidate subsystem sleep state atoms
Test: cts test
Change-Id: Ib9ff746eaa17b6c2c8f9fe5860dd0b480ec85186
2018-01-17 11:42:07 -08:00
Yao Chen
29f79b5623 Update the AID -> UID mapping.
Test: statsd_test
Change-Id: I43c004b765b0cc221ec2e02c9979890e5d55d570
2018-01-17 11:00:20 -08:00