OSDN Git Service

UPSTREAM: binder: filter out nodes when showing binder procs
authorTodd Kjos <tkjos@android.com>
Wed, 5 Dec 2018 23:19:26 +0000 (15:19 -0800)
committerAlistair Strachan <astrachan@google.com>
Tue, 5 Feb 2019 18:10:16 +0000 (18:10 +0000)
When dumping out binder transactions via a debug node,
the output is too verbose if a process has many nodes.
Change the output for transaction dumps to only display
nodes with pending async transactions.

Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ecd589d8f5661dd3a9545079a29b678cd9e3ecf3)
Bug: 112037142
Change-Id: Iaa76ebdc844037ce1ee3bf2e590676790a959cef

drivers/android/binder.c

index f1599c1..bd9e285 100644 (file)
@@ -5472,6 +5472,9 @@ static void print_binder_proc(struct seq_file *m,
        for (n = rb_first(&proc->nodes); n != NULL; n = rb_next(n)) {
                struct binder_node *node = rb_entry(n, struct binder_node,
                                                    rb_node);
+               if (!print_all && !node->has_async_transaction)
+                       continue;
+
                /*
                 * take a temporary reference on the node so it
                 * survives and isn't removed from the tree