Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ec3b78b authored by Steven Moreland's avatar Steven Moreland
Browse files

libprocessgroup users use libcutils

libprocessgroup symbols are being moved into libcutils in order to
optimize linking/memory usage. libprocessgroup will no longer be
required in the future (however removing references to it will come
separately).

Bug: 135145426
Test: boot

Test:
BEFORE:
$ adb shell showmap -a $(pid hwservicemanager) | grep -P "libprocessgroup|libcutils" -A1 | grep -P 'libprocessgroup|libcutils|\.bss' | awk '{s += $9}END{print s}'
28

AFTER:
$ adb shell showmap -a $(pid hwservicemanager) | grep -P "libprocessgroup|libcutils" -A1 | grep -P 'libprocessgroup|libcutils|\.bss' | awk '{s += $9}END{print s}'
12

Change-Id: I10d7c2d2b2b14cbbe0a128b9156d31206419d24c
parent 9b901988
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -169,8 +169,12 @@ cc_library {
                // releases, exclude qtaguid.cpp from the VNDK-SP variant.
                "qtaguid.cpp",
            ],
        }
        },
    },

    defaults: [
        "libprocessgroup_impl_provider",
    ],

    shared_libs: [
        "liblog",
@@ -180,11 +184,9 @@ cc_library {
        "libbase_headers",
        "libcutils_headers",
        "libutils_headers",
        "libprocessgroup_headers",
    ],
    export_header_lib_headers: [
        "libcutils_headers",
        "libprocessgroup_headers",
    ],
    local_include_dirs: ["include"],

+41 −12
Original line number Diff line number Diff line
@@ -14,13 +14,8 @@ cc_library_headers {
    },
}

// TODO: remove all usages
cc_library {
    srcs: [
        "cgroup_map.cpp",
        "processgroup.cpp",
        "sched_policy.cpp",
        "task_profiles.cpp",
    ],
    name: "libprocessgroup",
    host_supported: true,
    recovery_available: true,
@@ -29,6 +24,12 @@ cc_library {
        enabled: true,
        support_system_process: true,
    },
}

cc_defaults {
    name: "libprocessgroup_impl_libs",
    target: {
        linux: {
            shared_libs: [
                "libbase",
                "libcgrouprc",
@@ -36,6 +37,34 @@ cc_library {
            static_libs: [
                "libjsoncpp",
            ],
        },
    },
}

cc_defaults {
    name: "libprocessgroup_impl_provider",
    defaults: ["libprocessgroup_impl_libs"],
    target: {
        linux: {
            whole_static_libs: [
                "libprocessgroup_impl",
            ],
        },
    },
}

cc_library {
    name: "libprocessgroup_impl",
    defaults: ["libprocessgroup_impl_libs"],
    srcs: [
        "cgroup_map.cpp",
        "processgroup.cpp",
        "sched_policy.cpp",
        "task_profiles.cpp",
    ],
    host_supported: true,
    recovery_available: true,
    vendor_available: true,
    // for cutils/android_filesystem_config.h
    header_libs: [
        "libcutils_headers",
+1 −1
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ cc_defaults {
    ],
    shared_libs: [
        "libbase",
        "libcutils",
        "libpcrecpp",
        "libprocessgroup",
    ],
    static_libs: ["liblog"],
    logtags: ["event.logtags"],