Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Signed-off-by: Dmitrii <[email protected]> Signed-off-by: Joey Huab <[email protected]> Former-commit-id: 713d3c615df1f9da06074841a3a1eeeb73117bf8 Former-commit-id: facceb44f5357b2bcf480b678c100e6f6c96eb9e Signed-off-by: Pranav Vashi <[email protected]> Signed-off-by: Anushek Prasal <[email protected]>
- Loading branch information