diff options
author | Primiano Tucci <primiano@google.com> | 2018-07-17 16:53:14 +0100 |
---|---|---|
committer | Primiano Tucci <primiano@google.com> | 2018-07-19 22:46:23 +0000 |
commit | 65c72fc53c742ff69743546af215fb6e5e567274 (patch) | |
tree | 18d84f295c9dfbef83969dc2b5ceb034750d6073 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 4560b6fd1cafce92ec916afd1617be434d54ecd1 (diff) |
Remove unnecessary perfetto/perfprofd messages from statsd_config proto
This change simplifies the on-device statsd_config.proto when
it comes to handling perfetto and perfprofd configs.
In both cases statsd doesn't need to deserialize or know the schema
of the nested perfetto/perfprofd configs, because it just passes
the binary-encoded message to the corresponding daemons.
This change replaces the submessage with a generic "bytes" field.
As per https://developers.google.com/protocol-buffers/docs/proto#updating
"Embedded messages are compatible with bytes if the bytes contain an
encoded version of the message."
Advantages:
* One less copy of perfetto/perfprofd config around, reducing the risk
of getting that out of sync and the corresponding maintenance cost.
* Reduce the risk of failures within statsd if trying to parse an invalid
or outdated config proto.
* Reduce the CPU usage of statsd, by avoiding deserialization and
re-encoding of the config protos.
* Avoid bugs like b/111448265 where the binary size of statsd inflates
if the config protos are too big.
* Reflect what happens in the statsd code, specifically the fact that
statsd only sees the bytes of the config but doesn't touch/alter its
contents.
This change depends on: aosp/718808 and ag/4569627
Bug: 111448265
Test: Manual + CTS (atest AnomalyDetectionTests#testPerfetto)
Change-Id: I6ede5fa07c3ab3f71d29d38f2a40a90e88a16fd6
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions