From c32ca90181b9f5732ca27e928bc58ec4e95a5e5e Mon Sep 17 00:00:00 2001 From: Florian Mayer <fmayer@google.com> Date: Mon, 10 Dec 2018 16:20:20 +0000 Subject: [PATCH] Add persist.heapprofd.enable property. This is analoguous to what Perfetto does with persist.traced.enable. Test: m Test: flash walleye Test: setprop persist.heapprofd.enable 1 setprop persist.heapprofd.enable 0 Change-Id: I997272ef8c6fe078aca2388ed0cf2ecc3de612a5 --- private/compat/28.0/28.0.ignore.cil | 1 + private/property_contexts | 1 + public/property.te | 2 ++ public/shell.te | 3 +++ 4 files changed, 7 insertions(+) diff --git a/private/compat/28.0/28.0.ignore.cil b/private/compat/28.0/28.0.ignore.cil index eb58828d1..900c8c27c 100644 --- a/private/compat/28.0/28.0.ignore.cil +++ b/private/compat/28.0/28.0.ignore.cil @@ -39,6 +39,7 @@ hal_system_suspend_default_exec hal_system_suspend_default_tmpfs heapprofd + heapprofd_enabled_prop heapprofd_exec heapprofd_prop heapprofd_socket diff --git a/private/property_contexts b/private/property_contexts index adede99b5..5660d985c 100644 --- a/private/property_contexts +++ b/private/property_contexts @@ -64,6 +64,7 @@ persist.service. u:object_r:system_prop:s0 persist.service.bdroid. u:object_r:bluetooth_prop:s0 persist.security. u:object_r:system_prop:s0 persist.traced.enable u:object_r:traced_enabled_prop:s0 +persist.heapprofd.enable u:object_r:heapprofd_enabled_prop:s0 persist.vendor.overlay. u:object_r:overlay_prop:s0 ro.boot.vendor.overlay. u:object_r:overlay_prop:s0 ro.boottime. u:object_r:boottime_prop:s0 diff --git a/public/property.te b/public/property.te index fcbf36556..6ee568c84 100644 --- a/public/property.te +++ b/public/property.te @@ -38,6 +38,7 @@ type exported_secure_prop, property_type; type ffs_prop, property_type, core_property_type; type fingerprint_prop, property_type, core_property_type; type firstboot_prop, property_type; +type heapprofd_enabled_prop, property_type; type heapprofd_prop, property_type; type hwservicemanager_prop, property_type; type last_boot_reason_prop, property_type; @@ -397,6 +398,7 @@ compatible_property_only(` -device_config_reset_performed_prop -device_config_boot_count_prop -device_config_flags_health_check_prop + -heapprofd_enabled_prop -heapprofd_prop -hwservicemanager_prop -last_boot_reason_prop diff --git a/public/shell.te b/public/shell.te index 26f44f6f4..7201df0ec 100644 --- a/public/shell.te +++ b/public/shell.te @@ -75,6 +75,9 @@ set_prop(shell, traced_enabled_prop) userdebug_or_eng(`set_prop(shell, log_prop)') # logpersist script userdebug_or_eng(`set_prop(shell, logpersistd_logging_prop)') +# Allow shell to start/stop heapprofd via the persist.heapprofd.enable +# property. +set_prop(shell, heapprofd_enabled_prop) userdebug_or_eng(` # "systrace --boot" support - allow boottrace service to run -- GitLab