c40a19d2e43d5de3e036e926bf070220c2c865e6 |
|
16-Mar-2018 |
Yao Chen <yaochen@google.com> |
Add uid field annotation in atoms.proto and statd memory usage optimization. [memory] statsd binary size from 664k -> 600k memory usage 1978k -> 1813k (with no configs) + Avoid initialize any static map in statslog.h to avoid many copies of the map in each include. - Do it in cpp so that it is initialized only in places that use them [Uid annotation] + Uid annotation is needed for extracting uid from dimension for UidCpuPuller. + After the change, stand-alone uids don't need to be in field 1 anymore. + Also added exclusive bit annotation in AppDied + Currently only allow one uid field in an Atom. This is to keep things simple until we find an exception. Test: statsd_test Bug: 73958484 Bug: 72129300 Change-Id: I8a916d5c00d5930e24ae7e0825a57dea19c0e744
/frameworks/base/tools/stats_log_api_gen/Collation.cpp
|
9c1debe330006b2b4d5c08a55905789c57369609 |
|
19-Feb-2018 |
Yao Chen <yaochen@google.com> |
Add annotation to atoms that represent a state change in atoms.proto + A state change atom can have one exclusive state field, and any number of primary key fields. When there is primary key in the atom, it means the state belongs to the primary key. For example, message UidProcessStateChanged { optional int32 uid = 1 [(stateFieldOption).option = PRIMARY]; optional android.app.ProcessStateEnum state = 2 [(stateFieldOption).option = EXCLUSIVE]; } When there is no primary key fields in the atom, the state is global. For example, message ScreenStateChanged { optional android.view.DisplayStateEnum state = 1 [(stateFieldOption).option = EXCLUSIVE]; } + The annotation is consumed by stats_log_api_gen to generate a static map from the state atoms to its primary fields, and exclusive fields + stats_log.proto is splitted into 2 proto files, because statsd needs proto lite, and c++ lite proto library cannot properly ignore the field options which requires full proto. This CL doesn't change any logic in the statsd yet. A separate CL will use the field option information to correctly track the state. Test: added unit tests in stats_log_api_gen_test. and statsd_test pases. Change-Id: I9e8a979fe81ba60efd4d854bb7087ce4b2b147ec
/frameworks/base/tools/stats_log_api_gen/Collation.cpp
|
ba5b9e44bbfa7577c45c5c5e7e75cc1cd82a31b7 |
|
11-Jan-2018 |
Yangster-mac <yanglu@google.com> |
Stats log interface for single node attribution chain. Usually the input parameters for attribution chain is list of int64/string. The new c++interface takes one int64 and one string as input and write as a single node into logd. This will help avoid allocating temp objects in battery stats java code. Test: all statsd unit test passed. Change-Id: Ia0f7f26b71a570bd3628c42726a5afb0a500d073
/frameworks/base/tools/stats_log_api_gen/Collation.cpp
|
2087716f2bdca90c7c3034d556ac12911bd8018e |
|
23-Dec-2017 |
Yangster-mac <yanglu@google.com> |
1/ Support nested message and repeated fields in statsd. 2/ Filter gauge fields by FieldMatcher. 3/ Wire up wakelock attribution chain. 4/ e2e test: wakelock duration metric with aggregated predicate dimensions. 5/ e2e test: count metric with multiple metric condition links for 2 predicates and 1 non-sliced predicate. Test: statsd unit test passed. Change-Id: I89db31cb068184a54e0a892fad710966d3127bc9
/frameworks/base/tools/stats_log_api_gen/Collation.cpp
|
7604aeaf99b0ee14c1f9df95db0fc1d4e75b1baa |
|
12-Dec-2017 |
Yangster-mac <yanglu@google.com> |
Stats log api for attribution chain. Test: all unit test passed. Change-Id: I628d409e517f4f95c8da1d0c7fd4d514c1d9196d
/frameworks/base/tools/stats_log_api_gen/Collation.cpp
|
9478f3515b2e0ccc8320b1911e6f911e3a3ffde0 |
|
31-Oct-2017 |
Stefan Lafon <stlafon@google.com> |
Generate constants for enum values. Test: Builds successfully, tests pass and statsd works (it seems). This will allow us to use those constants instead of literals. The generated code only augmentes the java constant file. If needed, the same can be done for the C++ file. Some of the constant names are very long, but this is due to enum value names that are unnecessarily redundant with the enum names, i.e. enum ENUM_NAME { ENUM_NAME_UNKNOWN = 0; ENUM_NAME_VALUE1 = 1; ENUM_NAME_VALUE2 = 2; ... } which can be fixed by avoiding the 'ENUM_NAME_' part in the value names above. So, when possible, we should use shorter value names in stats_events.proto. Change-Id: I1ad19b86e28d0df0f8c15d4c995d101423cff4c2
/frameworks/base/tools/stats_log_api_gen/Collation.cpp
|
d54f9dd6251c7bd7033630b7afa770190d41c409 |
|
17-Oct-2017 |
Yao Chen <yaochen@google.com> |
Revert "Revert "Start auto-generating the stats log API."" Test: builds successfully This reverts commit 931945399859ab91545ba2c2a914f044092d5e2e. Change-Id: I22bca4a32adf86040b9d72ad5b45999aba28f586
/frameworks/base/tools/stats_log_api_gen/Collation.cpp
|
931945399859ab91545ba2c2a914f044092d5e2e |
|
17-Oct-2017 |
Joe Onorato <joeo@google.com> |
Revert "Start auto-generating the stats log API." This reverts commit b81d1a7b9a38dcb4d356ae3435a82fb52ba7d585. Change-Id: I189684d8913ffffca42d9514ac88ea5cc4a44f05
/frameworks/base/tools/stats_log_api_gen/Collation.cpp
|
b81d1a7b9a38dcb4d356ae3435a82fb52ba7d585 |
|
16-Oct-2017 |
Joe Onorato <joeo@google.com> |
Start auto-generating the stats log API. Both native and java bindings. TODOs: - Finish WorkSources. - Clean up the package names for the protos. - Put the protos in a more suitable location. Test: stats-log-api-gen-test Change-Id: Idf4022225e2be05106dbcf7de8e97a3337fc63e2
/frameworks/base/tools/stats_log_api_gen/Collation.cpp
|