Alternatives to /sys/kernel/debug/wakeup_sources
From: Tri Vo <hidden>
Date: 2019-06-05 00:24:10
From: Tri Vo <hidden>
Date: 2019-06-05 00:24:10
Hello Rafael, Currently, Android reads wakeup sources statistics from /sys/kernel/debug/wakeup_sources in production environment. This information is used, for example, to report which wake lock prevents the device from suspending. Android userspace reading wakeup_sources is not ideal because: - Debugfs API is not stable, i.e. Android tools built on top of it are not guaranteed to be backward/forward compatible. - This file requires debugfs to be mounted, which itself is undesirable for security reasons. To address these problems, we want to contribute a way to expose these statistics that doesn't depend on debugfs. Some initial thoughts/questions: Should we expose the stats in sysfs? Or maybe implement eBPF-based solution? What do you think? Thanks, Tri