Loading include/binder/IPCThreadState.h +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ class IPCThreadState { public: static IPCThreadState* self(); static IPCThreadState* selfOrNull(); // self(), but won't instantiate sp<ProcessState> process(); Loading include/surfaceflinger/Surface.h +1 −1 Original line number Diff line number Diff line Loading @@ -249,7 +249,7 @@ private: uint32_t *pWidth, uint32_t *pHeight, uint32_t *pFormat, uint32_t *pUsage) const; static void cleanCachedSurfaces(); static void cleanCachedSurfacesLocked(); class BufferInfo { uint32_t mWidth; Loading include/utils/CallStack.h +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public: void clear(); void update(int32_t ignoreDepth=0, int32_t maxDepth=MAX_DEPTH); void update(int32_t ignoreDepth=1, int32_t maxDepth=MAX_DEPTH); // Dump a stack trace to the log void dump(const char* prefix = 0) const; Loading libs/binder/IPCThreadState.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -318,6 +318,16 @@ restart: goto restart; } IPCThreadState* IPCThreadState::selfOrNull() { if (gHaveTLS) { const pthread_key_t k = gTLS; IPCThreadState* st = (IPCThreadState*)pthread_getspecific(k); return st; } return NULL; } void IPCThreadState::shutdown() { gShutdown = true; Loading libs/surfaceflinger_client/Surface.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -384,7 +384,7 @@ status_t Surface::writeToParcel( Mutex Surface::sCachedSurfacesLock; DefaultKeyedVector<wp<IBinder>, wp<Surface> > Surface::sCachedSurfaces(wp<Surface>(0)); DefaultKeyedVector<wp<IBinder>, wp<Surface> > Surface::sCachedSurfaces; sp<Surface> Surface::readFromParcel(const Parcel& data) { Mutex::Autolock _l(sCachedSurfacesLock); Loading @@ -397,13 +397,13 @@ sp<Surface> Surface::readFromParcel(const Parcel& data) { if (surface->mSurface == 0) { surface = 0; } cleanCachedSurfaces(); cleanCachedSurfacesLocked(); return surface; } // Remove the stale entries from the surface cache. This should only be called // with sCachedSurfacesLock held. void Surface::cleanCachedSurfaces() { void Surface::cleanCachedSurfacesLocked() { for (int i = sCachedSurfaces.size()-1; i >= 0; --i) { wp<Surface> s(sCachedSurfaces.valueAt(i)); if (s == 0 || s.promote() == 0) { Loading Loading @@ -489,6 +489,9 @@ status_t Surface::validate() const LOGE("[Surface] using an invalid surface, " "identity=%u should be %d", mIdentity, identity); CallStack stack; stack.update(); stack.dump("Surface"); return NO_INIT; } Loading @@ -497,6 +500,9 @@ status_t Surface::validate() const if (err != NO_ERROR) { LOGE("surface (identity=%u) is invalid, err=%d (%s)", mIdentity, err, strerror(-err)); CallStack stack; stack.update(); stack.dump("Surface"); return err; } Loading Loading
include/binder/IPCThreadState.h +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ class IPCThreadState { public: static IPCThreadState* self(); static IPCThreadState* selfOrNull(); // self(), but won't instantiate sp<ProcessState> process(); Loading
include/surfaceflinger/Surface.h +1 −1 Original line number Diff line number Diff line Loading @@ -249,7 +249,7 @@ private: uint32_t *pWidth, uint32_t *pHeight, uint32_t *pFormat, uint32_t *pUsage) const; static void cleanCachedSurfaces(); static void cleanCachedSurfacesLocked(); class BufferInfo { uint32_t mWidth; Loading
include/utils/CallStack.h +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public: void clear(); void update(int32_t ignoreDepth=0, int32_t maxDepth=MAX_DEPTH); void update(int32_t ignoreDepth=1, int32_t maxDepth=MAX_DEPTH); // Dump a stack trace to the log void dump(const char* prefix = 0) const; Loading
libs/binder/IPCThreadState.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -318,6 +318,16 @@ restart: goto restart; } IPCThreadState* IPCThreadState::selfOrNull() { if (gHaveTLS) { const pthread_key_t k = gTLS; IPCThreadState* st = (IPCThreadState*)pthread_getspecific(k); return st; } return NULL; } void IPCThreadState::shutdown() { gShutdown = true; Loading
libs/surfaceflinger_client/Surface.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -384,7 +384,7 @@ status_t Surface::writeToParcel( Mutex Surface::sCachedSurfacesLock; DefaultKeyedVector<wp<IBinder>, wp<Surface> > Surface::sCachedSurfaces(wp<Surface>(0)); DefaultKeyedVector<wp<IBinder>, wp<Surface> > Surface::sCachedSurfaces; sp<Surface> Surface::readFromParcel(const Parcel& data) { Mutex::Autolock _l(sCachedSurfacesLock); Loading @@ -397,13 +397,13 @@ sp<Surface> Surface::readFromParcel(const Parcel& data) { if (surface->mSurface == 0) { surface = 0; } cleanCachedSurfaces(); cleanCachedSurfacesLocked(); return surface; } // Remove the stale entries from the surface cache. This should only be called // with sCachedSurfacesLock held. void Surface::cleanCachedSurfaces() { void Surface::cleanCachedSurfacesLocked() { for (int i = sCachedSurfaces.size()-1; i >= 0; --i) { wp<Surface> s(sCachedSurfaces.valueAt(i)); if (s == 0 || s.promote() == 0) { Loading Loading @@ -489,6 +489,9 @@ status_t Surface::validate() const LOGE("[Surface] using an invalid surface, " "identity=%u should be %d", mIdentity, identity); CallStack stack; stack.update(); stack.dump("Surface"); return NO_INIT; } Loading @@ -497,6 +500,9 @@ status_t Surface::validate() const if (err != NO_ERROR) { LOGE("surface (identity=%u) is invalid, err=%d (%s)", mIdentity, err, strerror(-err)); CallStack stack; stack.update(); stack.dump("Surface"); return err; } Loading