Commit graph

19 commits

Author SHA1 Message Date
Steven Moreland
b495b0d403 libprocessgroup: move native_bridge_support
To avoid merge conflict.

Bug: 135293492
Bug: 135298384
Test: N/A
Change-Id: I034b989c7e0f8a477b29ef7ca40bba8f2dc929e5
2019-06-17 12:48:06 -07:00
dimitry
49c1f6efea Enable native_bridge_support for libprocessgroup
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libprocessgroup modules
needed by libutils greylisted library (available for apps targeting
Android version < N).

Bug: http://b/77159578
Test: make
Change-Id: I8d6f33e95e9f7424f5fa12f6fbabafa1d6c37413
2019-05-16 14:19:09 +02:00
Vic Yang
d167cb2958 Static link libjsoncpp in libprocessgroup
The majority of libjsoncpp use is due to libprocessgroup.  Static
linking reduces relocations required at runtime as well as compacts the
pages dirtied by relocations.  On a 32-bit system, where this matters
the most, this reduces 8KB of dirty pages per libprocessgroup load.
Overall, the dirty page reduction on 32-bit cuttlefish is ~500KB.

Bug: 132275636
Test: Boot on cuttlefish.  Calculate total amount of dirty memory used
      for libprocessgroup and libjsoncpp.
Change-Id: I1135bb45a3764f96a4a3a47c98fbcdee3913c988
(cherry picked from commit b562e68503)
2019-05-08 20:29:44 -07:00
Yifan Hong
53e0deb7b2 libprocessgroup: use libcgrouprc to read cgroup.rc
Use the LL-NDK library to read cgroup.rc.

As a side-effect, the CgroupController class is changed
to a wrapper of ACgroupController* from the library. The
class itself essentially becomes the pointer, and can be
trivially copied. Modify all client code for this change.

Test: builds and boots
Bug: 123664216

Change-Id: I635d9885db62e82f37421f6d20f59c84a6f4cbb2
Merged-In: I635d9885db62e82f37421f6d20f59c84a6f4cbb2
2019-04-02 22:31:57 -07:00
Elliott Hughes
be87d447b4 libprocessgroup: add -Wexit-time-destructors.
Exit time destructors already caused trouble (see
dba6d44376), and without this warning,
it's too easy to reintroduce issues.

Bug: 129023204
Test: builds
Change-Id: If5fb4d0c11c74ba4971bb218059c6d37edeaf4df
2019-03-26 18:50:22 -07:00
Suren Baghdasaryan
82b72a5667 libprocessgroup: Add support for task profiles
Abstract usage of cgroups into task profiles that allows for changes
in cgroup hierarchy and version without affecting framework codebase.
Rework current processgroup and sched_policy API function implementations
to use task profiles instead of hardcoded paths and attributes.
Mount cgroups using information from cgroups.json rather than from init.rc

Exempt-From-Owner-Approval: already approved in internal master

Bug: 111307099
Test: builds, boots

Change-Id: If5532d6dc570add825cebd5b5148e00c7d688e32
Merged-In: If5532d6dc570add825cebd5b5148e00c7d688e32
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-03 16:48:35 +00:00
Suren Baghdasaryan
9491078300 DO NOT MERGE: Revert "Revert "Add dependencies on libprocessgroup for sched_policy users""
This reverts commit 1bef8c550c.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ib341ac80e2f88c13a7815a490ea2d9422ebdf55f
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 16:49:18 +00:00
Suren Baghdasaryan
1bd127b72e DO NOT MERGE: Revert "Revert "libcutils: Move sched_policy functions into libprocessgroup""
This reverts commit b5394db682.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ie1a2e0200600214a65f4fe2250c903c8e8ce0a29
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 16:49:09 +00:00
Suren Baghdasaryan
7bf4381a82 DO NOT MERGE: Revert "Revert "Add libprocessgroup into VNDK""
This reverts commit c4a02d25a9.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ifc1c4d51aa1b168ef62cf58275b908d98b9a04bf
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 16:48:58 +00:00
Suren Baghdasaryan
c4a02d25a9 DO NOT MERGE: Revert "Add libprocessgroup into VNDK"
This reverts commit dad4749731.

Reason for revert: Broke AOSP

Change-Id: I019e1226a65b31495984cf47ad471771b4880c45
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-23 20:44:47 -08:00
Suren Baghdasaryan
b5394db682 DO NOT MERGE: Revert "libcutils: Move sched_policy functions into libprocessgroup"
This reverts commit facd40d0e1.

Reason for revert: Broke AOSP

Change-Id: Id333417d4970ced800ab801bddfed880cafa056d
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-23 20:44:09 -08:00
Suren Baghdasaryan
1bef8c550c DO NOT MERGE: Revert "Add dependencies on libprocessgroup for sched_policy users"
This reverts commit 02843339f9.

Reason for revert: Broke AOSP

Change-Id: I62f91c0adf440b5da0a145862b04dd27a7016faf
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-23 20:43:28 -08:00
Suren Baghdasaryan
02843339f9 Add dependencies on libprocessgroup for sched_policy users
After moving sched_policy functions into libprocessgroup its users require
additional dependency and inclusion of sched_policy_ctrl.h header.

Exempt-From-Owner-Approval: janitorial

Bug: 111307099
Test: builds, boots

Merged-In: Icc052080e1bce46ce06f7264446950cab0490a95
Change-Id: Icc052080e1bce46ce06f7264446950cab0490a95
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-22 18:19:45 +00:00
Suren Baghdasaryan
facd40d0e1 libcutils: Move sched_policy functions into libprocessgroup
Move functions operating on cgroups from sched_policy.h in libcutils
into sched_policy_ctrl.h under libprocessgroup. This consolidates
cgroup-related functionality inside libprocessgroup.

Bug: 111307099
Test: builds, boots

Merged-In: Iba75f33281162b889989214d0325a5973d53ed2d
Change-Id: Iba75f33281162b889989214d0325a5973d53ed2d
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-22 18:18:48 +00:00
Suren Baghdasaryan
dad4749731 Add libprocessgroup into VNDK
Include libprocessgroup into vndk in preparation for sched_policy
functions to be moved into it.

Bug: 111307099
Test: builds, boots
Merged-In: I09a528cac8821df3201c2428b151fd2eaece3ccb
Change-Id: I09a528cac8821df3201c2428b151fd2eaece3ccb
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-22 18:18:22 +00:00
Tom Cherry
1151d15be5 Add recovery_available: true to init dependencies
Init needs this in order to be built in Android.bp

Test: build
Change-Id: I695438d69cc71b739b7648c4008ff3760da58ef0
2018-07-24 13:45:50 -07:00
Tom Cherry
574a081623 libprocessgroup: remove legacy C string handling and build for host
Bug: 36970783
Test: kill zygote and see that its children die correctly
Change-Id: I1b0e9a9cdb834a000fec82323d690e3bd288692d
2018-02-27 14:12:19 -08:00
Tom Cherry
efa81080fd Enable libprocessgroup on host bionic
Bug: 31559095

Test: Build
Change-Id: I1ee9fb492137c6c16f0d02586393837616127972
2017-05-11 17:55:04 -07:00
Steven Moreland
419ce36c7d libprocessgroup: Android.mk -> Android.bp
Test: links
Test: (sanity) boot marlin in recovery + to system UI
Bug: 37512442
Change-Id: Ie19c02bda9df7c0cfdeeaf34c48f251b2b93961d
2017-04-19 14:29:08 -07:00