android_system_core/rootdir
Danny Lin 1aea24d503 init.rc: Disable native stats collection service
When opening and closing activities in Settings, a measurably
significant amount of CPU time is spent processing and logging stats
events in statsd:

0.02%     /apex/com.android.os.statsd/lib64/libstatspull.so                                                                                         @plt
0.01%     /apex/com.android.os.statsd/bin/statsd                                                                                                    @plt
0.01%     /apex/com.android.os.statsd/bin/statsd                                                                                                    SocketListener::runListener()
0.01%     /apex/com.android.os.statsd/bin/statsd                                                                                                    android::os::statsd::LogEvent::parseBuffer(unsigned char*, unsigned long)
0.01%     /apex/com.android.os.statsd/bin/statsd                                                                                                    android::os::statsd::LogEvent::parseAnnotations(unsigned char, int)

Over longer device uptimes with real-world usage, statsd uses a
substantial amount of total CPU time. We have no use for the stats
recorded by statsd, so disable the service entirely to save CPU in
potential hotpaths.

This is the system/core part of the change; changes to frameworks/base
are also required.

Test: simpleperf record -a; verify that statsd no longer appears in
      sample hits
Change-Id: Idf6fdb0eff987169bd5f370dd72315e831a669e6
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Signed-off-by: Dmitrii <bankersenator@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>
2025-05-16 23:25:48 +00:00
..
avb Convert *-developer-gsi.avbpubkey to Android.bp 2024-07-17 13:34:46 +08:00
etc linker.config.json: remove libpac.so. 2024-04-02 14:19:15 +00:00
adb_debug.prop Adding adb_debug.prop into debug ramdisk 2019-04-20 06:08:51 +00:00
Android.bp Revert "Define ueventd.rc.recovery" 2024-12-09 02:46:21 +00:00
asan.options Include asan options from data partition. 2017-08-09 15:32:23 -07:00
asan_extract.rc Asan_extract: Use sys.powerctl 2017-04-19 18:32:27 -07:00
asan_extract.sh Asan_extract: Use sys.powerctl 2017-04-19 18:32:27 -07:00
create_root_structure.mk Rename system/core/rootdir/Android.mk to create_root_structure.mk 2024-09-10 06:50:19 +00:00
init-debug.rc Prevent debugfs unmount on debug builds with a persist property 2021-04-16 13:59:15 -07:00
init.boringssl.zygote64.rc Run boringssl tests according to ro.zygote 2023-08-10 17:12:47 +08:00
init.boringssl.zygote64_32.rc Run boringssl tests according to ro.zygote 2023-08-10 17:12:47 +08:00
init.environ.rc.in Refactor init.environ.rc to append than replace 2024-08-02 15:55:39 +09:00
init.no_zygote.rc Reland "Add a core configuration that disables the zygote." 2022-02-15 16:03:35 -08:00
init.rc init.rc: Disable native stats collection service 2025-05-16 23:25:48 +00:00
init.usb.configfs.rc Remove sys.usb.ffs.mtp.ready property 2018-03-22 11:35:20 -07:00
init.usb.rc Clean up userspace-reboot 2024-08-09 15:58:53 +09:00
init.zygote32.rc Update zygote32 rc file to match others 2024-06-06 19:11:27 +00:00
init.zygote64.rc Only restart media.tuner when it's running 2023-09-08 04:19:34 +00:00
init.zygote64_32.rc Resync zygote64 and zygote64_32 rc files. 2022-09-29 17:21:54 -07:00
OWNERS Add new owners to various sub-projects. 2020-12-11 12:45:45 -08:00
ramdisk_node_list ramdisk_node_list: Add urandom node 2023-05-02 09:48:21 +00:00
ueventd.rc Assigns system user/group to /dev/hidraw* devices. 2023-11-15 03:04:07 +00:00