summaryrefslogtreecommitdiff
path: root/drivers/android/binder_internal.h
diff options
context:
space:
mode:
authorHridya Valsaraju <hridya@google.com>2019-09-03 19:16:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-04 14:31:18 +0300
commit0e13e452dafc009049a9a5a4153e2f9e51b23915 (patch)
tree75d8f6c3f8a2de8fa55a50f7e3e64533fdd672f1 /drivers/android/binder_internal.h
parentf00834518ed3194b866f5f3d63b71e0ed7f6bc00 (diff)
downloadlinux-0e13e452dafc009049a9a5a4153e2f9e51b23915.tar.xz
binder: Add stats, state and transactions files
The following binder stat files currently live in debugfs. /sys/kernel/debug/binder/state /sys/kernel/debug/binder/stats /sys/kernel/debug/binder/transactions This patch makes these files available in a binderfs instance mounted with the mount option 'stats=global'. For example, if a binderfs instance is mounted at path /dev/binderfs, the above files will be available at the following locations: /dev/binderfs/binder_logs/state /dev/binderfs/binder_logs/stats /dev/binderfs/binder_logs/transactions This provides a way to access them even when debugfs is not mounted. Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Hridya Valsaraju <hridya@google.com> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Link: https://lore.kernel.org/r/20190903161655.107408-3-hridya@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android/binder_internal.h')
-rw-r--r--drivers/android/binder_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/android/binder_internal.h b/drivers/android/binder_internal.h
index fe8c745dc8e0..12ef96f256c6 100644
--- a/drivers/android/binder_internal.h
+++ b/drivers/android/binder_internal.h
@@ -57,4 +57,12 @@ static inline int __init init_binderfs(void)
}
#endif
+int binder_stats_show(struct seq_file *m, void *unused);
+DEFINE_SHOW_ATTRIBUTE(binder_stats);
+
+int binder_state_show(struct seq_file *m, void *unused);
+DEFINE_SHOW_ATTRIBUTE(binder_state);
+
+int binder_transactions_show(struct seq_file *m, void *unused);
+DEFINE_SHOW_ATTRIBUTE(binder_transactions);
#endif /* _LINUX_BINDER_INTERNAL_H */