Commit 89334ab4 authored by Arve Hjønnevåg's avatar Arve Hjønnevåg Committed by Greg Kroah-Hartman

Staging: android: binder: Add some missing binder_stat_br calls

Cached thread return errors, death notifications and new looper
requests were not included in the stats.
Signed-off-by: default avatarArve Hjønnevåg <arve@android.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 509f3f78
...@@ -2135,6 +2135,7 @@ static int binder_thread_read(struct binder_proc *proc, ...@@ -2135,6 +2135,7 @@ static int binder_thread_read(struct binder_proc *proc,
if (put_user(thread->return_error2, (uint32_t __user *)ptr)) if (put_user(thread->return_error2, (uint32_t __user *)ptr))
return -EFAULT; return -EFAULT;
ptr += sizeof(uint32_t); ptr += sizeof(uint32_t);
binder_stat_br(proc, thread, thread->return_error2);
if (ptr == end) if (ptr == end)
goto done; goto done;
thread->return_error2 = BR_OK; thread->return_error2 = BR_OK;
...@@ -2142,6 +2143,7 @@ static int binder_thread_read(struct binder_proc *proc, ...@@ -2142,6 +2143,7 @@ static int binder_thread_read(struct binder_proc *proc,
if (put_user(thread->return_error, (uint32_t __user *)ptr)) if (put_user(thread->return_error, (uint32_t __user *)ptr))
return -EFAULT; return -EFAULT;
ptr += sizeof(uint32_t); ptr += sizeof(uint32_t);
binder_stat_br(proc, thread, thread->return_error);
thread->return_error = BR_OK; thread->return_error = BR_OK;
goto done; goto done;
} }
...@@ -2297,6 +2299,7 @@ static int binder_thread_read(struct binder_proc *proc, ...@@ -2297,6 +2299,7 @@ static int binder_thread_read(struct binder_proc *proc,
if (put_user(death->cookie, (void * __user *)ptr)) if (put_user(death->cookie, (void * __user *)ptr))
return -EFAULT; return -EFAULT;
ptr += sizeof(void *); ptr += sizeof(void *);
binder_stat_br(proc, thread, cmd);
binder_debug(BINDER_DEBUG_DEATH_NOTIFICATION, binder_debug(BINDER_DEBUG_DEATH_NOTIFICATION,
"binder: %d:%d %s %p\n", "binder: %d:%d %s %p\n",
proc->pid, thread->pid, proc->pid, thread->pid,
...@@ -2404,6 +2407,7 @@ static int binder_thread_read(struct binder_proc *proc, ...@@ -2404,6 +2407,7 @@ static int binder_thread_read(struct binder_proc *proc,
proc->pid, thread->pid); proc->pid, thread->pid);
if (put_user(BR_SPAWN_LOOPER, (uint32_t __user *)buffer)) if (put_user(BR_SPAWN_LOOPER, (uint32_t __user *)buffer))
return -EFAULT; return -EFAULT;
binder_stat_br(proc, thread, BR_SPAWN_LOOPER);
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment