Run in foreground cpuset.
Change-Id: I4434192eb5c7ab7fc24c6d8dee3d5f997a54544f
Bug: 126724929
diff --git a/heapprofd.rc b/heapprofd.rc
index db4d836..2e69f60 100644
--- a/heapprofd.rc
+++ b/heapprofd.rc
@@ -17,7 +17,9 @@
socket heapprofd stream 0666 root root
user nobody
group nobody readproc
- writepid /dev/cpuset/system-background/tasks
+ # By default, this daemon is idle. When profiling an app, we should unwind
+ # as fast as possible in the interest of the app being profiled.
+ writepid /dev/cpuset/foreground/tasks
onrestart exec_background - nobody shell -- /system/bin/heapprofd --cleanup-after-crash
# DAC_READ_SEARCH is denied by SELinux on user builds because the SELinux
# permission is userdebug_or_eng only.