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

Commit 008181eb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "libbinder: add way to debug print stability"

parents 7a129feb 64ae917b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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*/);
}
+3 −0
Original line number Diff line number Diff line
@@ -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.