Commit Graph

5711 Commits

Author SHA1 Message Date
Tej Singh
e4f97f9ed1 Merge "Move proto, c++, and test libs to static" into rvc-dev am: fa49ff93f9 am: 559989bd4d
Change-Id: Ia0058da04746acdc51ad598ff1687c001ed453e1
2020-04-08 01:09:00 +00:00
Tej Singh
fa49ff93f9 Merge "Move proto, c++, and test libs to static" into rvc-dev 2020-04-08 00:37:49 +00:00
Chi Zhang
419b282ce3 Merge "Add radio to default pull sources in statsd_testdrive." into rvc-dev am: ec6b36ef49 am: 8e8a3ed66b
Change-Id: I29c98a7078aff089975fe19e9a0a2546ae443568
2020-04-07 22:44:25 +00:00
Chi Zhang
01e1c645e4 Add radio to default pull sources in statsd_testdrive.
Bug: 151642352
Test: m statsd_testdrive and manual test
Change-Id: I3411dba98b2087f401adfe374450f187b719b4b3
2020-04-07 20:57:09 +00:00
Tej Singh
1d4b4653cd Move proto, c++, and test libs to static
Link libgtest_prod, libprotobuf-cpp-lite, and libc++ statically.
This reduces the size of the statsd apex from 2.8M to 1.6M.

Initial:
blueline:/apex/com.android.os.statsd # du -h
16K	./lost+found
764K	./bin
1.3M	./lib64
8.0K	./etc
600K	./lib
120K	./javalib
2.8M	.

After linking proto lite and libgtest_prod statically (saves ~500kb):
blueline:/apex/com.android.os.statsd # du -h
16K	./lost+found
800K	./bin
876K	./lib64
8.0K	./etc
600K	./lib
120K	./javalib
2.3M	.

After also linking libc++ statically (saves ~700kb):
blueline:/apex/com.android.os.statsd # du -h
16K	./lost+found
0.9M	./bin
296K	./lib64
8.0K	./etc
204K	./lib
120K	./javalib
1.6M	.

After this change, the only libraries in both /lib and /lib64 are:
libstats_jni.so
libstatspull.so
libstatssocket.so

These are the 3 libraries we actually want to ship.

Test: m
Test: bit statsd_test:*
Test: atest GtsStatsdHostTestCases
Test: manually inspecting the size of the apex, statsd binary, and
libraries
Bug: 153349706
Bug: 153349659
Bug: 153350187

Change-Id: I00796fc1cf33e394422c6dc617a8430a5f5c5bbb
2020-04-06 20:01:49 -07:00
TreeHugger Robot
41978ed093 Merge "Remove obsolete/infeasible TODOs" into rvc-dev am: d5729ebc66
Change-Id: I3aee5f7e222c5cf29cf732bb46dab8c9eafefdbc
2020-04-07 00:27:19 +00:00
TreeHugger Robot
d5729ebc66 Merge "Remove obsolete/infeasible TODOs" into rvc-dev 2020-04-07 00:12:09 +00:00
Ruchir Rastogi
1d4fdcb6de Remove obsolete/infeasible TODOs
(a) Clean up LogEvent::parseBuffer - having those variables be member
variables really helps with code readability.

(b) Don't hold locks when writing to pipe within ShellSubscriber -
ag/150969574 describes why holding a lock is necessary.

Test: m
Bug: 150312423 (allows this bug to be marked as obsolete)
Change-Id: I4903de1dc87a552932b70e5975a7cde91df05b3b
2020-04-06 14:10:04 -07:00
Stanislav Zholnin
d318e582f5 Merge "Add AppOpEnum field to represent op_id in RuntimeAppOpAccess atom." into rvc-dev am: 03aa32160d
Change-Id: If0065c9d42df1ca2204c4007b3c2da5418f92eeb
2020-04-05 13:48:20 +00:00
Stanislav Zholnin
03aa32160d Merge "Add AppOpEnum field to represent op_id in RuntimeAppOpAccess atom." into rvc-dev 2020-04-05 13:35:03 +00:00
TreeHugger Robot
38950a11a4 Merge "Make state_option top-level boolean annotations" into rvc-dev am: 4e83de27c2
Change-Id: Ib507bb59dbb29e10e41bf4a5fa95dd69cdc3d45e
2020-04-04 05:29:30 +00:00
Muhammad Qureshi
3f9c330eef Make state_option top-level boolean annotations
- Add AnnotationId enum stats-log-api-gen
- Rename RESET_STATE annotation to TRIGGER_STATE_RESET. Also rename the proto annotation.

Bug: 152412767
Test: stats-log-api-gen-test
Test: m statslog-framework-java-gen
Change-Id: I2c12ea0b9222ef28b8cc11ea36b272e518a96259
2020-04-03 17:00:55 -07:00
Christine Tsai
9219793158 Merge "Clean up unused LogEvent constructors" into rvc-dev am: f3d5e7329b
Change-Id: I2450c2ff6c35018fcc36937adff5be376076c13a
2020-04-03 21:20:20 +00:00
Christine Tsai
f3d5e7329b Merge "Clean up unused LogEvent constructors" into rvc-dev 2020-04-03 21:03:57 +00:00
tsaichristine
c7911dd000 Clean up unused LogEvent constructors
After switching to the new socket schema, we can remove certain LogEvent
constructors. AttributionNodeInternal was only used in tests and can be
removed as well.

Bug: 14959031
Test: bit statsd_test:*
Change-Id: Ib5cb6acc50cc4d37a46a076d41face452a0a87d8
2020-04-03 12:12:24 -07:00
TreeHugger Robot
08786a89f0 Merge "[statsd/tools] allow multiple connected devices" into rvc-dev am: 6f9b5cc365
Change-Id: I25d162e8c732de751d026bfc185d002b064068c8
2020-04-03 18:29:41 +00:00
TreeHugger Robot
6f9b5cc365 Merge "[statsd/tools] allow multiple connected devices" into rvc-dev 2020-04-03 18:22:01 +00:00
Christine Tsai
79ece503f4 Merge "Remove StateConditionTracker from statsd" into rvc-dev am: d4abb2f9ff
Change-Id: Id010582069e9a0d389e522ccb38b653e1c6f8fa9
2020-04-03 18:20:05 +00:00
Christine Tsai
d4abb2f9ff Merge "Remove StateConditionTracker from statsd" into rvc-dev 2020-04-03 18:13:06 +00:00
tsaichristine
3d8e12a5ef Remove StateConditionTracker from statsd
StateConditionTracker was previously used as a way to slice by state
through a specific SimplePredicate definition. It is currently being
replaced by StateTracker, and no metrics use StateConditionTracker at
this time.

Bug: 136566566
Test: bit statsd_test:*
Change-Id: I1a14747907c23482a1b7500c6d7f07cd2f1d4aed
2020-04-03 09:41:52 -07:00
Siarhei Vishniakou
08d1f8ab50 Merge "Updated documentation for CTS uhid tests" into rvc-dev am: 01c36833b9
Change-Id: I9e2d1485563e6d5cb10b91d47c7c02929b3b03df
2020-04-03 15:59:59 +00:00
Siarhei Vishniakou
01c36833b9 Merge "Updated documentation for CTS uhid tests" into rvc-dev 2020-04-03 15:58:33 +00:00
TreeHugger Robot
1c106c7d62 Merge "Turn on uid sandboxing" into rvc-dev am: a07da2913d
Change-Id: I2d21cbe26eaa4ac72e1cd49ae4120911ec555238
2020-04-03 14:29:17 +00:00
Tej Singh
d8049352da Turn on uid sandboxing
Test: bit statsd_test:*
Test: atest GtsStatsdHostTestCases
Test: atest CtsStatsdHostTestCases
Bug: 152543345
Change-Id: Ie1fda2fefe0b03454fb91b2645f56431f04adcc1
2020-04-02 23:31:08 -07:00
Tej Singh
9de689a4af Merge "Link to death for pullers" into rvc-dev am: b23d417614
Change-Id: Ia4f2680aae38ec74a37eedeb0a5d2d884cb0df88
2020-04-03 01:28:03 +00:00
Tej Singh
b23d417614 Merge "Link to death for pullers" into rvc-dev 2020-04-03 01:04:57 +00:00
Christine Tsai
b5bfcffbb1 Merge "Slice by state in DurationMetricProducer" into rvc-dev am: 8ad7c0ec42
Change-Id: I7c77e56f533b42dbffb4a55138523d2340a19554
2020-04-03 00:48:35 +00:00
tsaichristine
1449fa4661 Slice by state in DurationMetricProducer
- Added #onStateChanged logic to DurationMetricProducer
- Only SUM aggregation type supports state slicing.
OringDurationTrackers now track durations keyed by different state
values.
- Added unit tests for DurationMetricProducer state changes

Test: bit statsd_test:*
Bug: 145838038
Bug: 136566566
Change-Id: I87dcc21bb904ef0fa76ea196d60dadae00f310fa
Merged-In: I735c7deee96639c32cad4b907e59b354dfd98d77
2020-04-02 14:53:40 -07:00
Ruchir Rastogi
4d27d3629a Merge "Store annotation info in LogEvent/FieldValue" into rvc-dev am: c0a892456b
Change-Id: I83ea7be93892f2c5f6a704c0beb63f2e8db66a6f
2020-04-02 16:05:49 +00:00
Ruchir Rastogi
c0a892456b Merge "Store annotation info in LogEvent/FieldValue" into rvc-dev 2020-04-02 15:49:22 +00:00
Muhammad Qureshi
2ae320ad8f Merge "Log annotations for pulled atoms." into rvc-dev am: c598ff319c
Change-Id: I312651917f35d985608e00355ea50b8a5a7db222
2020-04-02 14:00:54 +00:00
Muhammad Qureshi
c598ff319c Merge "Log annotations for pulled atoms." into rvc-dev 2020-04-02 13:59:18 +00:00
Stanislav Zholnin
3a2a6e4f1c Add AppOpEnum field to represent op_id in RuntimeAppOpAccess atom.
Deprecate string field for Appop id.

Test: ./out/host/linux-x86/bin/statsd_testdrive 10069
Bug: 143519689
Change-Id: I62b245e09a6c6f2dcf769b0e6942057eb94293fe
2020-04-02 09:31:07 +00:00
Tej Singh
dd25c825df Link to death for pullers
Set linkToDeath for IPullAtomCallbacks and remove them from the puller
map.

Bug: 146439412
Test: bit statsd_test:*
Test: manually killed system server and made sure all binder deaths were
received

Change-Id: Iba440156b9832d6514d8a9515124d29227dd4123
2020-04-01 16:33:50 -07:00
Farid Chahla
853f0d322a Updated documentation for CTS uhid tests
A new field was added where bus can be specified for testing uhid
devices. This commit adds the relevant documention to the README.

Bug: 144949707
Test: none

Change-Id: If5f6673dd0fdd268b702119b6ccd4abdc37f65bd
2020-04-01 20:50:55 +00:00
Jeffrey Huang
d6960d80f1 Merge changes Icd1b1e57,Ib9c6b9b4 into rvc-dev am: 898dda3919
Change-Id: Iedf25e62f53ef2d72d0a9f7eda9379e2bb5cc4a7
2020-04-01 19:02:48 +00:00
Jeffrey Huang
898dda3919 Merge changes Icd1b1e57,Ib9c6b9b4 into rvc-dev
* changes:
  Load Metadata from Disk
  Save metadata to Disk
2020-04-01 18:56:26 +00:00
Ruchir Rastogi
13296519fa Store annotation info in LogEvent/FieldValue
Test: bit statsd_test:*
Bug: 151109630
Change-Id: I9e07400baed51d5e0b507d9b11118bd29bf41708
2020-04-01 10:03:34 -07:00
Songchun Fan
44e7c134d4 [statsd/tools] allow multiple connected devices
// Multiple devices connected
Test: adb devices
List of devices attached
02211FQC200065	device
98141FFBA005QD	device
Test: out/host/linux-x86/bin/statsd_testdrive -s 98141FFBA005QD 261
Test: out/host/linux-x86/bin/statsd_localdrive -s 98141FFBA005QD get-data 261

// Single device connected
Test: adb devices
98141FFBA005QD	device
Test: out/host/linux-x86/bin/statsd_testdrive 261
Test: out/host/linux-x86/bin/statsd_localdrive get-data 261

BUG: 152913040
Change-Id: I54009b9151565ddb5512a4f7b3ff8ef67c3a2055
2020-04-01 09:27:52 -07:00
Muhammad Qureshi
22e52daa05 Log annotations for pulled atoms.
- Also add is_uid annotation to PackageNotication atoms.

Bug: 150414118
Test: m
Change-Id: I5e9abfe4772b04a66bc055e0d784469d94597748
2020-03-31 20:24:22 -07:00
Jeffrey Huang
475677e771 Load Metadata from Disk
Bug: 148280505
Test: bit statsd_test:*
Test: Manual - Added Config, Tested System Server Crash
Test: Manual - Added Config, Tested Device restart
Change-Id: Icd1b1e57bbf24e4a5676820a2b955f2034d4b37d
2020-03-31 19:10:58 -07:00
Jeffrey Huang
b8f5403d17 Save metadata to Disk
Bug: 148280505
Test: bit statsd_test:*
Change-Id: Ib9c6b9b4f22e7380717b480c7ae4a37bb3364619
2020-03-31 19:10:58 -07:00
Zhen Sun
9d4c65cd8e Merge "Add atom of TvSettings and its enum" into rvc-dev am: e31edc21a1
Change-Id: I133db962d0398e624d4c3b42342f61de20255c93
2020-03-31 23:39:59 +00:00
Zhen Sun
e31edc21a1 Merge "Add atom of TvSettings and its enum" into rvc-dev 2020-03-31 23:24:21 +00:00
TreeHugger Robot
e1ac4b0366 Merge "Log also the lang id model name that is involved in events" into rvc-dev am: 32f3bcfcd2
Change-Id: I70cf70f98711667cae04a9d9c487c997fd5e2d9b
2020-03-31 20:13:21 +00:00
TreeHugger Robot
32f3bcfcd2 Merge "Log also the lang id model name that is involved in events" into rvc-dev 2020-03-31 20:04:47 +00:00
TreeHugger Robot
30b9a38675 Merge "Guardrail for pull cooldown/timeout" into rvc-dev am: 533a99f3b0
Change-Id: Icd87036716c07c222193e61e068e90c5043774e3
2020-03-31 18:47:42 +00:00
TreeHugger Robot
533a99f3b0 Merge "Guardrail for pull cooldown/timeout" into rvc-dev 2020-03-31 18:25:56 +00:00
Tony Mak
2c0049521b Log also the lang id model name that is involved in events
Possible values:
und_v0, und_v1

What is it:
The model version of the LangId model file.

Who determines this value?
The textclassifier team. The model version is burnt to the model file.

Test: m
Test: atest TextClassifierServiceTest

Bug: 152490822

Change-Id: I0058536ee4e5d8e9c14e100b61683c67af28981d
2020-03-31 17:12:17 +00:00
Tej Singh
abc1b8de87 Guardrail for pull cooldown/timeout
Enforce a 1 second minimum cooldown and a 10 second maximum timeout on
pullers.

Test: bit statsd_test:*
Test: atest LibStatsPullTests
Test: atest GtsStatsdHostTestCases
Bug: 152543610
Change-Id: Ida0047235a7e56d7b700f1a7ab5cfbc2a147caeb
2020-03-30 22:26:46 -07:00