summaryrefslogtreecommitdiff
path: root/libs/binder/IPCThreadState.cpp
AgeCommit message (Collapse)Author
2012-03-07remove files that moved to frameworks/native Mathias Agopian
Change-Id: I140d291e520097b1148930f736823650e08488f7
2012-03-05Remove obsolete references to sched_policy.h Glenn Kasten
As part of scheduling policy cleanup, remove or isolate all references to the scheduling policy APIs. Change-Id: Ia1ea2fe711a399039f25217309e061267744b856
2012-02-03Multi-user - 1st major checkin Amith Yamasani
Switching activity stacks Cache ContentProvider per user Long-press power to switch users (on phone) Added ServiceMap for separating services by user Launch PendingIntents on the correct user's uid Fix task switching from Recents list AppWidgetService is mostly working. Commands added to pm and am to allow creating and switching profiles. Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
2012-01-09Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/157519 Bug: 5449033 Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
2012-01-04Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
2011-12-01am f1a4c48b: am e21dabf6: Merge "Initialize bwr.read_buffer in ↵ Ben Cheng
IPCThreadState::talkWithDriver." into ics-mr1 * commit 'f1a4c48b886d53e2afceb0620215e3792af79fd5': Initialize bwr.read_buffer in IPCThreadState::talkWithDriver.
2011-12-01Initialize bwr.read_buffer in IPCThreadState::talkWithDriver. Ben Cheng
I/valgrind( 1309): ==1310== Syscall param ioctl(BINDER_WRITE_READ).read_buffer points to uninitialised byte(s) I/valgrind( 1309): ==1310== at 0x480E670: __ioctl (__ioctl.S:10) I/valgrind( 1309): ==1310== Address 0xbda651b4 is on thread 1's stack Change-Id: I02893df7b5786b6b2dbd9659f5706d7171295ab2
2011-10-25Rename (IF_)LOG() to (IF_)ALOG() DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/#/c/141576 Bug: 5449033 Change-Id: I42575e7c29cf1c0f465c357a5c97ab118df6f473
2011-09-07Resurrect verbose binder logging Andy McFadden
Updated the command name lists, and masked off the additional bits in the command word when doing the name lookup. Made descriptor values easier to grep for and consistent with kernel output (i.e. decimal rather than hex). Attempt to show transaction descriptors as such (they're in a union with a pointer). Also, the writeLines() function in Static was using a no-op logging call to write an iovec. It looks like all callers are using N=1, so I just added a log for the first string. Bug 5155269 Change-Id: I417b8d77da3eb6ee1d2069ba94047210f75738bc
2011-04-21Make sure binder ioctl structs don't contain uninitialized values. Evgeniy Stepanov
Change-Id: I8a678f91262417bb120e65e32c244ce1512b46c2
2010-12-14Framework-side support for Dalvik "isSensitiveThread" hook. Brad Fitzpatrick
Used in lock contention stats. Bug: 3226270 Change-Id: Ie6f58d130a29079a59bdefad40b80304d9bc3623
2010-09-24Some debugging support. Dianne Hackborn
- New feature to "am monitor" to have it automatically launch gdbserv for you when a crash/ANR happens, and tell you how to run the client. - Update dumpstate to match new location of binder debug logs - Various commented out logs that are being used to track down issues. Change-Id: Ia5dd0cd2df983a1fc6be697642a4590aa02a26a5
2010-08-31Don't propagate StrictMode over one-way Binder calls. Brad Fitzpatrick
This was causing stack stitching problems where a one-way call with violations followed by a two-way call without violations was getting the previous one-way call's violation stack stitched on to the second caller's stack. The solution is a little more indirect than I would've liked (preserving the binder's onTransact flags until enforceInterface) but was seemingly necessary to work without changing the AIDL compiler. It should also be sufficiently cheap, since no new calls to thread-local IPCThreadState lookups were required. The additional work is just same-thread getter/setters on the existing IPCThreadState. Change-Id: I4b6db1d445c56e868e6d0d7be3ba6849f4ef23ae
2010-07-15More StrictMode work, keeping Binder & BlockGuard's thread-locals in-sync. Brad Fitzpatrick
Change-Id: Ia67cabcc17a73a0f15907ffea683d06bc41b90e5
2010-06-21Start of work on passing around StrictMode policy over Binder calls. Brad Fitzpatrick
This is (intendend to be) a no-op change. At this stage, Binder RPCs just have an additional uint32 passed around in the header, right before the interface name. But nothing is actually done with them yet. That value should right now always be 0. This now boots and seems to work. Change-Id: I135b7c84f07575e6b9717fef2424d301a450df7b
2010-03-18Ensure that binder incalls to the system process keep the fg cgroup Christopher Tate
On binder incalls, the handler thread is given the caller's priority by the driver, but not the caller's cgroup. We have explicit code that sets the handler's cgroup to match the caller's, *except* that the system process explicitly disables this behavior. This led to a siuation in which we were running binder incalls to the system process at nice=10 but cgroup=fg. That's fine as far as it goes, except that if a GC happened in the handler thread, it would be promoted to foreground priority and cgroup both, to avoid having the GC take forever. Then, when GC finished, the original priority is reset, and the cgroup set *based on that priority*. This would push the handler thread into nice=10 cgroup=bg_non_interactive -- which matches the caller, but is supposed to be impossible in the system process. The end result of this was that we could be running "lengthy" operations in the system process in the background. Unfortunately, some of the operations that wound up like this would hold important global system locks for up to twenty seconds as a result, making the entire device unresponsive to input for that period. This CL fixes the binder incall setup to ensure that within the system process, a binder incall is always begun from the normal foreground priority as well as cgroup. In practice now the device still becomes laggy/sluggish when the offending lock-holding time-consuming incall occurs, but since it still runs as a foreground task it is able to proceed to completion within a short time rather than taking 20 seconds. Fixes bug #2403717 Change-Id: Id046aeabd0e80c48eef94accc37842835eab308d
2009-12-07Propagate background scheduling class across processes. Dianne Hackborn
This is a very simply implementation: upon receiving an IPC, if the handling thread is at a background priority (the driver will have taken care of propagating this from the calling thread), then stick it in to the background scheduling group. Plus an API to turn this off for the process, which is used by the system process. This also pulls some of the code for managing scheduling classes out of the Process JNI wrappers and in to some convenience methods in thread.h.
2009-11-08Reset binder service threads' cgroup/priority after command completion Christopher Tate
To prevent buggy command implementations from poisoning binder threads' scheduling class & priority for future command execution, we now reset the cgroup and thread priority to foreground/normal when a binder service thread finishes executing the designated command. Change-Id: Ibc0ab2485751453f6dc96fdb4eb877fd02796e3f
2009-11-06Revert jparks code from IPCThreadState. Evan Millar
2009-11-04When a thread is about to be put back onto the thread pool ensure that it is ↵ Jason Parks
in the foreground cgroup.
2009-11-03Add a warning when we leave threads in the binder thread pool in the ↵ Jason Parks
background scheduling group.
2009-07-17Instead of using -1 for pid and uid in the simulator, and then having Marco Nelissen
to special-case the simulator case all over the framework, just use getuid and getpid, and intercept those in the simulator wrapper.
2009-05-20move libbinder's header files under includes/binder Mathias Agopian
2009-05-20checkpoint: split libutils into libutils + libbinder Mathias Agopian