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

Commit 762a8b30 authored by Zim's avatar Zim
Browse files

Unify binder txn trace name

To match cpp aidl trace name for easier perfetto parsing

Test: Manual
Bug: 161393989
Change-Id: I21d788c8de27327bd3f64da2e8cf14e6fcf9d073
parent ce1c0862
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -911,11 +911,15 @@ public class Binder implements IBinder {
            final String transactionName = getTransactionName(transactionCode);
            final StringBuffer buf = new StringBuffer();

            // Keep trace name consistent with cpp trace name in:
            // system/tools/aidl/generate_cpp.cpp
            buf.append("AIDL::java::");
            if (transactionName != null) {
                buf.append(mSimpleDescriptor).append(":").append(transactionName);
                buf.append(mSimpleDescriptor).append("::").append(transactionName);
            } else {
                buf.append(mSimpleDescriptor).append("#").append(transactionCode);
                buf.append(mSimpleDescriptor).append("::#").append(transactionCode);
            }
            buf.append("::server");

            transactionTraceName = buf.toString();
            mTransactionTraceNames.setRelease(index, transactionTraceName);