I am just after a quick clarification from someone who has more of an idea than I. I am currently tracing binder transactions in the Android Kernel and comparing them to the binder logs as a sanity check. The logs show an entry such as
2122.135601 1959009: call from 3081:7263 to 3075:0 node 69606 handle 10 size 84:0
(please note I have modified the binder log print to show sched_clock()
)
Now from the binder log print function
seq_printf(m,
| "%5llu.%06lu %d: %s from %d:%d to %d:%d node %d handle %d size %d:%d\n",
| t, usec_rem,
| e->debug_id, (e->call_type == 2) ? "reply" :
| ((e->call_type == 1) ? "async" : "call "), e->from_proc,
| e->from_thread, e->to_proc, e->to_thread, e->to_node,
| e->target_handle, e->data_size, e->offsets_size);
I can see that the print form of "X:Y to A:B" (in the middle of the statement) shows the from proc & thread and the to proc & thread. So after all that my question is quite simple. When the to proc & thread are something like 1234:0 does this mean that the thread (having an ID of 0) is representing that this is the original process that all other threads (for example 1234:5678) of the target program are forked from? I have not been able to find concrete literature on this (I may just be blind). I believe this may have something to do with the binder threads that are associated with a process. Documentation is extremely sparse.
Cheers