* Creates an incident section for statsd data.
* Allows dump to output statsd data, in proto format.
* Hooks up two statsd outputs to bugreports:
-statsd report data in proto format
-statsd metadata (statsdstats) in text format
The incident section does not import stats_log.proto because that turns
out to be extremely difficult: stats_log.proto imports atoms.proto,
which imports more things and is enormous and causes all sorts of
problems. atoms.proto was purposefully never compiled in AOSP, so to
retain that feature, the incident section uses 'bytes' instead of an
actual message. Since this isn't ever read in AOSP (other than testing),
this should be fine.
Bug: 115678461
Test: take a bug report and confirm valid proto
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.HostAtomTests#testDumpsysStats
Change-Id: I1c370af7678d1dc7440ce299ea5ea4da6d33832b
Also, add the start time to non-additive in statsd.
Bug: 118249210
Test: manually verified values are included in a report
Change-Id: Ib91d4d0f416a1cbd298f4a010e8264a3e8f0ee16
Bug: 118509430
Test: builds successfully. logging tests will be conducted once client
implementation is in.
Change-Id: If0085273b43316bce4c266829012a618193d6bd8
N.B.: This calls CpuThreadProcReader synchronously in
StatsCompanionService::pullData. This call takes approximately 50.079ms on a
Pixel 2.
Bug: 111534779
Test: `adb shell cmd stats pull-source 10035` returns correct data
Change-Id: I6fe6d178e28669f10ba9c076cbf19dc443d171c9
idmap2 is a reboot of the idmap project. The project aims to
- use modern C++
- greatly improve test and debug support
- interface towards AssetManager2 (instead of AssetManager)
- provide a solid foundation to add support for new features
To make it easier to verify correctness, this first version of idmap2 is
feature equivalent to idmap. Later versions will add support for new
features such as <overlayable>.
Bug: 78815803
Test: make idmap2_tests
Change-Id: I1d806dc875a493e730ab55d2fdb027618e586d16
Process start time is recorded to detect whether two memory samples
come from the same process and how long the process was alive.
Bug: 118249210
Test: atest MemoryStatUtilTest and manually verified that data is in
statsd report
Change-Id: I7f49cd8bfc81c5e7e70e4f8b49729632eeec5798
1. Use custom TestDriveFormatter for log output.
It should be easy to fine tune it from here.
2. Fine tune logging level
Now the output looks like this:
./out/host/linux-x86/bin/statsd_testdrive 10
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.Utf8$UnsafeProcessor (file:/android2/master/out/host/linux-x86/framework/statsd_testdrive.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.Utf8$UnsafeProcessor
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Pushed the following config to statsd:
id: 12345
event_metric {
id: 1111
what: 1234567
}
atom_matcher {
id: 1234567
simple_atom_matcher {
atom_id: 10
}
}
......
hash_strings_in_metric_report: false
Now please play with the device to trigger the event. All events should be dumped after 1 min ...
Success!
Got following metric data dump:
metric_id: 1111
event_metrics {
data {
.....
state: RELEASE
}
}
}
}
Test: manual test
Change-Id: I9fcb09bbd1663f0eae85d428ed45a3b139f62782
There are an increasing number of requests to log data in complex format to statsd, while the data
is not expected to be parsed or aggregated by statsd and only to be uploaded as events.
Instead of making an exception for each of these cases in a hard coded way, this CL add a feature to
annotate these field in atoms.proto and the stats-log-api-gen tool will produce byte array
interfaces for them.
Note that log_msg does not have byte array type, and only has string type, when statsd receives the
log, these fields are in string type. Only when the atom is written to proto, we will check if this
field should be bytes field and write it to protobuf in message format.
Change-Id: If53dd95c5826710c76d7fe982bf951a435dfc738
Fix: 118386797
Test: unit test & manual test
Previously we always take screenshot in SRGB data space. It's been working well
since the screen only has sRGB color. However, since we are moving towards
wider color, we can't make this assumption any more. Thus we need to pass the
data space and pixel format of the screenshot buffer into SurfaceFlinger and
render screenshot in the desired data space and pixel format.
BUG: 111436479
BUG: 116112787
Test: Build, flash, boot and take screenshot, observe there's no color shift.
Test: Take screenshot, verified the color profile is correct of the png.
Change-Id: I9b1a1c878f8099715c2a2c296aaf3419ca6e9bd5
To match the rest of booting log in system_server,
e.g. SystemServerTiming and SystemUIBootTiming.
Test: build
Bug: 118241273
Change-Id: Idf6aca0c503b85c645a7c3d5f430c321a8d83cca
It will be a global error by default.
Cherry pick lost changes from AOSP, for Android.mk and main.cpp.
Test: make checkbuild
Bug: 112564944
Change-Id: I6f1024fa5e31302af27fa9d5bac195e511f4ba20
Exempt-From-Owner-Approval: do not block on new warnings
This reverts commit b35b5f7c6b.
Reason for revert: move the refactoring/renaming to another CL.
Test: statsd test
Change-Id: Ia3445beb0df813adba0d3d6e137a363e694b5da1
When starting a process under instrumentation using this new
"--no-isolated-storage" flag, the process would be able to see the
full external storage.
Bug: 117229024
Test: adb shell am instrument --no-isolated-storage \
-e class android.media.cts.EncodeDecodeTest#testEncodeDecodeVideoFromBufferToBuffer720p \
-w android.media.cts/android.test.InstrumentationTestRunner
Change-Id: I7973b123cf4fc08e8ce2b05bd4c23fa41b1cdcdf
Currently, once a metric config is pushed to statsD, it will
start to collect metrics immediately. This CL introduces the metric
activation logic. When metric needs an activation, the metric producer
will hold until the activation event is detected. Then the metric producer
starts metric generation until the TTL expires (timebomb).
This is to support Mainline where it wants to collect a few metrics for
a few hours when the binary push starts or flag flips.
Test: statsd test
BUG: b/117858835
Change-Id: I992ae98f4303d5b79932eb94eddf6c19ded3727e
Which processes to snapshot is controlled by a whitelist.
Benchmark for taking the snapshot:
https://docs.google.com/spreadsheets/d/1vG9ku8Uu8104CmKbO4cNeEKVeeByvHY--p0_dK1GAdA/edit?usp=sharing
(The difference between the first two sheets.)
~20ms constant cost plus ~4ms per process.
Bug: 115968899
Test: manually verified that statsd is included in the report
Change-Id: Iba680531c563ba28fae849e44044313866b2103f