Staging: android: binder: Add some missing binder_stat_br calls
authorArve Hjønnevåg <arve@android.com>
Tue, 16 Oct 2012 22:29:52 +0000 (15:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 20:04:29 +0000 (13:04 -0700)
Cached thread return errors, death notifications and new looper
requests were not included in the stats.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/binder.c

index 7b0ba92e7e46730d1d5c72137c9f1b2b9ddc3201..9e852d0bef3bf477c49256765b8b8d76df825d51 100644 (file)
@@ -2135,6 +2135,7 @@ retry:
                        if (put_user(thread->return_error2, (uint32_t __user *)ptr))
                                return -EFAULT;
                        ptr += sizeof(uint32_t);
+                       binder_stat_br(proc, thread, thread->return_error2);
                        if (ptr == end)
                                goto done;
                        thread->return_error2 = BR_OK;
@@ -2142,6 +2143,7 @@ retry:
                if (put_user(thread->return_error, (uint32_t __user *)ptr))
                        return -EFAULT;
                ptr += sizeof(uint32_t);
+               binder_stat_br(proc, thread, thread->return_error);
                thread->return_error = BR_OK;
                goto done;
        }
@@ -2297,6 +2299,7 @@ retry:
                        if (put_user(death->cookie, (void * __user *)ptr))
                                return -EFAULT;
                        ptr += sizeof(void *);
+                       binder_stat_br(proc, thread, cmd);
                        binder_debug(BINDER_DEBUG_DEATH_NOTIFICATION,
                                     "binder: %d:%d %s %p\n",
                                      proc->pid, thread->pid,
@@ -2404,6 +2407,7 @@ done:
                             proc->pid, thread->pid);
                if (put_user(BR_SPAWN_LOOPER, (uint32_t __user *)buffer))
                        return -EFAULT;
+               binder_stat_br(proc, thread, BR_SPAWN_LOOPER);
        }
        return 0;
 }
This page took 0.028787 seconds and 5 git commands to generate.