libbinder: add way to debug print stability

Bug: 136027762
Test: manual
Change-Id: Id390f0459fd162a20bbd64870fc568a87f422f15
diff --git a/libs/binder/Stability.cpp b/libs/binder/Stability.cpp
index 0bcce5b..0a10a1d 100644
--- a/libs/binder/Stability.cpp
+++ b/libs/binder/Stability.cpp
@@ -28,6 +28,10 @@
     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*/);
 }