3227 Commits

Author SHA1 Message Date
Treehugger Robot
0b8f17b3ba Merge "statsd: fix double close." 2018-09-05 18:16:46 +00:00
Josh Gao
3330d1208f statsd: fix double close.
Previously, fdopen was being called on a file descriptor that was owned
by a unique_fd without releasing. This leads to a double close, since
both fclose and the unique_fd destructor will try to close the fd.

Bug: http://b/113880863
Test: treehugger
Change-Id: I6f6f48d304861b5e4d7efee0d3ad0e30178a95a4
2018-09-04 11:12:04 -07:00
Kenneth Magic
93ca85a172 Update PageTypeInfoParser to be less restrictive.
The page block order is an independent variable from the free
page order table in the kernel, so the parser should not error
out if they do not match.

Bug: 110559361
Test: incident_helper_test
Change-Id: I08ad9c8f9b29cc15b80a89929f3a1fb6886852e6
Merged-In: I08ad9c8f9b29cc15b80a89929f3a1fb6886852e6
(cherry picked from commit 3abb43991685d0ba40e70dd5f81abe044f65b891)
2018-08-28 10:39:42 -07:00
Yi Kong
288f355e1a Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.

Test: m
Bug: 68236239
Change-Id: Ic440b9fcb9be97c316448b764f7110ef1f7eb525
Merged-In: Ic440b9fcb9be97c316448b764f7110ef1f7eb525
(cherry picked from commit 08a8d728dbe379cd70974ba98d59017f5506e0e5)
2018-08-08 14:08:35 -07:00
Yao Chen
39c8fe12e4 Merge "Disable statsd and make StatsLog no-op if ro.statsd.enable=false" into pi-dev
am: 38b92986df

Change-Id: Ia90bed14900a2c944165aefe00661d3979c08aed
2018-06-07 14:53:43 -07:00
Yao Chen
38b92986df Merge "Disable statsd and make StatsLog no-op if ro.statsd.enable=false" into pi-dev 2018-06-07 21:10:16 +00:00
Yao Chen
cf3829a696 Disable statsd and make StatsLog no-op if ro.statsd.enable=false
Bug: 79324611
Test: manually tested on marlin_svelte
Change-Id: Ic7fbf86d7c295cb6b2f20e7f9a957d1ed74c42c0
2018-06-06 17:25:08 -07:00
Steven Moreland
a89ae86745 screencap: return instead of _exit.
_exit was being used instead of return in order to
work around a static destructor issue that has been
fixed.

Bug: 77934844
Test: screencap (and it doesn't crash)
Change-Id: I5dc25b0af5099993a94705ac9c7b439e68432824
2018-05-25 00:55:51 +00:00
Makoto Onuki
d8cf91c5f8 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev
am: 621fd20f55

Change-Id: I31ae3e9e11b9defb7e6352830439484d7ec7ac01
2018-05-24 17:54:37 -07:00
Makoto Onuki
d5f25d2cd8 Tweak exemption for sync requests made by FG apps
Exemption given to a sync request made by a foreground app (including
PROCESS_STATE_IMPORTANT_FOREGROUND).
At the schedule time, we promote the sync adapter app for a higher bucket:
- If the device is not dozing (so the sync will start right away)
  promote to ACTIVE for 1 hour.
- If the device is dozing (so the sync *won't* start right away),
promote to WORKING_SET for 4 hours, so it'll get a higher chance to be started once the
device comes out of doze.
- When the sync actually starts, we promote the sync adapter app to ACTIVE for 10 minutes,
so it can schedule and start more syncs without getting throttled, even when the first
operation was canceled and now we're retrying.

Test: atest cts/tests/tests/syncmanager/
Test: Manual test with "requestsync -f" and "am set-standby-bucket", while checking
"dumpsys usagestats"
Test: settings put global app_idle_constants \
  exempted_sync_scheduled_nd_duration=1,exempted_sync_scheduled_d_duration=2,exempted_sync_start_duration=3
  and check "dumpsys usagestats" and make sure the constants are properly updated.
Fixes: 72443754

Change-Id: I233d8e4be85769150830bac798abc04810f4cc7b
2018-05-23 14:50:05 -07:00
Jaewan Kim
a31254bde1 Merge "Differentiate MediaController in a process for MediaSession" into pi-dev
am: 43688e8f2f

Change-Id: I8deb492fa82dcb2bec04d85a65a0aa267be830a4
2018-05-21 17:29:35 -07:00
TreeHugger Robot
43688e8f2f Merge "Differentiate MediaController in a process for MediaSession" into pi-dev 2018-05-22 00:11:49 +00:00
Yangster-mac
02b40158ab Merge "Add a field in config to disable/enable the string hashing in metric report." into pi-dev
am: 76cb7fe2f6

Change-Id: I4bb331330c505396427bb72ff7b69c2b6653ba97
2018-05-21 12:01:32 -07:00
Jaewan Kim
21c23e30b4 Differentiate MediaController in a process for MediaSession
MediaSession#getCurrentControllerInfo() can have more fine grained
differentiation for multiple MediaController in a package/process

Bug: 79728675
Test: Run CtsMediaTestCases
Change-Id: I81e94736e795ee5e7fbd28cb6cd834cc3a3b8f98
2018-05-19 08:36:51 +09:00
Yangster-mac
1c58f04cd3 Add a field in config to disable/enable the string hashing in metric report.
Statsd hashes (using its own hashing function) raw strings to reduce the
upload data size when there are duplicate strings in the report. And in cloud,
the clearcut translator would backfill the strings.

In a few droidfood users, we find the translator was unable to do that. While
debugging the root cause, we first decided to provide an option to disable
the hashing from the cloud.

Test: statsd unit test, CTS test, tested manually

BUG: b/79943763
Change-Id: If0359c8cf3f3cf83a2938db9ebf95ea7906f0b0c
2018-05-18 10:39:50 -07:00
Chenjie Yu
dcc56f980a Merge "ValueMetric pushed events should check condition" into pi-dev
am: 644c94f125

Change-Id: Ib8555c0664bceee108dc4f93bbeaaa9a146ef00a
2018-05-17 15:53:17 -07:00
Chenjie Yu
021e25307d ValueMetric pushed events should check condition
+ fix unit test flakiness

Bug: 79873404
Change-Id: I15b52a79b18c05603640781e4450e7b62fac24ba
Fix: 79873404
Test: unit test
2018-05-16 14:50:11 -07:00
David Chen
fcac66945b Merge "Fixes Value metrics in statsd and app upgrades." into pi-dev
am: c9076fac9b

Change-Id: Ib54ea85970d57c70cba12157f8d0ef1fcf602a6d
2018-05-15 19:41:05 -07:00
TreeHugger Robot
c9076fac9b Merge "Fixes Value metrics in statsd and app upgrades." into pi-dev 2018-05-16 02:27:37 +00:00
David Chen
092a5a9b85 Fixes Value metrics in statsd and app upgrades.
Pulled value metrics with conditions had a subtle bug that caused
us to leave the condition on even if it should've been false.

Bug: 79778783
Test: Added unit-test and verified on marlin-eng.
Change-Id: I31f34791118319b3471f7a6ea8a024e2d511cfe7
2018-05-15 17:51:47 -07:00
Dan Willemsen
d00c851e55 Merge "Convert to Soong" am: acbd94d76f
am: b1005a8a2a

Change-Id: If5cb26e0669f79240d8fee1d40aaa2162d8e611f
2018-05-15 15:06:19 -07:00
Dan Willemsen
b1005a8a2a Merge "Convert to Soong"
am: acbd94d76f

Change-Id: Ib04e6936303b53cf4d919ad07a27a9b8dda86168
2018-05-15 15:00:18 -07:00
Dan Willemsen
4888b1f6f0 Convert to Soong
See build/soong/README.md for more information.

Test: m libframeworks_coretests_jni
Test: m FrameworkCoreTests_install
Test: m libshim_jni
Test: m CtsShimPrivUpgrade
Test: m libfilterfw
Test: m PMTest_Java_dual
Test: m libdefcontainer_jni
Test: m libperftestscore_jni
Test: m libpmtest32 libpmtest64
Test: m libprintspooler_jni
Test: m libsmartcamera_jni
Test: m idmap
Test: m libdrmframework_jni
Test: m libdvr_loader com.google.vr.platform com.google.vr.platform.xml
Test: m libfilterpack_imageproc libfilterpack_base
Test: m libwebviewchromium_loader
Test: m shared_mem_test
Test: m test-touchlag
Change-Id: I868561dd237fa28647896d59049ab9260373ada1
2018-05-14 16:47:02 -07:00
Chenjie Yu
315211c74b Merge "Configurable data error action in value metric" into pi-dev
am: 5ca38cafe8

Change-Id: Ic4ce7443e381e42e6b33f93021c6344d18abb9c2
2018-05-14 15:57:30 -07:00
Chenjie Yu
47234644ca Configurable data error action in value metric
Right now in value metric, if a later pull produces a smaller number
than the previous one, we use absolute value of the current value.
This is not correct for some atoms as listed in the CL, which should
just take 0.
For some other atoms, this is unexpected error and should just dump
stale data.

Test: manual test
Bug: 79265262
Change-Id: I59fbfd96cbb57be22cd8d21cb57a7c60ca6856ee
2018-05-14 13:50:25 -07:00
Yangster-mac
2d41c7d382 Merge "Guardrail the max gauge atoms per dimension in one bucket." into pi-dev
am: 67cee97754

Change-Id: I74ad62e53fc245f8c77741db3235543846f70832
2018-05-11 20:15:13 -07:00
TreeHugger Robot
67cee97754 Merge "Guardrail the max gauge atoms per dimension in one bucket." into pi-dev 2018-05-12 03:03:01 +00:00
David Chen
efe26104b3 Merge "Fixes statsd reports missing strings and SCS." into pi-dev
am: 50a5e71bf3

Change-Id: Icc690ce0a82d07ad46fb95e1a369a037cc9ff9e3
2018-05-11 19:52:59 -07:00
Yangster-mac
50b0c9a608 Guardrail the max gauge atoms per dimension in one bucket.
Test: statsd
BUG: b/78603347
Change-Id: Ide77cc8ff0cde6cf6cc9e56034727ed27dd7be88
2018-05-11 17:15:44 -07:00
David Chen
56ae0d9a48 Fixes statsd reports missing strings and SCS.
Reports written to disk don't contain the strings used, which will
make this report unusable if there are strings that don't show up
again. We should always include the strings, so this option is
removed entirely.

Also, we hard-coded the wrong number of fields when pulling
ModemActivityInfo. There are actually 10 fields, not 6.

Bug: 79601503
Test: Tested unit-tests pass on marlin-eng.
Change-Id: I6834b096ced77418a9cc2ddd79b08d1c9c447fae
2018-05-11 17:04:56 -07:00
Jaewan Kim
399a7e999c Merge "MediaSessionService: Provide caller information for media key events" into pi-dev
am: 183a63474f

Change-Id: I6ad5053137c2ae7d123940c7f5239060d70ce68f
2018-05-09 22:02:41 -07:00
Jaewan Kim
183a63474f Merge "MediaSessionService: Provide caller information for media key events" into pi-dev 2018-05-10 04:48:35 +00:00
Yangster-mac
018765f4ca Merge "Fix the gauge metric data size estimation." into pi-dev
am: 3b592910c5

Change-Id: Ie8977d334e3345dd273f7f7fb587e5cd0edd77d8
2018-05-09 19:53:03 -07:00
Yang Lu
85d7b2a060 Merge "Add a sampling method to pull gauge when condition changes to true." into pi-dev
am: c2f44a19b2

Change-Id: Ie85fb0789c2330e563242345876ade0e916754fe
2018-05-09 19:49:36 -07:00
TreeHugger Robot
3b592910c5 Merge "Fix the gauge metric data size estimation." into pi-dev 2018-05-10 02:43:20 +00:00
Yang Lu
c2f44a19b2 Merge "Add a sampling method to pull gauge when condition changes to true." into pi-dev 2018-05-10 02:37:49 +00:00
yro
ef16759cdd Merge "Skip writing metrics to disk if it's entirely composed of no_report_metric" into pi-dev
am: 3f57b16deb

Change-Id: Ie5dce0d1678408986360815ec3190c32ee88fbe1
2018-05-09 19:13:51 -07:00
TreeHugger Robot
3f57b16deb Merge "Skip writing metrics to disk if it's entirely composed of no_report_metric" into pi-dev 2018-05-10 02:02:37 +00:00
Yangster-mac
5ba80b011f Merge "Fix the flaky gauge/value e2e test due to cached events." into pi-dev
am: a159842161

Change-Id: I3942b5c691b31054ca63b3bbd7fc89ec269c9e28
2018-05-09 18:15:58 -07:00
TreeHugger Robot
a159842161 Merge "Fix the flaky gauge/value e2e test due to cached events." into pi-dev 2018-05-10 01:02:10 +00:00
Yangster-mac
b2532daf4d Fix the gauge metric data size estimation.
Test: statsd test
BUG: b/77906846
Change-Id: Ie5ab54771acadde1e825289fe5ec491cc2225458
2018-05-09 23:14:26 +00:00
yro
028091cb15 Skip writing metrics to disk if it's entirely composed of
no_report_metric

Test: unit test, cts
Bug: 79488249
Change-Id: I3e13a6271cc36665a43d0f09d8663e5996224477
2018-05-09 16:03:27 -07:00
Yangster
ec3c7a3e58 Add a sampling method to pull gauge when condition changes to true.
Test: statsd test

BUG: b/79490890
Change-Id: I82ed6681151f8a217e74bd0d855f817b4fa0619c
2018-05-09 16:02:35 -07:00
android-build-team Robot
e46d7975b8 Merge "Fix partial bucket unit tests." into pi-dev
am: c3d0798455

Change-Id: I44f0aa78defe58a6c04411d76d97631fb808305c
2018-05-09 11:40:04 -07:00
android-build-team Robot
c3d0798455 Merge "Fix partial bucket unit tests." into pi-dev 2018-05-09 18:07:24 +00:00
Chenjie Yu
b0828d55e5 Merge "fix cts error on x86 simulator" into pi-dev
am: 9743fae2d9

Change-Id: I13f5120724b6983661bd29f93112c66c4bce0f3d
2018-05-08 18:07:57 -07:00
Chenjie Yu
9743fae2d9 Merge "fix cts error on x86 simulator" into pi-dev 2018-05-09 00:53:09 +00:00
android-build-team Robot
30b2280bbe Merge "Fix statsd returning uidmap with empty reports." into pi-dev
am: 0d3a6dee7f

Change-Id: I3ab384316614255710a51ff84e43d1fe4dc076c8
2018-05-08 17:38:02 -07:00
android-build-team Robot
0d3a6dee7f Merge "Fix statsd returning uidmap with empty reports." into pi-dev 2018-05-09 00:25:31 +00:00
android-build-team Robot
6a748eee30 Merge "Should not use the absolute value when the value does not change." into pi-dev
am: 64307ea578

Change-Id: I8d4c27f386e4e952d2d32f627ea3818d8f50334e
2018-05-08 16:46:37 -07:00