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
diff --git a/private/compat/28.0/28.0.ignore.cil b/private/compat/28.0/28.0.ignore.cil
index eb58828..900c8c2 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 adede99..5660d98 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -64,6 +64,7 @@
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 fcbf365..6ee568c 100644
--- a/public/property.te
+++ b/public/property.te
@@ -38,6 +38,7 @@
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 @@
-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 26f44f6..7201df0 100644
--- a/public/shell.te
+++ b/public/shell.te
@@ -75,6 +75,9 @@
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