Commit graph

76014 commits

Author SHA1 Message Date
Automerger Merge Worker
5379d00c24 Merge "[vts-core] Add VtsKernelBinderTest to vts-core suite." am: 364b2213da
Change-Id: If36dc4c889f8a5e64caa6850da88b92569830d99
2020-02-12 02:18:03 +00:00
Treehugger Robot
364b2213da Merge "[vts-core] Add VtsKernelBinderTest to vts-core suite." 2020-02-12 02:00:52 +00:00
Automerger Merge Worker
5d1678950b Merge "dumpsys: use std::c* instead of TextOutput" am: b4401d18d8
Change-Id: Ia21fe2eab0928fa22623fd786750b37de27e1a2d
2020-02-11 23:03:21 +00:00
Steven Moreland
b4401d18d8 Merge "dumpsys: use std::c* instead of TextOutput" 2020-02-11 22:43:26 +00:00
Automerger Merge Worker
4ccbf7d293 Merge "libbinder: dump dropped oneway transaction data" am: 505e9eac76
Change-Id: I102414708fbb82a6bf4e47fbe6487ea9d6e54746
2020-02-11 21:24:06 +00:00
Steven Moreland
505e9eac76 Merge "libbinder: dump dropped oneway transaction data" 2020-02-11 21:07:59 +00:00
Connor O'Brien
2a716a401b libtimeinstate: add functions to read only recently-updated stats
Add getUidsUpdatedCpuFreqTimes and getUidsUpdatedConcurrentTimes,
which skip reading stats for UIDs that haven't been updated since
before a time passed in by their caller, and pass a new lastUpdate
time back to the caller. This is implemented by querying a new map
that holds the most recent update time for each new UID.

This approach has a potential race when a UID is updated after we have
already read its stats, but before we finish iterating through the
rest of the BPF map. By not skipping UIDs updated up to 1s before
lastUpdate, we improve the chance that such an update will be picked
up the next time getUidsUpdated*Times is called. Though this doesn't
completely eliminate the risk of a race, the consequences of the race
aren't that severe - we could undercount some runtimes by ~seconds at
worst, and only until the affected UID runs again.

Extend existing tests to check that these new functions behave like
the existing getUids*Times functions when passed a last update time of
0, and add new testcases to exercise the case where a nonzero last
update time is used.

Test: libtimeinstate_test passes
Bug: 138317993
Change-Id: I06ddf8bd7ab7812d067f3a1f5b2fbedeae016bfc
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-02-11 20:43:43 +00:00
Automerger Merge Worker
593d730ecf Merge "Support dumping mainline relevant service pre-boot into bugreport" am: f2a15e8742
Change-Id: I3b3e33b12498021957306ce6715bb713d26ef82d
2020-02-11 03:08:55 +00:00
Jerry Chang
f2a15e8742 Merge "Support dumping mainline relevant service pre-boot into bugreport" 2020-02-11 02:49:29 +00:00
Automerger Merge Worker
d1edd2e636 Merge "Read binder stats from binderfs" am: b5624e4579
Change-Id: If7778dea2427514f6bad2d524539f8fce07dbfb3
2020-02-11 00:49:42 +00:00
Treehugger Robot
b5624e4579 Merge "Read binder stats from binderfs" 2020-02-11 00:40:23 +00:00
Steven Moreland
ce66b8adf8 libbinder: dump dropped oneway transaction data
oneway transaction errors or parcel contents will be dropped. Whenever
there is an error returned from one of these or data is written to the
parcel, we are now logging it here.

Fixes: 148640588
Test: boot, check logs
Change-Id: I96ad47dc39d6deb03805608ee1b21b090332411a
2020-02-10 15:53:49 -08:00
Automerger Merge Worker
94fdd187ff Merge "libbinder_ndk: support handleShellCommand" am: ef464b3857
Change-Id: I68f451481f618ab57316fa973d67a831a63eee8c
2020-02-10 23:05:53 +00:00
Automerger Merge Worker
a645ce2ac5 Merge "Remove aidl_interface visibility." am: 687d82a177
Change-Id: Ie95c508e17d63bcd1b8cec95e8463be65b63b7e0
2020-02-10 22:56:03 +00:00
Tej Singh
ef464b3857 Merge "libbinder_ndk: support handleShellCommand" 2020-02-10 22:49:48 +00:00
Steven Moreland
687d82a177 Merge "Remove aidl_interface visibility." 2020-02-10 22:44:55 +00:00
Steven Moreland
3657ee5429 dumpsys: use std::c* instead of TextOutput
TextOutput implementation has some static variables contributing a small
amount to private dirty memory, but we don't need it.

Bug: 148676615
Test: dumpsys_test
Change-Id: I2133b136f5d1265670b7f94d6e2413caf88a2149
2020-02-10 14:20:22 -08:00
Hridya Valsaraju
920ba71f58 Read binder stats from binderfs
If binderfs is mounted, dumpstate should read binder stats
from /dev/binderfs/binder_logs instead of debugfs.

Test: adb shell dumpstate
Bug: 136497735
Change-Id: I4e7856078fd8db242eee65039c3950f69d992ca4
2020-02-10 13:10:44 -08:00
Steven Moreland
557a31b046 Remove aidl_interface visibility.
Since it needs to be seen by aidl_metadata_json.

(this is simpler than having aidl_interface.go inject an exception here,
which could get quite messy)

Bug: 145920591
Test: builds
Change-Id: If6952f0c6ad9677dec807fd5da26b255b52100c3
2020-02-10 11:01:17 -08:00
Automerger Merge Worker
4ec34c0deb Merge changes from topic "connectivity-br" am: 3c741f0315
Change-Id: I3d57ad0dd6c39197a7d943de01ebe381f6e427e4
2020-02-10 17:40:10 +00:00
Hunter Knepshield
3c741f0315 Merge changes from topic "connectivity-br"
* changes:
  Update timeout logic for connectivity reports.
  Update contents of a telephony bug report.
2020-02-10 17:29:42 +00:00
Dan Zimmerman
b79acc0222 Revert "Revert "[dexopt] Allow secondary dex files to generate app images""
Reason for revert: Breaking up the original topic into individual CLs so
that we can merge non-broken code sooner (and fix/merge the broken test
on its own).
Reverted Changes:
Ic30045e59: Revert "[dexopt] Allow secondary dex files to gene...

Test: adb shell pm bg-dexopt-job with app installed that uses secondary
dexes, verify app image is generated for secondary image. Launch app and
verify no class linker/class loader/image space warnings in logcat

Change-Id: Id6e633fb95798041df75e0e3e8b926aa6038a9ac
2020-02-10 07:25:38 -08:00
Hunter Knepshield
70610fa215 Update timeout logic for connectivity reports.
Typically, BUGREPORT_MODE_TELEPHONY takes single-digit seconds, which
leaves the routine waiting for just USER_CONSENT_TIMEOUT_MS (30 seconds)
for the user to respond. Given the sizeable dialog with lots to read, we
don't believe this is a reasonable default.

We increase the timeout specifically for MODE_TELEPHONY to be 2 minutes,
which should then roughly match the time it takes a full report to be
generated, and plenty of time for the user to fully read the consent
dialog.

Bug: 146521742
Test: manual, ensure timeout happens after 2 minutes instead of 30
seconds

Change-Id: I3a5d9c696470a0dc3cbeb0d84b78ea36a3694fea
2020-02-09 19:56:29 -08:00
Hunter Knepshield
820f9bc656 Update contents of a telephony bug report.
Much of the current info is not suitable to share with carriers from
devices running user builds, so we strip much of it out.

We also show a progress notification for connectivity reports now to
satisfy system health requirements for a user-visible indicator.

Bug: 146521742
Test: take bug report on user build
Test: atest dumpstate_test
Change-Id: I21182e75dd85936c979e8b983aa03cb3b02420b7
2020-02-09 19:56:27 -08:00
Automerger Merge Worker
c1b7b713ab Merge "Update dexopt code with the new JIT zygote image." am: 7cada579e2
Change-Id: Ia82bf7232181dd8e66504cd9122091e06b8835a3
2020-02-09 23:27:55 +00:00
Nicolas Geoffray
7cada579e2 Merge "Update dexopt code with the new JIT zygote image." 2020-02-09 23:07:49 +00:00
Automerger Merge Worker
a0a62037e1 Merge "Revert "[dexopt] Allow secondary dex files to generate app images"" am: 799cfc57c3
Change-Id: I35f2614af2566f2a9bbbe62058f74ef73aa46f60
2020-02-09 22:39:45 +00:00
Nicolas Geoffray
799cfc57c3 Merge "Revert "[dexopt] Allow secondary dex files to generate app images"" 2020-02-09 22:24:51 +00:00
Nicolas Geoffray
29628b6099 Revert "[dexopt] Allow secondary dex files to generate app images"
Revert submission 1210624-secimg

Bug: 149098478
Bug: 149168708

Reason for revert: Tests fail on device
Reverted Changes:
I87a0c2698: [art] Fix, re-enable and expand 596-app-images
I73592c597: [art] Enable compilation of secondary dexes by def...
I6cff0c8f2: [art] Expand test coverage of secondary app images...
Iaa04175ee: [dexopt] Allow secondary dex files to generate app...

Change-Id: Ic30045e59cce34749b3f31097d392072c44a7d7a
2020-02-09 22:21:26 +00:00
Yifan Hong
cba0a4fb89 dumpstate: collect snapshotctl logs without root.
Test: bugreport
Bug: 148818798
Change-Id: I83e394420225bd9543e013e8ed71b37850d07314
2020-02-08 18:40:10 -08:00
Ruchir Rastogi
cc7a7465a1 libbinder_ndk: support handleShellCommand
At the NDK layer:
AIBinder_Class_setHandleShellCommand (to implement handleShellCommand)

At the AIDL layer:
ICInterface::dump (to override default handleShellCommand)

Test: m libbinder_ndk
Test: atest CtsNdkBinderTestCases
Test: atest libbinder_ndk_unit_test
Bug: 148692423
Change-Id: I1fec523b0ca59466d117c94243176ff123389a9a
2020-02-08 03:43:06 -08:00
Automerger Merge Worker
91d0c37acc Merge "DO NOT MERGE - Merge QQ1A.200205.002 into master" am: 39504c325b
Change-Id: I594387e42c6cf757e7814a09394461a169f53ca0
2020-02-08 01:49:57 +00:00
Automerger Merge Worker
504fae4021 DO NOT MERGE - Merge QQ1A.200205.002 into master am: 5d4361bfb3
Change-Id: I62aedcc9229a0687747969931e15fa3d4dbfc1b8
2020-02-08 01:38:43 +00:00
Treehugger Robot
39504c325b Merge "DO NOT MERGE - Merge QQ1A.200205.002 into master" 2020-02-08 01:29:23 +00:00
Automerger Merge Worker
7b9d08a483 Merge "[dexopt] Allow secondary dex files to generate app images" am: 6c7d069509
Change-Id: I1b428c247e5ba868195cf884701dca9789b818e6
2020-02-07 22:50:36 +00:00
Mathieu Chartier
6c7d069509 Merge "[dexopt] Allow secondary dex files to generate app images" 2020-02-07 22:37:35 +00:00
Dan Zimmerman
84d077cbb2 [dexopt] Allow secondary dex files to generate app images
After creating tests and fixing bugs surrounding loading multiple app
images into the runtime we can safely enable generating app image files
for secondary dexes.

Test: adb shell pm bg-dexopt-job with app installed that uses secondary
dexes, verify app image is generated for secondary image. Launch app and
verify no class linker/class loader/image space warnings in logcat
Bug: 149098478

Change-Id: Iaa04175ee56aae69f41f3e2972c322049cfc9e26
2020-02-07 18:23:17 +00:00
Automerger Merge Worker
4cbc5f08d8 Merge "Create libstatshidl" am: 2649732a41
Change-Id: Id899eee57e5da42118c5168c8512cdbf5491a5e5
2020-02-07 18:17:50 +00:00
Jeffrey Huang
2649732a41 Merge "Create libstatshidl" 2020-02-07 18:03:04 +00:00
Nicolas Geoffray
5a4c4e96fd Update dexopt code with the new JIT zygote image.
And pass --boot-image instead of --runtime-option -Ximage (read nicer)

Bug:119800099
Test: boots, apps get compiled with the right image
Change-Id: I40edb8c72e30e535696fc52bfa9da81d3fe635ab
2020-02-07 15:26:15 +00:00
Automerger Merge Worker
29d636cd3f Merge "Fix defaultServiceManager() locking and retry loop." am: b1e64b4873
Change-Id: I9888bb394149a66abb82704a41aeacd66afa5014
2020-02-07 10:43:50 +00:00
Automerger Merge Worker
445b5a49c4 Merge "Convert frameworks/native to Result::ok()" am: 4a495bd448
Change-Id: I2df8348654bd2a5e841d2c7bbefefb954dbd7867
2020-02-07 10:43:25 +00:00
Treehugger Robot
b1e64b4873 Merge "Fix defaultServiceManager() locking and retry loop." 2020-02-07 10:31:00 +00:00
Treehugger Robot
4a495bd448 Merge "Convert frameworks/native to Result::ok()" 2020-02-07 10:28:52 +00:00
nelsonli
1e8d071c2e [vts-core] Add VtsKernelBinderTest to vts-core suite.
VtsKernelBinderTest include the Gtest of binderSafeInterfaceTest,
binderLibTest, binderDriverInterfaceTest, and memunreachable_binder_test

Bug: 132702215
Test: atest memunreachable_binder_test
Change-Id: If03dd7017e96679da4d15f0008080dadfebb377f
2020-02-07 15:04:09 +08:00
Jeffrey Huang
1a4f0f207e Create libstatshidl
Test: bit VtsHalStatsV1_0TargetTest:*
Bug: 148794952
Change-Id: I7e8c7f51ed00ed152561f6883157b363494b470a
Merged-In: If704ae440246390fb15f6619048f18f14c106a01
2020-02-06 16:20:04 -08:00
Steven Moreland
93aabe27c7 rm libbinderthreadstate
Empty, since the functionality was moved to libbinder/libhwbinder to
remove extra lib dependency.

Bug: 148692216
Test: N/A
Change-Id: Ie94f0a7f64213c2265b4207db2e5b55b5bdd01a1
2020-02-06 13:12:21 -08:00
Automerger Merge Worker
32415facc1 Merge "Remove need for libbinderthreadstate." am: 26d0eb321c
Change-Id: Ie8b7ae5f915ef5da968cebc98653cdcacb07d465
2020-02-06 19:22:26 +00:00
Steven Moreland
26d0eb321c Merge "Remove need for libbinderthreadstate." 2020-02-06 19:07:49 +00:00
Bernie Innocenti
018138fd8f Convert frameworks/native to Result::ok()
No functionality changes, this is a mechanical cleanup.

Test: m
Change-Id: I0451ec8cb174449a79d91e99d3b9e5c9edb034eb
2020-02-06 21:39:04 +09:00