Commit graph

76014 commits

Author SHA1 Message Date
Steven Moreland
42666b84bc libbinder_ndk: remove logspam on incStrong
AIBinder_incStrong is frequently called on a null binder out of
convenience, because in cases where ownership is required on a binder
that may or may not be nullptr, ignoring the incStrong on nullptr is
consistent.

Bug: 150894288
Test: atest CtsNdkBinderTestCases
Change-Id: I247811a7d4600711c015647f77900bf3183890e2
2020-03-06 18:20:56 -08:00
Steven Moreland
1fdb98baf2 Reland "Disallow shrinking threadpool size once started."
This reverts commit 0a09c76c71.

Bug: 147699567
Test: atest LibStatsPullTests now passes
Reason for revert: b/150904425 is fixed.

Change-Id: I00451b5f146dbb9086d395a8bf50e5929a6b7839
2020-03-07 00:04:06 +00:00
Steven Moreland
d59ca09f5f Merge "dumpsys: '-l' works for 0/1 services." 2020-03-06 21:24:09 +00:00
Steven Moreland
6d4d8f6c62 Merge "BpBinder: remove unused field" 2020-03-06 21:23:55 +00:00
Chih-Hung Hsieh
628878625a Fix bugprone-use-after-move warnings
Bug: 150783499
Test: WITH_TIDY=1 make
Change-Id: I930cbe4b421913a58d7886fbf845a77f94387ff5
2020-03-06 11:01:16 -08:00
Steven Moreland
e15c527c67 Merge "Revert "Disallow shrinking threadpool size once started."" 2020-03-06 01:17:59 +00:00
Steven Moreland
0a09c76c71 Revert "Disallow shrinking threadpool size once started."
This reverts commit e52a3b607d.

Reason for revert: caught bug in b/150901303, but will temporarily revert until it can be fixed.

Change-Id: Ia8e37395e0d000d247c0ffa4ac9243aab699d09b
2020-03-06 01:17:35 +00:00
Steven Moreland
4fcd863b32 BpBinder: remove unused field
Bug: 148177595
Test: atest CompositionSamplingListenerTest
   (broken by other changes in previous CL that included
    this change with other changes, in b/150837217)
Test: boot

Change-Id: I11c9fb7031ae6f226ba279ade9d7ffef7eccb6aa
2020-03-05 15:53:57 -08:00
Steven Moreland
c865e256b9 Merge "Revert "Optimize BpBinder struct size."" 2020-03-05 23:17:30 +00:00
Steven Moreland
06074d8846 Revert "Optimize BpBinder struct size."
This reverts commit 76c0aa44bb.

Reason for revert: breaks some tests b/150837217 - will investigate why later

Change-Id: I7fe4c567a4b46d02bb31c6442e969b33b6237513
2020-03-05 23:16:51 +00:00
Bill Yi
11f9bbf449 Merge "Merge stage-aosp-master to aosp-master - DO NOT MERGE" 2020-03-05 18:27:29 +00:00
Steven Moreland
31dac35341 dumpsys: '-l' works for 0/1 services.
Currently, if there are only 0/1 services registered and list is called,
no output will be produced.

Bug: hit me while testing vndservicemanager, since this may not register
    anything
Test: dumpsys_test
Change-Id: I8e16376eb99c5758d53ff0b5f01b32fd21e6b119
2020-03-05 09:51:10 -08:00
Bill Yi
6b8bf72c06 Merge stage-aosp-master to aosp-master - DO NOT MERGE
Change-Id: I284f579e1e1c47090d9998c45c710cbc3108db0b
2020-03-05 09:51:09 -08:00
Automerger Merge Worker
62ce7f5ab2 Merge "Optimize BpBinder struct size." am: d6dad7afc0
Change-Id: I5a0161a4df4126284be53d2ea5f0a0b290ace33b
2020-03-04 21:18:40 +00:00
Automerger Merge Worker
c8c27ea6bd Merge "libbinder: avoid attached objects for stability" am: 1ed44fd5bb
Change-Id: Id9de508f423510a1c9682e252ac097217aa54203
2020-03-04 21:18:30 +00:00
Steven Moreland
d6dad7afc0 Merge "Optimize BpBinder struct size." 2020-03-04 21:05:57 +00:00
Steven Moreland
1ed44fd5bb Merge "libbinder: avoid attached objects for stability" 2020-03-04 21:05:54 +00:00
Automerger Merge Worker
9ee812fdc9 Merge "Disallow shrinking threadpool size once started." am: 70f592a6cf
Change-Id: I50c7b0aba4d22a08de0b78775c2c352e92bbbb95
2020-03-04 17:08:46 +00:00
Automerger Merge Worker
2b3ad23b0c Merge "lshal: avoid FQName globals." am: dd5506c236
Change-Id: I350ffebeb845b2e4f4e3fb8798ccc1da2bf784f1
2020-03-04 17:08:02 +00:00
Steven Moreland
70f592a6cf Merge "Disallow shrinking threadpool size once started." 2020-03-04 17:02:10 +00:00
Steven Moreland
dd5506c236 Merge "lshal: avoid FQName globals." 2020-03-04 16:58:42 +00:00
Automerger Merge Worker
60e1700650 Merge "Update OWNERS" am: 0f58ab624b
Change-Id: Iccce6b80843c13807edf8ff02975154bf62ef86d
2020-02-28 21:23:19 +00:00
Treehugger Robot
0f58ab624b Merge "Update OWNERS" 2020-02-28 21:07:00 +00:00
Marissa Wall
9668eca1fb Update OWNERS
Remove people who are no longer owners. Add new owners.

Test: Compiles
Bug: 150462113
Change-Id: Ia9c353772cb1f95b430a62155b4e499a3466861b
2020-02-28 20:45:54 +00:00
Automerger Merge Worker
bcf0cd7afa Merge "Never send Binder / HIDL txn from atrace." am: a08b3bfff9
Change-Id: I8ec3ff9e7e6d6ae7afa1a2d0d27c7d27d9ef741f
2020-02-27 10:49:04 +00:00
Florian Mayer
a08b3bfff9 Merge "Never send Binder / HIDL txn from atrace." 2020-02-27 10:36:48 +00:00
Automerger Merge Worker
aa007214b0 Merge "Use {llndk,vndksp}.libraries.txt from VNDK APEX" am: 4d89476be3
Change-Id: I87a91c61591e40168cf0665ea3a1e4ece801dc96
2020-02-27 05:07:45 +00:00
Treehugger Robot
4d89476be3 Merge "Use {llndk,vndksp}.libraries.txt from VNDK APEX" 2020-02-27 04:55:53 +00:00
Automerger Merge Worker
25a9ba1bc7 Merge "Use std::optional for @nullable (AIDL)" am: b08a7a4997
Change-Id: I1004fd7a0c2e3fda7906e232913d25e4059b3f9f
2020-02-27 03:22:54 +00:00
Jooyung Han
b08a7a4997 Merge "Use std::optional for @nullable (AIDL)" 2020-02-27 03:06:14 +00:00
Jooyung Han
9fcc4ef9bb Use std::optional for @nullable (AIDL)
Previously, nullable types were mapped to std::unique_ptr for C++
backend. But std::unique_ptr typically involves unnecessary alloc/dealloc.

For example, if nullable string is represented in unique_ptr<string>, we
should do "unique_ptr<string>(new string(value))" to set a value.

To avoid breaking all hand-written parcelables, only new read/write
functions are added to Parcel class and they are used only by
aidl-generated code and their implementations.

Bug: 144773267
Test: build/flash/boot
      atest --test-mapping frameworks/native/libs/binder

Merged-In: I2c801e3b69f2f8ccf44267f15cbf79e1d8fbf19e
Change-Id: I2c801e3b69f2f8ccf44267f15cbf79e1d8fbf19e
(cherry picked from commit 1e1c5fbbbe8a76150fe832c8f974cbd543aa0860)

Exempt-From-Owner-Approval: CP from master
2020-02-27 03:05:50 +00:00
Steven Moreland
76c0aa44bb Optimize BpBinder struct size.
Unnecessary field, and some fields which could be bools. Only shaves off
a few bytes.

Bug: 148177595
Test: boots/works
Change-Id: Iec53d7398d0dc78c0f722e63d650252e769b00ad
2020-02-26 16:22:58 -08:00
Steven Moreland
a7fb018627 libbinder: avoid attached objects for stability
Attached objects require a heap allocation, and stability is always
attached. This avoids a heap allocation per binder object (Android R
regression).

Bug: 148177595
Test: binderStabilityTest

Change-Id: I5eab8be5d87fdd9468bcbd8d54913ca713559314
2020-02-26 16:11:18 -08:00
Steven Moreland
7a99e04990 lshal: avoid FQName globals.
These aren't really needed here, and they are costing 20Kib memory/user.

Bug: 148177595
Test: boot/lshal
Change-Id: Id0d311319c47553fac5d1d208409cef83073fddf
2020-02-26 13:16:34 -08:00
Florian Mayer
e2811af2c4 Never send Binder / HIDL txn from atrace.
Test: atrace ss
      atrace wm
      sanity check output
Bug: 137366208
Change-Id: I98b6933db9b168ab290f04286535d1a109b59843
2020-02-26 14:45:49 +00:00
Automerger Merge Worker
f124593290 Merge "lshal: read binder stats from binderfs" am: aa59a8b100
Change-Id: I57e49214e1753ed9042c1cee30631f788229cad7
2020-02-26 07:40:48 +00:00
Treehugger Robot
aa59a8b100 Merge "lshal: read binder stats from binderfs" 2020-02-26 07:18:43 +00:00
Steven Moreland
e52a3b607d Disallow shrinking threadpool size once started.
If a larger threadpool is started, and concurrent binder transactions
are cause these threads to actually be started, and then we shrink
the threadpool, these extra threads won't be shut down. So, when we
detect that this race may happen, we abort with an error.

It's best practice to setup a threadpool at process startup time.

Bug: 147699567
Test: TH
Change-Id: I12d2e6e6b1ebf92c2b2abbfccffb011c4248d8ec
2020-02-26 01:25:30 +00:00
Automerger Merge Worker
5f9520d6a6 Merge "binder: fix inconsistent-missing-override warning." am: ab0b2a284e
Change-Id: Ia45ed3fd0d70cdc6451a38d41d006fa460379a04
2020-02-25 22:22:08 +00:00
Treehugger Robot
ab0b2a284e Merge "binder: fix inconsistent-missing-override warning." 2020-02-25 22:10:51 +00:00
Hridya Valsaraju
b49b0b162f lshal: read binder stats from binderfs
If binderfs is mounted, lshal should read binder stats
from /dev/binderfs/binder_logs instead of debugfs.

Test: atest lshal_test, adb shell lshal
Change-Id: Id585cdcd71c0ab4346045a099c2e3d0ddffcecc0
2020-02-25 12:34:52 -08:00
Yi Kong
f4bb6ffef3 binder: fix inconsistent-missing-override warning.
Some functions are marked as "override" while the rest are not.

No functionality change.

Test: TreeHugger
Change-Id: I7bcd785588feba0c514dcb473f29ea92784efee0
2020-02-26 01:26:11 +08:00
Jooyung Han
7839680477 Use {llndk,vndksp}.libraries.txt from VNDK APEX
/system/etc/{llndk,vndksp}.libraries.txt files will be deprecated.
These files can be read from VNDK APEX.

Bug: 145184886
Test: build / boot
Change-Id: Ic6f46033bd525325562e04ef9e8bcb8ebb5b5d41
2020-02-23 03:02:43 +09:00
Automerger Merge Worker
e76a58ffcc Merge "Add adbd tls APIs to adbd_auth library." am: 61addf0da3
Change-Id: I6c410adb5ab54abb702aa6cd91b379bba21f69fb
2020-02-21 21:14:20 +00:00
Joshua Duong
61addf0da3 Merge "Add adbd tls APIs to adbd_auth library." 2020-02-21 20:59:54 +00:00
Automerger Merge Worker
93f07fb962 Merge "Implement quota calculation for project ID based quota." am: 26b068e97c
Change-Id: I6b76ddd7d96cb6d1ca26dfcd054b95940979268c
2020-02-21 06:39:38 +00:00
Martijn Coenen
26b068e97c Merge "Implement quota calculation for project ID based quota." 2020-02-21 06:25:59 +00:00
Joshua Duong
3d0860e802 Add adbd tls APIs to adbd_auth library.
Bug: 111434128

Test: mmm -j frameworks/native/libs/adbd_auth
Change-Id: Id285763c2c2dba1666040581d1d2d56e69ff54cb
2020-02-20 19:05:42 -08:00
Automerger Merge Worker
3e7c0f4069 Merge "LazyServiceRegistrar: Use defaultServiceManager" am: 7f9edd9bff
Change-Id: I1e7aea8ed8a1125f67d5020f9074cfb3ab5d7240
2020-02-21 02:54:18 +00:00
Treehugger Robot
7f9edd9bff Merge "LazyServiceRegistrar: Use defaultServiceManager" 2020-02-21 02:42:33 +00:00