Name of Binder_1 thread

511 views
Skip to first unread message

Durgadoss Ramanathan

unread,
Apr 30, 2013, 11:50:57 AM4/30/13
to android-...@googlegroups.com
Hi,

I am debugging a service under system_server process.

Under /proc/pidof system_server/task/, I see some services like PowerManagerService, that are named as such, but there are few services which are not named and show up as 'Binder_1' 'Binder_4' etc..

Is there a way to figure out the names of these services ?

--
Regards
Durgadoss

Glenn Kasten

unread,
May 1, 2013, 12:36:48 PM5/1/13
to android-...@googlegroups.com
These Binder_# threads are usually not tied to a particular service,
but are part of a pool of worker threads that handle incoming IPC requests within the process.
They are created on an as-needed basis.

Durgadoss Ramanathan

unread,
May 1, 2013, 1:18:06 PM5/1/13
to android-...@googlegroups.com
My understanding was that Binder_# are for services that directly
do 'extends Binder'. Looks like this is not correct.

But, once I did this experiment:

There were Binder_1 to Binder_9 threads inside system server process.
I removed a service that 'extends Binder', by removing ServiceManager.add(..) for that service.
[After rebooting] I observed that now, there were only Binder_1 to Binder_8 threads inside System Server process.

Then, was this observation a mere coincidence ?





--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To post to this group, send email to android-...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Regards
Durgadoss

Christopher Tate

unread,
May 1, 2013, 3:48:53 PM5/1/13
to android-...@googlegroups.com
Yes, that's just coincidence.  Binder_# threads are the pool created to handle incoming Binder invocations; it's not entirely deterministic exactly how many threads wind up in the pool.

Going back to your original question, code running in a Binder_# thread is servicing a Binder method call from a different process.  You need to look at what code it's executing in order to discern which interface it's servicing.

--
christopher tate
android framework engineer

Reply all
Reply to author
Forward
0 new messages