All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Arve Hjønnevåg" <arve@android.com>
To: gregkh@linuxfoundation.org
Cc: xiaobing.tu@intel.com, ccross@android.com, davej@redhat.com,
	akpm@linux-foundation.org, mingo@elte.hu, rusty@rustcorp.com.au,
	a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org,
	rostedt@goodmis.org, di.zhang@intel.com, xindong.ma@intel.com,
	alex.zuo@intel.com, "Arve Hjønnevåg" <arve@android.com>
Subject: [PATCH 1/4] Staging: android: binder: Add some missing binder_stat_br calls
Date: Tue, 16 Oct 2012 15:29:52 -0700	[thread overview]
Message-ID: <1350426595-18059-1-git-send-email-arve@android.com> (raw)
In-Reply-To: <20121016071101.GA5172@kroah.com>

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>
---
 drivers/staging/android/binder.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 7b0ba92..9e852d0 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -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;
 }
-- 
1.7.7.3


  reply	other threads:[~2012-10-16 22:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15  7:03 Fix memory leak in binder Tu, Xiaobing
2012-10-15  7:20 ` Fix memory leak in binder--version2 Tu, Xiaobing
2012-10-15 22:52   ` Greg KH
2012-10-15 23:55     ` Arve Hjønnevåg
2012-10-15 23:58       ` Greg KH
2012-10-16  0:32         ` [PATCH 1/2] Staging: android: binder: Fix memory leak on thread/process exit Arve Hjønnevåg
2012-10-16  0:32           ` [PATCH 2/2] Staging: android: binder: Allow using highmem for binder buffers Arve Hjønnevåg
2012-10-16  7:12             ` Greg KH
2012-10-16  7:11           ` [PATCH 1/2] Staging: android: binder: Fix memory leak on thread/process exit Greg KH
2012-10-16 22:45             ` Arve Hjønnevåg
2012-10-22 20:00               ` Greg KH
2012-10-23  0:58                 ` Arve Hjønnevåg
2012-10-23  3:12                   ` Greg KH
2012-10-16  0:39         ` Fix memory leak in binder--version2 Arve Hjønnevåg
2012-10-16  7:11           ` Greg KH
2012-10-16 22:29             ` Arve Hjønnevåg [this message]
2012-10-16 22:29               ` [PATCH 2/4] Staging: android: binder: Add some tracepoints Arve Hjønnevåg
2012-10-16 22:29               ` [PATCH 3/4] Staging: android: binder: Fix memory leak on thread/process exit Arve Hjønnevåg
2012-10-16 22:29               ` [PATCH 4/4] Staging: android: binder: Allow using highmem for binder buffers Arve Hjønnevåg
2012-10-16 22:33             ` Fix memory leak in binder--version2 Arve Hjønnevåg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350426595-18059-1-git-send-email-arve@android.com \
    --to=arve@android.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=alex.zuo@intel.com \
    --cc=ccross@android.com \
    --cc=davej@redhat.com \
    --cc=di.zhang@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    --cc=xiaobing.tu@intel.com \
    --cc=xindong.ma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.