Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 273e1442 authored by Iliyan Malchev's avatar Iliyan Malchev
Browse files

IServiceManager: dump stack on blocked vndbinder requests



Dump the stack of the thread requesting a service over /dev/vndbinder,
when the requestor is blocked waiting on the service.  This is very
helpful in identifying bugs in converting code to /dev/vndbinder.

Test: sailfish

Change-Id: Iaaf6a83df3465dd5b64cd83c19d8918cfa01d3d8
Signed-off-by: default avatarIliyan Malchev <malchev@google.com>
parent 32062246
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <binder/Parcel.h>
#include <utils/String8.h>
#include <utils/SystemClock.h>
#include <utils/CallStack.h>

#include <private/binder/Static.h>

@@ -136,7 +137,12 @@ public:
        unsigned n;
        for (n = 0; n < 5; n++){
            if (n > 0) {
                if (!strcmp(ProcessState::self()->getDriverName().c_str(), "/dev/vndbinder")) {
                    ALOGI("Waiting for vendor service %s...", String8(name).string());
                    CallStack stack(LOG_TAG);
                } else {
                    ALOGI("Waiting for service %s...", String8(name).string());
                }
                sleep(1);
            }
            sp<IBinder> svc = checkService(name);