diff options
-rw-r--r-- | libs/binder/Stability.cpp | 4 | ||||
-rw-r--r-- | libs/binder/include/binder/Stability.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libs/binder/Stability.cpp b/libs/binder/Stability.cpp index 0bcce5bf94..0a10a1d354 100644 --- a/libs/binder/Stability.cpp +++ b/libs/binder/Stability.cpp @@ -28,6 +28,10 @@ void Stability::markVintf(IBinder* binder) { LOG_ALWAYS_FATAL_IF(result != OK, "Should only mark known object."); } +void Stability::debugLogStability(const std::string& tag, const sp<IBinder>& binder) { + ALOGE("%s: stability is %s", tag.c_str(), stabilityString(get(binder.get())).c_str()); +} + void Stability::tryMarkCompilationUnit(IBinder* binder) { (void) set(binder, kLocalStability, false /*log*/); } diff --git a/libs/binder/include/binder/Stability.h b/libs/binder/include/binder/Stability.h index 148def60d3..9d98c7f911 100644 --- a/libs/binder/include/binder/Stability.h +++ b/libs/binder/include/binder/Stability.h @@ -40,6 +40,9 @@ public: // expressed here is guaranteed to be stable for multiple years (Stable AIDL) static void markVintf(IBinder* binder); + // WARNING: for debugging only + static void debugLogStability(const std::string& tag, const sp<IBinder>& binder); + private: // Parcel needs to store stability level since this is more efficient than storing and looking // up the efficiency level of a binder object. So, we expose the underlying type. |