Discussion:
[PATCH 3/3] binder: filter out nodes when showing binder procs
Todd Kjos
2018-12-05 23:19:26 UTC
Permalink
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 <***@google.com>
---
v2: no change, just resubmitted as #3 of 3 patches instead of by itself
There is no actual dependancy on patches 1 and 2 of the series

drivers/android/binder.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 172c207fbf99d..cbaef3b0d3078 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -5440,6 +5440,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
--
2.20.0.rc1.387.gf8505762e3-goog
Todd Kjos
2018-12-05 23:19:25 UTC
Permalink
Fix the incomplete kerneldoc header for struct binder_buffer.

Signed-off-by: Todd Kjos <***@google.com>
---
v2: no code change. Removed needless "Change-Id:"
There is no dependancy on patch 1/3

drivers/android/binder_alloc.h | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/android/binder_alloc.h b/drivers/android/binder_alloc.h
index fb3238c74c8a8..c0aadbbf7f193 100644
--- a/drivers/android/binder_alloc.h
+++ b/drivers/android/binder_alloc.h
@@ -30,16 +30,16 @@ struct binder_transaction;
* struct binder_buffer - buffer used for binder transactions
* @entry: entry alloc->buffers
* @rb_node: node for allocated_buffers/free_buffers rb trees
- * @free: true if buffer is free
- * @allow_user_free: describe the second member of struct blah,
- * @async_transaction: describe the second member of struct blah,
- * @debug_id: describe the second member of struct blah,
- * @transaction: describe the second member of struct blah,
- * @target_node: describe the second member of struct blah,
- * @data_size: describe the second member of struct blah,
- * @offsets_size: describe the second member of struct blah,
- * @extra_buffers_size: describe the second member of struct blah,
- * @data:i describe the second member of struct blah,
+ * @free: %true if buffer is free
+ * @allow_user_free: %true if user is allowed to free buffer
+ * @async_transaction: %true if buffer is in use for an async txn
+ * @debug_id: unique ID for debugging
+ * @transaction: pointer to associated struct binder_transaction
+ * @target_node: struct binder_node associated with this buffer
+ * @data_size: size of @transaction data
+ * @offsets_size: size of array of offsets
+ * @extra_buffers_size: size of space for other objects (like sg lists)
+ * @data: pointer to base of buffer space
*
* Bookkeeping structure for binder transaction buffers
*/
--
2.20.0.rc1.387.gf8505762e3-goog
Greg KH
2018-12-06 14:44:08 UTC
Permalink
Add __acquire()/__release() annnotations to fix warnings
in sparse context checking
There is one case where the warning was due to a lack of
a "default:" case in a switch statement where a lock was
being released in each of the cases, so the default
case was added.
---
v2: no change, just resubmitted as #1 of 3 patches instead of by itself
I've already applied this one, right?

thanks,

greg k-h
Todd Kjos
2018-12-06 16:37:41 UTC
Permalink
Post by Greg KH
Add __acquire()/__release() annnotations to fix warnings
in sparse context checking
There is one case where the warning was due to a lack of
a "default:" case in a switch statement where a lock was
being released in each of the cases, so the default
case was added.
---
v2: no change, just resubmitted as #1 of 3 patches instead of by itself
I've already applied this one, right?
No, not yet. I confused you by failing to add the "v2" in the subject
for the other two submitted with it that you applied this morning:

binder: filter out nodes when showing binder procs
binder: fix kerneldoc header for struct binder_buffer

Sorry about the confusion. This one still needs to be applied.

-Todd
Post by Greg KH
thanks,
greg k-h
Greg Kroah-Hartman
2018-12-07 07:08:28 UTC
Permalink
Post by Todd Kjos
Post by Greg KH
Add __acquire()/__release() annnotations to fix warnings
in sparse context checking
There is one case where the warning was due to a lack of
a "default:" case in a switch statement where a lock was
being released in each of the cases, so the default
case was added.
---
v2: no change, just resubmitted as #1 of 3 patches instead of by itself
I've already applied this one, right?
No, not yet. I confused you by failing to add the "v2" in the subject
binder: filter out nodes when showing binder procs
binder: fix kerneldoc header for struct binder_buffer
Sorry about the confusion. This one still needs to be applied.
But I thought I applied this back on November 26:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?h=char-misc-testing&id=324fa64cf4189094bc4df744a9e7214a1b81d845

You should have gotten an email from my scripts at that time.

or is this somehow a different patch with the same commit log?
Or a v2 that changed from the one that I had applied? Do I need to
revert this one and apply your new one?

confused,

greg k-h

Loading...