Commit Graph

5604 Commits

Author SHA1 Message Date
Mike Ma
0b25ee526e Merge "TextDumpsysSection memory optimization" into rvc-dev am: 707263d99c am: 1924ad6191
Change-Id: I5f5f06226a03e8056d1fe073aedf0cab8f2e9e9d
2020-03-20 04:21:04 +00:00
Mike Ma
707263d99c Merge "TextDumpsysSection memory optimization" into rvc-dev 2020-03-20 03:52:54 +00:00
TreeHugger Robot
7951aba041 Merge "Enforce permission on native puller API" into rvc-dev am: 591bb7b1fe am: af0f4cbc0c
Change-Id: Iaea82e4cd91b2829dc16b959c771418bb2f0ebd8
2020-03-19 21:45:56 +00:00
TreeHugger Robot
591bb7b1fe Merge "Enforce permission on native puller API" into rvc-dev 2020-03-19 21:12:52 +00:00
Christine Tsai
8d0b2fc0bf Merge "(Part 2.4) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: 481c162de2 am: 6cf8423ceb
Change-Id: Ia59e4fdcfb777e7e165f1af88468a2a7ce710782
2020-03-19 19:38:20 +00:00
Christine Tsai
6cf8423ceb Merge "(Part 2.4) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: 481c162de2
Change-Id: Ia09a2743ebd5aa3de3fdfc976decffa72f43315d
2020-03-19 19:35:48 +00:00
Mike Ma
87003ad3f6 TextDumpsysSection memory optimization
TextDumpsysSection used to inherent WorkerThreadSection, which
allocates 2x more memory than the dumped content. This change saves
the extra allocation by writing dumpsys content directly to FdBuffer.

Bug: 150311553
Test: Manually run "incident -p EXPLICIT 4000"
Change-Id: I9c0c0db75c8595822ee0711040e8865dd69378b6
2020-03-19 12:31:29 -07:00
Tej Singh
10458eca11 Enforce permission on native puller API
Test: m
Test: no security exceptions on boot
Test: atest LibStatsPullTests
Bug: 148955001
Change-Id: I4b06bfc41be2925270eaddd717f1499d98739dae
2020-03-19 11:54:11 -07:00
tsaichristine
3ca4d78d72 (Part 2.4) Use new socket schema in ValueMetricProducer_test
First CL at ag/10697747. Sending ValueMetricProducer_test as multiple CLs to retain diff and make
it easier to review.

Updates from TestUseZeroDefaultBase to TestEmptyDataResetsBase_onDataPulled

Test: bit statsd_test:*
Bug: 149590301
Change-Id: I91601123e8aaeb92aa6e6618dbd12467949a94e4
2020-03-19 10:28:20 -07:00
Christine Tsai
8a24eb87ff Merge "(Part 2.3) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: e356490e47 am: b9b2b78963
Change-Id: Ife3f16c30c0e894dd684a5c1af4a2241046369b6
2020-03-19 04:00:17 +00:00
Christine Tsai
cae58d8fed Merge "(Part 2.3) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: e356490e47
Change-Id: I0eedd23b20716dec8e2357777d1b2f21fd30ba92
2020-03-19 03:46:23 +00:00
tsaichristine
5adb1b1461 (Part 2.3) Use new socket schema in ValueMetricProducer_test
First CL at ag/10697747. Sending ValueMetricProducer_test as multiple CLs to retain diff and make
it easier to review.

Updates from TestPushedEventsWithoutCondition to TestSkipZeroDiffOutputMultiValue

Test: bit statsd_test:*
Bug: 149590301
Change-Id: Ie429f36124d475c16652eb52fed41ab88128ffdd
2020-03-18 16:24:54 -07:00
TreeHugger Robot
5db0fc10b2 Merge "Fix incidentd stack use-after-return" into rvc-dev am: 0c4353a5d6 am: 0595081dc2
Change-Id: I9a50193d9cc02d9944d54fbb44cd13c5ed020ff3
2020-03-18 20:39:02 +00:00
TreeHugger Robot
24134f28c4 Merge "Fix incidentd stack use-after-return" into rvc-dev am: 0c4353a5d6
Change-Id: Iedae3703fdb4e98e98ecd8d9cfbb2d1d93bfbad1
2020-03-18 20:35:24 +00:00
TreeHugger Robot
0c4353a5d6 Merge "Fix incidentd stack use-after-return" into rvc-dev 2020-03-18 20:33:45 +00:00
Jeffrey Huang
e492db5485 Merge "Migrate statsd_test to use libstatslog_statsdtest" into rvc-dev am: 4980c0a6cf am: a846cf462f
Change-Id: Ifc1e91823d95433e640014ae41109bf3481ebfab
2020-03-18 20:06:39 +00:00
Jeffrey Huang
a846cf462f Merge "Migrate statsd_test to use libstatslog_statsdtest" into rvc-dev am: 4980c0a6cf
Change-Id: Ia89443ce35a3bc89965c9d548787cdd941a8f5bf
2020-03-18 19:57:37 +00:00
Jeffrey Huang
4980c0a6cf Merge "Migrate statsd_test to use libstatslog_statsdtest" into rvc-dev 2020-03-18 19:47:14 +00:00
Mike Ma
b328e290f1 Fix incidentd stack use-after-return
The detached thread may live longer than the caller, and then "data"
goes out of scope. Fix it by managing data using a strong pointer.

Fixes: 151335416
Test: turn on hwasan, tweak WorkerThreadSection timeout, verify no
hwasan error

Change-Id: I179204b17c381e4e920b9aee07900150d9497639
2020-03-18 11:43:15 -07:00
Christine Tsai
da86d5073c Merge "(Part 2.2) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: 300ee6ea68 am: a0328d42ea
Change-Id: Idce3cbb580fa94a16451a201602b9f98c5c11155
2020-03-18 18:18:53 +00:00
Christine Tsai
a0328d42ea Merge "(Part 2.2) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: 300ee6ea68
Change-Id: I0999d29a3e6ce47405fe6c2cc52d07e0f6c9e191
2020-03-18 17:56:08 +00:00
Christine Tsai
300ee6ea68 Merge "(Part 2.2) Use new socket schema in ValueMetricProducer_test" into rvc-dev 2020-03-18 17:45:08 +00:00
Christine Tsai
8b90210c63 Merge "(Part 2.5) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: 9139003053 am: a30354cb0d
Change-Id: I43d4c7706f7482fd09c221eb158129a117898b52
2020-03-18 16:15:45 +00:00
Christine Tsai
a30354cb0d Merge "(Part 2.5) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: 9139003053
Change-Id: I00dab15c1fed620cb9d52d3e0e993642c1cb125c
2020-03-18 16:12:05 +00:00
tsaichristine
b828fe2a72 (Part 2.5) Use new socket schema in ValueMetricProducer_test
First CL at ag/10697747. Sending ValueMetricProducer_test as multiple CLs to retain diff and make
it easier to review.

Updates from TestEmptyDataResetsBase_onConditionChanged to TestInvalidBucketWhenPullFailed

Test: bit statsd_test:*
Bug: 149590301
Change-Id: I915b47e086ee5065eaa71094b83d2b271ce847b7
2020-03-17 18:25:37 -07:00
tsaichristine
f487f2a509 (Part 2.2) Use new socket schema in ValueMetricProducer_test
First CL at ag/10697747. Sending ValueMetricProducer_test as multiple CLs to retain diff and make
it easier to review.

Updates from TestPulledEventsTakeAbsoluteValueOnReset to TestPulledValueWithUpgradeWhileConditionFalse

Test: bit statsd_test:*
Bug: 149590301
Change-Id: I31b4a635262586aedeb23f84cae3d66f48593b3f
2020-03-17 18:07:23 -07:00
Susi Kharraz-Post
b39d9b7809 Merge "Add sharesheet + generic ranking atoms for statsd." into rvc-dev am: 3b8389263e am: 10bbd37bbd
Change-Id: I80d470f8adaf3d119caff553a1af8a0d949d6f4e
2020-03-17 20:46:20 +00:00
Susi Kharraz-Post
caa5e1932a Merge "Add sharesheet + generic ranking atoms for statsd." into rvc-dev am: 3b8389263e
Change-Id: I0c3b9bdded80cba8733b475094b0158a6f4041a9
2020-03-17 20:35:32 +00:00
Susi Kharraz-Post
3b8389263e Merge "Add sharesheet + generic ranking atoms for statsd." into rvc-dev 2020-03-17 20:14:27 +00:00
Jeffrey Huang
3eb84d4da9 Migrate statsd_test to use libstatslog_statsdtest
This is part of the migration to remove libstatslog from statsd

Since we still depend on libstatsmetadata, we cannot fully mock out
all the atoms. So we will create a new libstatslog_statsdtest to house
atoms used only in the tests.

Bug: 150976524
Test: bit statsd_test:*
Change-Id: I6368305eb89b2c35e670e42907a308afd922e604
2020-03-17 11:59:01 -07:00
Automerger Merge Worker
608ac75640 Merge "(Part 2.1) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: 92eb1bbfd4 am: 4957c62a2a
Change-Id: I95f8a8a1f8be64b01599cad2ed3ea228b24b0f33
2020-03-17 18:41:36 +00:00
Automerger Merge Worker
cfcb00d7b7 Merge "(Part 2.1) Use new socket schema in ValueMetricProducer_test" into rvc-dev am: 92eb1bbfd4
Change-Id: I8958fa828a8e8fb51a8dc1ad458bda65663bb4b4
2020-03-17 18:32:37 +00:00
TreeHugger Robot
92eb1bbfd4 Merge "(Part 2.1) Use new socket schema in ValueMetricProducer_test" into rvc-dev 2020-03-17 18:21:32 +00:00
Susi Kharraz-Post
1df7b0066a Add sharesheet + generic ranking atoms for statsd.
Bug: 147508495

Change-Id: Ie02cbb84a0ddfe7ca51acf722f9a5632b846f283
Test: m out/soong/.intermediates/frameworks/base/framework-statslog-gen/gen/android/util/StatsLogInternal.java out/soong/.intermediates/frameworks/base/tools/stats_log_api_gen/statslog.cpp/gen/statslog.cpp
Android Metrics Design Review: https://eldar.corp.google.com/assessments/369729150/revisions/1?jsmode=du

Change-Id: I49391a786840febb6b7b67ac91e029d8d742e956
2020-03-17 18:10:37 +00:00
tsaichristine
bb33b803ef (Part 2.1) Use new socket schema in ValueMetricProducer_test
Sending ValueMetricProducer_test as multiple CLs to retain diff and make
it easier to review.

I added a few different CreateLogEvent functions that account for tests
that need events with 0, 2, and 3 values.

The old #createEvent function took in one value but added it twice to the
LogEvent. I replaced this with #CreateRepeatedValueLogEvent. Any events
made with #createEvent or that took the form of:
event.write(tagId)
event.write(value)

was replaced with a call to #CreateRepeatedValueLogEvent. I assumed
that the tagId was used as the first field because an arbitrary number
was needed.

Test: bit statsd_test:*
Bug: 149590301
Change-Id: I26de8074a66babcf3ab7ee395be0598d88b4ba59
2020-03-17 09:17:27 -07:00
Automerger Merge Worker
09210afe15 Merge "Delay initialization of RarelyUsedPackages and package sampling." into rvc-dev am: 86e27477a7 am: 243779bb80
Change-Id: Ic3c53d76aa358ab11b5dfd959bf1ae18025d10ed
2020-03-16 09:47:14 +00:00
Automerger Merge Worker
bf695389a7 Merge "Delay initialization of RarelyUsedPackages and package sampling." into rvc-dev am: 86e27477a7
Change-Id: Iad2e11463f83438816599e6a589bd404f06da29f
2020-03-16 09:34:43 +00:00
Stanislav Zholnin
86e27477a7 Merge "Delay initialization of RarelyUsedPackages and package sampling." into rvc-dev 2020-03-16 09:23:17 +00:00
Automerger Merge Worker
5e4975cfd0 Merge "Add logging operation ids." into rvc-dev am: decfe4b331 am: 40c5647773
Change-Id: Icf95df7fd1ddc56bd2edf926800b31340d1a08c1
2020-03-15 14:57:46 +00:00
Automerger Merge Worker
c94378b1d1 Merge "Add logging operation ids." into rvc-dev am: decfe4b331
Change-Id: Ia56210f7216ae352c8baa3f5206e15b80be77390
2020-03-15 14:36:21 +00:00
Stanislav Zholnin
48811ee600 Add logging operation ids.
Add operation ids which are used only for logging. They will
allow to reduce bandwidth required for logging. Mapping between
operation string ids (OPSTR_, public API) and Logging ids
is enforced by statsd CTS test.

Bug:143519689
Test: android.cts.statsd.atom.UidAtomTests#testAppOps
Test: android.cts.statsd.atom.UidAtomTests#testForegroundServiceAccessAppOp
Exempt-From-Owner-Approval: discussed  with moltmann@ in chat.

Change-Id: I2f85d6889e946219557d26b28334d4bacde06b12
Merged-In: I2f85d6889e946219557d26b28334d4bacde06b12
2020-03-15 14:29:32 +00:00
Stanislav Zholnin
4c32385bf6 Delay initialization of RarelyUsedPackages and package sampling.
Delay uniform sampling of packages.
Introduce boot time sampling of packages - simplified sampling designed
to save time during start up sequence.

Bug: 150239020
Test: manual verification
Change-Id: I5911b663cfefe324a443b0ba3f97c46e0984a0f3
2020-03-15 11:23:53 +00:00
Automerger Merge Worker
92cf620abd Merge "Parse annotations within LogEvent" into rvc-dev am: e9133b9351 am: 61c6b579f8
Change-Id: I680269db506890fdb81fc8f6c091a69a13638a71
2020-03-14 01:54:20 +00:00
Automerger Merge Worker
c871a929d6 Merge "Parse annotations within LogEvent" into rvc-dev am: e9133b9351
Change-Id: Ifd889e072976172f5bd2bca29d4e13eefc419bbe
2020-03-14 01:41:20 +00:00
TreeHugger Robot
e9133b9351 Merge "Parse annotations within LogEvent" into rvc-dev 2020-03-14 01:29:41 +00:00
Ruchir Rastogi
84eb44bb4c Parse annotations within LogEvent
This is a preliminary CL that parses annotations within LogEvent, but
does nothing with the annotations provided. Annotation information will
be exposed from LogEvent/FieldValue in a future CL. (That CL will also
contain tests for parsing annotations.)

Test: m statsd
Bug: 150414043
Change-Id: Iae79644ea8455280a654076bfd5819927d4183d3
2020-03-13 16:40:14 -07:00
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Automerger Merge Worker
c456fee09d Merge "Rename featureId -> attributionTag" into rvc-dev-plus-aosp am: b5ccedfe4d
Change-Id: Ie9f2302cc272783e992e40626639be10c72bdc41
2020-03-12 19:01:02 +00:00
Philip P. Moltmann
aea50fc06a Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 11:47:51 -07:00
Automerger Merge Worker
3dc88423fd Merge "Telephony statsd atoms." into rvc-dev am: 91af57e5c1 am: a79fb5b6f0
Change-Id: Ib3f7a33a31e7d9f22542cda8dae4eed64e9d1ad1
2020-03-12 18:18:38 +00:00