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
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
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
if the value is not monotically increasing, we should take
the absolute value as the diff.
Test: unit tested
Change-Id: Idd8a248b4092b1863eb8e50539f8f14b3ac9af9e
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
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
- 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